CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   buoyantSimpleFoam and watertank (https://www.cfd-online.com/Forums/openfoam-solving/125718-buoyantsimplefoam-watertank.html)

FatihT December 18, 2022 08:15

p_rgh and non-uniform density
 
1 Attachment(s)
Hello,
I'm facing a similar problem with non-uniform density over a water tank with supercritical water. The density is in a range of 85 to 1012 kg/m³.

I did the initialization with codeStream. (see below)

If you calculate the density from the pressure difference at the very bottom,
(p-p_rgh)/(gh) density corresponds to the local density.

Is there a way to use domainIntegrate to integrate the density up to the current height?
Or something like: p_hyd += rho*g*(h-h[-1])

buoyantFoam/pEqn.H:

// For steady closed-volume compressible cases adjust the pressure level
// to obey overall mass continuity
if (adjustMass && !thermo.incompressible())
{
p += (initialMass - fvc::domainIntegrate(thermo.rho()))
/fvc::domainIntegrate(psi);
p_rgh = p - rho*gh - pRef;
p_rgh.correctBoundaryConditions();
}


All times are GMT -4. The time now is 00:31.