second order ode45-where to put boundary and initial condition?
2 次查看(过去 30 天)
显示 更早的评论
I am solving this equation with ode45 method, p0 is already known:
4B*d^2u/dr^2+(4B/r)*du/dr=dp0/dz
and I have two conditions,
initial condition: r=0: du/dr=0;
boundary condition where r=1: u=0.
Where to put these conditions, because I can put initial condition in ode45 solver, but where to put boundary condition in this case?
0 个评论
回答(1 个)
Torsten
2018-5-8
u(r) = -1/(16*B)*dp0/dz*(1-r^2)
If the analytical solution is not what you want, use "bvp4c" instead of "ode45".
Best wishes
Torsten.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!