All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
QGDYEqn.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, based on OpenFOAM library.
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 
25 Group grpQGDcommon
26  This group contains common part of QGD solvers.
27 
28 Description
29  Solution of momentum equation for QGD solver.
30 
31 SourceFiles
32  QGDFoam.C
33 
34 \*----------------------------------------------------------------------------*/
35 {
36  combustion->correct();
37  Qdot = combustion->Qdot();
38  volScalarField Yt(0.0*Y[0]);
39 
40  forAll(Y, i)
41  {
42  if (i != inertIndex && composition.active(i))
43  {
44  volScalarField& Yi = Y[i];
45  const surfaceScalarField& phiJmYi = phiJmY[i];
46 
48  {
49  fvScalarMatrix YEqn
50  (
51  fvm::ddt(rho,Yi)
52  +
53  fvc::div(phiJmYi)
54  -
55  fvm::laplacian(muf/ScNumbers[i],Yi)
56  ==
57  combustion->R(Yi)
58  +
59  parcels.SYi(i, Yi)
60  );
61 
62  YEqn.solve();
63 
64  diffusiveFlux[i] += YEqn.flux();
66  }
67  else
68  {
69  solve
70  (
71  fvm::ddt(rho,Yi)
72  +
73  fvc::div(phiJmYi)
74  -
75  fvc::laplacian(muf/ScNumbers[i],Yi)
76  ==
77  combustion->R(Yi)
78  +
79  parcels.SYi(i, Yi)
80  );
81 
82  diffusiveFlux[i] += (muf / ScNumbers[i]) * fvc::snGrad(Yi.oldTime()) * mesh.magSf();
83  diffusiveFlux[inertIndex] -= diffusiveFlux[i];
84  }
85 
86  Yi.max(0.0);
87  Yt += Yi;
88  }
89 
90  Y[inertIndex] = scalar(1) - Yt;
91  Y[inertIndex].max(0.0);
92  }
93 }
94 
95 //
96 //END-OF-FILE
97 //
98 
99 
const label inertIndex(composition.species()[inertSpecie])
PtrList< surfaceScalarField > phiJmY(Y.size())
——–End———
muf
Definition: updateFields.H:38
basicSpecieMixture & composition
Definition: createFields.H:28
Switch implicitDiffusion(thermo.implicitDiffusion())
EEqn solve()
PtrList< surfaceScalarField > diffusiveFlux(Y.size())
Qdot
Definition: QGDYEqn.H:33
List< scalar > ScNumbers(composition.species().size(), 1.0)
Info<< "Creating density field"<< endl;volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *e+rho *0.5 *magSqr(U));volScalarField H(IOobject("Ht", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE),(rhoE+p)/rho);Switch implicitDiffusion(thermo.implicitDiffusion());Info<< "Creating turbulence model\n"<< endl;turbulence.reset(compressible::turbulenceModel::New(rho, U, phi, thermo).ptr());Info<< "\nReading gravitationalProperties"<< endl;IOdictionary gravitationalProperties(IOobject("gravitationalProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));const dimensionedVector g(gravitationalProperties.lookup("g"));#140"/home/jenkins/workspace/experQGDsolver-8doxigen/QGDsolver/reactingLagrangianQGDFoam/createFields.H"2Info<< "Creating combustion model\n"<< endl;autoPtr< CombustionModel< psiQGDReactionThermo > > combustion(CombustionModel< psiQGDReactionThermo >::New(thermo, turbulence()))
forAll(Y, i)
Definition: QGDYEqn.H:36
volScalarField Yt(0.0 *Y[0])
tmp< surfaceScalarField > div(const volVectorField &vF)
PtrList< volScalarField > & Y
Definition: createFields.H:29
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())