constantSurfaceTension.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) 2017-2018 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::surfaceTensionModels::constant
26 
27 Description
28  Uniform constant surface tension model.
29 
30 Usage
31  Example of the surface tension specification:
32  \verbatim
33  sigma
34  {
35  type constant;
36  sigma 0.07;
37  }
38  \endverbatim
39 
40 See also
41  Foam::surfaceTensionModel
42 
43 SourceFiles
44  constantSurfaceTension.C
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef constantSurfaceTension_H
49 #define constantSurfaceTension_H
50 
51 #include "surfaceTensionModel.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 namespace surfaceTensionModels
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class constant Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class constant
66 :
67  public surfaceTensionModel
68 {
69  // Private data
70 
71  //- Surface tension coefficient
72  dimensionedScalar sigma_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("constant");
79 
80 
81  // Constructors
82 
83  //- Construct from dictionary and mesh
84  constant
85  (
86  const dictionary& dict,
87  const fvMesh& mesh
88  );
89 
90 
91  //- Destructor
92  virtual ~constant();
93 
94 
95  // Member Functions
96 
97  //- Surface tension coefficient
98  virtual tmp<volScalarField> sigma() const;
99 
100  //- Update surface tension coefficient from given dictionary
101  virtual bool readDict(const dictionary& dict);
102 
103  //- Write in dictionary format
104  virtual bool writeData(Ostream& os) const;
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace surfaceTensionModels
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
dictionary dict
TypeName("constant")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual bool writeData(Ostream &os) const
Write in dictionary format.
constant(const dictionary &dict, const fvMesh &mesh)
Construct from dictionary and mesh.
dynamicFvMesh & mesh
Uniform constant surface tension model.
virtual bool readDict(const dictionary &dict)
Update surface tension coefficient from given dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual tmp< volScalarField > sigma() const
Surface tension coefficient.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
A class for managing temporary objects.
Definition: PtrList.H:53
Abstract base-class for surface tension models which return the surface tension coefficient field...
Namespace for OpenFOAM.