|
[Sponsors] |
November 22, 2011, 05:07 |
Calculate custom pressure - best way?
|
#1 |
Member
Join Date: Nov 2010
Posts: 41
Rep Power: 15 |
I want to add rho*g*h to my pressure field as output by pimpleFoam. The options in my mind are:
1. inclusion of write.H to output p+rho*g*h (requires compiling new pimpleFoam solver) 2. post-process results with a utility to calculate p+rho*g*h Have i missed an option? it seems option 2 is more appropriate since it only involves making a utility and no recompilation of the entire solver. What is the best way to get the value for h? Thanks |
|
November 22, 2011, 05:16 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
im not sure but as i know in new OpenFoam version we have two pressures
1) p 2) p - rho*g*h so i guess the first p contains the effect of gravity! i insist im not sure |
|
November 22, 2011, 05:18 |
|
#3 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
Either of the two methods will do. If you need it for every timestep or want to sample during runtime I would chose option 1. If you need it only every once in a while, then option 2 will do.
If you go for option 2, have a look at the existing ptot utility. It has almost everything you need. For the calculation of h, you can have a look in for example the interFoam e.g. createFields.H line 109 reads Code:
volScalarField gh("gh", g & mesh.C()); Good luck! |
|
December 15, 2011, 04:38 |
|
#4 |
Member
Join Date: Nov 2010
Posts: 41
Rep Power: 15 |
Thanks All. Ok, I've tried with
Code:
volScalarField gh("gh", g & mesh.C()); |
|
February 1, 2012, 10:05 |
|
#5 |
New Member
Fabien Farella
Join Date: Jan 2012
Posts: 7
Rep Power: 14 |
Hi Greg,
I have the same problem. I would like to calculate the vertical offset from my boundary surface (the ground) of my mesh cell centers. Have you found a way to get the cell height relative to a surface/boundary? Thank you |
|
February 1, 2012, 11:07 |
|
#6 |
Member
Join Date: Nov 2010
Posts: 41
Rep Power: 15 |
Hi Fabien,
No I haven't done much more on this. There must be a relatively easy way to find the max z value of the mesh to use as the relative datum. But not sure how... if you find anything please post! G |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to define or adjust pressure??? | engahmed | FLUENT | 0 | July 6, 2010 17:19 |
Pressure Rise Error | emueller | CFX | 0 | May 5, 2009 11:08 |
custom pressure field at the faces | Souviktor | FLUENT | 0 | April 3, 2009 08:09 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 02:15 |
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) | HB &DS | CFX | 0 | January 9, 2000 13:19 |