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-2016 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.ref();
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.ref();
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.ref();
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 (
247  volScalarField& rho
248 ) const
249 {
251  fvScalarMatrix& fvm = tfvm.ref();
252 
253  forAll(*this, i)
254  {
255  fvm += operator[](i).Srho(rho);
256  }
257 
258  return tfvm;
259 }
260 
261 
262 // ************************************************************************* //
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
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
tmp< DimensionedField< scalar, volMesh > > rhoTrans() const
Return total mass transfer [kg/m3].
tmp< fvScalarMatrix > Sh(volScalarField &hs) const
Return sensible enthalpy source term [J/kg/m3/s].
tmp< DimensionedField< vector, volMesh > > UTrans() const
Return const reference to momentum source.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:715
tmp< fvScalarMatrix > SYi(const label i, volScalarField &Yi) const
Return mass source term for specie i - specie eqn.
tmp< fvVectorMatrix > SU(volVectorField &U) const
Return tmp momentum source term.
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))
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:71
static const zero Zero
Definition: zero.H:91
const dimensionSet dimForce
const dimensionSet dimEnergy
const dimensionSet dimDensity
const T & operator[](const label) const
Return element const reference.
Definition: UPtrListI.H:103
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:45
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:54
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
tmp< DimensionedField< scalar, volMesh > > Srho() const
Return tmp total mass source for carrier phase.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
tmp< DimensionedField< scalar, volMesh > > hsTrans() const
Sensible enthalpy transfer [J/kg].
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
const dimensionSet dimVelocity