CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   compressibleInterFoam : biphasic, compressible, equation of state (http://www.cfd-online.com/Forums/openfoam/114426-compressibleinterfoam-biphasic-compressible-equation-state.html)

clementolivier March 11, 2013 05:04

compressibleInterFoam : biphasic, compressible, equation of state
 
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

nimasam March 11, 2013 12:41

you should change source code, there is no easier task

clementolivier March 12, 2013 04:33

Thank you for your answer, I will get back to work !

olivierG March 12, 2013 05:36

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

clementolivier March 12, 2013 06:04

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 ?

olivierG March 12, 2013 06:18

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

clementolivier March 12, 2013 06:39

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.

olivierG March 12, 2013 06:46

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

clementolivier March 12, 2013 07:10

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

olivierG March 12, 2013 07:22

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

clementolivier March 12, 2013 07:36

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

aylalisa August 13, 2013 13:10

equationOfState - R
 
Hallo Olivier,

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


Quote:

Originally Posted by olivierG (Post 413377)
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

olivierG August 22, 2013 04:15

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

sh.d August 25, 2013 11:30

help
 
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?

Tobi September 24, 2013 06:17

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.


All times are GMT -4. The time now is 07:33.