Merge branch 'olesenm'

This commit is contained in:
andy
2010-04-23 14:40:48 +01:00
308 changed files with 1508 additions and 1812 deletions

View File

@ -36,12 +36,12 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
const surfaceScalarField& phi
)
{
word PDRDragModelTypeName = PDRProperties.lookup("PDRDragModel");
const word modelType(PDRProperties.lookup("PDRDragModel"));
Info<< "Selecting flame-wrinkling model " << PDRDragModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(PDRDragModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -49,7 +49,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
(
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
<< PDRDragModelTypeName << endl << endl
<< modelType << nl << nl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -29,18 +29,18 @@ License
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
(
const dictionary& XiEqProperties,
const dictionary& propDict,
const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su
)
{
word XiEqModelTypeName = XiEqProperties.lookup("XiEqModel");
const word modelType(propDict.lookup("XiEqModel"));
Info<< "Selecting flame-wrinkling model " << XiEqModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiEqModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,14 +53,13 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
<< XiEqModelTypeName << endl << endl
<< "Valid XiEqModels are : " << endl
<< modelType << nl << nl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<XiEqModel>
(cstrIter()(XiEqProperties, thermo, turbulence, Su));
return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));
}

View File

@ -29,18 +29,18 @@ License
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
(
const dictionary& XiGProperties,
const dictionary& propDict,
const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su
)
{
word XiGModelTypeName = XiGProperties.lookup("XiGModel");
const word modelType(propDict.lookup("XiGModel"));
Info<< "Selecting flame-wrinkling model " << XiGModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiGModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,14 +53,13 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
" const volScalarField& Su"
")"
) << "Unknown XiGModel type "
<< XiGModelTypeName << endl << endl
<< "Valid XiGModels are : " << endl
<< modelType << nl << nl
<< "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<XiGModel>
(cstrIter()(XiGProperties, thermo, turbulence, Su));
return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
}

View File

@ -29,7 +29,7 @@ License
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
(
const dictionary& XiProperties,
const dictionary& propDict,
const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su,
@ -38,12 +38,12 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const surfaceScalarField& phi
)
{
word XiModelTypeName = XiProperties.lookup("XiModel");
const word modelType(propDict.lookup("XiModel"));
Info<< "Selecting flame-wrinkling model " << XiModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -51,14 +51,14 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
(
"XiModel::New"
) << "Unknown XiModel type "
<< XiModelTypeName << endl << endl
<< "Valid XiModels are : " << endl
<< modelType << nl << nl
<< "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<XiModel>
(cstrIter()(XiProperties, thermo, turbulence, Su, rho, b, phi));
(cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi));
}

View File

@ -29,22 +29,19 @@ License
Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
(
const dictionary& combustionProperties,
const dictionary& propDict,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
{
word combustionModelTypeName = combustionProperties.lookup
(
"combustionModel"
);
const word modelType(propDict.lookup("combustionModel"));
Info<< "Selecting combustion model " << combustionModelTypeName << endl;
Info<< "Selecting combustion model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(combustionModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -52,14 +49,14 @@ Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
(
"combustionModel::New"
) << "Unknown combustionModel type "
<< combustionModelTypeName << endl << endl
<< "Valid combustionModels are : " << endl
<< modelType << nl << nl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<combustionModel>
(cstrIter()(combustionProperties, thermo, turbulence, phi, rho));
(cstrIter()(propDict, thermo, turbulence, phi, rho));
}

View File

@ -71,9 +71,9 @@ IOdictionary combustionProperties
);
Info<< "Creating combustion model\n" << endl;
autoPtr<combustionModel::combustionModel> combustion
autoPtr<combustionModel> combustion
(
combustionModel::combustionModel::New
combustionModel::New
(
combustionProperties,
thermo,

View File

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
autoPtr<Foam::motionSolver> motionPtr = motionSolver::New(mesh);
autoPtr<motionSolver> motionPtr = motionSolver::New(mesh);
while (runTime.loop())
{

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField& p = thermo.p();
volScalarField& hs = thermo.hs();

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{

View File

@ -36,30 +36,27 @@ Foam::phaseChangeTwoPhaseMixture::New
const word& alpha1Name
)
{
IOdictionary transportPropertiesDict
// get model name, but do not register the dictionary
const word mixtureType
(
IOobject
IOdictionary
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
IOobject
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
).lookup("phaseChangeTwoPhaseMixture")
);
word phaseChangeTwoPhaseMixtureTypeName
(
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
);
Info<< "Selecting phaseChange model "
<< phaseChangeTwoPhaseMixtureTypeName << endl;
Info<< "Selecting phaseChange model " << mixtureType << endl;
componentsConstructorTable::iterator cstrIter =
componentsConstructorTablePtr_
->find(phaseChangeTwoPhaseMixtureTypeName);
componentsConstructorTablePtr_->find(mixtureType);
if (cstrIter == componentsConstructorTablePtr_->end())
{
@ -67,8 +64,8 @@ Foam::phaseChangeTwoPhaseMixture::New
(
"phaseChangeTwoPhaseMixture::New"
) << "Unknown phaseChangeTwoPhaseMixture type "
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl
<< mixtureType << nl << nl
<< "Valid phaseChangeTwoPhaseMixture types are : " << endl
<< componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}

View File

@ -159,7 +159,7 @@
Info<< "Selecting Drift-Flux model " << endl;
word VdjModel(transportProperties.lookup("VdjModel"));
const word VdjModel(transportProperties.lookup("VdjModel"));
Info<< tab << VdjModel << " selected\n" << endl;

View File

@ -35,28 +35,24 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
const phaseModel& phaseb
)
{
word dragModelType
(
interfaceDict.lookup("dragModel" + phasea.name())
);
const word modelType(interfaceDict.lookup("dragModel" + phasea.name()));
Info<< "Selecting dragModel for phase "
<< phasea.name()
<< ": "
<< dragModelType << endl;
Info<< "Selecting dragModel for phase " << phasea.name()
<< ": " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "dragModel::New : " << endl
<< " unknown dragModelType type "
<< dragModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid dragModel types are : " << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
FatalErrorIn
(
"dragModel::New(...)"
) << "Unknown dragModel type "
<< modelType << nl << nl
<< "Valid dragModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return cstrIter()(interfaceDict, alpha, phasea, phaseb);

View File

@ -32,23 +32,23 @@ Foam::autoPtr<Foam::conductivityModel> Foam::conductivityModel::New
const dictionary& dict
)
{
word conductivityModelType(dict.lookup("conductivityModel"));
const word modelType(dict.lookup("conductivityModel"));
Info<< "Selecting conductivityModel "
<< conductivityModelType << endl;
Info<< "Selecting conductivityModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(conductivityModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "conductivityModel::New(const dictionary&) : " << endl
<< " unknown conductivityModelType type "
<< conductivityModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid conductivityModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
FatalErrorIn
(
"conductivityModel::New(const dictionary&)"
) << "Unknown conductivityModel type "
<< modelType << nl << nl
<< "Valid conductivityModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return autoPtr<conductivityModel>(cstrIter()(dict));

View File

@ -32,23 +32,24 @@ Foam::autoPtr<Foam::frictionalStressModel> Foam::frictionalStressModel::New
const dictionary& dict
)
{
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
const word modelType(dict.lookup("frictionalStressModel"));
Info<< "Selecting frictionalStressModel "
<< frictionalStressModelType << endl;
Info<< "Selecting frictionalStressModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "frictionalStressModel::New(const dictionary&) : " << endl
<< " unknown frictionalStressModelType type "
<< frictionalStressModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid frictionalStressModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
FatalErrorIn
(
"frictionalStressModel::New(const dictionary&)"
)
<< "Unknown frictionalStressModel type "
<< modelType << nl << nl
<< "Valid frictionalStressModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return autoPtr<frictionalStressModel>(cstrIter()(dict));

View File

@ -32,23 +32,23 @@ Foam::autoPtr<Foam::granularPressureModel> Foam::granularPressureModel::New
const dictionary& dict
)
{
word granularPressureModelType(dict.lookup("granularPressureModel"));
const word modelType(dict.lookup("granularPressureModel"));
Info<< "Selecting granularPressureModel "
<< granularPressureModelType << endl;
Info<< "Selecting granularPressureModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(granularPressureModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "granularPressureModel::New(const dictionary&) : " << endl
<< " unknown granularPressureModelType type "
<< granularPressureModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid granularPressureModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
FatalErrorIn
(
"granularPressureModel::New(const dictionary&)"
) << "Unknown granularPressureModel type "
<< modelType << nl << nl
<< "Valid granularPressureModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return autoPtr<granularPressureModel>(cstrIter()(dict));

View File

@ -32,23 +32,24 @@ Foam::autoPtr<Foam::radialModel> Foam::radialModel::New
const dictionary& dict
)
{
word radialModelType(dict.lookup("radialModel"));
const word modelType(dict.lookup("radialModel"));
Info<< "Selecting radialModel "
<< radialModelType << endl;
Info<< "Selecting radialModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(radialModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "radialModel::New(const dictionary&) : " << endl
<< " unknown radialModelType type "
<< radialModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid radialModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
FatalErrorIn
(
"radialModel::New(const dictionary&)"
)
<< "Unknown radialModel type "
<< modelType << nl << nl
<< "Valid radialModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return autoPtr<radialModel>(cstrIter()(dict));

View File

@ -33,23 +33,23 @@ Foam::kineticTheoryModels::viscosityModel::New
const dictionary& dict
)
{
word viscosityModelType(dict.lookup("viscosityModel"));
const word modelType(dict.lookup("viscosityModel"));
Info<< "Selecting viscosityModel "
<< viscosityModelType << endl;
Info<< "Selecting viscosityModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(viscosityModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "viscosityModel::New(const dictionary&) : " << endl
<< " unknown viscosityModelType type "
<< viscosityModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid viscosityModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
FatalErrorIn
(
"viscosityModel::New(const dictionary&)"
) << "Unknown viscosityModel type "
<< modelType << nl << nl
<< "Valid viscosityModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return autoPtr<viscosityModel>(cstrIter()(dict));