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