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-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 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
27 
29 {
30  return mesh_;
31 }
32 
33 
35 {
36  return pimple_;
37 }
38 
39 
42 {
43  return phaseModels_;
44 }
45 
46 
49 {
50  return phaseModels_;
51 }
52 
53 
56 {
57  return movingPhaseModels_;
58 }
59 
60 
63 {
64  return movingPhaseModels_;
65 }
66 
67 
70 {
71  return stationaryPhaseModels_;
72 }
73 
74 
77 {
78  return stationaryPhaseModels_;
79 }
80 
81 
84 {
85  return anisothermalPhaseModels_;
86 }
87 
88 
91 {
92  return anisothermalPhaseModels_;
93 }
94 
95 
98 {
99  return multicomponentPhaseModels_;
100 }
101 
102 
105 {
106  return multicomponentPhaseModels_;
107 }
108 
109 
111 (
112  const phaseModel& phase
113 ) const
114 {
115  if (phaseModels_.size() != 2)
116  {
118  << "Call from a two-phase model in a multi-phase system."
119  << exit(FatalError);
120  }
121 
122  if (&phase == &phaseModels_[0])
123  {
124  return phaseModels_[1];
125  }
126  else
127  {
128  return phaseModels_[0];
129  }
130 }
131 
132 
134 {
135  return phi_;
136 }
137 
138 
140 {
141  return phi_;
142 }
143 
144 
146 {
147  return dpdt_;
148 }
149 
150 
152 {
153  return dpdt_;
154 }
155 
156 
158 {
159  return MRF_;
160 }
161 
162 
164 {
165  return Foam::fvModels::New(mesh);
166 }
167 
168 
170 {
171  return Foam::fvModels::New(mesh_);
172 }
173 
174 
176 {
177  return Foam::fvConstraints::New(mesh);
178 }
179 
180 
182 {
183  return Foam::fvConstraints::New(mesh_);
184 }
185 
186 
188 {
189  return deltaN_;
190 }
191 
192 
193 // ************************************************************************* //
Generic GeometricField class.
List of MRF zones with IO functionality. MRF zones are specified by a list of dictionary entries,...
Definition: IOMRFZoneList.H:68
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Definition: dictionaryIO.C:100
Finite volume constraints.
Definition: fvConstraints.H:62
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Finite volume models.
Definition: fvModels.H:65
const IOMRFZoneList & MRF() const
Return MRF zones.
Definition: phaseSystemI.H:157
const phaseModel & otherPhase(const phaseModel &phase) const
Return the phase not given as an argument in a two-phase system.
Definition: phaseSystemI.H:111
const fvMesh & mesh_
Reference to the mesh.
Definition: phaseSystem.H:128
const dimensionedScalar & deltaN() const
Stabilisation for normalisation of the interface normal.
Definition: phaseSystemI.H:187
const Foam::fvModels & fvModels() const
Access the fvModels.
Definition: phaseSystemI.H:169
const surfaceScalarField & phi() const
Return the mixture flux.
Definition: phaseSystemI.H:133
const volScalarField & dpdt() const
Return the rate of change of the pressure.
Definition: phaseSystemI.H:145
const phaseModelPartialList & multicomponentPhases() const
Return the models for phases that have multiple species.
Definition: phaseSystemI.H:97
const phaseModelPartialList & movingPhases() const
Return the models for phases that are moving.
Definition: phaseSystemI.H:55
const phaseModelList & phases() const
Return the phase models.
Definition: phaseSystemI.H:41
const phaseModelPartialList & anisothermalPhases() const
Return the models for phases that have variable temperature.
Definition: phaseSystemI.H:83
const pimpleNoLoopControl & pimple() const
Return pimpleNoLoopControl.
Definition: phaseSystemI.H:34
const phaseModelPartialList & stationaryPhases() const
Return the models for phases that are stationary.
Definition: phaseSystemI.H:69
const fvMesh & mesh() const
Return the mesh.
Definition: phaseSystemI.H:28
const Foam::fvConstraints & fvConstraints() const
Access the fvConstraints.
Definition: phaseSystemI.H:181
Pimple no-loop control class. Implements various option flags, but leaves loop controls to the deriva...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:306
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError