42 template<
class RAUfType,
class DivUType>
50 const pressureReference& pressureReference,
51 nonOrthogonalSolutionControl& pcorrControl
54 const fvMesh& mesh = phi.mesh();
55 const Time& runTime = mesh.time();
60 p.boundaryField().size(),
61 zeroGradientFvPatchScalarField::typeName
67 if (p.boundaryField()[
patchi].fixesValue())
86 if (pcorr.needReference())
93 mesh.setFluxRequired(pcorr.name());
95 while (pcorrControl.correctNonOrthogonal())
104 pcorrEqn.setReference(pressureReference.refCell(), 0);
108 if (pcorrControl.finalNonOrthogonalIter())
110 phi -= pcorrEqn.flux();
116 template<
class RAUfType,
class DivRhoUType>
123 const RAUfType& rAUf,
124 const DivRhoUType& divRhoU,
125 nonOrthogonalSolutionControl& pcorrControl
128 const fvMesh& mesh = phi.mesh();
129 const Time& runTime = mesh.time();
134 p.boundaryField().size(),
135 zeroGradientFvPatchScalarField::typeName
141 if (p.boundaryField()[
patchi].fixesValue())
160 mesh.setFluxRequired(pcorr.name());
162 while (pcorrControl.correctNonOrthogonal())
177 if (pcorrControl.finalNonOrthogonalIter())
179 phi += pcorrEqn.flux();
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Calculate the matrix for the laplacian of the field.
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
void CorrectPhi(surfaceScalarField &phi, const volVectorField &U, const volScalarField &p, const RAUfType &rAUf, const DivUType &divU, const pressureReference &pressureReference, nonOrthogonalSolutionControl &pcorrControl)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Calculate the matrix for the first temporal derivative.
Calculate the divergence of the given field.
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
List< word > wordList
A List of words.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A scalar instance of fvMatrix.
wordList pcorrTypes(p.boundaryField().size(), zeroGradientFvPatchScalarField::typeName)
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...
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void makeRelative(surfaceScalarField &phi, const volVectorField &U)
Make the given flux relative.