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::RASModel> turbulence
84 (
85  incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
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 );
111 //zeroCells(alpha, outletCells);
pRefCell
label pRefCell
Definition: createFields.H:112
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
pRefValue
scalar pRefValue
Definition: createFields.H:113
Foam::labelList
List< label > labelList
A List of labels.
Definition: labelList.H:56
Foam::dimVelocity
const dimensionSet dimVelocity
inletCells
const labelList & inletCells
Definition: createFields.H:95
setRefCell
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
phi
surfaceScalarField & phi
Definition: createFields.H:13
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
simple
Simple relative velocity model.
zeroCells
zeroCells(alpha, inletCells)
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::label
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
createPhia.H
Creates and initialises the face-flux field phia.
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
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
zeroAlpha
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0)
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
alphaMax
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
laminarTransport
singlePhaseTransportModel laminarTransport(U, phi)
alpha
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
zeroSensitivity
dimensionedScalar zeroSensitivity("0", dimVelocity *dimVelocity, 0.0)
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
lambda
dimensionedScalar lambda(laminarTransport.lookup("lambda"))