CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   simpleFoam p field for interFoam p field (http://www.cfd-online.com/Forums/openfoam-solving/94651-simplefoam-p-field-interfoam-p-field.html)

shyam November 22, 2011 05:32

simpleFoam p field for interFoam p field
 
Hi Foamers,

I need to use interFoam to solve a problem, but it blows up within few time steps, which I believe is because of poor initialization . Hence I used simpleFoam to obtain the velocity and pressure fields. Now I want use the pressure field of simpleFoam (with units m^2/S^2) to obtain the pressure field of interFoam (kg/m/s^2) which is nothing but the product of pressure and density. How do I obtain this in openfoam?

nimasam November 22, 2011 05:50

some hints :) you need to investigate yourself ;)
1) Are you familiar with funkySetFields ? its great tool to make non uniform field
2) as a little I know ,you can easily change the dimension in p file ,so you can apply this pressure to interFoam
3)if you want to use pSimple*rho as new in interFoam, you should modified your solver!
something like that
volScalarField pSimple
(
IOobject
(
"pSimple",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);

p = pSimple*rho;

Bernhard November 22, 2011 06:24

Quote:

Originally Posted by nimasam (Post 333045)
2) as a little I know ,you can easily change the dimension in p file ,so you can apply this pressure to interFoam

But then your off by a factor of the density is suppose?
Quote:

Originally Posted by nimasam (Post 333045)
3)if you want to use pSimple*rho as new in interFoam, you should modified your solver!
something like that

If you do this one, I assume the foamCalc utility can do the trick.

shyam November 22, 2011 06:54

Thanks nima and Bernhard for your quick thoughts. I will try option 2 of nima and foamCalc and post my experience.


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