cloudAbsorptionEmission.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "cloudAbsorptionEmission.H"
00030 #include "addToRunTimeSelectionTable.H"
00031
00032 #include "thermoCloud.H"
00033
00034
00035
00036 namespace Foam
00037 {
00038 namespace radiation
00039 {
00040 defineTypeNameAndDebug(cloudAbsorptionEmission, 0);
00041
00042 addToRunTimeSelectionTable
00043 (
00044 absorptionEmissionModel,
00045 cloudAbsorptionEmission,
00046 dictionary
00047 );
00048 }
00049 }
00050
00051
00052
00053
00054 Foam::radiation::cloudAbsorptionEmission::cloudAbsorptionEmission
00055 (
00056 const dictionary& dict,
00057 const fvMesh& mesh
00058 )
00059 :
00060 absorptionEmissionModel(dict, mesh),
00061 coeffsDict_(dict.subDict(typeName + "Coeffs")),
00062 cloudNames_(coeffsDict_.lookup("cloudNames"))
00063 {}
00064
00065
00066
00067
00068 Foam::radiation::cloudAbsorptionEmission::~cloudAbsorptionEmission()
00069 {}
00070
00071
00072
00073
00074 Foam::tmp<Foam::volScalarField>
00075 Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const
00076 {
00077 tmp<volScalarField> ta
00078 (
00079 new volScalarField
00080 (
00081 IOobject
00082 (
00083 "a",
00084 mesh_.time().timeName(),
00085 mesh_,
00086 IOobject::NO_READ,
00087 IOobject::NO_WRITE,
00088 false
00089 ),
00090 mesh_,
00091 dimensionedScalar("a", dimless/dimLength, 0.0)
00092 )
00093 );
00094
00095 forAll(cloudNames_, i)
00096 {
00097 const thermoCloud& tc
00098 (
00099 mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
00100 );
00101
00102 ta() += tc.ap();
00103 }
00104
00105 return ta;
00106 }
00107
00108
00109 Foam::tmp<Foam::volScalarField>
00110 Foam::radiation::cloudAbsorptionEmission::eDisp(const label bandI) const
00111 {
00112 tmp<volScalarField> te
00113 (
00114 new volScalarField
00115 (
00116 IOobject
00117 (
00118 "e",
00119 mesh_.time().timeName(),
00120 mesh_,
00121 IOobject::NO_READ,
00122 IOobject::NO_WRITE,
00123 false
00124 ),
00125 mesh_,
00126 dimensionedScalar("e", dimless/dimLength, 0.0)
00127 )
00128 );
00129
00130 return te;
00131 }
00132
00133
00134 Foam::tmp<Foam::volScalarField>
00135 Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const
00136 {
00137 tmp<volScalarField> tE
00138 (
00139 new volScalarField
00140 (
00141 IOobject
00142 (
00143 "E",
00144 mesh_.time().timeName(),
00145 mesh_,
00146 IOobject::NO_READ,
00147 IOobject::NO_WRITE,
00148 false
00149 ),
00150 mesh_,
00151 dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0)
00152 )
00153 );
00154
00155 forAll(cloudNames_, i)
00156 {
00157 const thermoCloud& tc
00158 (
00159 mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
00160 );
00161
00162 tE() += tc.Ep();
00163 }
00164
00165 return tE;
00166 }
00167
00168
00169
Copyright © 2000-2009 OpenCFD Ltd