Info
此问题已关闭。 请重新打开它进行编辑或回答。
NON LINEAR PDE ERROR IN SIMULINK
1 次查看(过去 30 天)
显示 更早的评论
I TRY TO SIMULATE A NON-LINEAR MODEL IN SIMULINK WITH MATLAB FUNCTION, insert my equations but I got a zero result when including my discretization, why is it?
BLOQUE01
function D = fcn(theta)
L=10; %comprimento
z=linspace(0,L,5); % espaco de discretizacao
theta_r = 0.218; % conteudo de agua residual
alpha= 0.0115; %parametro de Van Genuchten 1/cm (Van Genuchten, 1980)
K_s = 31.6; % conductividade de saturacao cm/t
theta_s=0.52; %conteudo de agua saturado
n = 2.03;
m=1-(1/n);
i=2:length(z);
D =(K_s*(1-m)/(alpha*m*(theta_s-theta_r)))*(theta(i-1).^(0.5-(1/m))./(1-(theta(i-1).^(1/m)))).*((1-(1-(theta(i-1).^(1/m))).^m).^2);
bloque 02
function K = fcn(theta)
L=10; %comprimento
z=linspace(0,L,5); % espaco de discretizacao
theta_r = 0.218; % conteudo de agua residual
alpha= 0.0115; %parametro de Van Genuchten 1/cm (Van Genuchten, 1980)
K_s = 31.6; % conductividade de saturacao cm/t
theta_s=0.52; %conteudo de agua saturado
%dz=L/length(z);
%b=1/(2*dz);
n = 2.03;
m=1-(1/n);
i=2:length(z);
K = K_s*(theta(i-1).^(1/2)).*(( 1-(1-(theta(i-1).^(1/m))).^m).^2);
bloque 03
function dot_theta = Richards(theta,D,K)
L=10; %comprimento
z=linspace(0,L,5); % espaco de discretizacao
dz=L/length(z);
b=1/(2*dz^2);
i=2:length(z),
k=i-1,
j=i-2,
dot_theta=b*(D(j+1)+D(k)).*(theta(j+1)-theta(k))- b*(D(i-1)+D(k)).*(theta(k)-theta(i-1))+((K(k)-K(i-1))/dz);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/327569/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/327572/image.png)
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!