Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
error loop related to code not converging
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Chinaemerem Valentine Nwobi
el 30 de Abr. de 2019
Cerrada: MATLAB Answer Bot
el 20 de Ag. de 2021
function[Ps,T,Vl,Vv]= Ps_VDW_Plot(Pc,Tc,Pso,Tmin,dT)
%this is a function that calculates and plot the vapour pressure and the
%specific molar volume V for a pure fluid at given temperature T using both
%VDW-CEOS and considering a minimum value of temperature Tmin(loaded by user this requires
% where DT is stepwise increase in Temperature
%Ps_VDW as a subprogram to run. all parameters in SI units i.e
%P(Pa),T(K),V(m3/mol)
%initializing the iteration process
i=1;
%initial input temperature
T(i)=Tmin;
%calculation of Ps using Ps_VDW function
[Ps(i),Vl(i),Vv(i)]= Ps_VDW(Pc, Tc, Pso, T(i));
while Vl~=Vv
i=i+1;
T(i)=T(i-1)+dT;
[Ps(i),Vl(i),Vv(i)]= Ps_VDW(Pc, Tc, Ps(i-1), T(i));
end
%plot of P vs. T
plot(T,Ps);
end
please am having difficulty getting a fixed result/plot from this function
given that
Pc=4.8e6;
Tc=508.1;
Tmin=300;
dt=0.5;
Pso=100;
please run the file with the details below and tell me why it doesnt give consistent results
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!