createFields.H
Go to the documentation of this file.
1 IOdictionary dict
2 (
3  IOobject
4  (
5  "createBoxTurbDict",
6  runTime.constant(),
7  runTime,
8  IOobject::MUST_READ
9  )
10 );
11 
12 // Extents in x, y, z directions
13 const vector L(dict.get<vector>("L"));
14 
15 // Number of cells in x, y, z directions
16 const Vector<label> N(dict.get<Vector<label>>("N"));
17 
18 // Wave number vs energy profile
19 autoPtr<Function1<scalar>> Ek(Function1<scalar>::New("Ek", dict, &runTime));
20 
21 // Number of modes
22 const label nModes = dict.get<label>("nModes");
23 
24 // Mesh spacing in x, y and z directions
25 const vector delta
26 (
27  L.x()/scalar(N.x()),
28  L.y()/scalar(N.y()),
29  L.z()/scalar(N.z())
30 );
31 
32 Random rndGen(1234);
runTime
engineTime & runTime
Definition: createEngineTime.H:13
L
const vector L(dict.get< vector >("L"))
Foam::Vector::x
const Cmpt & x() const
Access to the vector x component.
Definition: VectorI.H:73
dict
IOdictionary dict(IOobject("createBoxTurbDict", runTime.constant(), runTime, IOobject::MUST_READ))
Ek
autoPtr< Function1< scalar > > Ek(Function1< scalar >::New("Ek", dict, &runTime))
Foam::Vector::z
const Cmpt & z() const
Access to the vector z component.
Definition: VectorI.H:85
nModes
const label nModes
Definition: createFields.H:22
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::Vector::y
const Cmpt & y() const
Access to the vector y component.
Definition: VectorI.H:79
rndGen
Random rndGen
Definition: createFields.H:23
N
const Vector< label > N(dict.get< Vector< label >>("N"))
delta
const vector delta(L.x()/scalar(N.x()), L.y()/scalar(N.y()), L.z()/scalar(N.z()))