turbulentMixingLengthDissipationRateInletFvPatchScalarField.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 "turbulentMixingLengthDissipationRateInletFvPatchScalarField.H"
00028 #include "addToRunTimeSelectionTable.H"
00029 #include "fvPatchFieldMapper.H"
00030 #include "surfaceFields.H"
00031 #include "volFields.H"
00032 #include "RASModel.H"
00033
00034
00035
00036 namespace Foam
00037 {
00038 namespace compressible
00039 {
00040
00041
00042
00043 turbulentMixingLengthDissipationRateInletFvPatchScalarField::
00044 turbulentMixingLengthDissipationRateInletFvPatchScalarField
00045 (
00046 const fvPatch& p,
00047 const DimensionedField<scalar, volMesh>& iF
00048 )
00049 :
00050 fixedValueFvPatchField<scalar>(p, iF),
00051 mixingLength_(0.001)
00052 {}
00053
00054 turbulentMixingLengthDissipationRateInletFvPatchScalarField::
00055 turbulentMixingLengthDissipationRateInletFvPatchScalarField
00056 (
00057 const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf,
00058 const fvPatch& p,
00059 const DimensionedField<scalar, volMesh>& iF,
00060 const fvPatchFieldMapper& mapper
00061 )
00062 :
00063 fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
00064 mixingLength_(ptf.mixingLength_)
00065 {}
00066
00067 turbulentMixingLengthDissipationRateInletFvPatchScalarField::
00068 turbulentMixingLengthDissipationRateInletFvPatchScalarField
00069 (
00070 const fvPatch& p,
00071 const DimensionedField<scalar, volMesh>& iF,
00072 const dictionary& dict
00073 )
00074 :
00075 fixedValueFvPatchField<scalar>(p, iF, dict),
00076 mixingLength_(readScalar(dict.lookup("mixingLength")))
00077 {}
00078
00079 turbulentMixingLengthDissipationRateInletFvPatchScalarField::
00080 turbulentMixingLengthDissipationRateInletFvPatchScalarField
00081 (
00082 const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf
00083 )
00084 :
00085 fixedValueFvPatchField<scalar>(ptf),
00086 mixingLength_(ptf.mixingLength_)
00087 {}
00088
00089 turbulentMixingLengthDissipationRateInletFvPatchScalarField::
00090 turbulentMixingLengthDissipationRateInletFvPatchScalarField
00091 (
00092 const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf,
00093 const DimensionedField<scalar, volMesh>& iF
00094 )
00095 :
00096 fixedValueFvPatchField<scalar>(ptf, iF),
00097 mixingLength_(ptf.mixingLength_)
00098 {}
00099
00100
00101
00102
00103 void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
00104 {
00105 if (updated())
00106 {
00107 return;
00108 }
00109
00110
00111 const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
00112
00113 const scalar Cmu =
00114 rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09);
00115
00116 const scalar Cmu75 = pow(Cmu, 0.75);
00117
00118 const fvPatchField<scalar>& kp =
00119 patch().lookupPatchField<volScalarField, scalar>("k");
00120
00121 operator==(Cmu75*kp*sqrt(kp)/mixingLength_);
00122
00123 fixedValueFvPatchField<scalar>::updateCoeffs();
00124 }
00125
00126
00127 void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
00128 (
00129 Ostream& os
00130 ) const
00131 {
00132 fvPatchField<scalar>::write(os);
00133 os.writeKeyword("mixingLength")
00134 << mixingLength_ << token::END_STATEMENT << nl;
00135 writeEntry("value", os);
00136 }
00137
00138
00139
00140
00141 makePatchTypeField
00142 (
00143 fvPatchScalarField,
00144 turbulentMixingLengthDissipationRateInletFvPatchScalarField
00145 );
00146
00147
00148
00149
00150 }
00151 }
00152
00153
Copyright © 2000-2009 OpenCFD Ltd