All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
createFaceFluxes.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10  Copyright (C) 2016-2019 ISP RAS (www.ispras.ru) UniCFD Group (www.unicfd.ru)
11 -------------------------------------------------------------------------------
12 License
13  This file is part of QGDsolver library, based on OpenFOAM+.
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22  You should have received a copy of the GNU General Public License
23  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 Global
25  createFaceFluxes
26 Description
27  Create Face Fluxes for calculation
28 SourceFile
29  QHDFoam.C
30 \*---------------------------------------------------------------------------*/
31 // Field for debugging parallel execution and tau-terms evaluation
32 /*
33 volScalarField cellNo
34 (
35  IOobject
36  (
37  "cellNo",
38  runTime.timeName(),
39  mesh,
40  IOobject::NO_READ,
41  IOobject::AUTO_WRITE
42  ),
43  rho*0.0
44 );
45 
46 forAll(cellNo, celli)
47 {
48  cellNo[celli] = mesh.C()[celli].z();
49 }
50 forAll(cellNo.boundaryField(), patchi)
51 {
52  forAll(cellNo.boundaryField()[patchi], facei)
53  {
54  cellNo.boundaryFieldRef()[patchi][facei] = mesh.Cf().boundaryField()[patchi][facei].z();
55  }
56 }
57 surfaceVectorField cellNoGradf
58 (
59  "cellNoGradf", fvsc::grad(cellNo)
60 );
61 
62 cellNo.write();
63 cellNoGradf.write();
64 return 0;
65 */
66 //Gradients and divergence
67 //---------Start---------
68 
69 
70 surfaceVectorField gradPf
71 (
72  "gradPf", fvsc::grad(p)
73 );
74 
75 surfaceVectorField gradTf
76 (
77  "gradTf", fvsc::grad(T)
78 );
79 
80 surfaceTensorField gradUf
81 (
82  "gradUf",
83  fvsc::grad(U)
84 );
85 
86 surfaceTensorField gradWf
87 (
88  "gradWf",
89  fvsc::grad(W)
90 );
91 
92 surfaceVectorField gradRhof
93 (
94  "gradRhof",
96 );
97 
98 surfaceScalarField divUf
99 (
100  "divUf",
101  tr(gradUf)
102 );
103 
104 //---------End---------
105 //P equation fluxes
106 //---------Start---------
107 //---------End---------
108 
109 // Fluxes for momentum balance equation
110 //---------Start---------
111 surfaceVectorField phiUf
112 (
113  "phiUf",
114  phi * Uf + (mesh.Sf() & (Wf * Wf))
115 );
116 
117 surfaceScalarField Pbyrho
118 (
119  "Pbyrho",
120  pf/rhof
121 );
122 
123 surfaceScalarField phiTf
124 (
125  "phiTf",
126  phi*Tf
127 );
128 
129 surfaceVectorField phiPi
130 (
131  "phiPi",
132  muf/rhof * mesh.Sf() & (gradUf+gradUf.T())
133 );
134 
135 //---------End---------
136 
137 // Fluxes for T balance equation
138 //---------Start---------
139 surfaceScalarField phiUmWT
140 (
141  "phiUmWT",
142  ((Uf-Wf)*Tf) & mesh.Sf()
143 );
144 
145 surfaceScalarField Hif
146 (
147  "Hif",
148  alphaf/rhof
149 );
150 Info << "Creating Face Fluxes is done"<< endl;
151 
152 //---------End---------
volVectorField W(IOobject("W", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), U)
gradPf
Definition: updateFluxes.H:33
pf
Definition: updateFields.H:21
muf
Definition: updateFields.H:38
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
gradRhof
Definition: updateFluxes.H:11
alphaf
Definition: updateFields.H:18
surfaceScalarField Pbyrho("Pbyrho", pf/rhof)
gradUf
Definition: updateFields.H:34
phiPi
Definition: updateFluxes.H:85
surfaceScalarField phiTf("phiTf", phi *Tf)
gradTf
Definition: updateFields.H:10
rhof
Definition: updateFields.H:27
Tf
Definition: updateFields.H:33
surfaceScalarField phiUmWT("phiUmWT",((Uf-Wf)*Tf)&mesh.Sf())
——–End———
Hif
Definition: updateFields.H:39
divUf
Definition: updateFluxes.H:7
Wf
Definition: QHDUEqn.H:31
Uf
Definition: updateFields.H:30
phiUf
Definition: QHDUEqn.H:35
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())
volScalarField & T
Definition: createFields.H:53
gradWf
Definition: updateFields.H:8
tmp< surfaceVectorField > grad(const volScalarField &vF)
volScalarField & p
Definition: createFields.H:52