All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
QGDUEqn.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 
13 License
14  This file is part of QGDsolver, based on OpenFOAM library.
15 
16  OpenFOAM is free software: you can redistribute it and/or modify it
17  under the terms of the GNU General Public License as published by
18  the Free Software Foundation, either version 3 of the License, or
19  (at your option) any later version.
20 
21  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
22  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  for more details.
25 
26  You should have received a copy of the GNU General Public License
27  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 
29 Group
30  grpQGDcommon
31 
32 Description
33  Solution of momentum equation for QGD solver
34 
35 \*----------------------------------------------------------------------------*/
36  solve
37  (
38  fvm::ddt(rhoU)
39  +
41  +
42  fvc::div(phiP)
43  -
45  );
46 
47  // Correct velocity
48  U.ref() =
49  rhoU()
50  /rho();
51  U.correctBoundaryConditions();
52 
53  // Solve diffusive QGD & NS part
55  {
56  fvVectorMatrix UEqn
57  (
58  fvm::ddt(rho, U) - fvc::ddt(rho,U)
59  - fvm::laplacian(muf, U)
61  ==
62  rhoUSu
63  );
64 
65  solve
66  (
67  UEqn
68  );
69 
70  rhoU = rho*U;
71 
72  sigmaDotUPtr() = (muf*linearInterpolate(fvc::grad(U)) + tauMCPtr()) & Uf;
73 
74  phiSigmaDotU = mesh.Sf() & sigmaDotUPtr(); //or eqn.flux()?
75  }
76  else
77  {
78  // Correct velocity with distributed sources
79  solve
80  (
81  fvm::ddt(rho,U)
82  -
83  fvc::ddt(rhoU)
84  ==
85  rhoUSu
86  );
87  }
88  rhoU.boundaryFieldRef() == rho.boundaryField()*
89  U.boundaryField();
90 
91 //
92 //END-OF-FILE
93 //
94 
95 
surfaceScalarField phiSigmaDotU("phiSigmaDotU", sigmaDotUPtr()&mesh.Sf())
phiP
Definition: updateFluxes.H:51
muf
Definition: updateFields.H:38
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
Switch implicitDiffusion(thermo.implicitDiffusion())
EEqn solve()
autoPtr< surfaceVectorField > sigmaDotUPtr
phiPi
Definition: updateFluxes.H:85
autoPtr< surfaceTensorField > tauMCPtr
phiJmU
——–End———
Definition: updateFluxes.H:50
tmp< surfaceScalarField > div(const volVectorField &vF)
fvVectorMatrix rhoUSu(U, rho.dimensions()*U.dimensions()*dimVolume/dimTime)
phiTauMC
Definition: updateFluxes.H:82
Uf
Definition: updateFields.H:30
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())
tmp< surfaceVectorField > grad(const volScalarField &vF)
volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U)