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

compressibleInterFoam : biphasic, compressible, equation of state

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By olivierG
  • 1 Post By olivierG

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2013, 05:04
Post compressibleInterFoam : biphasic, compressible, equation of state
  #1
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Hi everyone,

I am a new user on OpenFoam. I would like to run a compressible and biphasic case. It seems that, it is possible using compressibleInterFoam. However, I also want to change the two fluids' equation of state. Do I have to modify the C code of the solver, or there is a simpler way ?

Thanks

Best regards

Clément

Last edited by clementolivier; March 11, 2013 at 07:46.
clementolivier is offline   Reply With Quote

Old   March 11, 2013, 12:41
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
you should change source code, there is no easier task
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   March 12, 2013, 04:33
Post
  #3
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Thank you for your answer, I will get back to work !
clementolivier is offline   Reply With Quote

Old   March 12, 2013, 05:36
Default
  #4
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

This is already possible to change the fluid equation of state.
Take a look in the depthCharge tutorial, in TransportProperties : would can choose constant, linear, perfectFluid, ...

Regards,
olivier
olivierG is offline   Reply With Quote

Old   March 12, 2013, 06:04
Default
  #5
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Thank you for your answer olivierG.
I can see how to change the constants of the model (nu,rho,rho0,psi), but I do not quite see how to change the formula of the equation of state.

Do you mean that the argument of transportModel specifies it ? If it is the case, is there any exhaustive list of all allowed arguments ?
clementolivier is offline   Reply With Quote

Old   March 12, 2013, 06:18
Default
  #6
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

First what the state equation you would use ?
And which version of openfoam do you use ?

To get the list of state equation, put "dummy" instead of perfectFluid : you will get a list.
To find more info, you should take a look at the source code. this part was in the solver for the 2.1.x version, but has moved with the 2.2.x

regards,
olivier
olivierG is offline   Reply With Quote

Old   March 12, 2013, 06:39
Default
  #7
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Thank you again for your help

I want to use the equation of state called the Stifeffened Gas Equation of State for the liquid, and the Perfect Gas Equation of State for the gas.

I am currently usig OpenFoam v2.1.1.

I am sorry but I have done a grep -rin "perfectFluid" * in the directory tutorials/multiphase/compressibleInterFoam, and it is nowhere written. Can you explain more precisely where whould I type "dummy".

I am right now reading the C++ code in order to fix my problem.
clementolivier is offline   Reply With Quote

Old   March 12, 2013, 06:46
Default
  #8
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

1) in your tuto case, set "dummy" (or anythink), then launch the solver: you will get an error message, which will say dummy is not a equation of state, and will list the possible one.

2) For the 2.1.1, the definition is in the solver source, never in the tutorial. take a look at applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/ in your installation directories.

regards,

olivier
olivierG is offline   Reply With Quote

Old   March 12, 2013, 07:10
Default
  #9
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Thanks,

I still do not see where should I set "dummy" (or anything).

Moreover the directory applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/ does not exist in my version. I will get I last version and it will be easier for me to communicate.

regards,

Clément
clementolivier is offline   Reply With Quote

Old   March 12, 2013, 07:22
Default
  #10
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

Sorry, i wasn't clear.

copy the tuto (depthCharge3D).
Open depthCharge3D/constant/transportProperties
You have 2 phase, air and water.
In the definition of water, you should have:
Code:
equationOfState
{
type perfectFluid;
rho0 1000;
R 3000;
}
Just change "perfectFluid" by "dummy", and run the solver.

regards,
olivier
aylalisa likes this.
olivierG is offline   Reply With Quote

Old   March 12, 2013, 07:36
Default
  #11
New Member
 
Clement Olivier
Join Date: Mar 2013
Posts: 7
Rep Power: 13
clementolivier is on a distinguished road
Thank you very much,

Indeed in the last version, I can see everything you are talking about.

I think,this will fix my problem.

Thank you again

Regards,

Clément
clementolivier is offline   Reply With Quote

Old   August 13, 2013, 14:10
Default equationOfState - R
  #12
Senior Member
 
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14
aylalisa is on a distinguished road
Hallo Olivier,

I am not clear about equationOfState models.
What meanding has R?


Quote:
Originally Posted by olivierG View Post
hello,

Sorry, i wasn't clear.

copy the tuto (depthCharge3D).
Open depthCharge3D/constant/transportProperties
You have 2 phase, air and water.
In the definition of water, you should have:
Code:
equationOfState
{
type perfectFluid;
rho0 1000;
R 3000;
}
Just change "perfectFluid" by "dummy", and run the solver.

regards,
olivier

Aylalisa
aylalisa is offline   Reply With Quote

Old   August 22, 2013, 05:15
Default
  #13
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

R is the specific gaz constant = R/M (M=molar mass).
R is used to calculate the compressibility psi = 1/RT.
For liquid, you still need to set compressibility and use the same law (you can guess this from the name "perfectLiquid"). But R is really bigger, to act as a very low compressible media.

regards,
olivier
YHBen likes this.
olivierG is offline   Reply With Quote

Old   August 25, 2013, 12:30
Default help
  #14
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 14
sh.d is on a distinguished road
hi
In compressible liquid/gas flows, the pEqn reads :

(
fvm::ddt(psi,p)+fvc::div(phi)+fvm::div(phid,p,".." )-fvm::laplacian(..,p)
)
Can someone tell me what is the form of the differential equation?
sh.d is offline   Reply With Quote

Old   September 24, 2013, 07:17
Default
  #15
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hello sh.d,

the equation for that formula should be something like that:

\psi \frac{\partial p}{\partial t} + \nabla\phi + \nabla (\phi_d p ...) + \nabla \phi \nabla (p)

I think its not correct but gives you a hint to read the lines.
Tobi is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, eos, equation of state, multiphase


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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
Solver for compressible Navier-Stokes equation treima OpenFOAM Running, Solving & CFD 3 May 30, 2012 06:25
problem about adding another equation of state yhaomin2007 OpenFOAM 4 May 16, 2012 05:36
equation of state imbalance Ramya Siemens 0 November 23, 2006 00:48
equation of state imbalance(engine simulation) hennie Siemens 1 July 4, 2002 04:21


All times are GMT -4. The time now is 14:51.