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  // Copy phi to autoPtr. Rename to make sure copy is now registered as 'phi'.
46  phi.rename("phiFluid");
47  phiPtr.reset(new surfaceScalarField("phi", phi));
48 
50  (
51  rho,
52  U,
53  phiPtr(),
54  refCast<const fluidThermo>(thermo())
55  );
56 }
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
autoPtr< volVectorField > UPtr
Definition: createFields.H:21
Creates and initialises the face-flux field phi.
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
autoPtr< surfaceScalarField > phiPtr
Definition: createFields.H:22
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
rho
Definition: createFields.H:79
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
psiReactionThermo & thermo
Definition: createFields.H:32