Go to the documentation of this file.
48 int main(
int argc,
char *argv[])
52 "Density-based compressible flow solver based on central-upwind"
53 " schemes of Kurganov and Tadmor."
63 #include "createFields.H"
64 #include "createFieldRefs.H"
79 Info<<
"\nStarting time loop\n" <<
endl;
106 phiv_pos.setOriented(
false);
108 phiv_neg.setOriented(
false);
126 max(
max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero)
132 min(
min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero)
157 amaxSf =
max(
mag(aphiv_pos),
mag(aphiv_neg));
164 #include "setRDeltaT.H"
168 #include "setDeltaT.H"
175 phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg;
180 phiU.setOriented(
true);
187 aphiv_pos*(rho_pos*(e_pos + 0.5*
magSqr(U_pos)) + p_pos)
188 + aphiv_neg*(rho_neg*(e_neg + 0.5*
magSqr(U_neg)) + p_neg)
189 + aSf*p_pos - aSf*p_neg
204 U.correctBoundaryConditions();
205 rhoU.boundaryFieldRef() ==
rho.boundaryField()*
U.boundaryField();
226 & (a_pos*U_pos + a_neg*U_neg)
237 e.correctBoundaryConditions();
239 rhoE.boundaryFieldRef() ==
242 e.boundaryField() + 0.5*
magSqr(
U.boundaryField())
259 p.correctBoundaryConditions();
260 rho.boundaryFieldRef() ==
psi.boundaryField()*
p.boundaryField();
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
GeometricField< tensor, fvPatchField, volMesh > volTensorField
Info<< "Reading field U\n"<< 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\n"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
static constexpr const zero Zero
Global zero (0)
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Calculates the mean and maximum wave speed based Courant Numbers.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (uses stdout - output is on the master only)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
word fluxScheme("Kurganov")
Execute application functionObjects to post-process existing results.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Read the control parameters used by setDeltaT.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Read the control parameters used by setDeltaT.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
const dimensionedScalar e
Elementary charge.
const dimensionedScalar c
Speed of light in a vacuum.
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dimensionSet dimVolume(pow3(dimLength))
const volScalarField & psi
dimensionedScalar neg(const dimensionedScalar &ds)
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.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
dimensionedScalar pos(const dimensionedScalar &ds)