필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

error loop related to code not converging

조회 수: 1 (최근 30일)
Chinaemerem Valentine Nwobi
Chinaemerem Valentine Nwobi 2019년 4월 30일
마감: MATLAB Answer Bot 2021년 8월 20일
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개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by