FreeFOAM The Cross-Platform CFD Toolkit
createFields.H
Go to the documentation of this file.
1  Info<< "Reading thermophysical properties\n" << endl;
2 
3  autoPtr<hhuCombustionThermo> pThermo
4  (
5  hhuCombustionThermo::New(mesh)
6  );
7  hhuCombustionThermo& thermo = pThermo();
8  basicMultiComponentMixture& composition = thermo.composition();
9 
11  (
12  IOobject
13  (
14  "rho",
15  runTime.timeName(),
16  mesh,
17  IOobject::NO_READ,
18  IOobject::AUTO_WRITE
19  ),
20  thermo.rho()
21  );
22 
23  volScalarField& p = thermo.p();
24  const volScalarField& psi = thermo.psi();
25  volScalarField& h = thermo.h();
26  volScalarField& hu = thermo.hu();
27 
28  volScalarField& b = composition.Y("bprog");
29  Info<< "min(bprog) = " << min(b).value() << endl;
30 
31  //const volScalarField& T = thermo->T();
32 
33 
34  Info<< "\nReading field U\n" << endl;
36  (
37  IOobject
38  (
39  "U",
40  runTime.timeName(),
41  mesh,
42  IOobject::MUST_READ,
43  IOobject::AUTO_WRITE
44  ),
45  mesh
46  );
47 
49 
50  Info<< "Creating turbulence model\n" << endl;
51  autoPtr<compressible::RASModel> turbulence
52  (
53  compressible::RASModel::New
54  (
55  rho,
56  U,
57  phi,
58  thermo
59  )
60  );
61 
62  Info<< "Creating field DpDt\n" << endl;
64  (
65  "DpDt",
67  );
68 
69 
70  Info<< "Creating the unstrained laminar flame speed\n" << endl;
71  autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
72  (
73  laminarFlameSpeed::New(thermo)
74  );
75 
76 
77  Info<< "Reading strained laminar flame speed field Su\n" << endl;
79  (
80  IOobject
81  (
82  "Su",
83  runTime.timeName(),
84  mesh,
85  IOobject::MUST_READ,
86  IOobject::AUTO_WRITE
87  ),
88  mesh
89  );
90 
91  Info<< "Reading field betav\n" << endl;
92  volScalarField betav
93  (
94  IOobject
95  (
96  "betav",
97  runTime.findInstance(polyMesh::meshSubDir, "betav"),
98  polyMesh::meshSubDir,
99  mesh,
100  IOobject::MUST_READ,
101  IOobject::NO_WRITE
102  ),
103  mesh
104  );
105 
106  IOdictionary PDRProperties
107  (
108  IOobject
109  (
110  "PDRProperties",
111  runTime.constant(),
112  mesh,
113  IOobject::MUST_READ,
114  IOobject::NO_WRITE
115  )
116  );
117 
118  //- Create the drag model
119  autoPtr<PDRDragModel> drag = PDRDragModel::New
120  (
121  PDRProperties,
122  turbulence,
123  rho,
124  U,
125  phi
126  );
127 
128  //- Create the flame-wrinkling model
129  autoPtr<XiModel> flameWrinkling = XiModel::New
130  (
131  PDRProperties,
132  thermo,
133  turbulence,
134  Su,
135  rho,
136  b,
137  phi
138  );
139 
140  Info<< "Calculating turbulent flame speed field St\n" << endl;
141  volScalarField St
142  (
143  IOobject
144  (
145  "St",
146  runTime.timeName(),
147  mesh,
148  IOobject::NO_READ,
149  IOobject::AUTO_WRITE
150  ),
151  flameWrinkling->Xi()*Su
152  );
153 
154 
155  multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
156 
157  if (composition.contains("ft"))
158  {
159  fields.add(composition.Y("ft"));
160  }
161 
162  fields.add(b);
163  fields.add(h);
164  fields.add(hu);
165  flameWrinkling->addXi(fields);
166 
167 // ************************ vim: set sw=4 sts=4 et: ************************ //