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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
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 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "fvMatrices.H"
29 #include "volFields.H"
30 #include "DimensionedField.H"
31 
34 {
36  (
37  "UTransEff",
39  mesh_,
41  );
42  auto& fld = tfld.ref();
43 
44  forAll(*this, i)
45  {
46  fld += operator[](i).UTrans();
47  }
48 
49  return tfld;
50 }
51 
52 
54 (
56 ) const
57 {
58  auto tfvm = tmp<fvVectorMatrix>::New(U, dimForce);
59  auto& fvm = tfvm.ref();
60 
61  forAll(*this, i)
62  {
63  fvm += operator[](i).SU(U);
64  }
65 
66  return tfvm;
67 }
68 
69 
72 {
74  (
75  "hsTransEff",
77  mesh_,
79  );
80  auto& fld = tfld.ref();
81 
82  forAll(*this, i)
83  {
84  fld += operator[](i).hsTrans();
85  }
86 
87  return tfld;
88 }
89 
90 
92 (
93  volScalarField& hs
94 ) const
95 {
97  auto& fvm = tfvm.ref();
98 
99  forAll(*this, i)
100  {
101  fvm += operator[](i).Sh(hs);
102  }
103 
104  return tfvm;
105 }
106 
107 
109 (
110  const label ii,
111  volScalarField& Yi
112 ) const
113 {
114  auto tfvm = tmp<fvScalarMatrix>::New(Yi, dimMass/dimTime);
115  auto& fvm = tfvm.ref();
116 
117  forAll(*this, i)
118  {
119  fvm += operator[](i).SYi(ii, Yi);
120  }
121 
122  return tfvm;
123 }
124 
125 
128 {
130  (
131  "rhoTransEff",
133  mesh_,
135  );
136  auto& fld = tfld.ref();
137 
138  forAll(*this, i)
139  {
140  forAll(operator[](i).rhoTrans(), j)
141  {
142  fld += operator[](i).rhoTrans()[j];
143  }
144  }
145 
146  return tfld;
147 }
148 
149 
152 {
154  (
155  "rhoTransEff",
157  mesh_,
159  );
160  auto& fld = tfld.ref();
161 
162  forAll(*this, i)
163  {
164  fld += operator[](i).Srho();
165  }
167  return tfld;
168 }
169 
170 
173 (
174  const label i
175 ) const
176 {
178  (
179  "rhoTransEff",
181  mesh_,
183  );
184  auto& fld = tfld.ref();
185 
186  forAll(*this, j)
187  {
188  fld += operator[](j).Srho(i);
189  }
190 
191  return tfld;
192 }
193 
194 
196 (
198 ) const
199 {
201  auto& fvm = tfvm.ref();
202 
203  forAll(*this, i)
204  {
205  fvm += operator[](i).Srho(rho);
206  }
207 
208  return tfvm;
209 }
210 
211 
212 // ************************************************************************* //
const T & operator[](const label i) const
Return const reference to the element at given position. FatalError for bounds problem or nullptr...
Definition: UPtrListI.H:289
tmp< volVectorField::Internal > UTrans() const
Return const reference to momentum source.
tmp< volScalarField::Internal > hsTrans() const
Sensible enthalpy transfer [J/kg].
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
tmp< volScalarField::Internal > rhoTrans() const
Return total mass transfer [kg/m3].
tmp< fvScalarMatrix > SYi(const label i, volScalarField &Yi) const
Return mass source term for specie i - specie eqn.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:76
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:421
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Definition: tmp.H:206
const dimensionSet dimForce
tmp< volScalarField::Internal > Srho() const
Return tmp total mass source for carrier phase.
const dimensionSet dimEnergy
const dimensionSet dimDensity
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field...
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: HashPtrTable.H:50
Do not request registration (bool: false)
tmp< fvScalarMatrix > Sh(volScalarField &hs) const
Return sensible enthalpy source term [J/kg/m3/s].
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127
const dimensionSet dimVelocity