solidMixtureProperties.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) 2011-2017 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
26Class
27 Foam::solidMixtureProperties
28
29Description
30 A mixture of solids
31
32 An example of a two component solid mixture:
33 \verbatim
34 <parentDictionary>
35 {
36 C;
37
38 ash
39 {
40 //... user defined properties for ash
41 }
42 }
43 \endverbatim
44
45
46SourceFiles
47 solidMixtureProperties.C
48
49See also
50 Foam::solidProperties
51
52\*---------------------------------------------------------------------------*/
53
54#ifndef solidMixtureProperties_H
55#define solidMixtureProperties_H
56
57#include "solidProperties.H"
58#include "PtrList.H"
59#include "scalarField.H"
60
61// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62
63namespace Foam
64{
65
66/*---------------------------------------------------------------------------*\
67 Class solidMixtureProperties Declaration
68\*---------------------------------------------------------------------------*/
71{
72 // Private data
73
74 //- The names of the solids
75 List<word> components_;
76
77 //- The solidProperties properties
78 PtrList<solidProperties> properties_;
79
80
81public:
82
83 // Constructors
84
85 //- Construct from dictionary
87
88 //- Construct copy
90
91 //- Construct and return a clone
93 {
95 }
96
97
98 //- Destructor
99 virtual ~solidMixtureProperties() = default;
100
101
102 // Selectors
103
104 //- Select construct from dictionary
106
107
108 // Member Functions
109
110 //- Return the solidProperties names
111 inline const List<word>& components() const
112 {
113 return components_;
114 }
115
116 //- Return the solidProperties properties
117 inline const PtrList<solidProperties>& properties() const
118 {
119 return properties_;
120 }
121
122 //- Return the number of solids in the mixture
123 inline label size() const
124 {
125 return components_.size();
126 }
127
128 //- Calculate the mixture density [kg/m^3] as a function of
129 // mass fractions
130 scalar rho(const scalarField& Y) const;
131
132 //- Calculate the mixture heat capacity [J/(kg K)] as a function of
133 // mass fractions
134 scalar Cp(const scalarField& Y) const;
135};
136
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140} // End namespace Foam
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#endif
145
146// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
virtual ~solidMixtureProperties()=default
Destructor.
virtual autoPtr< solidMixtureProperties > clone() const
Construct and return a clone.
const PtrList< solidProperties > & properties() const
Return the solidProperties properties.
label size() const
Return the number of solids in the mixture.
const List< word > & components() const
Return the solidProperties names.
static autoPtr< solidMixtureProperties > New(const dictionary &)
Select construct from dictionary.
PtrList< volScalarField > & Y
const volScalarField & Cp
Definition: EEqn.H:7
Namespace for OpenFOAM.