90 int main(
int argc,
char *argv[])
97 #include "createControl.H"
106 Info<<
"\nStarting time loop\n" <<
endl;
110 Info<<
"Time = " << runTime.userTimeName() <<
nl <<
endl;
118 mesh.solution().fieldRelaxationFactor(
"alpha")
188 U.correctBoundaryConditions();
210 - adjointTransposeConvection
228 HbyAa = rAUa*UaEqn.
H();
246 phia = phiHbyAa - paEqn.
flux();
257 Ua.correctBoundaryConditions();
266 Info<<
"ExecutionTime = "
267 << runTime.elapsedCpuTime()
#define forAll(list, i)
Loop across all elements in list.
Calculates and prints the continuity errors.
int main(int argc, char *argv[])
void zeroCells(VolField< Type > &vf, const labelList &cells)
For cases which do no have a pressure boundary adjust the balance of fluxes to obey continuity....
Generic GeometricField class.
void relax(const scalar alpha)
Relax field (for steady-state solution).
Finite volume constraints.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
tmp< volScalarField > A() const
Return the central coefficient.
tmp< VolField< Type > > H() const
Return the H operation source.
tmp< SurfaceField< Type > > flux() const
Return the face-flux field from the matrix.
void setReference(const label celli, const Type &value, const bool forceReference=false)
Set reference level for solution.
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
virtual void correct()
Correct the fvModels.
bool correctNonOrthogonal(const bool finalIter=false)
Non-orthogonal corrector loop.
bool finalNonOrthogonalIter() const
Flag to indicate the last non-orthogonal iteration.
Provides controls for the pressure reference in closed-volume simulations.
scalar refValue() const
Return the pressure reference level.
label refCell() const
Return the cell in which the reference pressure is set.
bool loop(Time &time)
Time loop loop.
A class for managing temporary objects.
void clear() const
If object pointer points to valid object:
T & ref() const
Return non-const reference or generate a fatal error.
Abstract base class for all fluid physical properties.
tmp< fvVectorMatrix > tUEqn(fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevTau(U)==fvModels.source(rho, U))
Calculates and prints the continuity errors.
simpleControl simple(mesh)
Find the reference cell nearest (in index) to the given cell but which is not on a cyclic,...
Calculate the first temporal derivative.
Calculate the face-flux of the given field.
Calculate the gradient of the given field.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
Declare and initialise the cumulative adjoint continuity error.
Declare and initialise the cumulative continuity error.
volScalarField rAU(1.0/UEqn.A())
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(rho) *fvc::flux(HbyA))
dimensionedScalar alphaMax(viscosity->lookup("alphaMax"))
const labelList & inletCells
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0)
dimensionedScalar lambda(viscosity->lookup("lambda"))
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
void constrainPressure(volScalarField &p, const RhoType &rho, const volVectorField &U, const surfaceScalarField &phiHbyA, const RAUType &rhorAU, const MRFType &MRF)
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void constrainHbyA(volVectorField &HbyA, const volVectorField &U, const volScalarField &p)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
Execute application functionObjects to post-process existing results.
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))