wallLubricationModel.C
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-2022 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 \*---------------------------------------------------------------------------*/
25 
26 #include "wallLubricationModel.H"
27 #include "wallFvPatch.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(wallLubricationModel, 0);
34  defineBlendedInterfacialModelTypeNameAndDebug(wallLubricationModel, 0);
35  defineRunTimeSelectionTable(wallLubricationModel, dictionary);
36 }
37 
39 
40 
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
42 
44 (
45  tmp<volVectorField> tFi
46 ) const
47 {
48  volVectorField& Fi = tFi.ref();
49  const fvPatchList& patches = Fi.mesh().boundary();
50 
51  volVectorField::Boundary& FiBf = Fi.boundaryFieldRef();
52 
53  forAll(patches, patchi)
54  {
55  if (isA<wallFvPatch>(patches[patchi]))
56  {
57  fvPatchVectorField& Fiw = FiBf[patchi];
58  Fiw = Fiw.patchInternalField();
59  }
60  }
61 
62  return tFi;
63 }
64 
65 
66 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
67 
69 (
70  const dictionary& dict,
71  const phaseInterface& interface
72 )
73 :
74  wallDependentModel(interface.mesh())
75 {}
76 
77 
78 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
79 
81 {}
82 
83 
84 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
85 
87 {
88  return
89  evaluate
90  (
92  "F",
94  true
95  );
96 }
97 
98 
101 {
102  return
103  evaluate
104  (
106  "Ff",
108  true
109  );
110 }
111 
112 
113 // ************************************************************************* //
dictionary dict
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
const dimensionSet dimArea
fvPatchField< vector > fvPatchVectorField
void evaluate(GeometricField< Type, PatchField, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, PatchField, GeoMesh > &x)
tmp< volVectorField > F() const
Return wall lubrication force.
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
Type of the boundary field.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
tmp< surfaceScalarField > Ff() const
Return face wall lubrication force.
static const dimensionSet dimF
Coefficient dimensions.
Dimension set for the base types.
Definition: dimensionSet.H:121
virtual ~wallLubricationModel()
Destructor.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
Internal & ref()
Return a reference to the dimensioned internal field.
wallLubricationModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
tmp< volVectorField > zeroGradWalls(tmp< volVectorField >) const
Zero-gradient wall-lubrication force at walls.
PtrList< fvPatch > fvPatchList
container classes for fvPatch
Definition: fvPatchList.H:45
label patchi
virtual tmp< volVectorField > F() const =0
Return wall lubrication force.
virtual tmp< surfaceScalarField > Ff() const =0
Return face wall lubrication force.
#define defineBlendedInterfacialModelTypeNameAndDebug(ModelType, DebugSwitch)
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.