partial derivatives system of differential equations in multiple unknowns
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all
i have some problem with pdepe : "Unable to perform assignment because the size of the left side is 4-by-1 and the size of the right side is 4-by-4."
I have 4 differential equation, one of these has two indipendent variables. These equations are connected also in terms of BC
r = (0:0.01: 1);
t = (0:0.01:2);
m = 1;
sol = pdepe(m,@pdefun,@pdeic,@pdebc,r,t);
Th = sol(:,:,1);
Tg = sol(:,:,2);
Tsurfintchamber=sol(:,:,3);
Qdot=sol(:,:,4);
function [c,effe,s] = pdefun(r,t,T,dTdr)
Th=T(1);
Tg=T(2);
Tsurfintchamber=T(3);
Qdot=T(4);
y1=((hcoefficientinternalcyclefinal*Abobbin.*(T(1)-T(2)))-...
(hcoefficientoutcyclefinal*Ainternalsurfacechamber.*(T(2)-T(3))))./(densityxenonhotgas*Accycle2*Lbobbin*cvxenon);
y2=(1/((Nuout*thermalconductivity/((2*Rintchambercycle2final)-...
(2*Rextbobbincycle2final)))*(Rintchambercycle2final)))/(2*pi*Lbobbin);
y3=((1/((Nuout*thermalconductivity/((2*...
Rintchambercycle2final)-(2*Rextbobbincycle2final)))*(Rintchambercycle2final)))+...
((log(0.0129./(Rintchambercycle2final)))/ThermalconductivityAISI304)+((log((0.0129+0.005)./0.0129))/PROMALIGHT1200thermalconductivity)+...
((log((0.0129+0.005+Thicknessoutercylinder)./(0.0129+0.005)))/ThermalconductivityAISI304));
y4=(Power/(((pi/4)*Dtantalum^2)*Lstraightheater))+hcoefficientinternalcyclefinal*dTdr(1);
c=[densitytantalum*specificheattantalum,0,0, 0;0,1,0,0;0,-1,1,y2;0,-(10/100)*2*pi*Lbobbin, 0, y3];
effe=[thermalconductivitytantalum;0;0;0]*dTdr(1);
s=[y4;y1;0;0];
end
function T0 = pdeic(r)
Tcoldgas=300;%kelvin
T0 = [Tcoldgas; Tcoldgas;Tcoldgas;0];
end
function [pL,qL,pR,qR] = pdebc(rL,TL,rR,TR,t)
hcoefficientinternalcyclefinal=21.697199999999990;
pL = [TL(1)-900; 0;0;0];
qL = [0; 0;0;0];
pR = [hcoefficientinternalcyclefinal*(TR(1)-TR(2)); 0;0;0];
qR = [-1;0;0;0];
end
3 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!