correctPhi.H
Go to the documentation of this file.
2 
3 {
4  volScalarField pcorr
5  (
6  IOobject
7  (
8  "pcorr",
9  runTime.timeName(),
10  mesh,
11  IOobject::NO_READ,
12  IOobject::NO_WRITE
13  ),
14  mesh,
15  dimensionedScalar("pcorr", p.dimensions(), 0.0),
17  );
18 
19  surfaceScalarField rhof(fvc::interpolate(rho, "div(phi,rho)"));
20  dimensionedScalar rAUf("rAUf", dimTime, 1.0);
21 
22  mesh.setFluxRequired(pcorr.name());
23 
24  while (pimple.correctNonOrthogonal())
25  {
26  fvScalarMatrix pcorrEqn
27  (
29  );
30 
31  pcorrEqn.solve();
32 
33  if (pimple.finalNonOrthogonalIter())
34  {
35  phi -= pcorrEqn.flux()/rhof;
36  }
37  }
38 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
pimpleNoLoopControl & pimple
surfaceScalarField & phi
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
engineTime & runTime
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
dimensionedScalar rAUf("rAUf", dimTime, 1.0)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
correctUphiBCs(U, phi)
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
wordList pcorrTypes(p.boundaryField().size(), zeroGradientFvPatchScalarField::typeName)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
volScalarField & p
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField rhof(fvc::interpolate(rho, "div(phi,rho)"))