README.ThirdParty and AllMake.stage5: Changed tabs to spaces, for editing coherence.
[foam-extend-3.2.git] / src / solidModels / thermalModel / thermalModel.H
blob542b7000a16e9c591cd08af9dec37ff6387baf1c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     |
5     \\  /    A nd           | For copyright notice see file Copyright
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     thermalModel
27 Description
28     Thermal material properties for solids.
30 Author
31     Hrvoje Jasak, Wikki Ltd.  All rights reserved.
33 SourceFiles
34     thermalModel.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef thermalModel_H
39 #define thermalModel_H
41 #include "IOdictionary.H"
42 #include "typeInfo.H"
43 #include "runTimeSelectionTables.H"
44 #include "volFields.H"
45 #include "tmp.H"
46 #include "thermalLaw.H"
47 #include "Switch.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 namespace Foam
54 /*---------------------------------------------------------------------------*\
55                          Class thermalModel Declaration
56 \*---------------------------------------------------------------------------*/
58 class thermalModel
60     public IOdictionary
62     // Private data
64         //- Reference to temperature field
65         const volScalarField& T_;
67         //- Thermal law
68         autoPtr<thermalLaw> lawPtr_;
71     // Private Member Functions
73         //- Disallow copy construct
74         thermalModel(const thermalModel&);
76         //- Disallow default bitwise assignment
77         void operator=(const thermalModel&);
80 public:
82     //- Runtime type information
83     TypeName("thermalModel");
85     // Constructors
87         //- Construct from dictionary
88         thermalModel(const volScalarField& T);
91     // Destructor
93         virtual ~thermalModel()
94         {}
97     // Member Functions
99         //- Return thermal law
100         const thermalLaw& law() const
101         {
102             return lawPtr_();
103         }
105         //- Return specific heat capacity
106         tmp<volScalarField> C() const
107         {
108             return lawPtr_->C();
109         }
111         //- Return thermal conductivity
112         tmp<volScalarField> k() const
113         {
114             return lawPtr_->k();
115         }
117         //- Return thermal expansion coefficient
118         tmp<volScalarField> alpha() const
119         {
120             return lawPtr_->alpha();
121         }
123         //- Return reference temperature
124         tmp<volScalarField> T0() const
125         {
126             return lawPtr_->T0();
127         }
129         //- Correct the thermal model
130         void correct()
131         {
132             lawPtr_->correct();
133         }
135         //- Read thermalProperties dictionary
136         virtual bool read();
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //