thermophysicalMach.H
Go to the documentation of this file.
1  for (label i=startTime; i<endTime; i++)
2  {
3  runTime.setTime(Times[i], i);
4 
5  Info<< "Time = " << runTime.timeName() << endl;
6 
7  mesh.readUpdate();
8 
9  IOobject Uheader
10  (
11  "U",
12  runTime.timeName(),
13  mesh,
14  IOobject::MUST_READ
15  );
16 
17  if (Uheader.headerOk())
18  {
19  volVectorField U(Uheader, mesh);
20 
21  autoPtr<fluidThermo> thermo
22  (
24  );
25 
26  volScalarField Cp = thermo->Cp();
27  volScalarField Cv = thermo->Cv();
28 
30  (
31  IOobject
32  (
33  "Ma",
34  runTime.timeName(),
35  mesh
36  ),
37  mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T()))
38  );
39  Ma.write();
40  }
41  else
42  {
43  Info<< " No U" << endl;
44  }
45  }
dimensionedScalar sqrt(const dimensionedScalar &ds)
Foam::label startTime
dimensioned< scalar > mag(const dimensioned< Type > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
messageStream Info
dynamicFvMesh & mesh
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
virtual bool write() const
Write using setting from DB.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
psiReactionThermo & thermo
Definition: createFields.H:32
U
Definition: pEqn.H:82