BlendedInterfacialModel.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 | Copyright (C) 2014-2015 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 Class
25  Foam::BlendedInterfacialModel
26 
27 Description
28 
29 SourceFiles
30  BlendedInterfacialModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef BlendedInterfacialModel_H
35 #define BlendedInterfacialModel_H
36 
37 #include "blendingMethod.H"
38 #include "phasePair.H"
39 #include "orderedPhasePair.H"
40 
41 #include "geometricZeroField.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class BlendedInterfacialModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class modelType>
53 class BlendedInterfacialModel
54 {
55  // Private data
56 
57  //- Unordered phase pair
58  const phasePair& pair_;
59 
60  //- Ordered phase pair for dispersed phase 1 in continuous phase 2
62 
63  //- Ordered phase pair for dispersed phase 2 in continuous phase 1
65 
66  //- Model for region with no obvious dispersed phase
68 
69  //- Model for dispersed phase 1 in continuous phase 2
71 
72  //- Model for dispersed phase 2 in continuous phase 1
74 
75  //- Blending model
77 
78  //- If true set coefficients and forces to 0 at fixed-flux BCs
80 
81 
82  // Private Member Functions
83 
84  //- Disallow default bitwise copy construct
86 
87  //- Disallow default bitwise assignment
89 
90  //- Correct coeff/value on fixed flux boundary conditions
91  template<class GeometricField>
92  void correctFixedFluxBCs(GeometricField& field) const;
93 
94 
95 public:
96 
97  // Constructors
98 
99  //- Construct from the model table, dictionary and pairs
101  (
102  const phasePair::dictTable& modelTable,
103  const blendingMethod& blending,
104  const phasePair& pair,
105  const orderedPhasePair& pair1In2,
106  const orderedPhasePair& pair2In1,
107  const bool correctFixedFluxBCs = true
108  );
109 
110 
111  //- Destructor
113 
114 
115  // Member Functions
116 
117  //- Return true if a model is specified for the supplied phase
118  bool hasModel(const phaseModel& phase) const;
119 
120  //- Return the model for the supplied phase
121  const modelType& phaseModel(const phaseModel& phase) const;
122 
123  //- Return the blended force coefficient
124  tmp<volScalarField> K() const;
125 
126  //- Return the face blended force coefficient
127  tmp<surfaceScalarField> Kf() const;
128 
129  //- Return the blended force
130  template<class Type>
132 
133  //- Return the face blended force
134  tmp<surfaceScalarField> Ff() const;
135 
136  //- Return the blended diffusivity
137  tmp<volScalarField> D() const;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #ifdef NoRepository
148  #include "BlendedInterfacialModel.C"
149 #endif
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
Foam::BlendedInterfacialModel::model_
autoPtr< ModelType > model_
Model for region with no obvious dispersed phase.
Definition: BlendedInterfacialModel.H:66
Foam::phasePair
Definition: phasePair.H:49
Foam::BlendedInterfacialModel::BlendedInterfacialModel
BlendedInterfacialModel(const BlendedInterfacialModel< ModelType > &)
Disallow default bitwise copy construct.
Foam::phase
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phase.H:52
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::BlendedInterfacialModel::Ff
tmp< surfaceScalarField > Ff() const
Return the face blended force.
Foam::BlendedInterfacialModel::~BlendedInterfacialModel
~BlendedInterfacialModel()
Destructor.
Foam::BlendedInterfacialModel::F
tmp< GeometricField< Type, fvPatchField, volMesh > > F() const
Return the blended force.
Foam::BlendedInterfacialModel::model1In2_
autoPtr< modelType > model1In2_
Model for dispersed phase 1 in continuous phase 2.
Definition: BlendedInterfacialModel.H:69
Foam::BlendedInterfacialModel::correctFixedFluxBCs_
bool correctFixedFluxBCs_
If true set coefficients and forces to 0 at fixed-flux BCs.
Definition: BlendedInterfacialModel.H:75
Foam::BlendedInterfacialModel::hasModel
bool hasModel(const phaseModel &phase) const
Return true if a model is specified for the supplied phase.
Foam::BlendedInterfacialModel::blending_
const blendingMethod & blending_
Blending model.
Definition: BlendedInterfacialModel.H:63
Foam::BlendedInterfacialModel::pair2In1_
const orderedPhasePair & pair2In1_
Ordered phase pair for dispersed phase 2 in continuous phase 1.
Definition: BlendedInterfacialModel.H:63
Foam::BlendedInterfacialModel::model1In2_
autoPtr< ModelType > model1In2_
Model for dispersed phase 1 in continuous phase 2.
Definition: BlendedInterfacialModel.H:69
Foam::orderedPhasePair
Definition: orderedPhasePair.H:47
Foam::BlendedInterfacialModel::pair1In2_
const orderedPhasePair & pair1In2_
Ordered phase pair for dispersed phase 1 in continuous phase 2.
Definition: BlendedInterfacialModel.H:60
Foam::BlendedInterfacialModel::phaseModel
const modelType & phaseModel(const phaseModel &phase) const
Return the model for the supplied phase.
Foam::BlendedInterfacialModel::D
tmp< volScalarField > D() const
Return the blended diffusivity.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::HashTable
An STL-conforming hash table.
Definition: HashTable.H:61
Foam::blendingMethod
Definition: blendingMethod.H:49
Foam::autoPtr< modelType >
Foam::BlendedInterfacialModel::operator=
void operator=(const BlendedInterfacialModel< ModelType > &)
Disallow default bitwise assignment.
Foam::BlendedInterfacialModel::pair_
const phasePair & pair_
Unordered phase pair.
Definition: BlendedInterfacialModel.H:57
Foam::BlendedInterfacialModel
Definition: BlendedInterfacialModel.H:52
Foam::BlendedInterfacialModel::model2In1_
autoPtr< ModelType > model2In1_
Model for dispersed phase 2 in continuous phase 1.
Definition: BlendedInterfacialModel.H:72
Foam::BlendedInterfacialModel::Kf
tmp< surfaceScalarField > Kf() const
Return the face blended force coefficient.
Foam::BlendedInterfacialModel::K
tmp< volScalarField > K() const
Return the blended force coefficient.
Foam::BlendedInterfacialModel::model_
autoPtr< modelType > model_
Model for region with no obvious dispersed phase.
Definition: BlendedInterfacialModel.H:66
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
geometricZeroField.H
Foam::BlendedInterfacialModel::correctFixedFluxBCs
void correctFixedFluxBCs(GeometricField &field) const
Correct coeff/value on fixed flux boundary conditions.
Foam::BlendedInterfacialModel::model2In1_
autoPtr< modelType > model2In1_
Model for dispersed phase 2 in continuous phase 1.
Definition: BlendedInterfacialModel.H:72