CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to change density in OpenFoam (https://www.cfd-online.com/Forums/openfoam-solving/86058-how-change-density-openfoam.html)

 zhaowei March 13, 2011 17:34

How to change density in OpenFoam

Hi, all

I have done some simulation of aircraft propeller using MRFSimpleFoam, and the result goes well with ANSYS CFX. MRFSimpleFoam is used for incompressible steady state simulation. Now I want to change the flow density to see the performance of the propeller. It is very easy to change it in CFX, but how can I change the density of flow in OpenFoam?

I have read some theads said that OpenFoam use kinematic viscosity which is normalized by the density, and pressure is too. I have changed the reference pressure in fvSolution and mu in transportProperties, but the axial thrust does not change :confused:. Could anyone tell me how can I change the density? Thanks in advance.

 alberto March 14, 2011 05:00

You have to change the viscosity:

nu = mu/rho

being

mu -> dynamic viscosity
nu -> kinematic viscosity
rho -> density

Best,

 zhaowei March 14, 2011 05:51

Hi, Alberto

Thanks very much for your reply. I have changed the viscosity, but the axial force still not change. I use k-epsilon model, so should I change k and e?

thanks

 zhaowei March 14, 2011 06:00

Oh, I forgot to post my transportProperties file.

the original one is as follows:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

transportModel Newtonian;

nu nu [0 2 -1 0 0 0 0] 1e-05;

CrossPowerLawCoeffs
{
nu0 nu0 [0 2 -1 0 0 0 0] 1e-06;
nuInf nuInf [0 2 -1 0 0 0 0] 1e-06;
m m [0 0 1 0 0 0 0] 1;
n n [0 0 0 0 0 0 0] 1;
}

BirdCarreauCoeffs
{
nu0 nu0 [0 2 -1 0 0 0 0] 1e-06;
nuInf nuInf [0 2 -1 0 0 0 0] 1e-06;
k k [0 0 1 0 0 0 0] 0;
n n [0 0 0 0 0 0 0] 1;
}

 zhaowei March 14, 2011 06:09

Oh, sincerely sorry everyone. I use the libturboPerformance.so to calculate the performance of rotor. I forgot to change the density there. :p:p

 hz283 November 18, 2012 18:56

Quote:
 Originally Posted by alberto (Post 299279) You have to change the viscosity: nu = mu/rho being mu -> dynamic viscosity nu -> kinematic viscosity rho -> density Best,
>>>>>>>>>----------------------------------------------->>>>>>>
Now in my simulations, there are two streams: one is air and the other is pure methane. So in this case, how to set the nu? Is it still correct to give an approximate uniform value for the whole field? Thank you very much.

 hayhari February 25, 2013 05:48

Quote:
 Originally Posted by hz283 (Post 392833) >>>>>>>>>----------------------------------------------->>>>>>> Now in my simulations, there are two streams: one is air and the other is pure methane. So in this case, how to set the nu? Is it still correct to give an approximate uniform value for the whole field? Thank you very much.

Hi

I am new to openFoam. Did you get the answer for your question.?? please tell me how can we tackle this issue.. :o