StaticPhaseModel.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) 2017 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::StaticPhaseModel
28 
29 Description
30  Class which represents a static fluid phase.
31 
32 SourceFiles
33  StaticPhaseModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef StaticPhaseModel_H
38 #define StaticPhaseModel_H
39 
40 #include "phaseModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class phaseModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class BasePhaseModel>
52 class StaticPhaseModel
53 :
54  public BasePhaseModel
55 {
56  // Private data
57 
58  //- Reference to U
59  const volVectorField& U_;
60 
61  //- Flux
62  surfaceScalarField phi_;
63 
64  //- Volumetric flux
65  surfaceScalarField alphaPhi_;
66 
67 
68 public:
69 
70  // Constructors
71 
73  (
74  const phaseSystem& fluid,
75  const word& phaseName
76  );
77 
78 
79  //- Destructor
80  virtual ~StaticPhaseModel() = default;
81 
82 
83  // Member Functions
84 
85  //- Correct the phase properties other than the thermo and turbulence
86  virtual void correct();
87 
88 
89  // Momentum
90 
91  //- Constant access the volumetric flux. Return zero field
92  virtual tmp<surfaceScalarField> phi() const;
93 
94  //- Access the volumetric flux
95  virtual const surfaceScalarField& phi();
96 
97  //- Constant access the volumetric flux of the phase.
98  virtual tmp<surfaceScalarField> alphaPhi() const;
99 
100  //- Access the volumetric flux of the phase
101  virtual surfaceScalarField& alphaPhi();
102 
103  //- Access const reference to U
104  virtual tmp<volVectorField> U() const;
105 
106  //- Maximum diffusion number
107  virtual tmp<surfaceScalarField> diffNo() const;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #ifdef NoRepository
118 # include "StaticPhaseModel.C"
119 #endif
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
StaticPhaseModel.C
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
Foam::StaticPhaseModel::phi
virtual tmp< surfaceScalarField > phi() const
Constant access the volumetric flux. Return zero field.
Definition: StaticPhaseModel.C:84
Foam::StaticPhaseModel::correct
virtual void correct()
Correct the phase properties other than the thermo and turbulence.
Definition: StaticPhaseModel.C:76
Foam::StaticPhaseModel::~StaticPhaseModel
virtual ~StaticPhaseModel()=default
Destructor.
Foam::StaticPhaseModel
Class which represents a static fluid phase.
Definition: StaticPhaseModel.H:51
Foam::StaticPhaseModel::diffNo
virtual tmp< surfaceScalarField > diffNo() const
Maximum diffusion number.
Definition: StaticPhaseModel.C:162
Foam::StaticPhaseModel::U
virtual tmp< volVectorField > U() const
Access const reference to U.
Definition: StaticPhaseModel.C:141
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::StaticPhaseModel::StaticPhaseModel
StaticPhaseModel(const phaseSystem &fluid, const word &phaseName)
Definition: StaticPhaseModel.C:41
Foam::StaticPhaseModel::alphaPhi
virtual tmp< surfaceScalarField > alphaPhi() const
Constant access the volumetric flux of the phase.
Definition: StaticPhaseModel.C:111
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:63
Foam::GeometricField< vector, fvPatchField, volMesh >