mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
prghPressureFvPatchScalarField: Add support for hRef
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -152,7 +152,17 @@ void Foam::prghPressureFvPatchScalarField::updateCoeffs()
|
|||||||
const uniformDimensionedVectorField& g =
|
const uniformDimensionedVectorField& g =
|
||||||
db().lookupObject<uniformDimensionedVectorField>("g");
|
db().lookupObject<uniformDimensionedVectorField>("g");
|
||||||
|
|
||||||
operator==(p_ - rhop*((g.value() & patch().Cf())));
|
const uniformDimensionedScalarField& hRef =
|
||||||
|
db().lookupObject<uniformDimensionedScalarField>("hRef");
|
||||||
|
|
||||||
|
dimensionedScalar ghRef
|
||||||
|
(
|
||||||
|
mag(g.value()) > SMALL
|
||||||
|
? g & (cmptMag(g.value())/mag(g.value()))*hRef
|
||||||
|
: dimensionedScalar("ghRef", g.dimensions()*dimLength, 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
operator==(p_ - rhop*((g.value() & patch().Cf()) - ghRef.value()));
|
||||||
|
|
||||||
fixedValueFvPatchScalarField::updateCoeffs();
|
fixedValueFvPatchScalarField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ Description
|
|||||||
calculated as:
|
calculated as:
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
p_rgh = p - \rho g h
|
p_rgh = p - \rho g (h - hRef)
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
where
|
where
|
||||||
@ -40,8 +40,9 @@ Description
|
|||||||
p_rgh | Pseudo hydrostatic pressure [Pa]
|
p_rgh | Pseudo hydrostatic pressure [Pa]
|
||||||
p | Static pressure [Pa]
|
p | Static pressure [Pa]
|
||||||
h | Height in the opposite direction to gravity
|
h | Height in the opposite direction to gravity
|
||||||
|
hRef | Reference height in the opposite direction to gravity
|
||||||
\rho | density
|
\rho | density
|
||||||
g | acceleration due to gravity [m/s2]
|
g | acceleration due to gravity [m/s^2]
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
\heading Patch usage
|
\heading Patch usage
|
||||||
|
|||||||
Reference in New Issue
Block a user