OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

HeatTransferModel.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "HeatTransferModel.H"
00028 
00029 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00030 
00031 template<class CloudType>
00032 Foam::HeatTransferModel<CloudType>::HeatTransferModel(CloudType& owner)
00033 :
00034     dict_(dictionary::null),
00035     owner_(owner),
00036     coeffDict_(dictionary::null)
00037 {}
00038 
00039 
00040 template<class CloudType>
00041 Foam::HeatTransferModel<CloudType>::HeatTransferModel
00042 (
00043     const dictionary& dict,
00044     CloudType& owner,
00045     const word& type
00046 )
00047 :
00048     dict_(dict),
00049     owner_(owner),
00050     coeffDict_(dict.subDict(type + "Coeffs"))
00051 {}
00052 
00053 
00054 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00055 
00056 template<class CloudType>
00057 Foam::HeatTransferModel<CloudType>::~HeatTransferModel()
00058 {}
00059 
00060 
00061 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00062 
00063 template<class CloudType>
00064 const CloudType& Foam::HeatTransferModel<CloudType>::owner() const
00065 {
00066     return owner_;
00067 }
00068 
00069 
00070 template<class CloudType>
00071 const Foam::dictionary& Foam::HeatTransferModel<CloudType>::dict() const
00072 {
00073     return dict_;
00074 }
00075 
00076 
00077 template<class CloudType>
00078 const Foam::dictionary& Foam::HeatTransferModel<CloudType>::coeffDict() const
00079 {
00080     return coeffDict_;
00081 }
00082 
00083 
00084 template<class CloudType>
00085 Foam::scalar Foam::HeatTransferModel<CloudType>::h
00086 (
00087     const scalar dp,
00088     const vector& Ur,
00089     const scalar rhoc,
00090     const scalar rhop,
00091     const scalar cpc,
00092     const scalar cpp,
00093     const scalar muc
00094 ) const
00095 {
00096     const scalar Re = rhoc*mag(Ur)*dp/(muc + ROOTVSMALL);
00097 
00098 //    const scalar Pr = muc/alphac;
00099     const scalar Pr = this->Pr();
00100 
00101     const scalar Nu = this->Nu(Re, Pr);
00102 
00103     const scalar kappa = cpc*muc/Pr;
00104 
00105     return Nu*kappa/dp;
00106 }
00107 
00108 
00109 template<class CloudType>
00110 Foam::scalar Foam::HeatTransferModel<CloudType>::Cu
00111 (
00112     const scalar dp,
00113     const vector& Ur,
00114     const scalar rhoc,
00115     const scalar rhop,
00116     const scalar cpc,
00117     const scalar cpp,
00118     const scalar muc
00119 ) const
00120 {
00121     const scalar Re = rhoc*mag(Ur)*dp/(muc + ROOTVSMALL);
00122 
00123 //    const scalar Pr = muc/alphac;
00124     const scalar Pr = this->Pr();
00125 
00126     const scalar Nu = this->Nu(Re, Pr);
00127 
00128     const scalar kappa = cpc*muc/Pr;
00129 
00130     const scalar htc = Nu*kappa/dp;
00131 
00132     return 6.0*htc/(dp*rhop*cpp);
00133 }
00134 
00135 
00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00137 
00138 #include "NewHeatTransferModel.C"
00139 
00140 
00141 // ************************************************************************* //
00142 
Copyright © 2000-2009 OpenCFD Ltd