57 GeometricField<Type, fvPatchField, volMesh>& vf,
70 int main(
int argc,
char *argv[])
77 #include "createControl.H" 78 #include "createFields.H" 79 #include "initContinuityErrs.H" 86 Info<<
"\nStarting time loop\n" <<
endl;
98 mesh.fieldRelaxationFactor(
"alpha")
108 tmp<fvVectorMatrix>
tUEqn 136 while (
simple.correctNonOrthogonal())
146 if (
simple.finalNonOrthogonalIter())
152 #include "continuityErrs.H" 159 U.correctBoundaryConditions();
178 tmp<fvVectorMatrix> tUaEqn
181 - adjointTransposeConvection
199 HbyAa = rAUa*UaEqn.H();
205 while (
simple.correctNonOrthogonal())
212 paEqn.setReference(paRefCell, paRefValue);
215 if (
simple.finalNonOrthogonalIter())
217 phia = phiHbyAa - paEqn.flux();
228 Ua.correctBoundaryConditions();
237 Info<<
"ExecutionTime = "
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
void constrainPressure(volScalarField &p, const RhoType &rho, const volVectorField &U, const surfaceScalarField &phiHbyA, const RAUType &rhorAU, const MRFType &MRF)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
zeroCells(alpha, inletCells)
const labelList & inletCells
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< volScalarField > rAU
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
singlePhaseTransportModel laminarTransport(U, phi)
List< label > labelList
A List of labels.
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0)
Declare and initialise the cumulative ddjoint continuity error.
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
fvMatrix< vector > fvVectorMatrix
Calculates and prints the continuity errors.
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Execute application functionObjects to post-process existing results.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
simpleControl simple(mesh)