coalCloudListI.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 | Copyright (C) 2012 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "fvMatrices.H"
27 #include "volFields.H"
28 #include "DimensionedField.H"
29 
32 {
34  (
36  (
37  IOobject
38  (
39  "UTransEff",
40  mesh_.time().timeName(),
41  mesh_,
44  ),
45  mesh_,
47  )
48  );
49 
51 
52  forAll(*this, i)
53  {
54  fld += operator[](i).UTrans();
55  }
56 
57  return tfld;
58 }
59 
60 
62 (
64 ) const
65 {
67  fvVectorMatrix& fvm = tfvm();
68 
69  forAll(*this, i)
70  {
71  fvm += operator[](i).SU(U);
72  }
73 
74  return tfvm;
75 }
76 
77 
80 {
82  (
84  (
85  IOobject
86  (
87  "hsTransEff",
88  mesh_.time().timeName(),
89  mesh_,
92  ),
93  mesh_,
94  dimensionedScalar("zero", dimEnergy, 0.0)
95  )
96  );
97 
99 
100  forAll(*this, i)
101  {
102  fld += operator[](i).hsTrans();
103  }
104 
105  return tfld;
106 }
107 
108 
110 (
111  volScalarField& hs
112 ) const
113 {
115  fvScalarMatrix& fvm = tfvm();
116 
117  forAll(*this, i)
118  {
119  fvm += operator[](i).Sh(hs);
120  }
121 
122  return tfvm;
123 }
124 
125 
127 (
128  const label ii,
129  volScalarField& Yi
130 ) const
131 {
133  fvScalarMatrix& fvm = tfvm();
134 
135  forAll(*this, i)
136  {
137  fvm += operator[](i).SYi(ii, Yi);
138  }
139 
140  return tfvm;
141 }
142 
143 
146 {
148  (
150  (
151  IOobject
152  (
153  "rhoTransEff",
154  mesh_.time().timeName(),
155  mesh_,
158  ),
159  mesh_,
160  dimensionedScalar("zero", dimMass, 0.0)
161  )
162  );
163 
165 
166  forAll(*this, i)
167  {
168  forAll(operator[](i).rhoTrans(), j)
169  {
170  fld += operator[](i).rhoTrans()[j];
171  }
172  }
173 
174  return tfld;
175 }
176 
177 
178 
179 
182 {
184  (
186  (
187  IOobject
188  (
189  "rhoTransEff",
190  mesh_.time().timeName(),
191  mesh_,
194  ),
195  mesh_,
196  dimensionedScalar("zero", dimDensity/dimTime, 0.0)
197  )
198  );
199 
201 
202  forAll(*this, i)
203  {
204  fld += operator[](i).Srho();
205  }
206 
207  return tfld;
208 }
209 
210 
213 (
214  const label i
215 ) const
216 {
218  (
220  (
221  IOobject
222  (
223  "rhoTransEff",
224  mesh_.time().timeName(),
225  mesh_,
228  ),
229  mesh_,
230  dimensionedScalar("zero", dimDensity/dimTime, 0.0)
231  )
232  );
233 
235 
236  forAll(*this, j)
237  {
238  fld += operator[](j).Srho(i);
239  }
240 
241  return tfld;
242 }
243 
244 
246 (
248 ) const
249 {
251  fvScalarMatrix& fvm = tfvm();
252 
253  forAll(*this, i)
254  {
255  fvm += operator[](i).Srho(rho);
256  }
257 
258  return tfvm;
259 }
260 
261 
262 // ************************************************************************* //
volFields.H
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::Vector< scalar >::zero
static const Vector zero
Definition: Vector.H:80
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::dimVelocity
const dimensionSet dimVelocity
Foam::dimEnergy
const dimensionSet dimEnergy
Foam::dimDensity
const dimensionSet dimDensity
DimensionedField.H
Foam::dimForce
const dimensionSet dimForce
Foam::IOobject::NO_WRITE
@ NO_WRITE
Definition: IOobject.H:118
Foam::coalCloudList::UTrans
tmp< DimensionedField< vector, volMesh > > UTrans() const
Return const reference to momentum source.
Definition: coalCloudListI.H:31
U
U
Definition: pEqn.H:46
fvMatrices.H
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::coalCloudList::Srho
tmp< DimensionedField< scalar, volMesh > > Srho() const
Return tmp total mass source for carrier phase.
Definition: coalCloudListI.H:181
Foam::fvVectorMatrix
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:45
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::IOobject::NO_READ
@ NO_READ
Definition: IOobject.H:111
Foam::PtrList< coalCloud >::operator[]
const T & operator[](const label) const
Return element const reference.
Foam::coalCloudList::hsTrans
tmp< DimensionedField< scalar, volMesh > > hsTrans() const
Sensible enthalpy transfer [J/kg].
Definition: coalCloudListI.H:79
fld
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
rho
rho
Definition: pEqn.H:3
Foam::Time::timeName
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:741
Foam::coalCloudList::rhoTrans
tmp< DimensionedField< scalar, volMesh > > rhoTrans() const
Return total mass transfer [kg/m3].
Definition: coalCloudListI.H:145
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
Foam::coalCloudList::SYi
tmp< fvScalarMatrix > SYi(const label i, volScalarField &Yi) const
Return mass source term for specie i - specie eqn.
Definition: coalCloudListI.H:127
Foam::coalCloudList::mesh_
const fvMesh & mesh_
Reference to the mesh.
Definition: coalCloudList.H:49
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::coalCloudList::SU
tmp< fvVectorMatrix > SU(volVectorField &U) const
Return tmp momentum source term.
Definition: coalCloudListI.H:62
Foam::coalCloudList::Sh
tmp< fvScalarMatrix > Sh(volScalarField &hs) const
Return sensible enthalpy source term [J/kg/m3/s].
Definition: coalCloudListI.H:110
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51