Foam::autoPtr<Foam::interfaceCompositionModel>
Foam::interfaceCompositionModel::New
(
    const dictionary& dict,
    const phasePair& pair
)
{
    word interfaceCompositionModelType
    (
        word(dict.lookup("type"))
      + "<"
      + pair.phase1().thermo().type()
      + ","
      + pair.phase2().thermo().type()
      + ">"
    );

    Info<< "Selecting interfaceCompositionModel for "
        << pair << ": " << interfaceCompositionModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(interfaceCompositionModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown interfaceCompositionModelType type "
            << interfaceCompositionModelType << endl << endl
            << "Valid interfaceCompositionModel types are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(dict, pair);
}
Ejemplo n.º 2
0
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::Saturated
(
    const dictionary& dict,
    const phasePair& pair
)
:
    InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
    saturatedName_(this->speciesNames_[0]),
    saturatedIndex_
    (
        this->thermo_.composition().species()[saturatedName_]
    ),
    saturationModel_
    (
        saturationModel::New
        (
            dict.subDict("saturationPressure"),
            pair.phase1().mesh()
        )
    )
{
    if (this->speciesNames_.size() != 1)
    {
        FatalErrorInFunction
            << "Saturated model is suitable for one species only."
            << exit(FatalError);
    }
}
Ejemplo n.º 3
0
Foam::wallLubricationModel::wallLubricationModel
(
    const dictionary& dict,
    const phasePair& pair
)
:
    pair_(pair),
    yWall_(pair.phase1().mesh().lookupObject<volScalarField>("yWall"))
{}
Ejemplo n.º 4
0
Foam::aspectRatioModels::TomiyamaAspectRatio::TomiyamaAspectRatio
(
    const dictionary& dict,
    const phasePair& pair
)
:
    VakhrushevEfremov(dict, pair),
    wallDependentModel(pair.phase1().mesh())
{}
Foam::wallLubricationModel::wallLubricationModel
(
    const dictionary& dict,
    const phasePair& pair
)
:
    wallDependentModel(pair.phase1().mesh()),
    pair_(pair)
{}
Ejemplo n.º 6
0
Foam::virtualMassModel::virtualMassModel
(
    const dictionary& dict,
    const phasePair& pair,
    const bool registerObject
)
:
    regIOobject
    (
        IOobject
        (
            IOobject::groupName(typeName, pair.name()),
            pair.phase1().mesh().time().timeName(),
            pair.phase1().mesh(),
            IOobject::NO_READ,
            IOobject::NO_WRITE,
            registerObject
        )
    ),
    pair_(pair)
{}
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::InterfaceCompositionModel
(
    const dictionary& dict,
    const phasePair& pair
)
:
    interfaceCompositionModel(dict, pair),
    thermo_
    (
        pair.phase1().mesh().lookupObject<Thermo>
        (
            IOobject::groupName(basicThermo::dictName, pair.phase1().name())
        )
    ),
    otherThermo_
    (
        pair.phase2().mesh().lookupObject<OtherThermo>
        (
            IOobject::groupName(basicThermo::dictName, pair.phase2().name())
        )
    ),
    Le_("Le", dimless, dict.lookup("Le"))
{}