
[Sponsors] 
April 13, 2010, 14:16 
Where to define which fields to write?

#1 
New Member
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 9 
Hi there,
that's maybe a very simple question, but where can I define which fields OpenFOAM will write? I solved a case with sonicFoam and wanted to have a look at the density, but there is no rho in the timedirectories... Can I make OpenFOAM to calculate and write rho without rerunning the hole job? BTW: Am I right that the pressure is the dynamicPressure? Because then I could calculate my desity from velocity... Thanks a lot, Ben Last edited by bgoeppner; April 13, 2010 at 14:53. 

April 14, 2010, 08:36 

#2 
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 9 
The field p is the static pressure (in OpenFOAM 1.6). However, you can calculate the total pressue (static + dynamic pressure) by running the command ptot on the solved case. From there on, you can use foamCalc to calculate other parameters.


April 14, 2010, 09:22 

#3 
New Member
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 9 
Thanks a lot. I tried that but as my pField is in Pa (kg/msē) not in mē/sē ptot wants to have a rhofile... And that is exactly what I'm not having ;)


December 3, 2010, 13:22 

#4 
New Member
Join Date: Aug 2009
Posts: 5
Rep Power: 9 
Hi Benedikt,
I am facing with the same problem with sonicFoam.. how to calculate ptot ... have u found any solution to the problem ??? 

December 4, 2010, 04:09 

#5 
Senior Member
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 8 
Hi,
You may change definition of rho in createFields.H file of sonicFoam locaed in "$applications/solvers". You may define rho the way U is defined and the recompile your solver. In this way sonicFoam will output rho during runtime. 

December 4, 2010, 08:06 

#6 
New Member
Join Date: Aug 2009
Posts: 5
Rep Power: 9 
Hi,
I made the changes in the createFields.H and recompiled the solver, finally it works. thanks for the suggestion Using Sampledict one can calculate p, T, U etc . do u have any idea how to calculate variables other than the standard ones for Example (isentropic Mach Number) around a compressor profile thank u 

December 5, 2010, 07:36 

#7 
Senior Member
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 8 
Hi,
To get local Mach No. in the domain you may run the command "Mach". Also refer to the utilities section of the User Guide to find out what all you can get as data from OF. 

December 9, 2010, 08:25 

#8 
New Member
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 9 
Hi aruv,
sorry for my late answer... You can also add the following to the controlDict file: Code:
functions { rhofunc { type writeRegisteredObject; functionObjectLibs ("libIOFunctionObjects.so"); outputControl outputTime; outputInterval 1; objectNames ( "rho" "psi" ); } } Have fun! 

July 15, 2011, 11:00 

#9 
New Member
Farhad N.
Join Date: Apr 2010
Posts: 6
Rep Power: 8 
I was just reading your posts and leant lots. There is one thing that seems to be forgotten and It is the dimensions of p and p_rgh in OF 1.7 and OF 1.6. The dimension of p is m^2/s^2 which is the square of velocity dimension. Basically, for p OF skips the density in its calculations. On the other hand, the dimension of p_rgh is kg/ms^2 meaning that density is included. Therefore, if p is the addition of dynamic and static pressure, the actual pressure has yet to be obtained multiplying the density to p.


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Installing OF 1.6 on Mac OS X  gschaider  OpenFOAM Installation on Windows, Mac and other Unsupported Platforms  129  June 19, 2010 09:23 
HELPSurface Reaction UDF  Ashi  Fluent UDF and Scheme Programming  0  May 25, 2009 09:39 
Missing math.h header  Travis  FLUENT  4  January 15, 2009 12:48 
Free surface boudary conditions with SOLAVOF  Fan  Main CFD Forum  10  September 9, 2006 12:24 
UDF FOR UNSTEADY TIME STEP  mayur  FLUENT  3  August 9, 2006 10:19 