coalCloudListI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2018 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  "UTransEff",
38  mesh_,
40  )
41  );
42 
44 
45  forAll(*this, i)
46  {
47  fld += operator[](i).UTrans();
48  }
49 
50  return tfld;
51 }
52 
53 
55 (
57 ) const
58 {
60  fvVectorMatrix& fvm = tfvm.ref();
61 
62  forAll(*this, i)
63  {
64  fvm += operator[](i).SU(U);
65  }
66 
67  return tfvm;
68 }
69 
70 
73 {
75  (
77  (
78  "hsTransEff",
79  mesh_,
81  )
82  );
83 
85 
86  forAll(*this, i)
87  {
88  fld += operator[](i).hsTrans();
89  }
90 
91  return tfld;
92 }
93 
94 
96 (
97  volScalarField& hs
98 ) const
99 {
101  fvScalarMatrix& fvm = tfvm.ref();
102 
103  forAll(*this, i)
104  {
105  fvm += operator[](i).Sh(hs);
106  }
107 
108  return tfvm;
109 }
110 
111 
113 (
114  const label ii,
115  volScalarField& Yi
116 ) const
117 {
119  fvScalarMatrix& fvm = tfvm.ref();
120 
121  forAll(*this, i)
122  {
123  fvm += operator[](i).SYi(ii, Yi);
124  }
125 
126  return tfvm;
127 }
128 
129 
132 {
134  (
136  (
137  "rhoTransEff",
138  mesh_,
140  )
141  );
142 
143  volScalarField::Internal& fld = tfld.ref();
144 
145  forAll(*this, i)
146  {
147  forAll(operator[](i).rhoTrans(), j)
148  {
149  fld += operator[](i).rhoTrans()[j];
150  }
151  }
152 
153  return tfld;
154 }
155 
156 
157 
158 
161 {
163  (
165  (
166  "rhoTransEff",
167  mesh_,
169  )
170  );
171 
172  volScalarField::Internal& fld = tfld.ref();
173 
174  forAll(*this, i)
175  {
176  fld += operator[](i).Srho();
177  }
178 
179  return tfld;
180 }
181 
182 
185 (
186  const label i
187 ) const
188 {
190  (
192  (
193  "rhoTransEff",
194  mesh_,
196  )
197  );
198 
199  volScalarField::Internal& fld = tfld.ref();
200 
201  forAll(*this, j)
202  {
203  fld += operator[](j).Srho(i);
204  }
205 
206  return tfld;
207 }
208 
209 
211 (
212  volScalarField& rho
213 ) const
214 {
216  fvScalarMatrix& fvm = tfvm.ref();
217 
218  forAll(*this, i)
219  {
220  fvm += operator[](i).Srho(rho);
221  }
222 
223  return tfvm;
224 }
225 
226 
227 // ************************************************************************* //
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
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
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
tmp< volVectorField::Internal > UTrans() const
Return const reference to momentum source.
tmp< volScalarField::Internal > hsTrans() const
Sensible enthalpy transfer [J/kg].
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
const T & operator[](const label) const
Return element const reference.
Definition: UPtrListI.H:96
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
tmp< volScalarField::Internal > rhoTrans() const
Return total mass transfer [kg/m^3].
tmp< fvScalarMatrix > SYi(const label i, volScalarField &Yi) const
Return mass source term for specie i - specie eqn.
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:72
static const zero Zero
Definition: zero.H:97
const dimensionSet dimForce
tmp< volScalarField::Internal > Srho() const
Return tmp total mass source for carrier phase.
const dimensionSet dimEnergy
const dimensionSet dimDensity
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.
tmp< fvVectorMatrix > SU(volVectorField &U) const
Return tmp momentum source term.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< fvScalarMatrix > Sh(volScalarField &hs) const
Return sensible enthalpy source term [J/kg/m^3/s].
const dimensionSet dimVelocity