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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "isotropicKSolidThermo.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 defineTypeNameAndDebug(isotropicKSolidThermo, 0);
34 addToRunTimeSelectionTable
37 isotropicKSolidThermo,
41 addToRunTimeSelectionTable
44 isotropicKSolidThermo,
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53 Foam::isotropicKSolidThermo::isotropicKSolidThermo
56 const dictionary& dict
59 interpolatedSolidThermo(mesh, typeName + "Coeffs", dict),
65 mesh.time().timeName(),
71 dimEnergy/dimTime/(dimLength*dimTemperature)
73 KValues_ (Field<scalar>(subDict(typeName + "Coeffs").lookup("KValues")))
79 Foam::isotropicKSolidThermo::isotropicKSolidThermo(const fvMesh& mesh)
81 interpolatedSolidThermo(mesh, typeName + "Coeffs"),
87 mesh.time().timeName(),
93 dimEnergy/dimTime/(dimLength*dimTemperature)
95 KValues_ (Field<scalar>(subDict(typeName + "Coeffs").lookup("KValues")))
101 void Foam::isotropicKSolidThermo::correct()
105 K_.internalField() = interpolateXY
112 forAll(K_.boundaryField(), patchI)
114 K_.boundaryField()[patchI] == this->K(patchI)();
117 interpolatedSolidThermo::calculate();
121 Foam::tmp<Foam::scalarField> Foam::isotropicKSolidThermo::K
127 return tmp<scalarField>
133 T_.boundaryField()[patchI],
142 bool Foam::isotropicKSolidThermo::read()
144 KValues_ = Field<scalar>(subDict(typeName + "Coeffs").lookup("KValues"));
149 bool Foam::isotropicKSolidThermo::writeData(Ostream& os) const
151 os.writeKeyword("KValues") << KValues_ << token::END_STATEMENT << nl;
152 bool ok = interpolatedSolidThermo::writeData(os);
154 return ok && os.good();
157 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
159 Foam::isotropicKSolidThermo::~isotropicKSolidThermo()
163 // ************************************************************************* //