createFields.H
Go to the documentation of this file.
1 autoPtr<basicThermo> thermo
2 (
4 );
5 
6 const volScalarField& h = thermo->he();
7 
8 // Register copy of thermo density
10 (
11  IOobject
12  (
13  "rho",
14  runTime.timeName(),
15  mesh
16  ),
17  thermo->rho()
18 );
19 
20 // Construct turbulence model (if fluid)
21 autoPtr<volVectorField> UPtr;
22 autoPtr<surfaceScalarField> phiPtr;
23 autoPtr<compressible::turbulenceModel> turbulence;
24 
25 if (isA<fluidThermo>(thermo()))
26 {
27  UPtr.reset
28  (
29  new volVectorField
30  (
31  IOobject
32  (
33  "U",
34  runTime.timeName(),
35  mesh,
36  IOobject::MUST_READ,
37  IOobject::AUTO_WRITE
38  ),
39  mesh
40  )
41  );
42  const volVectorField& U = UPtr();
43 
44  #include "compressibleCreatePhi.H"
45 
46  // Copy phi to autoPtr. Rename to make sure copy is now registered as 'phi'.
47  phi.rename("phiFluid");
48  phiPtr.reset(new surfaceScalarField("phi", phi));
49 
51  (
52  rho,
53  U,
54  phiPtr(),
55  refCast<const fluidThermo>(thermo())
56  );
57 }
58 
59 // Read radiative heat-flux if available
61 (
62  IOobject
63  (
64  "Qr",
65  runTime.timeName(),
66  mesh,
67  IOobject::READ_IF_PRESENT,
68  IOobject::NO_WRITE
69  ),
70  mesh,
72 );
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
psiReactionThermo & thermo
Definition: createFields.H:32
phi
surfaceScalarField & phi
Definition: createFields.H:13
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:79
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::pow3
dimensionedScalar pow3(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:87
Qr
volScalarField Qr(IOobject("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0))
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
h
const volScalarField & h
Planck constant.
Definition: createFields.H:6
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
phiPtr
autoPtr< surfaceScalarField > phiPtr
Definition: createFields.H:22
UPtr
autoPtr< volVectorField > UPtr
Definition: createFields.H:21
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())