Non-linear differential dquation
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I am trying to solve the non-linear differential equation which has form:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170431/image.png)
What I'm thinking is using pdepe, but as the equation is quite complicated to me, I really don't know how to solve it.
Could anyone please help me solving this problem?
I would appreciate any kind of you help.
Thank you.
0 个评论
采纳的回答
Precise Simulation
2017-11-30
As per your previous question https://www.mathworks.com/matlabcentral/answers/368440-how-to-solve-fick-s-2nd-law-of-diffusion-equation
% Set up 1D domain from 0..3 with 20 elements.
fea.sdim = { 'x' };
fea.grid = linegrid( 20, 0, 3 );
% Add covection and diffusion physics mode.
fea = addphys( fea, @convectiondiffusion, {'u'} );
% Define diffusion coefficient.
fea.phys.cd.eqn.coef{2,end} = {'d_coef'};
fea.expr = { 'd_coef', {'0.00296*(1+49*u)^2/((1+49*u)^2+0.00164)'} };
% Use u = 0 on left boundary (x=0), and insulation
% flux boundary du/dx=0 conditions on the right (x=3).
fea.phys.cd.bdr.sel = [ 1 3 ];
fea.phys.cd.bdr.coef{1,end}{1} = 0;
% Check, parse, and solve problem
% with initial condition 'u=0.01'.
fea = parsephys( fea );
fea = parseprob( fea );
[fea.sol.u,tlist] = ...
solvetime( fea, 'tstep', 10, 'tmax', 100, 'init', {'0.01'} );
% Alternatively, solvestat can be used for stationary problems.
% Postprocessing.
isol = length(tlist);
postplot( fea, 'surfexpr', 'u', 'solnum', 1 )
hold on
postplot( fea, 'surfexpr', 'u', 'solnum', floor(isol/2) )
postplot( fea, 'surfexpr', 'u', 'solnum', isol )
axis normal
grid on
title( ['Solution at times, t = ',num2str(tlist([1 floor(isol/2) isol]))] )
ylabel( 'Concentration, u' )
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PDE Solvers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!