wallLubricationModel.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-2026 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::wallLubricationModel
26 
27 Description
28  Model for the wall lubrication force between two phases
29 
30 SourceFiles
31  wallLubricationModel.C
32  wallLubricationModelNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef wallLubricationModel_H
37 #define wallLubricationModel_H
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 #include "wallDependentModel.H"
42 #include "volFields.H"
43 #include "dictionary.H"
44 #include "runTimeSelectionTables.H"
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class wallLubricationModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public wallDependentModel
57 {
58 protected:
59 
60  // Protected Member Functions
61 
62  //- Zero-gradient wall-lubrication force at walls
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("wallLubricationModel");
70 
71 
72  // Declare runtime construction
73 
75  (
76  autoPtr,
78  dictionary,
79  (
80  const dictionary& dict,
81  const phaseInterface& interface
82  ),
83  (dict, interface)
84  );
85 
86 
87  // Static Data Members
88 
89  //- Coefficient dimensions
90  static const dimensionSet dimF;
91 
92 
93  // Constructors
94 
95  //- Construct from a dictionary and an interface
97  (
98  const dictionary& dict,
99  const phaseInterface& interface
100  );
101 
102 
103  //- Destructor
104  virtual ~wallLubricationModel();
105 
106 
107  // Selectors
108 
110  (
111  const dictionary& dict,
112  const phaseInterface& interface,
113  const bool outer = false
114  );
115 
117  (
118  const UPtrList<const dictionary>& subDicts,
119  const phaseInterface& interface
120  );
121 
122 
123  // Member Functions
124 
125  //- Return wall lubrication force
126  virtual tmp<volVectorField> F() const = 0;
127 
128  //- Return face wall lubrication force
129  virtual tmp<surfaceScalarField> Ff() const = 0;
130 };
131 
132 
133 /*---------------------------------------------------------------------------*\
134  Class blendedWallLubricationModel Declaration
135 \*---------------------------------------------------------------------------*/
136 
138 :
139  public BlendedInterfacialModel<wallLubricationModel>
140 {
141 public:
142 
143  // Constructors
144 
145  //- Inherit base class constructors
146  using
149 
150 
151  // Selectors
152 
154  (
155  const UPtrList<const dictionary>& subDicts,
156  const phaseInterface& interface,
157  const dictionary& blendingDict
158  )
159  {
160  return
162  (
164  (
165  subDicts,
166  interface,
168  )
169  );
170  }
171 
172 
173  // Member Functions
174 
175  //- Return wall lubrication force
176  tmp<volVectorField> F() const;
177 
178  //- Return face wall lubrication force
179  tmp<surfaceScalarField> Ff() const;
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
Wrapper class for interfacial models for which multiple instances of the model are used for different...
const phaseInterface & interface() const
Access the interface.
BlendedInterfacialModel(const UPtrList< const dictionary > &subDicts, const phaseInterface &interface, const dictionary &blendingDict, const Args &... args)
Construct from a dictionary, an interface and a blending dictionary.
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
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
tmp< surfaceScalarField > Ff() const
Return face wall lubrication force.
tmp< volVectorField > F() const
Return wall lubrication force.
static autoPtr< blendedWallLubricationModel > New(const UPtrList< const dictionary > &subDicts, const phaseInterface &interface, const dictionary &blendingDict)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
Class to represent an interface between phases. Derivations can further specify the configuration of ...
A class for managing temporary objects.
Definition: tmp.H:55
A class which provides on-demand creation and caching of wall distance and wall normal fields for use...
Model for the wall lubrication force between two phases.
TypeName("wallLubricationModel")
Runtime type information.
tmp< volVectorField > zeroGradWalls(tmp< volVectorField >) const
Zero-gradient wall-lubrication force at walls.
declareRunTimeSelectionTable(autoPtr, wallLubricationModel, dictionary,(const dictionary &dict, const phaseInterface &interface),(dict, interface))
static const dimensionSet dimF
Coefficient dimensions.
static autoPtr< wallLubricationModel > New(const dictionary &dict, const phaseInterface &interface, const bool outer=false)
virtual tmp< surfaceScalarField > Ff() const =0
Return face wall lubrication force.
virtual ~wallLubricationModel()
Destructor.
virtual tmp< volVectorField > F() const =0
Return wall lubrication force.
wallLubricationModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
Namespace for OpenFOAM.
void outer(GeometricField< typename outerProduct< Type1, Type2 >::type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type1, GeoMesh, PrimitiveField2 > &gf1, const GeometricField< Type2, GeoMesh, PrimitiveField3 > &gf2)
const dictionary & blendingDict(const phaseSystem &fluid, const dictionary &dict)
Macros to ease declaration of run-time selection tables.
dictionary dict