createFields.H
Go to the documentation of this file.
1Info<< "Reading field p\n" << endl;
2volScalarField p
3(
4 IOobject
5 (
6 "p",
7 runTime.timeName(),
8 mesh,
9 IOobject::MUST_READ,
10 IOobject::AUTO_WRITE
11 ),
12 mesh
13);
14
15Info<< "Reading field U\n" << endl;
16volVectorField U
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
32label pRefCell = 0;
33scalar pRefValue = 0.0;
35mesh.setFluxRequired(p.name());
36
37
38//- Overset specific
39
40// Add solver-specific interpolations
41{
42 wordHashSet& nonInt =
43 const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
44
45 nonInt.insert("HbyA");
46 nonInt.insert("grad(p)");
47 nonInt.insert("surfaceIntegrate(phi)");
48 nonInt.insert("surfaceIntegrate(phiHbyA)");
49 nonInt.insert("cellMask");
50 nonInt.insert("cellDisplacement");
51 nonInt.insert("interpolatedCells");
52 nonInt.insert("cellInterpolationWeight");
53
54}
55// Mask field for zeroing out contributions on hole cells
56#include "createCellMask.H"
57
58// Create bool field with interpolated cells
60
61singlePhaseTransportModel laminarTransport(U, phi);
62
63autoPtr<incompressible::turbulenceModel> turbulence
64(
65 incompressible::turbulenceModel::New(U, phi, laminarTransport)
66);
67
68surfaceScalarField phiHbyA
69(
70 IOobject
71 (
72 "phiHbyA",
73 runTime.timeName(),
74 mesh,
75 IOobject::NO_READ,
76 IOobject::AUTO_WRITE
77 ),
78 fvc::flux(U)
79);
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
pimpleControl & pimple
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:191
U
Definition: pEqn.H:72
volScalarField & p
phiHbyA
Definition: pcEqn.H:73
Creates mask for blocked out cells.
dynamicFvMesh & mesh
engineTime & runTime
Creates mask for interpolated cells.
compressible::turbulenceModel & turbulence
singlePhaseTransportModel laminarTransport(U, phi)
setRefCell(p, pimple.dict(), pRefCell, pRefValue)