All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2022 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 
105 (
106  const phaseModel& phase
107 ) const
108 {
109  if (phaseModels_.size() != 2)
110  {
112  << "Call from a two-phase model in a multi-phase system."
113  << exit(FatalError);
114  }
115 
116  if (&phase == &phaseModels_[0])
117  {
118  return phaseModels_[1];
119  }
120  else
121  {
122  return phaseModels_[0];
123  }
124 }
125 
126 
128 {
129  return phi_;
130 }
131 
132 
134 {
135  return phi_;
136 }
137 
138 
140 {
141  return dpdt_;
142 }
143 
144 
146 {
147  return dpdt_;
148 }
149 
150 
152 {
153  return MRF_;
154 }
155 
156 
158 {
159  return Foam::fvModels::New(mesh);
160 }
161 
162 
164 {
165  return Foam::fvModels::New(mesh_);
166 }
167 
168 
170 {
171  return Foam::fvConstraints::New(mesh);
172 }
173 
174 
176 {
178 }
179 
180 
182 {
183  return deltaN_;
184 }
185 
186 
187 // ************************************************************************* //
const phaseModelPartialList & movingPhases() const
Return the models for phases that are moving.
Definition: phaseSystemI.H:49
const Foam::fvModels & fvModels() const
Access the fvModels.
Definition: phaseSystemI.H:163
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
const Foam::fvConstraints & fvConstraints() const
Access the fvConstraints.
Definition: phaseSystemI.H:175
error FatalError
const dimensionedScalar deltaN_
Stabilisation for normalisation of the interface normal.
Definition: phaseSystem.H:160
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:306
volScalarField dpdt_
Rate of change of pressure.
Definition: phaseSystem.H:151
phaseModelPartialList stationaryPhaseModels_
Stationary phase models.
Definition: phaseSystem.H:139
phaseModelList phaseModels_
Phase models.
Definition: phaseSystem.H:133
phaseModelPartialList multiComponentPhaseModels_
Multi-component phase models.
Definition: phaseSystem.H:145
const phaseModelPartialList & stationaryPhases() const
Return the models for phases that are stationary.
Definition: phaseSystemI.H:63
const phaseModelList & phases() const
Return the phase models.
Definition: phaseSystemI.H:35
Finite volume models.
Definition: fvModels.H:60
const IOMRFZoneList & MRF() const
Return MRF zones.
Definition: phaseSystemI.H:151
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:105
const fvMesh & mesh_
Reference to the mesh.
Definition: phaseSystem.H:126
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
Definition: phaseSystem.H:142
phaseModelPartialList movingPhaseModels_
Moving phase models.
Definition: phaseSystem.H:136
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Definition: dictionaryIO.C:96
IOMRFZoneList MRF_
Optional MRF zones.
Definition: phaseSystem.H:154
const volScalarField & dpdt() const
Return the rate of change of the pressure.
Definition: phaseSystemI.H:139
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:127
Finite volume constraints.
Definition: fvConstraints.H:57
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
surfaceScalarField phi_
Total volumetric flux.
Definition: phaseSystem.H:148
const phaseModelPartialList & multiComponentPhases() const
Return the models for phases that have multiple species.
Definition: phaseSystemI.H:91
const dimensionedScalar & deltaN() const
Stabilisation for normalisation of the interface normal.
Definition: phaseSystemI.H:181
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:64