reboundVelocityLagrangianPatchVectorField.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::reboundVelocityLagrangianPatchVectorField
26 
27 Description
28  A rebound velocity boundary condition. Particles that hit a patch with this
29  condition will rebound back into the volume of the mesh. The change in
30  velocity is characterised by a coefficient of restitution and a fractional
31  tangential momentum loss.
32 
33 Usage
34  \table
35  Property | Description | Required? | Default
36  e | Coefficient of restitution | yes |
37  mu | Fractional tangential momentum loss | yes |
38  \endtable
39 
40  Example specification:
41  \verbatim
42  <LagrangianPatchName>
43  {
44  type reboundVelocity;
45  e 0.8;
46  mu 10 [%];
47  }
48  \endverbatim
49 
50 SourceFiles
51  reboundVelocityLagrangianPatchVectorField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef reboundVelocityLagrangianPatchVectorField_H
56 #define reboundVelocityLagrangianPatchVectorField_H
57 
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class reboundVelocityLagrangianPatchVectorField Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 class reboundVelocityLagrangianPatchVectorField
70 :
71  public cloudVelocityLagrangianPatchVectorField
72 {
73  // Private data
74 
75  //- Coefficient of restitution
76  const scalar e_;
77 
78  //- Fractional tangential momentum loss
79  const scalar mu_;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("reboundVelocity");
86 
87 
88  // Constructors
89 
90  //- Construct from patch, internal field and dictionary
92  (
93  const LagrangianPatch&,
94  const regIOobject&,
95  const dictionary&
96  );
97 
98  //- Construct as copy
100  (
102  );
103 
104  //- Construct as copy setting the internal field reference
106  (
108  const regIOobject&
109  );
110 
111  //- Construct and return a clone
113  {
115  (
117  );
118  }
119 
120  //- Construct and return a clone setting the internal field reference
122  (
123  const regIOobject& iIo
124  ) const
125  {
127  (
129  (
130  *this,
131  iIo
132  )
133  );
134  }
135 
136 
137  // Member Functions
138 
139  //- Evaluate the patch field
140  virtual void evaluate
141  (
144  );
145 
146  //- Write
147  virtual void write(Ostream&) const;
148 
149  //- Return the state after interaction with this patch
150  virtual LagrangianState state() const;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Base class for Lagrangian patches.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Buffers for inter-processor communications streams (UOPstream, UIPstream).
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A rebound velocity boundary condition. Particles that hit a patch with this condition will rebound ba...
virtual autoPtr< LagrangianPatchVectorField > clone() const
Construct and return a clone.
reboundVelocityLagrangianPatchVectorField(const LagrangianPatch &, const regIOobject &, const dictionary &)
Construct from patch, internal field and dictionary.
TypeName("reboundVelocity")
Runtime type information.
virtual LagrangianState state() const
Return the state after interaction with this patch.
virtual void evaluate(PstreamBuffers &, const LagrangianScalarInternalDynamicField &fraction)
Evaluate the patch field.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
Namespace for OpenFOAM.
LagrangianState
Lagrangian state enumeration.