LaplacePressureLagrangianScalarFieldSource.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) 2026 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::LaplacePressureLagrangianScalarFieldSource
26 
27 Description
28  This source condition sets the values of the pressure to that of the
29  carrier plus an amount caused by the effect of the surface tension on a
30  spherical droplet or bubble.
31 
32  Note that for now, the surface tension is an input parameter. This is
33  likely to change as more surface-tension-dependent models are introduced
34  and it becomes necessary to centralise the specification of the surface
35  tension modelling. For now, this serves as a proof of concept that the
36  pressure of the particles can differ from that of the carrier.
37 
38 Usage
39  \table
40  Property | Description | Required? | Default
41  sigma | The surface tension coefficient | yes |
42  \endtable
43 
44  Example specification:
45  \verbatim
46  <LagrangianModelName>
47  {
48  type LaplacePressure;
49  sigma 0.07 [N/m];
50  }
51  \endverbatim
52 
53 SourceFiles
54  LaplacePressureLagrangianScalarFieldSource.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef LaplacePressureLagrangianScalarFieldSource_H
59 #define LaplacePressureLagrangianScalarFieldSource_H
60 
61 #include "LagrangianFieldSources.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class LaplacePressureLagrangianScalarFieldSource Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class LaplacePressureLagrangianScalarFieldSource
74 :
75  public LagrangianScalarFieldSource,
76  private cloudLagrangianFieldSource
77 {
78 private:
79 
80  // Private Data
81 
82  //- The surface tension coefficient
83  const dimensionedScalar sigma_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("LaplacePressure");
90 
91 
92  // Constructors
93 
94  //- Construct from internal field and dictionary
96  (
97  const regIOobject&,
99  );
100 
101  //- Copy constructor setting the internal field reference
103  (
105  const regIOobject&
106  );
107 
108  //- Construct and return a clone setting the internal field reference
110  (
111  const regIOobject& iIo
112  ) const
113  {
115  (
117  );
118  }
119 
120 
121  //- Destructor
123 
124 
125  // Member Functions
126 
127  //- Return the value for an instantaneous injection
129  (
130  const LagrangianInjection&,
131  const LagrangianSubMesh&
132  ) const;
133 
134  //- Return the value without a model
136  (
137  const LagrangianSubMesh&
138  ) const;
139 
140  //- Write
141  virtual void write(Ostream&) const;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
This source condition sets the values of the pressure to that of the carrier plus an amount caused by...
TypeName("LaplacePressure")
Runtime type information.
LaplacePressureLagrangianScalarFieldSource(const regIOobject &, const dictionary &dict)
Construct from internal field and dictionary.
virtual tmp< LagrangianSubScalarField > value(const LagrangianInjection &, const LagrangianSubMesh &) const
Return the value for an instantaneous injection.
virtual autoPtr< LagrangianScalarFieldSource > clone(const regIOobject &iIo) const
Construct and return a clone setting the internal field reference.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
dictionary dict