MATLAB Answers

Solve ODE for variable domain

조회 수: 1(최근 30일)
Hi all
is it possible to solve the same ODE system for 3 adiacent different domain? Do i need something like that?
if x>x1&&x<=x2
.
.
.
elseif x>=x2&&x<x3
.
.
.
elseif x>x3
.
.
.
end
how continuity will be preserved?
Thank you for the help
Regards
  댓글 수: 5
EldaEbrithil
EldaEbrithil 3 Sep 2020
as you can see the central part is a conical section

댓글을 달려면 로그인하십시오.

채택된 답변

Alan Stevens
Alan Stevens 3 Sep 2020
So you would then call your ode with something like:
[x,Y] = ode45(@nozzlesinglebobb, xspan, Y0,[],xstartconica,xfineconica,Ralfa_end,Rbeta_end,alfa_end_rad,beta_end_rad,xc_end,yc_end,Lnozzle_end,raggio_end,f1,f2,f3);
where xspan = [0 x_final] and Y0 = [Pt0; M0] or similar.
Then
Pt = Y(:,1);
M = Y(:,2);
  댓글 수: 2
Alan Stevens
Alan Stevens 3 Sep 2020
Does it work? If it does, great! If not, try the syntax I used

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by