Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
(
    const dictionary& interfaceDict,
    const volScalarField& alpha,
    const phaseModel& phasea,
    const phaseModel& phaseb
)
{
    word dragModelType
    (
        interfaceDict.lookup("dragModel" + phasea.name())
    );

    Info << "Selecting dragModel for phase "
        << phasea.name()
        << ": "
        << dragModelType << endl;

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

    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_->toc() << abort(FatalError);
    }

    return cstrIter()(interfaceDict, alpha, phasea, phaseb);
}
Пример #2
0
Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
(
    const dictionary& interfaceDict,
    const volScalarField& alpha,
    const phaseModel& phase1,
    const phaseModel& phase2
)
{
    word heatTransferModelType
    (
        interfaceDict.lookup("heatTransferModel" + phase1.name())
    );

    Info<< "Selecting heatTransferModel for phase "
        << phase1.name()
        << ": "
        << heatTransferModelType << endl;

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

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn("heatTransferModel::New")
            << "Unknown heatTransferModelType type "
            << heatTransferModelType << endl << endl
            << "Valid heatTransferModel types are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(interfaceDict, alpha, phase1, phase2);
}
Пример #3
0
Foam::phasePair::phasePair
(
    const phaseModel& phase1,
    const phaseModel& phase2,
    const dimensionedVector& g,
    const scalarTable& sigmaTable,
    const bool ordered
)
:
    phasePairKey(phase1.name(), phase2.name(), ordered),
    phase1_(phase1),
    phase2_(phase2),
    g_(g),
    sigma_
    (
        "sigma",
        dimensionSet(1, 0, -2, 0, 0),
        sigmaTable
        [
            phasePairKey
            (
                phase1.name(),
                phase2.name(),
                false
            )
        ]
    )
{}
Пример #4
0
Foam::phasePair::phasePair
(
    const phaseModel& phase1,
    const phaseModel& phase2,
    const bool ordered
)
:
    phasePairKey(phase1.name(), phase2.name(), ordered),
    phase1_(phase1),
    phase2_(phase2),
    g_(phase1.mesh().lookupObject<uniformDimensionedVectorField>("g"))
{}
Пример #5
0
Foam::tmp<Foam::volScalarField> Foam::blendingMethods::noBlending::f2
(
    const phaseModel& phase1,
    const phaseModel& phase2
) const
{
    const fvMesh& mesh(phase1.mesh());

    return
        tmp<volScalarField>
        (
            new volScalarField
            (
                IOobject
                (
                    "f",
                    mesh.time().timeName(),
                    mesh
                ),
                mesh,
                dimensionedScalar
                (
                    "f",
                    dimless,
                    phase1.name() == continuousPhase_
                )
            )
        );
}
Пример #6
0
Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
(
    const dictionary& dict,
    const phaseModel& phase
)
{
    word diameterModelType
    (
        dict.lookup("diameterModel")
    );

    Info << "Selecting diameterModel for phase "
        << phase.name()
        << ": "
        << diameterModelType << endl;

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

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn("diameterModel::New")
           << "Unknown diameterModelType type "
           << diameterModelType << endl << endl
           << "Valid diameterModel types are : " << endl
           << dictionaryConstructorTablePtr_->sortedToc()
           << exit(FatalError);
    }

    return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
}
Пример #7
0
Foam::tmp<Foam::volScalarField> Foam::blendingMethods::linear::f2
(
    const phaseModel& phase1,
    const phaseModel& phase2
) const
{
    const dimensionedScalar
        maxFullAlpha(maxFullyDispersedAlpha_[phase2.name()]);
    const dimensionedScalar
        maxPartAlpha(maxPartlyDispersedAlpha_[phase2.name()]);

    return
        min
        (
            max
            (
                (maxPartAlpha - phase2)
               /(maxPartAlpha - maxFullAlpha + SMALL),
                scalar(0.0)
            ),
            scalar(1.0)
        );
}
Пример #8
0
Foam::tmp<Foam::volScalarField> Foam::blendingMethods::noBlending::f2
(
    const phaseModel& phase1,
    const phaseModel& phase2
) const
{
    const fvMesh& mesh(phase1.mesh());

    return volScalarField::New
    (
        "f",
        mesh,
        dimensionedScalar(dimless, phase1.name() == continuousPhase_)
    );
}
Foam::diameterModels::ADD::ADD
(
    const dictionary& diameterProperties,
    const phaseModel& phase
)
:
    diameterModel(diameterProperties, phase),
    
    d_
    (
        IOobject
        (
            IOobject::groupName("d", phase.name()),
            phase_.U().time().timeName(),
            phase_.U().mesh(),
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        phase_.U().mesh()
    ),
    dMax_
    (
        "dMax",
        dimLength,
        diameterProperties_.lookup("dMax")
    ),
    dMin_
    (
        "dMin",
        dimLength,
        diameterProperties_.lookup("dMin")
    ),
    residualAlpha_
    (
        "residualAlpha",
        dimless,
        diameterProperties_.lookup("residualAlpha")
    ),
    n_
    (
        "n",
        dimless,
        diameterProperties_.lookup("n")
    ),
    m_
    (
        "m",
        dimless,
        diameterProperties_.lookup("m")
    ),
    C1_
    (
        "C1",
        dimless,
        diameterProperties_.lookup("C1")
    ),
    C2_
    (
        "C2",
        dimLength,
        diameterProperties_.lookup("C2")
    ),
    Cb_
    (
        "Cb",
        dimless,
        diameterProperties_.lookup("Cb")
    ),
    Cc_
    (
        "Cc",
        dimless,
        diameterProperties_.lookup("Cc")
    ),
    Cmu_
    (
        "Cmu",
        dimless,
        diameterProperties_.lookup("Cmu")
    ),
    alphaMax_
    (
        "alphaMax",
        dimless,
        diameterProperties_.lookup("alphaMax")
    ),
    Deff_
    (
        IOobject
        (
            "Deff",
            phase_.U().time().timeName(),
            phase_.U().mesh()
        ),
        phase_.U().mesh(),
        dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0, 0, 0), 0.0)
    ),
    deq_
    (
        IOobject
        (
            "deq",
            phase_.U().time().timeName(),
            phase_.U().mesh()
        ),
        phase_.U().mesh(),
        dimensionedScalar("zero", dimensionSet(0, 1, 0, 0, 0, 0, 0), 0.0)
    ),
    tauRel_
    (
        IOobject
        (
            "tauRel",
            phase_.U().time().timeName(),
            phase_.U().mesh()
        ),
        phase_.U().mesh(),
        dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0, 0, 0), 0.0)
    )
{}