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 
51  Info<< "Creating turbulence model\n" << endl;
52  autoPtr<compressible::turbulenceModel> turbulence
53  (
54  compressible::turbulenceModel::New
55  (
56  rho,
57  U,
58  phi,
59  thermo
60  )
61  );
62 
63  Info<< "Creating field DpDt\n" << endl;
66 
67 
68  Info<< "Creating field Xi\n" << endl;
70  (
71  IOobject
72  (
73  "Xi",
74  runTime.timeName(),
75  mesh,
76  IOobject::MUST_READ,
77  IOobject::AUTO_WRITE
78  ),
79  mesh
80  );
81 
82 
83  Info<< "Creating the unstrained laminar flame speed\n" << endl;
84  autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
85  (
86  laminarFlameSpeed::New(thermo)
87  );
88 
89 
90  Info<< "Reading strained laminar flame speed field Su\n" << endl;
92  (
93  IOobject
94  (
95  "Su",
96  runTime.timeName(),
97  mesh,
98  IOobject::MUST_READ,
99  IOobject::AUTO_WRITE
100  ),
101  mesh
102  );
103 
104  dimensionedScalar SuMin = 0.01*Su.average();
105  dimensionedScalar SuMax = 4*Su.average();
106 
107  Info<< "Calculating turbulent flame speed field St\n" << endl;
108  volScalarField St
109  (
110  IOobject
111  (
112  "St",
113  runTime.timeName(),
114  mesh,
115  IOobject::NO_READ,
116  IOobject::AUTO_WRITE
117  ),
118  Xi*Su
119  );
120 
121 
122  multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
123 
124  if (composition.contains("ft"))
125  {
126  fields.add(composition.Y("ft"));
127  }
128 
129  fields.add(b);
130  fields.add(h);
131  fields.add(hu);
132 
133 // ************************ vim: set sw=4 sts=4 et: ************************ //