CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Janaf coefficients seems incorrect! (http://www.cfd-online.com/Forums/openfoam-solving/111070-janaf-coefficients-seems-incorrect.html)

immortality December 26, 2012 12:13

Janaf coefficients seems incorrect!
 
I want to use JANAF model for Cp.but the polynomials behave so strangely! and then openFOAM gives an error.I tried to plot them in matlab.the script is here.why polynomials are discontinue at 1000 so large?
introduce me a better way.
thanks.

Code:

clc
a1=5.009155110;
a2=-5.761013730e-3;
a3=1.066859930e-5;
a4=-7.940297970e-9;
a5=2.18523191e-12;
T2=linspace(1000,6000,100);
R=278;
cp=R*(a1+a2*(T./1000)+a3*(T./1000).^2+a4*(T./1000).^3+a5*(T./1000).^4);
T=linspace(200,1000,100);
b1=5.14455867;
b2=-2.13854179e-4;
b3=7.06522784e-8;
b4=-1.07148349e-11;
b5=6.57780015e-16;
cp2=R*(b1+b2*T+b3*T.^2+b4*T.^3+b5*T.^4);
plot(T,cp,T2,cp2)


immortality December 26, 2012 12:46

Janaf coefficients seems incorrect!
 
hi
excuse me for an basically question and for repeat.
but I have a problem with janaf table coefficients in openfoam.
polynomials at Tlow and Thigh are not continuous in 1000K.why?
I need using Cp varies with temperature for air.
how can I solve this?coefficients at all references seems incorrect or no explanations on using them is available.
OpenFOAM was showing an error and I wrote a matlab script ans saw polynomials are discontinued.
either for air or nitrogen or oxygen.
introduce me a good way for obtaining true coefficients.
thanks.
Code:

clc
a1=39.06;
a2=-512.79;
a3=1072.7;
a4=-820.4;
T=linspace(300,3500,100);
cp1=(a1+a2*(T/100).^-1.5+a3*(T/100).^-2+a4*(T/100).^-3)*1000/32;
b1=37.432;
b2=0.020102;
b3=-178.57;
b4=236.88;
cp2=(b1+b2*(T/100).^1.5+b3*(T/100).^-1.5+b4*(T/100).^-2)*1000/28.02;
cp3=.7.*cp1+.3.*cp2;
cp4=polyfit(cp3,T,4)
v=polyval(cp4,T);
plot(T,cp1,T,cp2,T,v)
%v=polyval(cp3,T)



ngj December 26, 2012 12:58

Good evening Ehsan,

Please be advised that posted the more or less identical message in six threads (more than one of these being completely new) will not enhance your success for a good reply.

Please consider the following guidelines for proper behaviour on the Forum:

http://openfoamwiki.net/index.php/Ho..._Message_Board

Kind regards,

Niels

immortality December 26, 2012 14:59

hi niels
They are not identical.i at first was searching for appropriate janaf table.next i found it and after that faced a problem and titled that.
But you are somewhat correct! Due to lack of time i have no patience! However Sorry and thank you for your attention to my posts and sharing your opinion.thanks again.
How could i find an answer then?

wyldckat December 26, 2012 18:17

Greetings to all!

@Ehsan: If you want people to spend some time and be patient answering your questions... then do not be impatient!
Your impatience as lead to having someone (in this case me) having to clean up the trail of questions you laid around the forum ;)


Anyway, you might find the answers you're looking for on this thread: http://www.cfd-online.com/Forums/ope...ombustion.html

Janaf, chemistry and combustion in OpenFOAM are subjects that require lengthy investigation and patience. Well... OpenFOAM itself requires lengthy investigation and patience :rolleyes:.


But if and when you're really in a hurry, you can always try the freelancers forum and ask for fast+professional+private help: http://www.cfd-online.com/Forums/cfd-freelancers/ - although it can also take about 24h for someone to contact you... but you can always try and contact people that have left their professional contacts there.

Best regards,
Bruno

immortality December 27, 2012 13:11

thank you bruno.;)


All times are GMT -4. The time now is 12:13.