1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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/>.
25 Foam::directionalKSolidThermo
28 Directional conductivity + table interpolation.
31 directionalKSolidThermo.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef directionalKSolidThermo_H
36 #define directionalKSolidThermo_H
38 #include "coordinateSystem.H"
39 #include "interpolatedSolidThermo.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class directionalKSolidThermo Declaration
48 \*---------------------------------------------------------------------------*/
50 class directionalKSolidThermo
52 public interpolatedSolidThermo
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
78 //- Transform principal values of symmTensor
82 const tensorField& tt,
86 //- Calculate properties
95 //- Runtime type information
96 TypeName("directionalKSolidThermo");
101 //- Construct from mesh
102 directionalKSolidThermo(const fvMesh& mesh);
104 //- Construct from mesh and dictionary
105 directionalKSolidThermo(const fvMesh& mesh, const dictionary& dict);
109 virtual ~directionalKSolidThermo();
114 //- Update properties
115 virtual void correct();
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;
136 //- Write the directionalKSolidThermo properties
137 virtual bool writeData(Ostream& os) const;
139 //- Read the directionalKSolidThermo properties
142 //- Read the directionalKSolidThermo properties
143 bool read(const dictionary& dict);
146 friend Ostream& operator<<
149 const directionalKSolidThermo& s
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 // ************************************************************************* //