thermodynamicMach.H
Go to the documentation of this file.
2 
3  for (label i=startTime; i<endTime; i++)
4  {
5  runTime.setTime(Times[i], i);
6 
7  Info<< "Time = " << runTime.timeName() << endl;
8 
9  IOobject Uheader
10  (
11  "U",
12  runTime.timeName(),
13  mesh,
14  IOobject::MUST_READ
15  );
16 
17  IOobject Theader
18  (
19  "T",
20  runTime.timeName(),
21  mesh,
22  IOobject::MUST_READ
23  );
24 
25 
26  // Check U exists
27  if (Uheader.headerOk() && Theader.headerOk())
28  {
29  mesh.readUpdate();
30 
31  volVectorField U(Uheader, mesh);
32  volScalarField T(Theader, mesh);
33 
35  (
36  IOobject
37  (
38  "Ma",
39  runTime.timeName(),
40  mesh
41  ),
42  mag(U)/(sqrt(((Cv + R)/Cv)*R*T))
43  );
44  Ma.write();
45  }
46  else
47  {
48  Info<< " No U or T" << endl;
49  }
50  }
dimensionedScalar sqrt(const dimensionedScalar &ds)
Foam::label startTime
dimensioned< scalar > mag(const dimensioned< Type > &)
#define R(A, B, C, D, E, F, K, M)
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
const volScalarField & T
Definition: createFields.H:25
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
U
Definition: pEqn.H:82