mixedEnthalpyFvPatchScalarField.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 "mixedEnthalpyFvPatchScalarField.H"
00028 #include "addToRunTimeSelectionTable.H"
00029 #include "fvPatchFieldMapper.H"
00030 #include "volFields.H"
00031 #include "basicThermo.H"
00032
00033
00034
00035 namespace Foam
00036 {
00037
00038
00039
00040 mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
00041 (
00042 const fvPatch& p,
00043 const DimensionedField<scalar, volMesh>& iF
00044 )
00045 :
00046 mixedFvPatchScalarField(p, iF)
00047 {
00048 valueFraction() = 0.0;
00049 refValue() = 0.0;
00050 refGrad() = 0.0;
00051 }
00052
00053
00054 mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
00055 (
00056 const mixedEnthalpyFvPatchScalarField& ptf,
00057 const fvPatch& p,
00058 const DimensionedField<scalar, volMesh>& iF,
00059 const fvPatchFieldMapper& mapper
00060 )
00061 :
00062 mixedFvPatchScalarField(ptf, p, iF, mapper)
00063 {}
00064
00065
00066 mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
00067 (
00068 const fvPatch& p,
00069 const DimensionedField<scalar, volMesh>& iF,
00070 const dictionary& dict
00071 )
00072 :
00073 mixedFvPatchScalarField(p, iF, dict)
00074 {}
00075
00076
00077 mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
00078 (
00079 const mixedEnthalpyFvPatchScalarField& tppsf
00080 )
00081 :
00082 mixedFvPatchScalarField(tppsf)
00083 {}
00084
00085
00086 mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
00087 (
00088 const mixedEnthalpyFvPatchScalarField& tppsf,
00089 const DimensionedField<scalar, volMesh>& iF
00090 )
00091 :
00092 mixedFvPatchScalarField(tppsf, iF)
00093 {}
00094
00095
00096
00097
00098 void mixedEnthalpyFvPatchScalarField::updateCoeffs()
00099 {
00100 if (updated())
00101 {
00102 return;
00103 }
00104
00105 const basicThermo& thermo = db().lookupObject<basicThermo>
00106 (
00107 "thermophysicalProperties"
00108 );
00109
00110 const label patchi = patch().index();
00111
00112 mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField>
00113 (
00114 const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi])
00115 );
00116
00117 Tw.evaluate();
00118
00119 valueFraction() = Tw.valueFraction();
00120 refValue() = thermo.h(Tw.refValue(), patchi);
00121 refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
00122 + patch().deltaCoeffs()*
00123 (
00124 thermo.h(Tw, patchi)
00125 - thermo.h(Tw, patch().faceCells())
00126 );
00127
00128 mixedFvPatchScalarField::updateCoeffs();
00129 }
00130
00131
00132
00133
00134 makePatchTypeField(fvPatchScalarField, mixedEnthalpyFvPatchScalarField);
00135
00136
00137
00138 }
00139
00140
Copyright © 2000-2009 OpenCFD Ltd