turbulenceModel.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 "turbulenceModel.H"
00028 #include "volFields.H"
00029 #include "surfaceFields.H"
00030
00031
00032
00033 namespace Foam
00034 {
00035 namespace compressible
00036 {
00037
00038
00039
00040 defineTypeNameAndDebug(turbulenceModel, 0);
00041 defineRunTimeSelectionTable(turbulenceModel, turbulenceModel);
00042
00043
00044
00045 turbulenceModel::turbulenceModel
00046 (
00047 const volScalarField& rho,
00048 const volVectorField& U,
00049 const surfaceScalarField& phi,
00050 const basicThermo& thermophysicalModel
00051 )
00052 :
00053 runTime_(U.time()),
00054 mesh_(U.mesh()),
00055
00056 rho_(rho),
00057 U_(U),
00058 phi_(phi),
00059 thermophysicalModel_(thermophysicalModel)
00060 {}
00061
00062
00063
00064
00065 autoPtr<turbulenceModel> turbulenceModel::New
00066 (
00067 const volScalarField& rho,
00068 const volVectorField& U,
00069 const surfaceScalarField& phi,
00070 const basicThermo& thermophysicalModel
00071 )
00072 {
00073 word modelName;
00074
00075
00076
00077
00078 {
00079 IOdictionary dict
00080 (
00081 IOobject
00082 (
00083 "turbulenceProperties",
00084 U.time().constant(),
00085 U.db(),
00086 IOobject::MUST_READ,
00087 IOobject::NO_WRITE
00088 )
00089 );
00090
00091 dict.lookup("simulationType") >> modelName;
00092 }
00093
00094 Info<< "Selecting turbulence model type " << modelName << endl;
00095
00096 turbulenceModelConstructorTable::iterator cstrIter =
00097 turbulenceModelConstructorTablePtr_->find(modelName);
00098
00099 if (cstrIter == turbulenceModelConstructorTablePtr_->end())
00100 {
00101 FatalErrorIn
00102 (
00103 "turbulenceModel::New(const volScalarField&, "
00104 "const volVectorField&, const surfaceScalarField&, "
00105 "basicThermo&)"
00106 ) << "Unknown turbulenceModel type " << modelName
00107 << endl << endl
00108 << "Valid turbulenceModel types are :" << endl
00109 << turbulenceModelConstructorTablePtr_->toc()
00110 << exit(FatalError);
00111 }
00112
00113 return autoPtr<turbulenceModel>
00114 (
00115 cstrIter()(rho, U, phi, thermophysicalModel)
00116 );
00117 }
00118
00119
00120
00121
00122 void turbulenceModel::correct()
00123 {}
00124
00125
00126
00127
00128 }
00129 }
00130
00131
Copyright © 2000-2009 OpenCFD Ltd