# Janaf coefficients seems incorrect!

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 26, 2012, 12:13 Janaf coefficients seems incorrect! #1 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,186 Rep Power: 16 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) ``` Last edited by immortality; December 26, 2012 at 12:47.

 December 26, 2012, 12:46 Janaf coefficients seems incorrect! #2 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,186 Rep Power: 16 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) ```

 December 26, 2012, 12:58 #3 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,608 Rep Power: 25 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

 December 26, 2012, 14:59 #4 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,186 Rep Power: 16 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?

 December 27, 2012, 13:11 #6 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,186 Rep Power: 16 thank you bruno.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post immortality OpenFOAM Running, Solving & CFD 28 December 20, 2013 18:44 sebastien_F1 OpenFOAM Programming & Development 0 August 13, 2012 15:51 w-nicholson ANSYS 2 July 8, 2011 12:31 w-nicholson ANSYS 3 May 18, 2011 12:00

All times are GMT -4. The time now is 08:29.