|
[Sponsors] |
October 20, 2012, 17: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: 14 |
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, 17:29 |
|
#2 |
Member
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 41
Rep Power: 14 |
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, 23:33 |
|
#3 |
New Member
Luleå tekniska universitet
Join Date: May 2015
Location: LTU, Luleå, Sweden
Posts: 11
Rep Power: 11 |
Hi,
Do you solve this issue? I am facing the similar problem. Thanks Regards: MAC |
|
July 29, 2015, 00:26 |
|
#4 |
Member
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 41
Rep Power: 14 |
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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Retrieving boundary patch values adjacent to a given cell | brooksmoses | OpenFOAM Post-Processing | 2 | December 8, 2008 11:00 |
DieselEngineFoam | stefanke | OpenFOAM Pre-Processing | 42 | December 3, 2008 23:53 |
Plotting raw data values | Wilesco | Siemens | 0 | January 5, 2006 06:34 |
Mass Flux values and calculations | Cb | Siemens | 1 | January 22, 2005 10:21 |
node based or cell centered Ts values | acboge | FLUENT | 0 | February 6, 2004 07:41 |