temperatureDependentSurfaceTension.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::temperatureDependent
28 
29 Description
30  Temperature-dependent surface tension model.
31 
32  The surface tension is evaluated from the specified Foam::Function1 for the
33  temperature field looked-up from the mesh database the name of which
34  may optionally be provided.
35 
36 Usage
37  \table
38  Property | Description | Required | Default value
39  T | Temperature field name | no | T
40  sigma | Surface tension function | yes |
41  \endtable
42 
43  Example of the surface tension specification:
44  \verbatim
45  sigma
46  {
47  type temperatureDependent;
48  sigma constant 0.07;
49  }
50  \endverbatim
51 
52 See also
53  Foam::surfaceTensionModel
54  Foam::Function1
55 
56 SourceFiles
57  temperatureDependentSurfaceTension.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef temperatureDependentSurfaceTension_H
62 #define temperatureDependentSurfaceTension_H
63 
64 #include "surfaceTensionModel.H"
65 #include "Function1.H"
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 
72 namespace surfaceTensionModels
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class temperatureDependent Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class temperatureDependent
80 :
81  public surfaceTensionModel
82 {
83  // Private data
84 
85  //- Name of temperature field, default = "T"
86  word TName_;
87 
88  //- Surface-tension function
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("temperatureDependent");
96 
97 
98  // Constructors
99 
100  //- Construct from dictionary and mesh
102  (
103  const dictionary& dict,
104  const fvMesh& mesh
105  );
106 
107 
108  //- Destructor
109  virtual ~temperatureDependent();
110 
111 
112  // Member Functions
113 
114  //- Surface tension coefficient
115  virtual tmp<volScalarField> sigma() const;
116 
117  //- Update surface tension coefficient from given dictionary
118  virtual bool readDict(const dictionary& dict);
119 
120  //- Write in dictionary format
121  virtual bool writeData(Ostream& os) const;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace surfaceTensionModels
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::surfaceTensionModels::temperatureDependent::readDict
virtual bool readDict(const dictionary &dict)
Definition: temperatureDependentSurfaceTension.C:101
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:57
Foam::surfaceTensionModel
Abstract base-class for surface tension models which return the surface tension coefficient field.
Definition: surfaceTensionModel.H:51
Function1.H
Foam::surfaceTensionModels::temperatureDependent
Temperature-dependent surface tension model.
Definition: temperatureDependentSurfaceTension.H:89
Foam::surfaceTensionModels::temperatureDependent::sigma
virtual tmp< volScalarField > sigma() const
Definition: temperatureDependentSurfaceTension.C:66
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:119
Foam::surfaceTensionModels::temperatureDependent::~temperatureDependent
virtual ~temperatureDependent()
Definition: temperatureDependentSurfaceTension.C:59
os
OBJstream os(runTime.globalPath()/outputName)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:81
Foam
Definition: atmBoundaryLayer.C:26
Foam::surfaceTensionModels::temperatureDependent::TypeName
TypeName("temperatureDependent")
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:49
Foam::surfaceTensionModels::temperatureDependent::writeData
virtual bool writeData(Ostream &os) const
Definition: temperatureDependentSurfaceTension.C:115
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:52
Foam::surfaceTensionModels::temperatureDependent::temperatureDependent
temperatureDependent(const dictionary &dict, const fvMesh &mesh)
Definition: temperatureDependentSurfaceTension.C:46