Hi all
is it possible to solve an ODE system with these characteristics? The problem can be summerized in this way, calling:
Domain=D (integration domain it is a certain set of row vectors. Fo example 0:0.1:1; 0:0.1:2; 0:0.1:5 etc.)
Parameter=P (inside one of the ode equations, it is a column vector; its length is equal to Domain number of set: in D1=> P=2, in D2=> P=4 etc.)
Bc=B (column vectors that rapresent boundary conditions) B=B1,B2,...Bn
at the first step i want to solve the ode system for D1 and P1 with B1. At the second step D2, P2 and B1 and so on...after having completed these steps i want to solve for D1,P1 with B2 etc..
Below there is my code
xRange is the Domain
Tt0,Pt0 and M01 are the IC (collected in Y0). Ch is the variable parameter. The unknowns are Pt, Tt and M
L=0.2:0.1:0.4;
Nc=0.00001;
xRange=[0:Nc:L];
P0=2.200000000000000e+05;
T0=300;
M01=0.0001:0.00001:0.5;
for i=1:length(M01)
Tt0(i)=T0*(1+((gamma-1)/2)*M01(i)^2);
Pt0(i)=P0*(1+((gamma-1)/2)*M01(i)^2)^(gamma/(gamma-1));
end
Y0=[Tt0;Pt0;M01];
[xSol,YSol]=ode23(@chambsinglebobb,xRange,Y0);
function dYdx=tubosinglebobb(x,Y)
gamma=1.667;
hradialchamber=3.5;
Hradialchamber=hradialchamber/1000;
Dexttantalum=0.001500000000000;
Aeffettiva=(Dexttantalum*(Hradialchamber))-(pi*(Dexttantalum^2)/4);
Perimetro=(Dexttantalum+Hradialchamber+2*pi*(Dexttantalum/2));
Tw=803;
fLc=0.006816427132907;
Tt=Y(1);
Pt=Y(2);
M=Y(3);
Ch=[0.0104838041220848,0.00821863791965557,0.00729962973207637];
dTtdx=Ch*(Tt-Tw)*(Perimetro/Aeffettiva);
dPtdx=Pt*((-gamma*((M^2)/2)*fLc*(Perimetro/Aeffettiva))-...
(gamma*((M^2)/2)*dTtdx*(1/Tt)));
dMdx=M*(((1+((gamma-1)/2)*M^2)/(1-M^2))*((gamma*M^2*fLc*...
Perimetro)/(2*Aeffettiva))+...
(0.5*((gamma*M^2)+1)/(1-M^2))*(Ch*(Tt-Tw)*Perimetro*...
(1+((gamma-1)/2)*M^2))/(Aeffettiva*Tt));
dYdx=[dTtdx;dPtdx;dMdx];
end
Thank you very much for the help
Regards