newViscosityModel.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 "viscosityModel.H"
00028 #include "volFields.H"
00029 #include "surfaceFields.H"
00030
00031
00032
00033 namespace Foam
00034 {
00035
00036
00037
00038 autoPtr<viscosityModel> viscosityModel::New
00039 (
00040 const word& name,
00041 const dictionary& viscosityProperties,
00042 const volVectorField& U,
00043 const surfaceScalarField& phi
00044 )
00045 {
00046 word viscosityModelTypeName(viscosityProperties.lookup("transportModel"));
00047
00048 Info<< "Selecting incompressible transport model "
00049 << viscosityModelTypeName << endl;
00050
00051 dictionaryConstructorTable::iterator cstrIter =
00052 dictionaryConstructorTablePtr_->find(viscosityModelTypeName);
00053
00054 if (cstrIter == dictionaryConstructorTablePtr_->end())
00055 {
00056 FatalErrorIn
00057 (
00058 "viscosityModel::New(const volVectorField&, "
00059 "const surfaceScalarField&)"
00060 ) << "Unknown viscosityModel type "
00061 << viscosityModelTypeName << endl << endl
00062 << "Valid viscosityModels are : " << endl
00063 << dictionaryConstructorTablePtr_->toc()
00064 << exit(FatalError);
00065 }
00066
00067 return autoPtr<viscosityModel>
00068 (cstrIter()(name, viscosityProperties, U, phi));
00069 }
00070
00071
00072
00073
00074 }
00075
00076
Copyright © 2000-2009 OpenCFD Ltd