hhuCombustionThermo.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 #include "hhuCombustionThermo.H"
00028 #include "fvMesh.H"
00029 #include "zeroGradientFvPatchFields.H"
00030 #include "fixedUnburntEnthalpyFvPatchScalarField.H"
00031 #include "gradientUnburntEnthalpyFvPatchScalarField.H"
00032 #include "mixedUnburntEnthalpyFvPatchScalarField.H"
00033
00034
00035
00036 namespace Foam
00037 {
00038
00039
00040
00041 defineTypeNameAndDebug(hhuCombustionThermo, 0);
00042 defineRunTimeSelectionTable(hhuCombustionThermo, fvMesh);
00043
00044
00045
00046 wordList hhuCombustionThermo::huBoundaryTypes()
00047 {
00048 const volScalarField::GeometricBoundaryField& tbf = Tu_.boundaryField();
00049
00050 wordList hbt = tbf.types();
00051
00052 forAll(tbf, patchi)
00053 {
00054 if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
00055 {
00056 hbt[patchi] = fixedUnburntEnthalpyFvPatchScalarField::typeName;
00057 }
00058 else if
00059 (
00060 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
00061 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
00062 )
00063 {
00064 hbt[patchi] = gradientUnburntEnthalpyFvPatchScalarField::typeName;
00065 }
00066 else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
00067 {
00068 hbt[patchi] = mixedUnburntEnthalpyFvPatchScalarField::typeName;
00069 }
00070 }
00071
00072 return hbt;
00073 }
00074
00075 void hhuCombustionThermo::huBoundaryCorrection(volScalarField& hu)
00076 {
00077 volScalarField::GeometricBoundaryField& hbf = hu.boundaryField();
00078
00079 forAll(hbf, patchi)
00080 {
00081 if
00082 (
00083 isA<gradientUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
00084 )
00085 {
00086 refCast<gradientUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
00087 .gradient() = hbf[patchi].fvPatchField::snGrad();
00088 }
00089 else if
00090 (
00091 isA<mixedUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
00092 )
00093 {
00094 refCast<mixedUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
00095 .refGrad() = hbf[patchi].fvPatchField::snGrad();
00096 }
00097 }
00098 }
00099
00100
00101
00102
00103 hhuCombustionThermo::hhuCombustionThermo(const fvMesh& mesh)
00104 :
00105 hCombustionThermo(mesh),
00106
00107 Tu_
00108 (
00109 IOobject
00110 (
00111 "Tu",
00112 mesh.time().timeName(),
00113 mesh,
00114 IOobject::MUST_READ,
00115 IOobject::AUTO_WRITE
00116 ),
00117 mesh
00118 ),
00119
00120 hu_
00121 (
00122 IOobject
00123 (
00124 "hu",
00125 mesh.time().timeName(),
00126 mesh,
00127 IOobject::NO_READ,
00128 IOobject::NO_WRITE
00129 ),
00130 mesh,
00131 dimensionSet(0, 2, -2, 0, 0),
00132 huBoundaryTypes()
00133 )
00134 {}
00135
00136
00137
00138
00139 hhuCombustionThermo::~hhuCombustionThermo()
00140 {}
00141
00142
00143
00144
00145 }
00146
00147
Copyright © 2000-2009 OpenCFD Ltd