phaseSystemI.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) 2014-2020 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 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
27 
29 {
30  return mesh_;
31 }
32 
33 
36 {
37  return phaseModels_;
38 }
39 
40 
43 {
44  return phaseModels_;
45 }
46 
47 
50 {
51  return movingPhaseModels_;
52 }
53 
54 
57 {
58  return movingPhaseModels_;
59 }
60 
61 
64 {
66 }
67 
68 
71 {
73 }
74 
75 
78 {
80 }
81 
82 
85 {
87 }
88 
89 
92 {
94 }
95 
96 
99 {
101 }
102 
103 
106 {
107  return phasePairs_;
108 }
109 
110 
112 (
113  const phaseModel& phase
114 ) const
115 {
116  if (phaseModels_.size() != 2)
117  {
119  << "Call from a two-phase model in a multi-phase system."
120  << exit(FatalError);
121  }
122 
123  if (&phase == &phaseModels_[0])
124  {
125  return phaseModels_[1];
126  }
127  else
128  {
129  return phaseModels_[0];
130  }
131 }
132 
133 
135 {
136  return phi_;
137 }
138 
139 
141 {
142  return phi_;
143 }
144 
145 
147 {
148  return dpdt_;
149 }
150 
151 
153 {
154  return dpdt_;
155 }
156 
157 
159 {
160  return MRF_;
161 }
162 
163 
165 {
166  return fv::options::New(mesh_);
167 }
168 
169 
170 // ************************************************************************* //
fv::options & fvOptions() const
Access the fvOptions.
Definition: phaseSystemI.H:164
const phaseModelPartialList & movingPhases() const
Return the models for phases that are moving.
Definition: phaseSystemI.H:49
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
phasePairTable phasePairs_
Phase pairs.
Definition: phaseSystem.H:163
volScalarField dpdt_
Rate of change of pressure.
Definition: phaseSystem.H:169
phaseModelPartialList stationaryPhaseModels_
Stationary phase models.
Definition: phaseSystem.H:154
Finite-volume options.
Definition: fvOptions.H:52
phaseModelList phaseModels_
Phase models.
Definition: phaseSystem.H:148
phaseModelPartialList multiComponentPhaseModels_
Multi-component phase models.
Definition: phaseSystem.H:160
const phaseModelPartialList & stationaryPhases() const
Return the models for phases that are stationary.
Definition: phaseSystemI.H:63
const phasePairTable & phasePairs() const
Return the phase pairs.
Definition: phaseSystemI.H:105
const phaseModelList & phases() const
Return the phase models.
Definition: phaseSystemI.H:35
const IOMRFZoneList & MRF() const
Return MRF zones.
Definition: phaseSystemI.H:158
const phaseModelPartialList & anisothermalPhases() const
Return the models for phases that have variable temperature.
Definition: phaseSystemI.H:77
const phaseModel & otherPhase(const phaseModel &phase) const
Return the phase not given as an argument in a two-phase system.
Definition: phaseSystemI.H:112
const fvMesh & mesh_
Reference to the mesh.
Definition: phaseSystem.H:141
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
Definition: phaseSystem.H:157
phaseModelPartialList movingPhaseModels_
Moving phase models.
Definition: phaseSystem.H:151
IOMRFZoneList MRF_
Optional MRF zones.
Definition: phaseSystem.H:172
const volScalarField & dpdt() const
Return the rate of change of the pressure.
Definition: phaseSystemI.H:146
label size() const
Return the number of elements in the UPtrList.
Definition: UPtrListI.H:29
const surfaceScalarField & phi() const
Return the mixture flux.
Definition: phaseSystemI.H:134
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
surfaceScalarField phi_
Total volumetric flux.
Definition: phaseSystem.H:166
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
Definition: fvOptions.C:101
const phaseModelPartialList & multiComponentPhases() const
Return the models for phases that have multiple species.
Definition: phaseSystemI.H:91
const fvMesh & mesh() const
Return the mesh.
Definition: phaseSystemI.H:28
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
List of MRF zones with IO functionality. MRF zones are specified by a list of dictionary entries...
Definition: IOMRFZoneList.H:66