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  }
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
thermo
rhoThermo & thermo
Definition: setRegionFluidFields.H:3
U
U
Definition: pEqn.H:46
Foam::label
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
Foam::Info
messageStream Info
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:142
startTime
Foam::label startTime
Definition: checkTimeOptions.H:5