All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
createFaceFluxes.H
Go to the documentation of this file.
1 
2 /*Field for debugging parallel execution*/
3 //surfaceVectorField cellNoGradf
4 //(
5 // "cellNoGradf", faceStencil.faceScalarGrad(cellNo)
6 //);
7 //
8 //cellNoGradf.write();
9 
10 //Gradients and divergence
11 //---------Start---------
12 surfaceVectorField gradPf
13 (
14  "gradPf", fvsc::grad(p)
15 );
16 
17 surfaceTensorField gradUf
18 (
19  "gradUf",
20  fvsc::grad(U)
21 );
22 
23 surfaceScalarField divUf
24 (
25  "divUf",
26  Foam::tr(gradUf)
27 );
28 
29 surfaceVectorField gradef
30 (
31  "gradef",
32  fvsc::grad(e)
33 );
34 
35 surfaceVectorField gradRhof
36 (
37  "gradRhof",
39 );
40 
41 surfaceScalarField divRhoUf
42 (
43  "divRhoUf",
45 );
46 
47 //---------End---------
48 
49 //Continuity equation fluxes
50 //---------Start---------
51 
52 phi = linearInterpolate(rhoU) & mesh.Sf();
53 
54 surfaceVectorField jm
55 (
56  "jm",
57  //rhoUf - rhoW
58  linearInterpolate(rhoU)
59 );
60 
61 surfaceScalarField phiJm
62 (
63  "phiJm",
64  mesh.Sf() & jm
65 );
66 
67 //---------End---------
68 
69 // Fluxes for momentum balance equation
70 //---------Start---------
71 surfaceVectorField phiJmU
72 (
73  "phiJmU",
74  mesh.Sf() & (jm * Uf)
75 );
76 
77 surfaceVectorField phiP
78 (
79  "phiP",
80  pf*mesh.Sf()
81 );
82 
83 surfaceTensorField Pif
84 (
85  "Pif",
86  //QGD diffusive fluxes
87  tauQGDf * (Uf * gradPf)
88  +
89  tauQGDf * I * ( (Uf & gradPf) + (gammaf * pf * divUf) )
90 );
91 
92 surfaceVectorField phiPi
93 (
94  "phiPi",
95  mesh.Sf() & Pif
96 );
97 
98 autoPtr<surfaceTensorField> tauMCPtr;
99 tauMCPtr.reset
100 (
101  new surfaceTensorField
102  (
103  "tauMC",
104  0.0*muf*
105  (
106  Foam::T(gradUf)//Don't forget to transpose
107  -
109  )
110  )
111 );
112 
113 surfaceVectorField phiTauMC
114 (
115  "phiTauMC",
116  tauMCPtr() & mesh.Sf()
117 );
118 
119 //---------End---------
120 
121 // Fluxes for energy balance equation
122 //---------Start---------
123 surfaceScalarField phiJmH
124 (
125  "phiJmH",
126  phiJm * linearInterpolate(e)
127 );
128 
129 surfaceScalarField phih2
130 (
131  "phih2",
132  (0.25*hQGDf*hQGDf*(fvc::snGrad(U) * fvc::snGrad(p)) & mesh.Sf())
133 );
134 phih2.setOriented(false);
135 
136 surfaceVectorField qf
137 (
138  "qf",
139  -
140  tauQGDf*
141  (
142  ((linearInterpolate(rho*(U*U))) & gradef)
143  -
144  (pf * rhof * Uf * (Uf & gradRhof) / rhof / rhof)
145  )
146 );
147 
148 surfaceScalarField phiQ
149 (
150  "phiQ",
151  qf & mesh.Sf()
152 );
153 
154 surfaceScalarField phiPiU
155 (
156  "phiPiU",
157  (Pif & Uf) & mesh.Sf()
158 );
159 
160 autoPtr<surfaceVectorField> sigmaDotUPtr;
161 sigmaDotUPtr.reset
162 (
163  new surfaceVectorField
164  (
165  "sigmaDotU",
166  tauMCPtr() & linearInterpolate(U) //to be updated later
167  )
168 );
169 
170 surfaceScalarField phiSigmaDotU
171 (
172  "phiSigmaDotU",
173  sigmaDotUPtr() & mesh.Sf()
174 );
175 
176 //---------End---------
surfaceScalarField phiSigmaDotU("phiSigmaDotU", sigmaDotUPtr()&mesh.Sf())
gradPf
Definition: updateFluxes.H:33
pf
Definition: updateFields.H:21
const surfaceScalarField & tauQGDf
Definition: createFields.H:55
phiP
Definition: updateFluxes.H:51
divRhoUf
Definition: updateFluxes.H:15
const surfaceScalarField & hQGDf
Definition: createFields.H:54
muf
Definition: updateFields.H:38
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
gradRhof
Definition: updateFluxes.H:11
phiJmH
——–End———
Definition: updateFluxes.H:95
gradUf
Definition: updateFields.H:34
phiPiU
Definition: updateFluxes.H:115
gradef
Definition: updateFluxes.H:9
gammaf
Definition: updateFields.H:27
autoPtr< surfaceVectorField > sigmaDotUPtr
phiPi
Definition: updateFluxes.H:85
phiJm
Definition: updateFluxes.H:39
qf
Definition: updateFluxes.H:97
rhof
Definition: updateFields.H:27
autoPtr< surfaceTensorField > tauMCPtr
phiJmU
——–End———
Definition: updateFluxes.H:50
volScalarField & e
Definition: createFields.H:50
tmp< surfaceScalarField > div(const volVectorField &vF)
phiTauMC
Definition: updateFluxes.H:82
divUf
Definition: updateFluxes.H:7
jm
Definition: updateFluxes.H:37
Uf
Definition: updateFields.H:30
phiQ
Definition: updateFluxes.H:113
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())
volScalarField & T
Definition: createFields.H:53
tmp< surfaceVectorField > grad(const volScalarField &vF)
volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U)
surfaceScalarField phih2("phih2",(0.25 *hQGDf *hQGDf *(fvc::snGrad(U)*fvc::snGrad(p))&mesh.Sf()))
volScalarField & p
Definition: createFields.H:52
Pif
Definition: updateFluxes.H:53