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 #include <EulerianInterfacialModels/dragModel.H>
00027
00028
00029
00030 Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
00031 (
00032 const dictionary& interfaceDict,
00033 const volScalarField& alpha,
00034 const phaseModel& phasea,
00035 const phaseModel& phaseb
00036 )
00037 {
00038 word dragModelType
00039 (
00040 interfaceDict.lookup("dragModel" + phasea.name())
00041 );
00042
00043 Info << "Selecting dragModel for phase "
00044 << phasea.name()
00045 << ": "
00046 << dragModelType << endl;
00047
00048 dictionaryConstructorTable::iterator cstrIter =
00049 dictionaryConstructorTablePtr_->find(dragModelType);
00050
00051 if (cstrIter == dictionaryConstructorTablePtr_->end())
00052 {
00053 FatalError
00054 << "dragModel::New : " << endl
00055 << " unknown dragModelType type "
00056 << dragModelType
00057 << ", constructor not in hash table" << endl << endl
00058 << " Valid dragModel types are : " << endl;
00059 Info << dictionaryConstructorTablePtr_->sortedToc()
00060 << abort(FatalError);
00061 }
00062
00063 return cstrIter()(interfaceDict, alpha, phasea, phaseb);
00064 }
00065
00066
00067