Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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{
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(
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,
112) const
113{
115 auto& fvm = tfvm.ref();
116
117 forAll(*this, i)
118 {
119 fvm += operator[](i).SYi(ii, Yi);
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 }
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();
166
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// ************************************************************************* //
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
static tmp< GeometricField< vector, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< vector >::calculatedType())
@ NO_REGISTER
Do not request registration (bool: false).
const coalCloud & operator[](const label i) const
Definition UPtrListI.H:289
tmp< fvVectorMatrix > SU(volVectorField &U) const
Return tmp momentum source term.
tmp< volVectorField::Internal > UTrans() const
Return const reference to momentum source.
tmp< fvScalarMatrix > SYi(const label i, volScalarField &Yi) const
Return mass source term for specie i - specie eqn.
tmp< volScalarField::Internal > Srho() const
Return tmp total mass source for carrier phase.
tmp< volScalarField::Internal > hsTrans() const
Sensible enthalpy transfer [J/kg].
tmp< volScalarField::Internal > rhoTrans() const
Return total mass transfer [kg/m3].
tmp< fvScalarMatrix > Sh(volScalarField &hs) const
Return sensible enthalpy source term [J/kg/m3/s].
A class for managing temporary objects.
Definition tmp.H:75
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Definition tmp.H:215
U
Definition pEqn.H:72
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Namespace of functions to calculate implicit derivatives returning a matrix.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimEnergy
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVelocity
const dimensionSet dimForce
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimDensity
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
#define forAll(list, i)
Loop across all elements in list.
Definition stdFoam.H:299