Loading...
Searching...
No Matches
pureZoneMixture.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) 2021,2022 OpenCFD Ltd.
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
26Class
27 Foam::pureZoneMixture
28
29Description
30 Version of pureMixture that uses different mixtures for different
31 cellZones.
32 Every cellZone has to provide an entry for its mixture. A reserved
33 entry 'none' is for all unzoned cells.
34
35 Example of the zone based mixture specification:
36 \verbatim
37 mixture
38 {
39 solid1
40 {
41 specie
42 {
43 molWeight 50;
44 }
45
46 transport
47 {
48 kappa 80;
49 }
50
51 thermodynamics
52 {
53 Hf 0;
54 Cp 450;
55 }
56
57 equationOfState
58 {
59 rho 8000;
60 }
61 }
62 solid2
63 {
64 //- Start off from 'solid1' properties
65 ${solid1}
66
67 //- Selectively overwrite properties
68 transport
69 {
70 kappa 8;
71 }
72 }
73 }
74 \endverbatim
75
76
77SourceFiles
78 pureZoneMixture.C
79
80\*---------------------------------------------------------------------------*/
81
82#ifndef pureZoneMixture_H
83#define pureZoneMixture_H
84
85#include "basicMixture.H"
86
87// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88
89namespace Foam
90{
91
92/*---------------------------------------------------------------------------*\
93 Class pureZoneMixture Declaration
94\*---------------------------------------------------------------------------*/
95
96template<class ThermoType>
97class pureZoneMixture
98:
99 public basicMixture
100{
101 // Private data
102
103 const fvMesh& mesh_;
104
105 //- Inverse zone info
106 labelList zoneID_;
107
108 //- Species data
109 PtrList<ThermoType> speciesData_;
110
111 //- Temporary storage for the cell/face mixture thermo data
112 mutable ThermoType mixture_;
113
114
115 // Private Member Functions
116
117 //- Construct the species data from the given dictionary and return the
118 // data for the first specie to initialise the mixture thermo data
119 const ThermoType& constructSpeciesData(const dictionary& thermoDict);
120
121 //- No copy construct
122 pureZoneMixture(const pureZoneMixture<ThermoType>&) = delete;
123
124
125public:
126
127 //- The type of thermodynamics this mixture is instantiated for
128 typedef ThermoType thermoType;
129
130
131 // Constructors
132
133 //- Construct from dictionary, mesh and phase name
134 pureZoneMixture
135 (
136 const dictionary& thermoDict,
137 const fvMesh& mesh,
138 const word& phaseName
139 );
140
141
142 //- Destructor
143 virtual ~pureZoneMixture() = default;
144
145
146 // Member functions
147
148 //- Return the instantiated type name
149 static word typeName()
150 {
151 return "pureZoneMixture<" + ThermoType::typeName() + '>';
152 }
153
154 const ThermoType& cellMixture(const label celli) const;
155
156 const ThermoType& patchFaceMixture
158 const label patchi,
159 const label facei
160 ) const;
161
162 const ThermoType& cellVolMixture
163 (
164 const scalar p,
165 const scalar T,
166 const label celli
167 ) const;
168
169 const ThermoType& patchFaceVolMixture
170 (
171 const scalar p,
172 const scalar T,
173 const label patchi,
174 const label facei
175 ) const;
176
177 //- Read dictionary
178 void read(const dictionary&);
179};
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183} // End namespace Foam
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#ifdef NoRepository
188 #include "pureZoneMixture.C"
189#endif
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193#endif
194
195// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
basicMixture(const dictionary &, const fvMesh &, const word &)
Construct from dictionary, mesh and phase name.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
const ThermoType & cellMixture(const label celli) const
ThermoType thermoType
The type of thermodynamics this mixture is instantiated for.
const ThermoType & cellVolMixture(const scalar p, const scalar T, const label celli) const
static word typeName()
Return the instantiated type name.
const ThermoType & patchFaceMixture(const label patchi, const label facei) const
const ThermoType & patchFaceVolMixture(const scalar p, const scalar T, const label patchi, const label facei) const
void read(const dictionary &)
Read dictionary.
virtual ~pureZoneMixture()=default
Destructor.
A class for handling words, derived from Foam::string.
Definition word.H:66
volScalarField & p
const dictionary & thermoDict
Definition EEqn.H:16
dynamicFvMesh & mesh
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)