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