51int main(
int argc,
char *argv[])
55 "Density-based compressible flow solver based on"
56 " central-upwind schemes of Kurganov and Tadmor with"
57 " support for mesh-motion and topology changes."
82 scalar minCoNum = 0.0;
84 Info<<
"\nStarting time loop\n" <<
endl;
92 #include "setDeltaT.H"
123 phiv_pos.setOriented(
false);
125 phiv_neg.setOriented(
false);
152 max(
max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero)
158 min(
min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero)
183 amaxSf =
max(
mag(aphiv_pos),
mag(aphiv_neg));
196 phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg;
201 phiU.setOriented(
true);
208 aphiv_pos*(rho_pos*(e_pos + 0.5*
magSqr(U_pos)) + p_pos)
209 + aphiv_neg*(rho_neg*(e_neg + 0.5*
magSqr(U_neg)) + p_neg)
210 + aSf*p_pos - aSf*p_neg
218 phiEp +=
meshPhi*(a_pos*p_pos + a_neg*p_neg);
228 solve(fvm::ddt(rhoU) + fvc::div(phiUp));
233 U.correctBoundaryConditions();
234 rhoU.boundaryFieldRef() ==
rho.boundaryField()*
U.boundaryField();
241 - fvm::laplacian(muEff,
U)
252 fvc::interpolate(muEff)*
mesh.magSf()*fvc::snGrad(
U)
253 + fvc::dotInterpolate(
mesh.Sf(), tauMC)
255 & (a_pos*U_pos + a_neg*U_neg)
262 - fvc::div(sigmaDotU)
266 e.correctBoundaryConditions();
268 rhoE.boundaryFieldRef() ==
271 e.boundaryField() + 0.5*
magSqr(
U.boundaryField())
288 p.correctBoundaryConditions();
289 rho.boundaryFieldRef() ==
psi.boundaryField()*
p.boundaryField();
295 runTime.printExecutionTime(Info);
Calculates the mean and maximum wave speed based Courant Numbers.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
const volScalarField & psi
Read the control parameters used by setDeltaT.
compressible::turbulenceModel & turbulence
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
const dimensionedScalar c
Speed of light in a vacuum.
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a).
Execute application functionObjects to post-process existing results.
word fluxScheme("Kurganov")
Read the control parameters used by setDeltaT.