wallDampedLift.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) 2015-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 \*---------------------------------------------------------------------------*/
25 
26 #include "wallDampedLift.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace liftModels
34 {
37 }
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 (
45  const dictionary& dict,
46  const phaseInterface& interface
47 )
48 :
49  dispersedLiftModel(dict, interface),
50  liftModel_(liftModel::New(dict.subDict("lift"), interface, false)),
51  wallDampingModel_
52  (
53  wallDampingModel::New(dict.subDict("wallDamping"), interface)
54  )
55 {
56  if (!isA<dispersedLiftModel>(liftModel_()))
57  {
59  << "The sub-lift-model of a " << type()
60  << " lift model must be for a dispersed configuration"
61  << exit(FatalError);
62  }
63 }
64 
65 
66 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
67 
69 {}
70 
71 
72 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
73 
75 {
76  return
77  wallDampingModel_->damping()
78  *refCast<const dispersedLiftModel>(liftModel_()).Cl();
79 }
80 
81 
83 {
84  return
85  wallDampingModel_->damping()
86  *refCast<const dispersedLiftModel>(liftModel_()).Fi();
87 }
88 
89 
91 {
92  return wallDampingModel_->damping()*liftModel_->F();
93 }
94 
95 
97 {
98  return wallDampingModel_->dampingf()*liftModel_->Ff();
99 }
100 
101 
102 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Model for the lift force between two phases.
Definition: liftModel.H:53
wallDamped(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
virtual tmp< surfaceScalarField > Ff() const
Return face lift force.
virtual tmp< volVectorField > F() const
Return lift force.
virtual ~wallDamped()
Destructor.
virtual tmp< volScalarField > Cl() const
Lift coefficient.
virtual tmp< volVectorField > Fi() const
Return phase-intensive lift force.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
A class for managing temporary objects.
Definition: tmp.H:55
Wall damping models can be used to filter interfacial models near the walls. This is particularly use...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
addToRunTimeSelectionTable(liftModel, constantLiftCoefficient, dictionary)
defineTypeNameAndDebug(constantLiftCoefficient, 0)
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
dictionary dict