createFields.H
Go to the documentation of this file.
1 Info<< "Reading field p\n" << endl;
3 (
4  IOobject
5  (
6  "p",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE
11  ),
12  mesh
13 );
14 
15 Info<< "Reading field U\n" << endl;
17 (
18  IOobject
19  (
20  "U",
21  runTime.timeName(),
22  mesh,
23  IOobject::MUST_READ,
24  IOobject::AUTO_WRITE
25  ),
26  mesh
27 );
28 
29 #include "createPhi.H"
30 
31 
32 label pRefCell = 0;
33 scalar pRefValue = 0.0;
35 mesh.setFluxRequired(p.name());
36 
37 
38 Info<< "Reading field pa\n" << endl;
40 (
41  IOobject
42  (
43  "pa",
44  runTime.timeName(),
45  mesh,
46  IOobject::MUST_READ,
47  IOobject::AUTO_WRITE
48  ),
49  mesh
50 );
51 
52 Info<< "Reading field Ua\n" << endl;
54 (
55  IOobject
56  (
57  "Ua",
58  runTime.timeName(),
59  mesh,
60  IOobject::MUST_READ,
61  IOobject::AUTO_WRITE
62  ),
63  mesh
64 );
65 
66 #include "createPhia.H"
67 
68 
69 label paRefCell = 0;
70 scalar paRefValue = 0.0;
72 (
73  pa,
74  simple.dict(),
75  paRefCell,
76  paRefValue
77 );
78 mesh.setFluxRequired(pa.name());
79 
80 
81 singlePhaseTransportModel laminarTransport(U, phi);
82 
83 autoPtr<incompressible::turbulenceModel> turbulence
84 (
86 );
87 
88 
91 
92 dimensionedScalar lambda(laminarTransport.lookup("lambda"));
93 dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"));
94 
95 const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
96 //const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
97 
99 (
100  IOobject
101  (
102  "alpha",
103  runTime.timeName(),
104  mesh,
105  IOobject::READ_IF_PRESENT,
106  IOobject::AUTO_WRITE
107  ),
108  lambda*max(Ua & U, zeroSensitivity)
109 );
110 zeroCells(alpha, inletCells);
111 //zeroCells(alpha, outletCells);
surfaceScalarField & phi
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
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
zeroCells(alpha, inletCells)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
List< label > labelList
A List of labels.
Definition: labelList.H:56
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0)
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
volScalarField & p
Definition: createFields.H:23
dimensionedScalar zeroSensitivity("0", dimVelocity *dimVelocity, 0.0)
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
const dictionary & simple
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Creates and initialises the face-flux field phia.
singlePhaseTransportModel laminarTransport(U, phi)
scalar pRefValue
Definition: createFields.H:107
const dimensionSet dimVelocity