FreeFOAM The Cross-Platform CFD Toolkit
createRASTurbulence.H
Go to the documentation of this file.
1  IOdictionary RASProperties
2  (
3  IOobject
4  (
5  "RASProperties",
6  runTime.constant(),
7  mesh,
8  IOobject::MUST_READ,
9  IOobject::NO_WRITE
10  )
11  );
12 
13 
14  Switch turbulence
15  (
16  RASProperties.lookup("turbulence")
17  );
18 
19  dictionary kEpsilonDict
20  (
21  RASProperties.subDictPtr("kEpsilonCoeffs")
22  );
23 
25  (
26  dimensionedScalar::lookupOrAddToDict
27  (
28  "Cmu",
30  0.09
31  )
32  );
33 
35  (
36  dimensionedScalar::lookupOrAddToDict
37  (
38  "C1",
40  1.44
41  )
42  );
43 
45  (
46  dimensionedScalar::lookupOrAddToDict
47  (
48  "C2",
50  1.92
51  )
52  );
53 
55  (
56  dimensionedScalar::lookupOrAddToDict
57  (
58  "alphak",
60  1.0
61  )
62  );
63 
65  (
66  dimensionedScalar::lookupOrAddToDict
67  (
68  "alphaEps",
70  0.76923
71  )
72  );
73 
74  dictionary wallFunctionDict
75  (
76  RASProperties.subDictPtr("wallFunctionCoeffs")
77  );
78 
80  (
81  dimensionedScalar::lookupOrAddToDict
82  (
83  "kappa",
85  0.41
86  )
87  );
88 
90  (
91  dimensionedScalar::lookupOrAddToDict
92  (
93  "E",
95  9.8
96  )
97  );
98 
99  if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
100  {
101  Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
102  << "wallFunctionCoeffs" << wallFunctionDict << endl;
103  }
104 
105 
106  nearWallDist y(mesh);
107 
108 
109  Info<< "Reading field k\n" << endl;
111  (
112  IOobject
113  (
114  "k",
115  runTime.timeName(),
116  mesh,
117  IOobject::MUST_READ,
118  IOobject::AUTO_WRITE
119  ),
120  mesh
121  );
122 
123  Info<< "Reading field epsilon\n" << endl;
124  volScalarField epsilon
125  (
126  IOobject
127  (
128  "epsilon",
129  runTime.timeName(),
130  mesh,
131  IOobject::MUST_READ,
132  IOobject::AUTO_WRITE
133  ),
134  mesh
135  );
136 
137 
138  Info<< "Calculating field nutb\n" << endl;
139  volScalarField nutb
140  (
141  IOobject
142  (
143  "nutb",
144  runTime.timeName(),
145  mesh,
146  IOobject::NO_READ,
147  IOobject::AUTO_WRITE
148  ),
149  Cmu*sqr(k)/epsilon
150  );
151 
152  Info<< "Calculating field nuEffa\n" << endl;
154  (
155  IOobject
156  (
157  "nuEffa",
158  runTime.timeName(),
159  mesh,
160  IOobject::NO_READ,
161  IOobject::NO_WRITE
162  ),
163  sqr(Ct)*nutb + nua
164  );
165 
166  Info<< "Calculating field nuEffb\n" << endl;
168  (
169  IOobject
170  (
171  "nuEffb",
172  runTime.timeName(),
173  mesh,
174  IOobject::NO_READ,
175  IOobject::NO_WRITE
176  ),
177  nutb + nub
178  );
179 
180 // ************************ vim: set sw=4 sts=4 et: ************************ //