All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
createFaceFields.H
Go to the documentation of this file.
1  /*
2  *
3  * Linear interpolation of fields from volumes to face centers
4  *
5  */
6 
7  surfaceScalarField pos
8  (
9  IOobject
10  (
11  "pos",
12  runTime.timeName(),
13  mesh
14  ),
15  mesh,
16  dimensionedScalar("pos", dimless, 1.0)
17  );
18 
19  surfaceScalarField neg
20  (
21  IOobject
22  (
23  "neg",
24  runTime.timeName(),
25  mesh
26  ),
27  mesh,
28  dimensionedScalar("neg", dimless, -1.0)
29  );
30 
31  // Density
32  surfaceScalarField rhof
33  (
34  "rhof",
35  linearInterpolate(rho)
36  );
37  surfaceScalarField rho_pos
38  (
40  );
41  surfaceScalarField rho_neg
42  (
44  );
45 
46  surfaceScalarField rhoLnf = 1.0 / logMean(rho_pos,rho_neg);
47 
48  surfaceScalarField ef
49  (
50  "ef",
51  linearInterpolate(e)
52  );
53  surfaceScalarField e_pos
54  (
56  );
57  surfaceScalarField e_neg
58  (
60  );
61  surfaceScalarField eLnf= e_pos*e_neg*logMean(e_pos,e_neg);
62 
63  // Velocity
64  surfaceVectorField Uf
65  (
66  "Uf",
67  linearInterpolate(U)
68  );
69  surfaceVectorField U_pos
70  (
72  );
73  surfaceVectorField U_neg
74  (
76  );
77 
78  // Pressure
79  surfaceScalarField pf
80  (
81  "pf",
82  linearInterpolate(p)
83  );
84 
85  // Heat capacities ratio
86  surfaceScalarField gammaf
87  (
88  "gammaf",
89  linearInterpolate(gamma)
90  );
91 
92  surfaceScalarField gammam1f
93  (
94  "gammam1",
95  gammaf - 1
96  );
97 
98  // Heat capacity at constant pressure
99  surfaceScalarField E1f
100  (
101  "E1f",
102  linearInterpolate(rhoE + p)
103  //or (rhoEf + pf)/rhof?
104  );
105 
106  surfaceScalarField p1f
107  (
108  "p1f",
110  );
111 
112  surfaceScalarField muf
113  (
114  "muf",
115  linearInterpolate(thermo.mu()*0.0)
116  );
117 
118  surfaceScalarField alphauf
119  (
120  "alphauf",
121  muf*0.0
122  );
123 
124  surfaceScalarField cf
125  (
126  "cf",
127  linearInterpolate(thermo.c())
128  );
129 
130 
131 
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &dir, const word &reconFieldName=word::null)
Interpolate field vf according to direction dir.
surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh,)
pf
Definition: updateFields.H:21
surfaceScalarField eLnf
tmp< surfaceScalarField > logMean(const surfaceScalarField &a, const surfaceScalarField &b)
Definition: zQGDFoam.C:59
e_pos
Definition: updateFields.H:14
muf
Definition: updateFields.H:38
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
ef
Definition: updateFields.H:13
gammaf
Definition: updateFields.H:27
rho_pos
Definition: updateFields.H:9
alphauf
Definition: updateFields.H:42
volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *e+rho *0.5 *magSqr(U))
const volScalarField & gamma
Definition: createFields.H:19
rhof
Definition: updateFields.H:27
p1f
Definition: updateFields.H:35
surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh,)
volScalarField & e
Definition: createFields.H:50
e_neg
Definition: updateFields.H:15
rhoQGDThermo & thermo
Definition: createFields.H:47
gammam1f
Definition: updateFields.H:28
U_pos
Definition: updateFields.H:20
U_neg
Definition: updateFields.H:21
rho_neg
Definition: updateFields.H:10
Uf
Definition: updateFields.H:30
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())
cf
Definition: updateFields.H:24
E1f
Definition: updateFields.H:34
volScalarField & p
Definition: createFields.H:52
surfaceScalarField rhoLnf