pressureGradientForce.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) 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 Class
25  Foam::Lagrangian::pressureGradientForce
26 
27 Description
28  Pressure gradient force model
29 
30 Usage
31  Example specification:
32  \verbatim
33  <LagrangianModelName>
34  {
35  type pressureGradientForce;
36  }
37  \endverbatim
38 
39 SourceFiles
40  pressureGradientForce.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef pressureGradientForce_H
45 #define pressureGradientForce_H
46 
47 #include "cloudLagrangianModel.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace Lagrangian
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class pressureGradientForce Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public LagrangianModel,
63  private cloudLagrangianModel
64 {
65 private:
66 
67  // Private Member Functions
68 
69  //- Add a source term to the velocity equation
70  void addUSup
71  (
74  ) const;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("pressureGradientForce");
81 
82 
83  // Constructors
84 
85  //- Construct from components
87  (
88  const word& name,
89  const LagrangianMesh& mesh,
90  const dictionary& modelDict,
91  const dictionary& stateDict
92  );
93 
94 
95  // Member Functions
96 
97  //- Return the name of the velocity field
98  virtual wordList addSupFields() const;
99 
100  //- Return true for the velocity or carrier velocity field
101  virtual bool addsSupToField
102  (
103  const word& fieldName,
104  const word& eqnFieldName
105  ) const;
106 
107  //- Add a source term to the velocity equation
108  virtual void addSup
109  (
110  const LagrangianSubScalarField& deltaT,
113  ) const;
114 
115  //- Add a source term to the momentum equation
116  virtual void addSup
117  (
118  const LagrangianSubScalarField& deltaT,
119  const LagrangianSubScalarSubField& vOrM,
122  ) const;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Lagrangian
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation an...
Definition: LagrangianEqn.H:56
Class containing Lagrangian geometry and topology.
Base class for Lagrangian models.
const LagrangianMesh & mesh() const
The mesh.
static word fieldName(const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
Return the name of the field associated with a source term.
const word & name() const
The source name.
virtual wordList addSupFields() const
Return the name of the velocity field.
virtual bool addsSupToField(const word &fieldName, const word &eqnFieldName) const
Return true for the velocity or carrier velocity field.
pressureGradientForce(const word &name, const LagrangianMesh &mesh, const dictionary &modelDict, const dictionary &stateDict)
Construct from components.
virtual void addSup(const LagrangianSubScalarField &deltaT, const LagrangianSubVectorSubField &U, LagrangianEqn< vector > &eqn) const
Add a source term to the velocity equation.
TypeName("pressureGradientForce")
Runtime type information.
Mix-in for Lagrangian models that refer to a cloud.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
static dictionary stateDict(const word &name, const objectRegistry &db)
Construct and return the state dictionary for reading.
Definition: stateModel.C:137
A class for handling words, derived from string.
Definition: word.H:63
U
Definition: pEqn.H:72
Namespace for OpenFOAM.