ReactingParcelI.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) 2011-2023 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 "ReactingParcel.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class ParcelType>
31 inline
33 :
34  ParcelType::constantProperties(),
35  pMin_(this->dict_, 0.0),
36  constantVolume_(this->dict_, false)
37 {}
38 
39 
40 template<class ParcelType>
42 (
43  const constantProperties& cp
44 )
45 :
46  ParcelType::constantProperties(cp),
47  pMin_(cp.pMin_),
48  constantVolume_(cp.constantVolume_)
49 {}
50 
51 
52 template<class ParcelType>
54 (
55  const dictionary& parentDict
56 )
57 :
58  ParcelType::constantProperties(parentDict),
59  pMin_(this->dict_, "pMin", 1000.0),
60  constantVolume_(this->dict_, word("constantVolume"))
61 {}
62 
63 
64 template<class ParcelType>
66 (
67  const polyMesh& mesh,
68  const barycentric& coordinates,
69  const label celli,
70  const label tetFacei,
71  const label tetPti,
72  const label facei
73 )
74 :
75  ParcelType(mesh, coordinates, celli, tetFacei, tetPti, facei),
76  Y_(0)
77 {}
78 
79 
80 template<class ParcelType>
82 (
83  const polyMesh& mesh,
84  const vector& position,
85  const label celli
86 )
87 :
88  ParcelType(mesh, position, celli),
89  Y_(0)
90 {}
91 
92 
93 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
94 
95 template<class ParcelType>
96 inline Foam::scalar
98 {
99  return pMin_.value();
100 }
101 
102 
103 template<class ParcelType>
104 inline bool
106 {
107  return constantVolume_.value();
108 }
109 
110 
111 // * * * * * * * * * * ReactingParcel Member Functions * * * * * * * * * * * //
112 
113 template<class ParcelType>
115 {
116  return Y_;
117 }
118 
119 
120 template<class ParcelType>
122 {
123  return Y_;
124 }
125 
126 
127 // ************************************************************************* //
Class to hold reacting parcel constant properties.
bool constantVolume() const
Return const access to the constant volume flag.
scalar pMin() const
Return const access to the minimum pressure.
const scalarField & Y() const
Return const access to mass fractions of mixture [].
scalarField Y_
Mass fractions of mixture [].
ReactingParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label facei)
Construct from mesh, coordinates and topology.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A class for handling words, derived from string.
Definition: word.H:62
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
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy, recursively if necessary, the source to the destination.
Definition: POSIX.C:753