correctPhi.H
Go to the documentation of this file.
2 
3 {
5  (
6  IOobject
7  (
8  "pcorr",
9  runTime.timeName(),
10  mesh,
11  IOobject::NO_READ,
12  IOobject::NO_WRITE
13  ),
14  mesh,
15  dimensionedScalar(p.dimensions(), Zero),
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:37
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())
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
engineTime & runTime
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:40
dimensionedScalar rAUf("rAUf", dimTime, 1.0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
dynamicFvMesh & mesh
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
pimpleControl & pimple
correctUphiBCs(U, phi)
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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)"))
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:133