Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::granularPressureModels::Chao:: granularPressureCoeffPrime ( const phaseModel& phase1, const phaseModel& phase2, const volScalarField& Theta1, const volScalarField& Theta2, const volScalarField& g0, const volScalarField& g0prime, const dimensionedScalar& e ) const { volScalarField m0 ( constant::mathematical::pi/6.0 *(phase1.rho()*pow3(phase1.d()) + phase2.rho()*pow3(phase2.d())) ); tmp<volScalarField> pCoeff ( 2.0*phase2*constant::mathematical::pi/(3.0*m0)*phase1.rho() *phase2.rho()*(1.0 + e)*pow3((phase1.d() + phase2.d())/2.0) *(Theta1 + Theta2 + 0.2*magSqr(phase1.U() - phase2.U())) ); if (&phase1 == &phase2) { return pCoeff*(2.0*g0 + phase1*g0prime); } else { return pCoeff*(g0 + phase1*g0prime); } }
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); }
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_ ) ) ); }
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien:: granularPressureCoeff ( const phaseModel& phase1, const phaseModel& phase2, const volScalarField& Theta1, const volScalarField& Theta2, const volScalarField& g0, const dimensionedScalar& e ) const { if (&phase1 != &phase2) { return tmp<volScalarField> ( new volScalarField ( IOobject ( "granularPressureCoeff", phase1.time().timeName(), phase1.mesh(), IOobject::NO_READ, IOobject::NO_WRITE, false ), phase1.mesh(), dimensionedScalar("0", dimDensity*sqr(dimVelocity), 0.0) ) ); } return 2.0*phase1.rho()*Theta1*(1.0 + e)*sqr(phase1)*g0; }
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); }
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 ) ] ) {}
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")) {}
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::tmp<Foam::volScalarField> Foam::kineticTheoryModels::radialModels::Gao::g0prime ( const phaseModel& phase1, const phaseModel& phase2 ) const { volScalarField aByaMax ( cbrt(min(max(phase1, scalar(1e-3))/phase1.alphaMax(), 0.999)) ); return (1.0/(3.0*phase1.alphaMax()))/sqr(aByaMax - sqr(aByaMax)) *phase1.d()/(phase1.d() + phase2.d()); }
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); }
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::radialModels::SinclairJackson::g0prime ( const phaseModel& phase1, const phaseModel& phase2 ) const { volScalarField aByaMax ( cbrt ( min ( max(phase1, scalar(1e-3)), alphaMinFriction_ )/phase1.alphaMax() ) ); return (1.0/(3*phase1.alphaMax()))/sqr(aByaMax - sqr(aByaMax)); }
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) ); }
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::radialModels::SinclairJackson::g0 ( const phaseModel& phase1, const phaseModel& phase2 ) const { return 1.0 /( 1.0 - cbrt(min(phase1, alphaMinFriction_)/phase1.alphaMax()) ); }
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::radialModels::Gao::g0 ( const phaseModel& phase1, const phaseModel& phase2 ) const { volScalarField g1(1.0/(1.0 - cbrt(min(phase1/phase1.alphaMax(), 0.999)))); volScalarField g2(1.0/(1.0 - cbrt(min(phase2/phase2.alphaMax(), 0.999)))); return (phase1.d()*g1 + phase2.d()*g2)/(phase1.d() + phase2.d()); }
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) ) {}