constantSurfaceTension.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::surfaceTensionModels::constant
28 
29 Description
30  Uniform constant surface tension model.
31 
32 Usage
33  Example of the surface tension specification:
34  \verbatim
35  sigma
36  {
37  type constant;
38  sigma 0.07;
39  }
40  \endverbatim
41 
42 See also
43  Foam::surfaceTensionModel
44 
45 SourceFiles
46  constantSurfaceTension.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef constantSurfaceTension_H
51 #define constantSurfaceTension_H
52 
53 #include "surfaceTensionModel.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 
60 namespace surfaceTensionModels
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class constant Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class constant
68 :
69  public surfaceTensionModel
70 {
71  // Private data
72 
73  //- Surface tension coefficient
74  dimensionedScalar sigma_;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("constant");
81 
82 
83  // Constructors
84 
85  //- Construct from dictionary and mesh
86  constant
87  (
88  const dictionary& dict,
89  const fvMesh& mesh
90  );
91 
92 
93  //- Destructor
94  virtual ~constant();
95 
96 
97  // Member Functions
98 
99  //- Surface tension coefficient
100  virtual tmp<volScalarField> sigma() const;
101 
102  //- Update surface tension coefficient from given dictionary
103  virtual bool readDict(const dictionary& dict);
104 
105  //- Write in dictionary format
106  virtual bool writeData(Ostream& os) const;
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace surfaceTensionModels
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
Foam::surfaceTensionModels::constant::~constant
virtual ~constant()
Destructor.
Definition: constantSurfaceTension.C:59
Foam::surfaceTensionModels::constant::constant
constant(const dictionary &dict, const fvMesh &mesh)
Construct from dictionary and mesh.
Definition: constantSurfaceTension.C:47
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::surfaceTensionModel
Abstract base-class for surface tension models which return the surface tension coefficient field.
Definition: surfaceTensionModel.H:55
Foam::surfaceTensionModels::constant::writeData
virtual bool writeData(Ostream &os) const
Write in dictionary format.
Definition: constantSurfaceTension.C:101
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::surfaceTensionModels::constant::readDict
virtual bool readDict(const dictionary &dict)
Update surface tension coefficient from given dictionary.
Definition: constantSurfaceTension.C:85
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::dimensioned< scalar >
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::surfaceTensionModels::constant
Uniform constant surface tension model.
Definition: constantSurfaceTension.H:66
Foam::surfaceTensionModels::constant::sigma
virtual tmp< volScalarField > sigma() const
Surface tension coefficient.
Definition: constantSurfaceTension.C:66
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::surfaceTensionModels::constant::TypeName
TypeName("constant")
Runtime type information.