45 int main(
int argc,
char *argv[])
53 #include "createFields.H" 54 #include "createFieldRefs.H" 67 scalar meanCoNum = 0.0;
69 Info<<
"\nStarting time loop\n" <<
endl;
77 #include "setDeltaT.H" 111 phiv_pos -=
mesh.phi();
112 phiv_neg -=
mesh.phi();
130 max(
max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero)
135 min(
min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero)
160 amaxSf =
max(
mag(aphiv_pos),
mag(aphiv_neg));
166 #include "setRDeltaT.H" 172 phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg;
176 (aphiv_pos*rhoU_pos + aphiv_neg*rhoU_neg)
177 + (a_pos*p_pos + a_neg*p_neg)*
mesh.Sf()
183 aphiv_pos*(rho_pos*(e_pos + 0.5*
magSqr(U_pos)) + p_pos)
184 + aphiv_neg*(rho_neg*(e_neg + 0.5*
magSqr(U_neg)) + p_neg)
185 + aSf*p_pos - aSf*p_neg
191 phiEp +=
mesh.phi()*(a_pos*p_pos + a_neg*p_neg);
206 U.correctBoundaryConditions();
207 rhoU.boundaryFieldRef() ==
rho.boundaryField()*
U.boundaryField();
228 & (a_pos*U_pos + a_neg*U_neg)
239 e.correctBoundaryConditions();
241 rhoE.boundaryFieldRef() ==
244 e.boundaryField() + 0.5*
magSqr(
U.boundaryField())
261 p.correctBoundaryConditions();
262 rho.boundaryFieldRef() ==
psi.boundaryField()*
p.boundaryField();
269 Info<<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s" 270 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< tensor, fvPatchField, volMesh > volTensorField
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Read the control parameters used by setDeltaT.
rhoReactionThermo & thermo
const dimensionedScalar & c
Speed of light in a vacuum.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedScalar neg(const dimensionedScalar &ds)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimVolume(pow3(dimLength))
rhoReactionThermophysicalTransportModel & thermophysicalTransport
const dimensionedScalar & e
Elementary charge.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
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.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Calculates the mean and maximum wave speed based Courant Numbers.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
dimensioned< scalar > mag(const dimensioned< Type > &)
const volScalarField & psi
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Execute application functionObjects to post-process existing results.
word fluxScheme("Kurganov")
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
Read the control parameters used by setDeltaT.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)