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-2025 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 #include "correctFixedFluxBCs.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
37 }
38 
40 
41 
42 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
43 
45 (
47 ) const
48 {
49  volVectorField& Fi = tFi.ref();
50  const fvPatchList& patches = Fi.mesh().boundary();
51 
53 
55  {
56  if (isA<wallFvPatch>(patches[patchi]))
57  {
58  fvPatchVectorField& Fiw = FiBf[patchi];
59  Fiw = Fiw.patchInternalField();
60  }
61  }
62 
63  return tFi;
64 }
65 
66 
67 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
68 
70 (
71  const dictionary& dict,
72  const phaseInterface& interface
73 )
74 :
75  wallDependentModel(interface.mesh())
76 {}
77 
78 
79 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
80 
82 {}
83 
84 
85 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
86 
88 {
89  return
91  (
92  interface(),
93  evaluate
94  (
96  "F",
98  )
99  );
100 }
101 
102 
105 {
106  return
108  (
109  interface(),
110  evaluate
111  (
113  "Ff",
115  )
116  );
117 }
118 
119 
120 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:433
const Mesh & mesh() const
Return mesh.
Generic GeometricBoundaryField class.
Generic GeometricField class.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
tmp< surfaceScalarField > Ff() const
Return face wall lubrication force.
tmp< volVectorField > F() const
Return wall lubrication force.
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
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:91
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
Definition: fvPatchField.C:178
Class to represent an interface between phases. Derivations can further specify the configuration of ...
A class for managing temporary objects.
Definition: tmp.H:55
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:197
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.
tmp< volVectorField > zeroGradWalls(tmp< volVectorField >) const
Zero-gradient wall-lubrication force at walls.
static const dimensionSet dimF
Coefficient dimensions.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
label patchi
const fvPatchList & patches
Namespace for OpenFOAM.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineBlendedInterfacialModelTypeNameAndDebug(diffusiveMassTransferModel, 0)
void evaluate(GeometricField< Type, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, GeoMesh > &x)
defineTypeNameAndDebug(combustionModel, 0)
const dimensionSet dimArea
tmp< GeometricField< Type, GeoMesh > > correctFixedFluxBCs(const phaseInterface &interface, tmp< GeometricField< Type, GeoMesh >> tfield)
dictionary dict