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

R constant in Perfet Fluid

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By Mehdi3031
  • 1 Post By anh065
  • 3 Post By wildemam
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2017, 10:16
Default R constant in Perfet Fluid
  #1
Member
 
Mehdi Aminyavari
Join Date: Feb 2016
Location: Milan
Posts: 35
Rep Power: 10
Mehdi3031 is on a distinguished road
Hello everybody,
in many cases of openFoam, you can find equation Of State that is modeled as a perfect Fluid such as in:
tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/constant/thermophysicalProperties.mercury

Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   200.59;
    }
    equationOfState
    {
        R           6818;
        rho0        13529;
    }
    thermodynamics
    {
        Cp          139;
        Hf          0;
    }
    transport
    {
        mu          1.522e-3;
        Pr          0.022;
    }
}
or in:
tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.water

Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   18;
    }
    equationOfState
    {
        R           3000;
        rho0        1027;
    }
    thermodynamics
    {
        Cp          4195;
        Hf          0;
    }
    transport
    {
        mu          3.645e-4;
        Pr          2.289;
    }
}
There are two parameters "R" and "rho0" that are defined and necessary for perfect liquid model which is defined in OF documentation as following:


I can't figure out what is this value of R which is 3000 for water and 6818 for mercury and how to calculate it for ammonia for example. any Idea?
saidc. likes this.
Mehdi3031 is offline   Reply With Quote

Old   February 7, 2018, 03:10
Default I don't know, either. Any one know the answer?
  #2
New Member
 
Join Date: Dec 2012
Posts: 11
Rep Power: 13
meshman is on a distinguished road
There is no documentation related above question...
meshman is offline   Reply With Quote

Old   March 6, 2018, 00:45
Default
  #3
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by Mehdi3031 View Post
Hello everybody,
in many cases of openFoam, you can find equation Of State that is modeled as a perfect Fluid such as in:
tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/constant/thermophysicalProperties.mercury

Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   200.59;
    }
    equationOfState
    {
        R           6818;
        rho0        13529;
    }
    thermodynamics
    {
        Cp          139;
        Hf          0;
    }
    transport
    {
        mu          1.522e-3;
        Pr          0.022;
    }
}
or in:
tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.water

Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   18;
    }
    equationOfState
    {
        R           3000;
        rho0        1027;
    }
    thermodynamics
    {
        Cp          4195;
        Hf          0;
    }
    transport
    {
        mu          3.645e-4;
        Pr          2.289;
    }
}
There are two parameters "R" and "rho0" that are defined and necessary for perfect liquid model which is defined in OF documentation as following:


I can't figure out what is this value of R which is 3000 for water and 6818 for mercury and how to calculate it for ammonia for example. any Idea?
Hi Mehdi

I am having the same problem. I could not figure out the R of 3000 for water in the twoPhaseEulerFoam tutorial. In particular with respect to rhom (after you run the case) RAS/bubbleCoumn, rhom is around 1027 in the region where alpha.air=0 (meaning water) but rhom is around 513 in the region where alpha.air=1 (meaning air). Shouldn't the rhom be around 1.225 (density of air) in the region where alpha=1?

Thanks
Jie
jiejie is offline   Reply With Quote

Old   May 1, 2018, 09:58
Default
  #4
New Member
 
krishnan
Join Date: Feb 2018
Posts: 16
Rep Power: 8
tankerp is on a distinguished road
Im also having a difficulty in understanding this. What is rhom and why is it as much as 513 in the region representing air?
tankerp is offline   Reply With Quote

Old   June 6, 2018, 18:01
Default
  #5
New Member
 
Anh
Join Date: Jan 2012
Posts: 2
Rep Power: 0
anh065 is on a distinguished road
R = R_{gas}/MW with MW being the molecular weight of gas/fluid.

For air, MW\approx 0.029 [kg/mol] and R =8.314/0.029\approx 287 [J/kg.K].


https://en.wikipedia.org/wiki/Ideal_gas_law
jiejie likes this.
anh065 is offline   Reply With Quote

Old   June 19, 2018, 05:55
Question I don't think so, because..
  #6
New Member
 
Join Date: Dec 2012
Posts: 11
Rep Power: 13
meshman is on a distinguished road
According to your solution,

For example, in case of water (H2O)

the molar mass is about 0.018 kg/mol

so the R = 8.314/0.018 ~ 461.9 J/kg K.

This value is not same with '3000' in the above tutorial.

(Actually, I still don't know why the value is 3000....)
meshman is offline   Reply With Quote

Old   February 1, 2019, 06:04
Default
  #7
New Member
 
Arne
Join Date: Dec 2018
Posts: 19
Rep Power: 7
arsimons is on a distinguished road
I believe that in OpenFOAM 1806, R = 7255 for water. However, I have no idea what it means...
arsimons is offline   Reply With Quote

Old   August 17, 2019, 09:24
Default
  #8
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Have you solved this?



I think if you use R for a liquid, it is just some kind of compressibility of it.



Regarding rhom: It is calculated here:
https://github.com/OpenFOAM/OpenFOAM...Epsilon.C#L403


and it involves the use of a virtual mass model. What are the corresponding settings in your case?
jherb is offline   Reply With Quote

Old   May 9, 2020, 00:22
Default
  #9
New Member
 
M Shaaban
Join Date: Jun 2019
Posts: 9
Rep Power: 6
wildemam is on a distinguished road
Quote:
Originally Posted by arsimons View Post
I believe that in OpenFOAM 1806, R = 7255 for water. However, I have no idea what it means...



If anyone is still wondering:


R is (RT)^(-1)


For water, it should be calculated from psi, the compressiblity.


psi = rho/bulk modulus, giving around 4.5e-7 s2/m2
(check here https://www.openfoam.com/documentati...x12-620003.3.1)


then R = 7255.

the use of 3000 is a mystery.
parthigcar, saidc. and Lennart.H like this.
wildemam is offline   Reply With Quote

Old   February 13, 2021, 15:56
Default
  #10
New Member
 
Xingchun Wang
Join Date: Dec 2016
Posts: 3
Rep Power: 9
krasus is on a distinguished road
Quote:
Originally Posted by wildemam View Post
If anyone is still wondering:


R is (RT)^(-1)


For water, it should be calculated from psi, the compressiblity.


psi = rho/bulk modulus, giving around 4.5e-7 s2/m2
(check here https://www.openfoam.com/documentati...x12-620003.3.1)


then R = 7255.

the use of 3000 is a mystery.
Thanks for the clue. However, can you show how to calculate R from psi? I can't figure out how (RT)^-1 and psi is correlated.
krasus is offline   Reply With Quote

Old   February 15, 2021, 05:04
Default
  #11
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
psi is defined as drho/dp|_T, and so for an ideal gas psi = rho/p = 1/RT. This is referred to as the compressibility. R is the ideal gas constant over the molecular weight; it doesn't have any meaning for a liquid.
cjacob likes this.
Tobermory is offline   Reply With Quote

Old   February 20, 2021, 00:30
Default
  #12
New Member
 
Xingchun Wang
Join Date: Dec 2016
Posts: 3
Rep Power: 9
krasus is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
psi is defined as drho/dp|_T, and so for an ideal gas psi = rho/p = 1/RT. This is referred to as the compressibility. R is the ideal gas constant over the molecular weight; it doesn't have any meaning for a liquid.
Thanks for the info!
krasus is offline   Reply With Quote

Reply


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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
conjugate heat transfer in OpenFOAM skuznet OpenFOAM Running, Solving & CFD 99 March 16, 2017 05:07
Ideal gas a and constant density fluid sunilpatil Fluent Multiphase 0 May 25, 2016 13:24
My Revised "Time Vs Energy" Article For Review Abhi Main CFD Forum 2 July 9, 2002 09:08
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 04:45.