coalCloudList.C
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 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 "coalCloudList.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
33 (
34  const volScalarField& rho,
35  const volVectorField& U,
36  const dimensionedVector& g,
37  const SLGThermo& slgThermo
38 )
39 :
41  mesh_(rho.mesh())
42 {
43  IOdictionary props
44  (
45  IOobject
46  (
47  "coalCloudList",
48  mesh_.time().constant(),
49  mesh_,
50  IOobject::MUST_READ
51  )
52  );
53 
54  const wordHashSet cloudNames(wordList(props.lookup("clouds")));
55 
56  setSize(cloudNames.size());
57 
58  label i = 0;
59  for (const word& name : cloudNames)
60  {
61  Info<< "creating cloud: " << name << endl;
62 
63  set
64  (
65  i++,
66  new coalCloud
67  (
68  name,
69  rho,
70  U,
71  g,
72  slgThermo
73  )
74  );
75 
76  Info<< endl;
77  }
78 }
79 
80 
81 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
82 
84 {
85  forAll(*this, i)
86  {
87  operator[](i).evolve();
88  }
89 }
90 
91 
92 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
setSize
points setSize(newPointi)
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::SLGThermo
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition: SLGThermo.H:64
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
coalCloudList.H
Foam::HashSet< word >
rho
rho
Definition: readInitialConditions.H:96
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:290
Foam::wordList
List< word > wordList
A List of words.
Definition: fileName.H:59
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:62
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::PtrList< coalCloud >
Foam::dictionary::lookup
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionary.C:419
Foam::dimensioned< vector >
g
const uniformDimensionedVectorField & g
Definition: createFluidFields.H:24
cloudNames
const wordList cloudNames(cloudFields.sortedToc())
U
U
Definition: pEqn.H:72
Foam::coalCloudList::evolve
void evolve()
Evolve the cloud collection.
Definition: coalCloudList.C:83
slgThermo
SLGThermo slgThermo(mesh, thermo)
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::ReactingMultiphaseCloud
Templated base class for multiphase reacting cloud.
Definition: ReactingMultiphaseCloud.H:68
Foam::coalCloudList::coalCloudList
coalCloudList(const volScalarField &rho, const volVectorField &U, const dimensionedVector &g, const SLGThermo &slgThermo)
Definition: coalCloudList.C:33