linear.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 Class
25  Foam::blendingMethods::linear
26 
27 Description
28  Blending method based on piecewise linear functions. Supports the full
29  range of phase fraction space. E.g., from droplets in air, through a
30  segregated regime, to bubbly flow.
31 
32  This method requires two volume fractions between which the phase is
33  considered to become continuous to be specified for both phases.
34 
35  Alternatively, these volume fractions can be omitted or replaced with the
36  keyword "none" to represent a phase which cannot become continuous. E.g.,
37  a particulate phase.
38 
39 SourceFiles
40  linear.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef linear_H
45 #define linear_H
46 
47 #include "blendingMethod.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace blendingMethods
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class linear Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class linear
61 :
62  public blendingMethod
63 {
64  // Private Data
65 
66  //- Minimum fraction of phases which can be considered fully continuous
67  Pair<blendingParameter> minFullyContinuousAlpha_;
68 
69  //- Minimum fraction of phases which can be considered partly continuous
70  Pair<blendingParameter> minPartlyContinuousAlpha_;
71 
72 
73 protected:
74 
75  // Protected Member Functions
76 
77  //- Evaluate the blending function
79  (
80  const UPtrList<const volScalarField>& alphas,
81  const label phaseSet,
82  const label systemSet
83  ) const;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("linear");
90 
91 
92  // Constructors
93 
94  //- Construct from a dictionary and an interface
95  linear
96  (
97  const dictionary& dict,
98  const phaseInterface& interface
99  );
100 
101 
102  //- Destructor
103  ~linear();
104 
105 
106  // Member Functions
107 
108  //- Return whether or not a phase can be considered continuous
109  virtual bool canBeContinuous(const label index) const;
110 
111  //- Return whether or not this interface can segregate
112  virtual bool canSegregate() const;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace blendingMethods
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:65
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:66
Abstract base class for functions that are used to combine interfacial sub-models according to the vo...
Blending method based on piecewise linear functions. Supports the full range of phase fraction space....
Definition: linear.H:62
virtual tmp< volScalarField > fContinuous(const UPtrList< const volScalarField > &alphas, const label phaseSet, const label systemSet) const
Evaluate the blending function.
Definition: linear.C:45
virtual bool canSegregate() const
Return whether or not this interface can segregate.
Definition: linear.C:167
linear(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
Definition: linear.C:63
virtual bool canBeContinuous(const label index) const
Return whether or not a phase can be considered continuous.
Definition: linear.C:161
TypeName("linear")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Class to represent an interface between phases. Derivations can further specify the configuration of ...
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict