ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / thermophysicalModels / basicSolidThermo / directionalKSolidThermo / directionalKSolidThermo.H
blob6872bec26f5ecd06649d54237d86e4ef14fcdd53
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::directionalKSolidThermo
27 Description
28     Directional conductivity + table interpolation.
30 SourceFiles
31     directionalKSolidThermo.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef directionalKSolidThermo_H
36 #define directionalKSolidThermo_H
38 #include "coordinateSystem.H"
39 #include "interpolatedSolidThermo.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                   Class directionalKSolidThermo Declaration
48 \*---------------------------------------------------------------------------*/
50 class directionalKSolidThermo
52     public interpolatedSolidThermo
54     // Private data
56         //- Thermal conductivity [W/(m.K)]
57         volSymmTensorField directionalK_;
59         //- Thermal conductivity vector
60         Field<vector> KValues_;
62         //- Coordinate system used for the directional properties
63         coordinateSystem coordSys_;
65         //- Transformation for cell centres
66         volTensorField ccTransforms_;
69     // Private Member Functions
71         //- Transform principal values of symmTensor
72         symmTensor transformPrincipal
73         (
74             const tensor& tt,
75             const vector& st
76          ) const;
78         //- Transform principal values of symmTensor
79         void transformField
80         (
81             symmTensorField& fld,
82             const tensorField& tt,
83             const vectorField& st
84         ) const;
86         //- Calculate properties
87         void calculate();
89         //- Initialize thermo
90         void init();
93 public:
95     //- Runtime type information
96     TypeName("directionalKSolidThermo");
99     // Constructors
101         //- Construct from mesh
102         directionalKSolidThermo(const fvMesh& mesh);
104          //- Construct from mesh and dictionary
105         directionalKSolidThermo(const fvMesh& mesh, const dictionary& dict);
108     //- Destructor
109     virtual ~directionalKSolidThermo();
112     // Member Functions
114         //- Update properties
115         virtual void correct();
117         //- Access functions
119             //- Thermal conductivity [W/(m.K)]
120             virtual const volSymmTensorField& directionalK() const;
122             //- Iostropic thermal conductivity [W/(m.K)]
123             virtual const volScalarField& K() const;
125         // Per patch calculation
127             //- Thermal conductivity [W//m/K]
128             virtual tmp<scalarField> K(const label patchI) const;
130             //- Thermal conductivity [W//m/K]
131             virtual tmp<symmTensorField> directionalK(const label) const;
134         // I-O
136             //- Write the directionalKSolidThermo properties
137             virtual bool writeData(Ostream& os) const;
139             //- Read the directionalKSolidThermo properties
140             virtual bool read();
142             //- Read the directionalKSolidThermo properties
143             bool read(const dictionary& dict);
145             //- Ostream Operator
146             friend Ostream& operator<<
147             (
148                 Ostream& os,
149                 const directionalKSolidThermo& s
150             );
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 #endif
162 // ************************************************************************* //