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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::surfaceTensionModels::temperatureDependent
28
29Description
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
36Usage
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
52See also
53 Foam::surfaceTensionModel
54 Foam::Function1
55
56SourceFiles
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
69namespace Foam
70{
71
72namespace surfaceTensionModels
73{
74
75/*---------------------------------------------------------------------------*\
76 Class temperatureDependent Declaration
77\*---------------------------------------------------------------------------*/
78
79class 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
89 autoPtr<Function1<scalar>> sigma_;
90
91
92public:
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
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// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
virtual bool writeData(Ostream &os) const
Write in dictionary format.
virtual bool readDict(const dictionary &dict)
Update surface tension coefficient from given dictionary.
virtual tmp< volScalarField > sigma() const
Surface tension coefficient.
TypeName("temperatureDependent")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73