43 template<
class RAUfType,
class DivUType>
62 p.boundaryField().size(),
67 forAll(
p.boundaryField(), patchi)
69 if (
p.boundaryField()[patchi].fixesValue())
71 pcorrTypes[patchi] = fixedValueFvPatchScalarField::typeName;
88 if (
pcorr.needReference())
97 while (
pimple.correctNonOrthogonal())
113 if (
pimple.finalNonOrthogonalIter())
121 template<
class RAUfType,
class DivRhoUType>
129 const RAUfType&
rAUf,
130 const DivRhoUType& divRhoU,
134 const fvMesh&
mesh =
U.mesh();
142 p.boundaryField().size(),
147 forAll(
p.boundaryField(), patchi)
149 if (
p.boundaryField()[patchi].fixesValue())
151 pcorrTypes[patchi] = fixedValueFvPatchScalarField::typeName;
170 while (
pimple.correctNonOrthogonal())
188 if (
pimple.finalNonOrthogonalIter())
190 phi += pcorrEqn.flux();
void CorrectPhi(volVectorField &U, surfaceScalarField &phi, const volScalarField &p, const RAUfType &rAUf, const DivUType &divU, pimpleControl &pimple)
fvMatrix< scalar > fvScalarMatrix
volScalarField pcorr(IOobject("pcorr", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedScalar(p.dimensions(), Zero), pcorrTypes)
wordList pcorrTypes(p.boundaryField().size(), fvPatchFieldBase::zeroGradientType())
const word zeroGradientType
A zeroGradient patch field type.
void setReference(const label celli, const Type &value, const bool forceReference=false)
Set reference level for solution.
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Calculate the matrix for the laplacian of the field.
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Calculate the matrix for the first temporal derivative.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Calculate the divergence of the given field.
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
List< word > wordList
List of word.
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A scalar instance of fvMatrix.
PIMPLE control class to supply convergence information/checks for the PIMPLE loop.
Mesh data needed to do the Finite Volume discretisation.
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
For cases which do no have a pressure boundary adjust the balance of fluxes to obey continuity...
const volScalarField & psi
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void makeRelative(surfaceScalarField &phi, const volVectorField &U)
Make the given flux relative.
Defines the attributes of an object for which implicit objectRegistry management is supported...
static constexpr const zero Zero
Global zero (0)