# C_P(c,t) is giving incorrect values.

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

 October 20, 2012, 16:10 C_P(c,t) is giving incorrect values. #1 Member   Christopher Hershey Join Date: Feb 2012 Location: East Lansing, Michigan Posts: 41 Rep Power: 5 Hello all, I have been struggling with this problem in my UDF. I am working on getting density to be a function of "Static Pressure". I have read that C_P(c,t) is supposed to give me static pressure relative to the operating pressure set. I interpret that as: C_P(c,t) = Static Pressure - Operating Pressure So in my UDF I define Pressure to be: P = C_P(c,t)+RP_Get_Real("operating-pressure") However when I include a Message Statement to printout the values of pressure, I get values that are anywhere between -7000000 to 7000000. I need my static pressure to be around 100 Pa in order for my equation to work. Does anyone have suggestions as to how I should handle C_P(c,t)? Density is changing with pressure in a manner similar to: rho = rho_initial/(1+c/P) where c is a value changing with time.

 October 20, 2012, 16:29 #2 Member   Christopher Hershey Join Date: Feb 2012 Location: East Lansing, Michigan Posts: 41 Rep Power: 5 As I initialize the solution (even using a UDF DEFINE_INIT) to make the entire domain 100 Pa, the Message printout which is: Message("Pressure:%d\n",P); Keeps displaying zero. If I run a quick contour plot, the static pressure is 100 Pa. The solution immediately diverges at the beginning of the simulation because if Pressure is equal to zero, then obviously density is being divided by zero from how I have it defined.

 July 28, 2015, 22:33 #3 New Member   New South Wales Join Date: May 2015 Location: UNSW, NSW, Sydney Posts: 11 Rep Power: 2 Hi, Do you solve this issue? I am facing the similar problem. Thanks Regards: MAC

 July 28, 2015, 23:26 #4 Member   Christopher Hershey Join Date: Feb 2012 Location: East Lansing, Michigan Posts: 41 Rep Power: 5 Hello MAC, Yes, I did solve my issue. There was a problem with another part of my code which gave incorrect values. To properly use static pressure you should have in your UDF: real P_absolute; real P_operating = RP_Get_Real("operating-pressure"); P_absolute = C_P(c,t)+P_operating; The implementation obviously depends on what your UDF looks like. If you attach it, I can try to take a look at it.

 Tags c_p, density, pressure, static, udf

 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 brooksmoses OpenFOAM Post-Processing 2 December 8, 2008 11:00 stefanke OpenFOAM Pre-Processing 42 December 3, 2008 23:53 Wilesco CD-adapco 0 January 5, 2006 06:34 Cb CD-adapco 1 January 22, 2005 10:21 acboge FLUENT 0 February 6, 2004 07:41

All times are GMT -4. The time now is 17:55.