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 
93 (
94  "lambda",
97 );
98 
100 (
101  "alphaMax",
104 );
105 
106 const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
107 //const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
108 
110 (
111  IOobject
112  (
113  "alpha",
114  runTime.timeName(),
115  mesh,
116  IOobject::READ_IF_PRESENT,
117  IOobject::AUTO_WRITE
118  ),
119  lambda*max(Ua & U, zeroSensitivity)
120 );
122 //zeroCells(alpha, outletCells);
123 
124 #include "createFvOptions.H"
pRefCell
label pRefCell
Definition: createFields.H:106
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:71
runTime
engineTime & runTime
Definition: createEngineTime.H:13
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Definition: dimensionSets.H:50
pRefValue
scalar pRefValue
Definition: createFields.H:107
turbulence
Info<< "Reading field U\n"<< 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\n"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
Foam::dimLength
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:53
zeroSensitivity
dimensionedScalar zeroSensitivity(dimVelocity *dimVelocity, Zero)
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::dimVelocity
const dimensionSet dimVelocity
inletCells
const labelList & inletCells
Definition: createFields.H:106
setRefCell
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
createFvOptions.H
zeroCells
zeroCells(alpha, inletCells)
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:54
createPhia.H
Creates and initialises the face-flux field phia.
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
alphaMax
dimensionedScalar alphaMax("alphaMax", dimless/dimTime, laminarTransport)
p
volScalarField & p
Definition: createFields.H:23
lambda
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
zeroAlpha
dimensionedScalar zeroAlpha(dimless/dimTime, Zero)
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:60
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:51
alpha
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
laminarTransport
singlePhaseTransportModel laminarTransport(U, phi)