CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

psi in compressibleInterFoam (OpenFoam)

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 3 Post By RaghavendraRohith
  • 2 Post By acs
  • 1 Post By sahas
  • 1 Post By godfatherBond

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2013, 12:36
Default psi in compressibleInterFoam (OpenFoam)
  #1
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Hi everyone,

I am currently using the solver compressibleInterFoam (of OpenFoam). I am trying to change the equation of state perfectFluid and therefore, I need to understand what is psi. It seems to be the compressibility defined by
\psi = \left( \frac{\partial \rho}{\partial p} \right)_T
But I am not sure at all.
Moreover, I do not understand the file pEqn.H, and thus it do not help me to understand how psi is used.

If someone could give me some help, I would be very thankful

Best regards

Clément
clementolivier is offline   Reply With Quote

Old   May 28, 2013, 07:44
Default
  #2
New Member
 
Aaron
Join Date: Mar 2013
Posts: 10
Rep Power: 13
dalaron is on a distinguished road
Hi Clement,

Have you managed to figure this out? I am also looking to implement an equation of state and am not sure what to make of the psi term.

Referring to the documentation for totalPressure boundary condition (which is more in line with my own interests), psi is defined as compressibility and has units m^2/s^2. Beyond that though, I have not seen any documentation about what it actually is ...

Edit:
Continuing with the dimensional line of thought,
\psi = \frac{P}{\rho} = \frac{kg/ms^2}{kg/m^2}=\frac{m^2}{s^2}
so the units work out in that regard.

Regards,
Aaron

Last edited by dalaron; May 28, 2013 at 07:57. Reason: Forgot to add something
dalaron is offline   Reply With Quote

Old   April 24, 2014, 10:08
Default
  #3
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi

I think the compressibility is actually the reverse that is being defined above. It is

psi = rho/p which makes it a isothermal compressibility


Thanks
RR
Z.Q. Niu, musabai and HenriW like this.
RaghavendraRohith is offline   Reply With Quote

Old   February 9, 2016, 07:52
Default totalPressure definition
  #4
New Member
 
Join Date: Feb 2016
Posts: 13
Rep Power: 10
fanny is on a distinguished road
Hi,


In totalPressureFvPatchScalarField.H we can read that for compressible supersonic flow the total pressure is defined as :


\f[ p_p = \frac{p_0}{(1 + 0.5 \psi G |U|^2)^{\frac{1}{G}}}
\f]
where
\vartable
p_p | pressure at patch [Pa]
p_0 | total pressure [Pa]
\gamma | ratio of specific heats (Cp/Cv)
\psi | compressibility [m2/s2]
G | coefficient given by \f$\frac{\gamma}{1-\gamma}\f$
\endvartable



What compressibility is ? is its dimension really m2/s2 ? and really not s2/m2 ??.
I would expect s2/m2 in order to obtain psi*U^2 as an unidimensional number ..

I am also surprised by the G definition. It is really \frac{\gamma}{1-\gamma} ?
I would expect the inverse frac{1-\gamma}{\gamma} ?

Does someone has an opinion on it?

Regards
Fanny
fanny is offline   Reply With Quote

Old   February 12, 2016, 04:51
Default
  #5
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi

I see it is s2/m2 because in the above equation it is multiplied by U2 to get a scalar value.

Best Regards,
RRK
RaghavendraRohith is offline   Reply With Quote

Old   November 21, 2016, 10:17
Default from the Programmer's Guide v 3.0.1
  #6
acs
New Member
 
Join Date: Apr 2016
Posts: 4
Rep Power: 10
acs is on a distinguished road
Hi, everyone,

If it still can help anybody, in studying the Programmer's Guide OF v. 3.0.1, I,ve found, in section 3.4, the definition of psi (\psi):
\psi = \frac{\partial \rho}{\partial p},
which is called the barotropic relationship (compressibility), and its unit is s²/m² (at least for sonicLiquidFoam).
saltyFish and Weitao like this.
acs is offline   Reply With Quote

Old   February 8, 2018, 13:31
Default
  #7
Member
 
Alexander
Join Date: Mar 2009
Posts: 49
Rep Power: 17
sahas is on a distinguished road
Quote:
Originally Posted by acs View Post
Hi, everyone,

If it still can help anybody, in studying the Programmer's Guide OF v. 3.0.1, I,ve found, in section 3.4, the definition of psi (\psi):
\psi = \frac{\partial \rho}{\partial p},
which is called the barotropic relationship (compressibility), and its unit is s²/m² (at least for sonicLiquidFoam).
The problem is that this definition of psi is unambiguous.
It can be
\psi = \left ( \frac{\partial \rho}{\partial p} \right )_T = \frac{1}{RT}
in isothermal case, and
\psi = \left ( \frac{\partial \rho}{\partial p} \right )_S = \frac{1}{\gamma RT}
in adiabatic case. Can we be sure that psi is determined by the first formula in all cases?
Weitao likes this.
sahas is offline   Reply With Quote

Old   February 9, 2018, 02:32
Default
  #8
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9
godfatherBond is on a distinguished road
Quote:
Originally Posted by sahas View Post
The problem is that this definition of psi is unambiguous.
It can be
\psi = \left ( \frac{\partial \rho}{\partial p} \right )_T = \frac{1}{RT}
in isothermal case, and
\psi = \left ( \frac{\partial \rho}{\partial p} \right )_S = \frac{1}{\gamma RT}
in adiabatic case. Can we be sure that psi is determined by the first formula in all cases?
I checked the source code for compressibleInterFoam and based on the thermo library used, I can say that psi is surely 1/RT (at least for a perfect fluid). It may vary according to the the equation of state chosen at runtime.
Please correct me if I am wrong!
ES7
granzer likes this.
godfatherBond is offline   Reply With Quote

Old   March 21, 2018, 18:39
Default OpenFOAM docs
  #9
New Member
 
Arpit
Join Date: Nov 2015
Posts: 3
Rep Power: 11
foam is on a distinguished road
This might be useful. You can look up different versions (v3 and above).
https://cfd.direct/openfoam/user-gui...hermophysical/
foam is offline   Reply With Quote

Old   May 11, 2019, 05:33
Default Add a non-linear equation of state to foam
  #10
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi foamers,

I want to add a non-linear equation of state (JWL) to foam to use in sonicFoam.
In this equation, I need to calculate rho, Cp, h, s, psi, Z, and cpMcv and some functions such as:


correct (which is used in EEqn.H: thermo.correct() )
pThermo(which is used in createFields.H: thermo.pThermo() )
p (which is used in createFields.H: thermo.p() )
rho (which is used in createFields.H: thermo.rho() )
he (which is used in createFieldRefs.H: thermo.he() )
psi (which is used in createFieldRefs.H: thermo.psi() )

But JWL is non-linear and calculation of parameters are not as easy as perfectGas! However, I have calculated rho using Newton method in rho() function. But I don't know how to calculate the others!

Thanks
alimea is offline   Reply With Quote

Old   May 12, 2019, 10:37
Default
  #11
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Dear foamers,
my last problem is not solved yet!
In addition I want to know:
1- How can I calculate "h", "Cp" for my new equation of state? why Cp and h are zero for perfectGas model in openFoam? and how did they calculate "s=-R*log(p/Pstd)" ?

Thanks
alimea is offline   Reply With Quote

Old   October 30, 2019, 12:32
Default JWL implementation that works with OpenFOAM
  #12
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,

Yes, we have just released a new solver (blastFoam) which includes the JWL equation of state (an extensions to model afterburn), as well as several other useful and interoperable equations of state (e.g. ideal gas, stiffened gas, tait, cochran-chan, van der waals, JWL), flux schemes (HLLC, AUSM+, Kurganov/Tadmor), and multiple examples/tutorial cases.


Source, user guide and examples are available here: https://github.com/synthetik-technologies/blastfoam

Hope this helps!
Peter Vonk
Synthetik Applied Technologies
opedrofunk is offline   Reply With Quote

Reply

Tags
compressibility, compressibleinterfoam, openfoam, perfectfluid, psi


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 19:28
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x wyldckat OpenFOAM Bugs 18 October 21, 2010 06:51
The OpenFOAM extensions project mbeaudoin OpenFOAM 16 October 9, 2007 10:33
Getting OpenFOAM to coexist with an existing JAVA VM nik777 OpenFOAM Installation 5 February 22, 2007 08:21


All times are GMT -4. The time now is 13:22.