diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files index fb9a8d104..4f1288f7a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files @@ -36,10 +36,31 @@ kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJackson kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C +derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C +derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.C +derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C +derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C +derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C + +derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C +derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C +derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C + +derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C +derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C +derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C +derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C + +derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C +derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C +derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C + derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C + LIB = $(FOAM_LIBBIN)/libtwoPhaseReactingTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index 15e7727bc..6f850cdc1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -38,6 +38,31 @@ License #include "wallFvPatch.H" #include "uniformDimensionedFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<> +const char* Foam::NamedEnum +< + Foam::compressible:: + alphatWallBoilingWallFunctionFvPatchScalarField::phaseType, + 2 +>::names[] = +{ + "vapor", + "liquid" +}; + +const Foam::NamedEnum +< + Foam::compressible:: + alphatWallBoilingWallFunctionFvPatchScalarField::phaseType, + 2 +> +Foam::compressible:: +alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_; + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -55,12 +80,17 @@ alphatWallBoilingWallFunctionFvPatchScalarField ) : alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF), + phaseType_(liquidPhase), relax_(0.5), - AbyV_(p.size(), 0.0), - alphatConv_(p.size(), 0.0) + AbyV_(p.size(), 0), + alphatConv_(p.size(), 0), + partitioningModel_(nullptr), + nucleationSiteModel_(nullptr), + departureDiamModel_(nullptr), + departureFreqModel_(nullptr) { AbyV_ = this->patch().magSf(); - forAll(AbyV_,facei) + forAll(AbyV_, facei) { label faceCelli = this->patch().faceCells()[facei]; AbyV_[facei] /= iF.mesh().V()[faceCelli]; @@ -77,19 +107,67 @@ alphatWallBoilingWallFunctionFvPatchScalarField ) : alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict), + phaseType_(phaseTypeNames_.read(dict.lookup("phaseType"))), relax_(dict.lookupOrDefault("relax", 0.5)), - AbyV_(p.size(), 0.0), - alphatConv_(p.size(), 0.0) + AbyV_(p.size(), 0), + alphatConv_(p.size(), 0), + partitioningModel_(nullptr), + nucleationSiteModel_(nullptr), + departureDiamModel_(nullptr), + departureFreqModel_(nullptr) { + switch (phaseType_) + { + case vaporPhase: + { + partitioningModel_ = + wallBoilingModels::partitioningModel::New + ( + dict.subDict("partitioningModel") + ); + + dmdt_ = 0; + + break; + } + case liquidPhase: + { + partitioningModel_ = + wallBoilingModels::partitioningModel::New + ( + dict.subDict("partitioningModel") + ); + + nucleationSiteModel_ = + wallBoilingModels::nucleationSiteModel::New + ( + dict.subDict("nucleationSiteModel") + ); + + departureDiamModel_ = + wallBoilingModels::departureDiameterModel::New + ( + dict.subDict("departureDiamModel") + ); + + departureFreqModel_ = + wallBoilingModels::departureFrequencyModel::New + ( + dict.subDict("departureFreqModel") + ); + break; + } + } + if (dict.found("alphatConv")) { alphatConv_ = scalarField("alphatConv", dict, p.size()); } AbyV_ = this->patch().magSf(); - forAll(AbyV_,facei) + forAll(AbyV_, facei) { - label faceCelli = this->patch().faceCells()[facei]; + const label faceCelli = this->patch().faceCells()[facei]; AbyV_[facei] /= iF.mesh().V()[faceCelli]; } } @@ -113,7 +191,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField ), relax_(psf.relax_), AbyV_(psf.AbyV_), - alphatConv_(psf.alphatConv_, mapper) + alphatConv_(psf.alphatConv_, mapper), + partitioningModel_(psf.partitioningModel_), + nucleationSiteModel_(psf.nucleationSiteModel_), + departureDiamModel_(psf.departureDiamModel_), + departureFreqModel_(psf.departureFreqModel_) {} @@ -126,7 +208,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf), relax_(psf.relax_), AbyV_(psf.AbyV_), - alphatConv_(psf.alphatConv_) + alphatConv_(psf.alphatConv_), + partitioningModel_(psf.partitioningModel_), + nucleationSiteModel_(psf.nucleationSiteModel_), + departureDiamModel_(psf.departureDiamModel_), + departureFreqModel_(psf.departureFreqModel_) {} @@ -140,7 +226,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf, iF), relax_(psf.relax_), AbyV_(psf.AbyV_), - alphatConv_(psf.alphatConv_) + alphatConv_(psf.alphatConv_), + partitioningModel_(psf.partitioningModel_), + nucleationSiteModel_(psf.nucleationSiteModel_), + departureDiamModel_(psf.departureDiamModel_), + departureFreqModel_(psf.departureFreqModel_) {} @@ -153,13 +243,19 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() return; } + // Check that partitioningModel has been constructed + if (!partitioningModel_.valid()) + { + FatalErrorInFunction + << "partitioningModel has not been constructed!" + << abort(FatalError); + } + // Lookup the fluid model const ThermalPhaseChangePhaseSystem - >& - fluid - = refCast + >& fluid = refCast < const ThermalPhaseChangePhaseSystem < @@ -170,192 +266,312 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() db().lookupObject("phaseProperties") ); - const phaseModel& liquid - ( - fluid.phase1().name() == internalField().group() - ? fluid.phase1() - : fluid.phase2() - ); - - const phaseModel& vapor(fluid.otherPhase(liquid)); - const label patchi = patch().index(); - // Retrieve turbulence properties from model - const phaseCompressibleTurbulenceModel& turbModel = liquid.turbulence(); - - const tmp tnutw = turbModel.nut(patchi); - - const scalar Cmu25(pow025(Cmu_)); - - const scalarField& y = turbModel.y()[patchi]; - - const tmp tmuw = turbModel.mu(patchi); - const scalarField& muw = tmuw(); - - const tmp talphaw = liquid.thermo().alpha(patchi); - const scalarField& alphaw = talphaw(); - - const tmp tk = turbModel.k(); - const volScalarField& k = tk(); - const fvPatchScalarField& kw = k.boundaryField()[patchi]; - - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const scalarField magGradUw(mag(Uw.snGrad())); - - const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const fvPatchScalarField& hew = - liquid.thermo().he().boundaryField()[patchi]; - - const fvPatchScalarField& Tw = - liquid.thermo().T().boundaryField()[patchi]; - const scalarField Tc(Tw.patchInternalField()); - - scalarField uTau(Cmu25*sqrt(kw)); - - scalarField yPlus(uTau*y/(muw/rhow)); - - scalarField Pr(muw/alphaw); - - // Molecular-to-turbulent Prandtl number ratio - scalarField Prat(Pr/Prt_); - - // Thermal sublayer thickness - scalarField P(this->Psmooth(Prat)); - - scalarField yPlusTherm(this->yPlusTherm(P, Prat)); - - const scalarField rhoc(rhow.patchInternalField()); - - tmp trhoVapor = vapor.thermo().rho(); - const volScalarField& rhoVapor = trhoVapor(); - const fvPatchScalarField& rhoVaporw = - rhoVapor.boundaryField()[patchi]; - const scalarField rhoVaporp(rhoVaporw.patchInternalField()); - - tmp tCp = liquid.thermo().Cp(); - const volScalarField& Cp = tCp(); - const fvPatchScalarField& Cpw = Cp.boundaryField()[patchi]; - - // Saturation temperature - const tmp tTsat = - fluid.saturation().Tsat(liquid.thermo().p()); - const volScalarField& Tsat = tTsat(); - const fvPatchScalarField& Tsatw(Tsat.boundaryField()[patchi]); - const scalarField Tsatc(Tsatw.patchInternalField()); - - // Gravitational acceleration - const uniformDimensionedVectorField& g = - db().lookupObject("g"); - - const fvPatchScalarField& pw = - liquid.thermo().p().boundaryField()[patchi]; - - const scalarField L - ( - vapor.thermo().he(pw,Tsatc,patchi)-hew.patchInternalField() - ); - - // Liquid temperature at y+=250 is estimated from logarithmic - // thermal wall function (Koncar, Krepper & Egorov, 2005) - scalarField Tplus_y250(Prt_*(log(E_*250)/kappa_ + P)); - scalarField Tplus(Prt_*(log(E_*yPlus)/kappa_ + P)); - scalarField Tl(Tw - (Tplus_y250/Tplus)*(Tw - Tc)); - Tl = max(Tc - 40, min(Tc, Tl)); - - // Nucleation site density: - // Reformulation of Lemmert & Chawla (Egorov & Menter, 2004) - const scalarField N - ( - 0.8*9.922e5*pow(max((Tw - Tsatw)/10, scalar(0)), 1.805) - ); - - // Bubble departure diameter: - // Tolubinski and Kostanchuk (1970) - const scalarField Tsub(max(Tsatw - Tl, scalar(0))); - const scalarField Ddep - ( - max(min(0.0006*exp(-Tsub/45), scalar(0.0014)), scalar(1e-6)) - ); - - // Bubble departure frequency: - // Cole (1960) - const scalarField F - ( - sqrt - ( - 4*mag(g).value()*(max(rhoc - rhoVaporp, scalar(0.1)))/(3*Ddep*rhow) - ) - ); - - // Area fractions: - - // Del Valle & Kenning (1985) - const scalarField Ja(rhoc*Cpw*Tsub/(rhoVaporp*L)); - const scalarField Al(4.8*exp(-Ja/80)); - - // Liquid phase fraction at the wall - const scalarField liquidw(liquid.boundaryField()[patchi]); - - // Damp boiling at high void fractions. - const scalarField W(min(liquidw/0.2, scalar(1))); - - const scalarField A2(W*min(M_PI*sqr(Ddep)*N*Al/4, scalar(1))); - const scalarField A1(max(1 - A2, scalar(1e-4))); - const scalarField A2E(W*min(M_PI*sqr(Ddep)*N*Al/4, scalar(5))); - - // Wall evaporation heat flux [kg/s3 = J/m2s] - const scalarField Qe((1.0/6.0)*A2E*Ddep*rhoVaporw*F*L); - - // Volumetric mass source in the near wall cell due to the wall boiling - dmdt_ = (1 - relax_)*dmdt_ + relax_*Qe*AbyV_/L; - - // Volumetric source in the near wall cell due to the wall boiling - mDotL_ = dmdt_*L; - - // Quenching heat transfer coefficient - const scalarField hQ - ( - 2*(alphaw*Cpw)*F*sqrt((0.8/F)/(M_PI*alphaw/rhow)) - ); - - // Quenching heat flux - const scalarField Qq(A2*hQ*max(Tw - Tl, scalar(0))); - - // Convective heat flux - alphatConv_ = calcAlphat(alphatConv_); - //const scalarField Qc(A1*(alphatConv_ + alphaw)*hew.snGrad()); - - // Effective thermal diffusivity that corresponds to the calculated - // convective, quenching and evaporative heat fluxes - - operator== - ( - A1*alphatConv_ + (Qq + Qe)/max(liquidw*hew.snGrad(), scalar(1e-16)) - ); - - if(debug) + switch (phaseType_) { - Info<< " L: " << gMin(L) << " - " << gMax(L) << endl; - Info<< " Tl: " << gMin(Tl) << " - " << gMax(Tl) << endl; - Info<< " N: " << gMin(N) << " - " << gMax(N) << endl; - Info<< " Ddep: " << gMin(Ddep) << " - " << gMax(Ddep) << endl; - Info<< " F: " << gMin(F) << " - " << gMax(F) << endl; - Info<< " Al: " << gMin(Al) << " - " << gMax(Al) << endl; - Info<< " A1: " << gMin(A1) << " - " << gMax(A1) << endl; - Info<< " A2: " << gMin(A2) << " - " << gMax(A2) << endl; - Info<< " A2E: " << gMin(A2E) << " - " << gMax(A2E) << endl; - Info<< " dmdtW: " << gMin(dmdt_) << " - " << gMax(dmdt_) << endl; - const scalarField Qc(A1*(alphatConv_ + alphaw)*hew.snGrad()); - Info<< " Qc: " << gMin(Qc) << " - " << gMax(Qc) << endl; - Info<< " Qq: " << gMin(Qq) << " - " << gMax(Qq) << endl; - Info<< " Qe: " << gMin(Qe) << " - " << gMax(Qe) << endl; - const scalarField QEff(liquidw*(*this + alphaw)*hew.snGrad()); - Info<< " QEff: " << gMin(QEff) << " - " << gMax(QEff) << endl; - Info<< " alphat: " << gMin(*this) << " - " << gMax(*this) << endl; - Info<< " alphatConv: " << gMin(alphatConv_) - << " - " << gMax(alphatConv_) << endl; + case vaporPhase: + { + const phaseModel& vapor + ( + fluid.phase1().name() == internalField().group() + ? fluid.phase1() + : fluid.phase2() + ); + + const phaseModel& liquid(fluid.otherPhase(vapor)); + + // Liquid phase fraction at the wall + const scalarField liquidw(liquid.boundaryField()[patchi]); + + // Vapor Liquid phase fraction at the wall + const scalarField vaporw(vapor.boundaryField()[patchi]); + + const scalarField fLiquid + ( + partitioningModel_->fLiquid(liquidw) + ); + + operator== + ( + calcAlphat(*this)*(1 - fLiquid)/max(vaporw, scalar(1e-8)) + ); + break; + } + case liquidPhase: + { + // Check that nucleationSiteModel has been constructed + if (!nucleationSiteModel_.valid()) + { + FatalErrorInFunction + << "nucleationSiteModel has not been constructed!" + << abort(FatalError); + } + + // Check that departureDiameterModel has been constructed + if (!departureDiamModel_.valid()) + { + FatalErrorInFunction + << "departureDiameterModel has not been constructed!" + << abort(FatalError); + } + + // Check that nucleationSiteModel has been constructed + if (!departureFreqModel_.valid()) + { + FatalErrorInFunction + << "departureFrequencyModel has not been constructed!" + << abort(FatalError); + } + + const phaseModel& liquid + ( + fluid.phase1().name() == internalField().group() + ? fluid.phase1() + : fluid.phase2() + ); + + const phaseModel& vapor(fluid.otherPhase(liquid)); + + // Retrieve turbulence properties from model + const phaseCompressibleTurbulenceModel& turbModel = + liquid.turbulence(); + + const tmp tnutw = turbModel.nut(patchi); + + const scalar Cmu25(pow025(Cmu_)); + + const scalarField& y = turbModel.y()[patchi]; + + const tmp tmuw = turbModel.mu(patchi); + const scalarField& muw = tmuw(); + + const tmp talphaw = liquid.thermo().alpha(patchi); + const scalarField& alphaw = talphaw(); + + const tmp tk = turbModel.k(); + const volScalarField& k = tk(); + const fvPatchScalarField& kw = k.boundaryField()[patchi]; + + const fvPatchVectorField& Uw = + turbModel.U().boundaryField()[patchi]; + const scalarField magUp(mag(Uw.patchInternalField() - Uw)); + const scalarField magGradUw(mag(Uw.snGrad())); + + const fvPatchScalarField& rhow = + turbModel.rho().boundaryField()[patchi]; + const fvPatchScalarField& hew = + liquid.thermo().he().boundaryField()[patchi]; + + const fvPatchScalarField& Tw = + liquid.thermo().T().boundaryField()[patchi]; + const scalarField Tc(Tw.patchInternalField()); + + const scalarField uTau(Cmu25*sqrt(kw)); + + const scalarField yPlus(uTau*y/(muw/rhow)); + + const scalarField Pr(muw/alphaw); + + // Molecular-to-turbulent Prandtl number ratio + const scalarField Prat(Pr/Prt_); + + // Thermal sublayer thickness + const scalarField P(this->Psmooth(Prat)); + + const scalarField yPlusTherm(this->yPlusTherm(P, Prat)); + + const fvPatchScalarField& rhoLiquidw = + liquid.turbulence().rho().boundaryField()[patchi]; + + const fvPatchScalarField& rhoVaporw = + vapor.turbulence().rho().boundaryField()[patchi]; + + tmp tCp = liquid.thermo().Cp(); + const volScalarField& Cp = tCp(); + const fvPatchScalarField& Cpw = Cp.boundaryField()[patchi]; + + // Saturation temperature + const tmp tTsat = + fluid.saturation().Tsat(liquid.thermo().p()); + const volScalarField& Tsat = tTsat(); + const fvPatchScalarField& Tsatw(Tsat.boundaryField()[patchi]); + const scalarField Tsatc(Tsatw.patchInternalField()); + + const fvPatchScalarField& pw = + liquid.thermo().p().boundaryField()[patchi]; + + const scalarField L + ( + vapor.thermo().he(pw,Tsatc,patchi)-hew.patchInternalField() + ); + + // Liquid phase fraction at the wall + const scalarField liquidw(liquid.boundaryField()[patchi]); + + const scalarField fLiquid(partitioningModel_->fLiquid(liquidw)); + + for (label i=0; i<10; i++) + { + // Liquid temperature at y+=250 is estimated from logarithmic + // thermal wall function (Koncar, Krepper & Egorov, 2005) + const scalarField Tplus_y250(Prt_*(log(E_*250)/kappa_ + P)); + + const scalarField Tplus(Prt_*(log(E_*yPlus)/kappa_ + P)); + scalarField Tl(Tw - (Tplus_y250/Tplus)*(Tw - Tc)); + Tl = max(Tc - 40, min(Tc, Tl)); + const scalarField Tsub(max(Tsatw - Tl, scalar(0))); + + // Wall heat flux partitioning + const scalarField fLiquid + ( + partitioningModel_->fLiquid(liquidw) + ); + + // Nucleation site density: + const scalarField N + ( + nucleationSiteModel_->N + ( + liquid, + vapor, + patchi, + Tsatw + ) + ); + + // Bubble departure diameter: + const scalarField dDep + ( + departureDiamModel_->dDeparture + ( + liquid, + vapor, + patchi, + Tsub + ) + ); + + // Bubble departure frequency: + const scalarField fDep + ( + departureFreqModel_->fDeparture + ( + liquid, + vapor, + patchi, + dDep + ) + ); + + // Area fractions: + + // Del Valle & Kenning (1985) + const scalarField Ja(rhoLiquidw*Cpw*Tsub/(rhoVaporw*L)); + const scalarField Al(fLiquid*4.8*exp(-Ja/80)); + + const scalarField A2(min(M_PI*sqr(dDep)*N*Al/4, scalar(1))); + const scalarField A1(max(1 - A2, scalar(1e-4))); + const scalarField A2E(min(M_PI*sqr(dDep)*N*Al/4, scalar(5))); + + // Wall evaporation heat flux [kg/s3 = J/m2s] + const scalarField Qe((1.0/6.0)*A2E*dDep*rhoVaporw*fDep*L); + + // Volumetric mass source in the near wall cell due to the + // wall boiling + dmdt_ = (1 - relax_)*dmdt_ + relax_*Qe*AbyV_/L; + + // Volumetric source in the near wall cell due to the wall + // boiling + mDotL_ = dmdt_*L; + + // Quenching heat transfer coefficient + const scalarField hQ + ( + 2*(alphaw*Cpw)*fDep*sqrt((0.8/fDep)/(M_PI*alphaw/rhow)) + ); + + // Quenching heat flux + const scalarField Qq(A2*hQ*max(Tw - Tl, scalar(0))); + + // Convective heat flux + alphatConv_ = calcAlphat(alphatConv_); + + // Effective thermal diffusivity that corresponds to the + // calculated convective, quenching and evaporative heat fluxes + + operator== + ( + ( + A1*alphatConv_ + + (Qq + Qe)/max(hew.snGrad(), scalar(1e-16)) + ) + /max(liquidw, scalar(1e-8)) + ); + + scalarField TsupPrev(max((Tw - Tsatw),scalar(0))); + const_cast(Tw).evaluate(); + scalarField TsupNew(max((Tw - Tsatw),scalar(0))); + + scalar maxErr(max(mag(TsupPrev - TsupNew))); + + if (maxErr < 1e-1) + { + if (i > 0) + { + Info<< "Wall boiling wall function iterations: " + << i + 1 << endl; + } + break; + } + + if (debug) + { + const scalarField Qc + ( + fLiquid*A1*(alphatConv_ + alphaw)*hew.snGrad() + ); + + const scalarField QEff + ( + liquidw*(*this + alphaw)*hew.snGrad() + ); + + Info<< " L: " << gMin(L) << " - " << gMax(L) << endl; + Info<< " Tl: " << gMin(Tl) << " - " << gMax(Tl) << endl; + Info<< " N: " << gMin(N) << " - " << gMax(N) << endl; + Info<< " dDep: " << gMin(dDep) << " - " + << gMax(dDep) << endl; + Info<< " fDep: " << gMin(fDep) << " - " + << gMax(fDep) << endl; + Info<< " Al: " << gMin(Al) << " - " << gMax(Al) << endl; + Info<< " A1: " << gMin(A1) << " - " << gMax(A1) << endl; + Info<< " A2: " << gMin(A2) << " - " << gMax(A2) << endl; + Info<< " A2E: " << gMin(A2E) << " - " + << gMax(A2E) << endl; + Info<< " dmdtW: " << gMin(dmdt_) << " - " + << gMax(dmdt_) << endl; + Info<< " Qc: " << gMin(Qc) << " - " << gMax(Qc) << endl; + Info<< " Qq: " << gMin(fLiquid*Qq) << " - " + << gMax(fLiquid*Qq) << endl; + Info<< " Qe: " << gMin(fLiquid*Qe) << " - " + << gMax(fLiquid*Qe) << endl; + Info<< " QEff: " << gMin(QEff) << " - " + << gMax(QEff) << endl; + Info<< " alphat: " << gMin(*this) << " - " + << gMax(*this) << endl; + Info<< " alphatConv: " << gMin(alphatConv_) + << " - " << gMax(alphatConv_) << endl; + } + } + break; + } + default: + { + FatalErrorInFunction + << "Unknown phase type. Valid types are: " + << phaseTypeNames_ << nl << exit(FatalError); + } } fixedValueFvPatchScalarField::updateCoeffs(); @@ -365,7 +581,47 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); + + os.writeKeyword("phaseType") << phaseTypeNames_[phaseType_] + << token::END_STATEMENT << nl; + os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; + + switch (phaseType_) + { + case vaporPhase: + { + os.writeKeyword("partitioningModel") << nl; + os << indent << token::BEGIN_BLOCK << incrIndent << nl; + partitioningModel_->write(os); + os << decrIndent << indent << token::END_BLOCK << nl; + break; + } + case liquidPhase: + { + os.writeKeyword("partitioningModel") << nl; + os << indent << token::BEGIN_BLOCK << incrIndent << nl; + partitioningModel_->write(os); + os << decrIndent << indent << token::END_BLOCK << nl; + + os.writeKeyword("nucleationSiteModel") << nl; + os << indent << token::BEGIN_BLOCK << incrIndent << nl; + nucleationSiteModel_->write(os); + os << decrIndent << indent << token::END_BLOCK << nl; + + os.writeKeyword("departureDiamModel") << nl; + os << indent << token::BEGIN_BLOCK << incrIndent << nl; + departureDiamModel_->write(os); + os << decrIndent << indent << token::END_BLOCK << nl; + + os.writeKeyword("departureFreqModel") << nl; + os << indent << token::BEGIN_BLOCK << incrIndent << nl; + departureFreqModel_->write(os); + os << decrIndent << indent << token::END_BLOCK << nl; + break; + } + } + dmdt_.writeEntry("dmdt", os); alphatConv_.writeEntry("alphatConv", os); writeEntry("value", os); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H old mode 100644 new mode 100755 index cfef83e44..52d488b17 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H @@ -28,11 +28,17 @@ Group grpCmpWallFunctions Description - A thermal wall function for simulation of subcooled nucleate wall boiling. + A thermal wall function for simulation of subcooled nucleate wall boiling + with runtime selctable submodels for: + - wall heat flux partitioning model + - nucleation site density + - bubble departure frequency + - bubble departure diameter Implements a version of the well-known RPI wall boiling model (Kurul & Podowski, 1991). The model implementation is similar to the model - described by Peltola & Pättikangas (2012). + described by Peltola & Pättikangas (2012) but has been extended with the + wall heat flux partitioning models. References: \verbatim @@ -51,8 +57,66 @@ Description Daejeon, Korea, September 10-12 2012 \endverbatim -See also - Foam::fixedValueFvPatchField +Usage + \table + Property | Description | Required | Default value + phaseType | 'vapor' or 'liquid' | yes | + relax |wall boiling model relaxation| yes | + Prt | inherited from alphatPhaseChangeJayatillekeWallFunction + Cmu | inherited from alphatPhaseChangeJayatillekeWallFunction + kappa | inherited from alphatPhaseChangeJayatillekeWallFunction + E | inherited from alphatPhaseChangeJayatillekeWallFunction + dmdt | phase change mass flux | yes | + value | initial alphat value | yes | + + if phaseType 'vapor': + + partitioningModel| | yes | + + if phaseType 'liquid': + + partitioningModel| | yes | + nucleationSiteModel| | yes | + departureDiamModel| | yes | + departureFreqModel| | yes | + \endtable + + NOTE: Runtime selectabale submodels may require model specific entries + + Example usage: + \verbatim + hotWall + { + type compressible::alphatWallBoiling2WallFunction; + phaseType liquid; + Prt 0.85; + Cmu 0.09; + kappa 0.41; + E 9.8; + relax 0.001; + dmdt uniform 0; + partitioningModel + { + type Lavieville; + alphaCrit 0.2; + } + nucleationSiteModel + { + type LemmertChawla; + } + departureDiamModel + { + type TolubinskiKostanchuk; + } + departureFreqModel + { + type Cole; + } + value uniform 0.01; + \endverbatim + +SeeAlso + Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField SourceFiles alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -63,6 +127,10 @@ SourceFiles #define compressiblealphatWallBoilingWallFunctionFvPatchScalarField_H #include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H" +#include "partitioningModel.H" +#include "nucleationSiteModel.H" +#include "departureDiameterModel.H" +#include "departureFrequencyModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -79,8 +147,28 @@ class alphatWallBoilingWallFunctionFvPatchScalarField : public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField { +public: + + // Data types + + //- Enumeration listing the possible operational modes + enum phaseType + { + vaporPhase, + liquidPhase + }; + + +private: + // Private data + //- Heat source type names + static const NamedEnum phaseTypeNames_; + + //- Heat source type + phaseType phaseType_; + //- dmdt relaxationFactor scalar relax_; @@ -90,6 +178,22 @@ class alphatWallBoilingWallFunctionFvPatchScalarField //- Convective turbulent thermal diffusivity scalarField alphatConv_; + //- Run-time selected heat flux partitioning model + autoPtr + partitioningModel_; + + //- Run-time selected nucleation site density model + autoPtr + nucleationSiteModel_; + + //- Run-time selected bubble departure diameter model + autoPtr + departureDiamModel_; + + //- Run-time selected bubble departure frequency model + autoPtr + departureFreqModel_; + public: diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C new file mode 100644 index 000000000..ae6ecf462 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "KocamustafaogullariIshii.H" +#include "addToRunTimeSelectionTable.H" +#include "uniformDimensionedFields.H" +#include "compressibleTurbulenceModel.H" +#include "ThermalDiffusivity.H" +#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseSystem.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace departureDiameterModels +{ + defineTypeNameAndDebug(KocamustafaogullariIshii, 0); + addToRunTimeSelectionTable + ( + departureDiameterModel, + KocamustafaogullariIshii, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureDiameterModels:: +KocamustafaogullariIshii::KocamustafaogullariIshii +( + const dictionary& dict +) +: + departureDiameterModel(), + phi_(readScalar(dict.lookup("phi"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureDiameterModels:: +KocamustafaogullariIshii::~KocamustafaogullariIshii() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::departureDiameterModels:: +KocamustafaogullariIshii::dDeparture +( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& Tsub +) const +{ + // Gravitational acceleration + const uniformDimensionedVectorField& g = + liquid.mesh().lookupObject("g"); + + const fvPatchScalarField& rhoLiquid = + liquid.turbulence().rho().boundaryField()[patchi]; + + const fvPatchScalarField& rhoVapor = + vapor.turbulence().rho().boundaryField()[patchi]; + + const scalarField rhoM((rhoLiquid-rhoVapor)/rhoVapor); + + const tmp& tsigma + ( + liquid.fluid().sigma(phasePairKey(liquid.name(),vapor.name())) + ); + const volScalarField& sigma = tsigma(); + const fvPatchScalarField& sigmaw = sigma.boundaryField()[patchi]; + + return + 0.0012*pow(rhoM,0.9)*0.0208*phi_ + *sqrt(sigmaw/(mag(g.value())*(rhoLiquid-rhoVapor))); +} + + +void Foam::wallBoilingModels::departureDiameterModels:: +KocamustafaogullariIshii::write(Ostream& os) const +{ + departureDiameterModel::write(os); + os.writeKeyword("phi") << phi_ << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.H new file mode 100644 index 000000000..5bbe8d543 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.H @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::departureDiameterModels::KocamustafaogullariIshii + +Description + A correlation for bubble departure diameter. + + Requires model parameter 'phi': contact angle in degrees. + + Reference: + \verbatim + Kocamustafaogullari, G., & Ishii, M. (1983). + Interfacial area and nucleation site density in boiling systems. + International Journal of Heat and Mass Transfer, 26(9), 1377-1387. + \endverbatim + +SourceFiles + KocamustafaogullariIshii.C + +\*---------------------------------------------------------------------------*/ + +#ifndef KocamustafaogullariIshii_H +#define KocamustafaogullariIshii_H + +#include "departureDiameterModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace departureDiameterModels +{ + +/*---------------------------------------------------------------------------*\ + Class KocamustafaogullariIshii Declaration +\*---------------------------------------------------------------------------*/ + +class KocamustafaogullariIshii +: + public departureDiameterModel +{ + // Private data + + //- Contact angle + scalar phi_; + + +public: + + //- Runtime type information + TypeName("KocamustafaogullariIshii"); + + // Constructors + + //- Construct from a dictionary + KocamustafaogullariIshii(const dictionary& dict); + + + //- Destructor + virtual ~KocamustafaogullariIshii(); + + + // Member Functions + + //- Calculate and return the departure diameter field + virtual tmp dDeparture + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& Tsub + ) const; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace departureDiameterModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C new file mode 100644 index 000000000..23229071c --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "TolubinskiKostanchuk.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace departureDiameterModels +{ + defineTypeNameAndDebug(TolubinskiKostanchuk, 0); + addToRunTimeSelectionTable + ( + departureDiameterModel, + TolubinskiKostanchuk, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureDiameterModels:: +TolubinskiKostanchuk::TolubinskiKostanchuk +( + const dictionary& dict +) +: + departureDiameterModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureDiameterModels:: +TolubinskiKostanchuk::~TolubinskiKostanchuk() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::departureDiameterModels:: +TolubinskiKostanchuk::dDeparture +( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& Tsub +) const +{ + return max(min(0.0006*exp(-Tsub/45), scalar(0.0014)), scalar(1e-6)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.H new file mode 100644 index 000000000..9437f5185 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.H @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk + +Description + Tolubinski-Kostanchuk correlation for bubble departure diameter. + + Reference: + \verbatim + Tolubinsky, V. I., & Kostanchuk, D. M. (1970). + Vapour bubbles growth rate and heat transfer intensity at subcooled + water boiling. + In International Heat Transfer Conference 4 (Vol. 23). Begel House Inc. + \endverbatim + +SourceFiles + TolubinskiKostanchuk.C + +\*---------------------------------------------------------------------------*/ + +#ifndef TolubinskiKostanchuk_H +#define TolubinskiKostanchuk_H + +#include "departureDiameterModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace departureDiameterModels +{ + +/*---------------------------------------------------------------------------*\ + Class TolubinskiKostanchuk Declaration +\*---------------------------------------------------------------------------*/ + +class TolubinskiKostanchuk +: + public departureDiameterModel +{ + +public: + + //- Runtime type information + TypeName("TolubinskiKostanchuk"); + + + // Constructors + + //- Construct from a dictionary + TolubinskiKostanchuk(const dictionary& dict); + + + //- Destructor + virtual ~TolubinskiKostanchuk(); + + + // Member Functions + + //- Calculate and return the departure diameter field + virtual tmp dDeparture + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& Tsub + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace departureDiameterModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C new file mode 100644 index 000000000..4c3564a00 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "departureDiameterModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace wallBoilingModels + { + defineTypeNameAndDebug(departureDiameterModel, 0); + defineRunTimeSelectionTable(departureDiameterModel, dictionary); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureDiameterModel::departureDiameterModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureDiameterModel::~departureDiameterModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::wallBoilingModels::departureDiameterModel::write(Ostream& os) const +{ + os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; +} + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H new file mode 100644 index 000000000..47f431eb1 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H @@ -0,0 +1,125 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::departureDiameterModel + +Description + Base class for bubble departure diameter models + +SourceFiles + departureDiameterModel.C + newdepartureDiameterModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef departureDiameterModel_H +#define departureDiameterModel_H + +#include "volFields.H" +#include "dictionary.H" +#include "runTimeSelectionTables.H" + +#include "phaseModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ + +/*---------------------------------------------------------------------------*\ + Class departureDiameterModel Declaration +\*---------------------------------------------------------------------------*/ + +class departureDiameterModel +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + departureDiameterModel(const departureDiameterModel&); + + //- Disallow default bitwise assignment + void operator=(const departureDiameterModel&); + + +public: + + //- Runtime type information + TypeName("departureDiameterModel"); + + + //- Declare runtime construction + declareRunTimeSelectionTable + ( + autoPtr, + departureDiameterModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct null + departureDiameterModel(); + + + // Selectors + + //- Select null constructed + static autoPtr New(const dictionary& dict); + + + //- Destructor + virtual ~departureDiameterModel(); + + + // Member Functions + + //- Calculate and return the departure diameter field + virtual tmp dDeparture + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& Tsub + ) const = 0; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C new file mode 100644 index 000000000..45301ef6f --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "departureDiameterModel.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::wallBoilingModels::departureDiameterModel::New +( + const dictionary& dict +) +{ + word departureDiameterModelType(dict.lookup("type")); + + Info<< "Selecting departureDiameterModel: " + << departureDiameterModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(departureDiameterModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown departureDiameterModelType type " + << departureDiameterModelType << endl << endl + << "Valid departureDiameterModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C new file mode 100644 index 000000000..b6584caf5 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "Cole.H" +#include "addToRunTimeSelectionTable.H" +#include "uniformDimensionedFields.H" +#include "compressibleTurbulenceModel.H" +#include "ThermalDiffusivity.H" +#include "PhaseCompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace departureFrequencyModels +{ + defineTypeNameAndDebug(Cole, 0); + addToRunTimeSelectionTable + ( + departureFrequencyModel, + Cole, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureFrequencyModels:: +Cole::Cole(const dictionary& dict) +: + departureFrequencyModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureFrequencyModels:: +Cole::~Cole() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::departureFrequencyModels:: +Cole::fDeparture +( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& dDep +) const +{ + // Gravitational acceleration + const uniformDimensionedVectorField& g = + liquid.mesh().lookupObject("g"); + + const fvPatchScalarField& rhoLiquid = + liquid.turbulence().rho().boundaryField()[patchi]; + + const fvPatchScalarField& rhoVapor = + vapor.turbulence().rho().boundaryField()[patchi]; + + return sqrt + ( + 4*mag(g).value() + *max(rhoLiquid - rhoVapor, scalar(0.1)) + /(3*dDep*rhoLiquid) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.H new file mode 100644 index 000000000..e3bbba979 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.H @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::departureFrequencyModels::Cole + +Description + Cole correlation for bubble departure frequency. + + Reference: + \verbatim + Cole, R. (1960). + A photographic study of pool boiling in the region of the + critical heat flux. + AIChE Journal, 6(4), 533-538. + \endverbatim + +SourceFiles + Cole.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Cole_H +#define Cole_H + +#include "departureFrequencyModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace departureFrequencyModels +{ + +/*---------------------------------------------------------------------------*\ + Class Cole Declaration +\*---------------------------------------------------------------------------*/ + +class Cole +: + public departureFrequencyModel +{ + +public: + + //- Runtime type information + TypeName("Cole"); + + + // Constructors + + //- Construct from a dictionary + Cole(const dictionary& dict); + + + //- Destructor + virtual ~Cole(); + + + // Member Functions + + //- Calculate and return the bubble departure frequency + virtual tmp fDeparture + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& dDep + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace departureFrequencyModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C new file mode 100644 index 000000000..e87e52009 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "departureFrequencyModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace wallBoilingModels + { + defineTypeNameAndDebug(departureFrequencyModel, 0); + defineRunTimeSelectionTable(departureFrequencyModel, dictionary); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureFrequencyModel::departureFrequencyModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::departureFrequencyModel::~departureFrequencyModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::wallBoilingModels::departureFrequencyModel::write(Ostream& os) const +{ + os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H new file mode 100644 index 000000000..282df0b12 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H @@ -0,0 +1,125 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::departureFrequencyModel + +Description + Base class for bubble departure frequency models + +SourceFiles + departureFrequencyModel.C + newdepartureFrequencyModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef departureFrequencyModel_H +#define departureFrequencyModel_H + +#include "volFields.H" +#include "dictionary.H" +#include "runTimeSelectionTables.H" + +#include "phaseModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ + +/*---------------------------------------------------------------------------*\ + Class departureFrequencyModel Declaration +\*---------------------------------------------------------------------------*/ + +class departureFrequencyModel +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + departureFrequencyModel(const departureFrequencyModel&); + + //- Disallow default bitwise assignment + void operator=(const departureFrequencyModel&); + + +public: + + //- Runtime type information + TypeName("departureFrequencyModel"); + + + //- Declare runtime construction + declareRunTimeSelectionTable + ( + autoPtr, + departureFrequencyModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct null + departureFrequencyModel(); + + + // Selectors + + //- Select null constructed + static autoPtr New(const dictionary& dict); + + + //- Destructor + virtual ~departureFrequencyModel(); + + + // Member Functions + + //- Calculate and return the bubble departure frequency + virtual tmp fDeparture + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const scalarField& dDep + ) const = 0; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C new file mode 100644 index 000000000..4902b3291 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "departureFrequencyModel.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::wallBoilingModels::departureFrequencyModel::New +( + const dictionary& dict +) +{ + word departureFrequencyModelType(dict.lookup("type")); + + Info<< "Selecting departureFrequencyModel: " + << departureFrequencyModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(departureFrequencyModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown departureFrequencyModelType type " + << departureFrequencyModelType << endl << endl + << "Valid departureFrequencyModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C new file mode 100644 index 000000000..28920597d --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "LemmertChawla.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace nucleationSiteModels +{ + defineTypeNameAndDebug(LemmertChawla, 0); + addToRunTimeSelectionTable + ( + nucleationSiteModel, + LemmertChawla, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::LemmertChawla +( + const dictionary& dict +) +: + nucleationSiteModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::~LemmertChawla() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::N +( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const fvPatchScalarField& Tsatw +) const +{ + const fvPatchScalarField& Tw = + liquid.thermo().T().boundaryField()[patchi]; + + return 0.8*9.922e5*pow(max((Tw - Tsatw)/10, scalar(0)), 1.805); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.H new file mode 100644 index 000000000..a521eb784 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla + +Description + Lemmert & Chawla function for nucleation site density, + correlation by Egorov & Menter. + + References: + \verbatim + Lemmert, M., & Chawla, J. M. (1977). + Influence of flow velocity on surface boiling heat transfer coefficient. + Heat Transfer in Boiling, 237, 247. + + Egorov, Y., & Menter, F. (2004). + Experimental implementation of the RPI wall boiling model in CFX-5.6. + Staudenfeldweg, 12, 83624. + Technical Report ANSYS/TR-04-10, ANSYS Gmbh. + \endverbatim + +SourceFiles + LemmertChawla.C + +\*---------------------------------------------------------------------------*/ + +#ifndef LemmertChawla_H +#define LemmertChawla_H + +#include "nucleationSiteModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace nucleationSiteModels +{ + +/*---------------------------------------------------------------------------*\ + Class LemmertChawla Declaration +\*---------------------------------------------------------------------------*/ + +class LemmertChawla +: + public nucleationSiteModel +{ + +public: + + //- Runtime type information + TypeName("LemmertChawla"); + + // Constructors + + //- Construct from a dictionary + LemmertChawla(const dictionary& dict); + + + //- Destructor + virtual ~LemmertChawla(); + + + // Member Functions + + //- Calculate and return the nucleation-site density + virtual tmp N + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const fvPatchScalarField& Tsatw + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace nucleationSiteModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C new file mode 100644 index 000000000..486597787 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "nucleationSiteModel.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::wallBoilingModels::nucleationSiteModel::New +( + const dictionary& dict +) +{ + word nucleationSiteModelType(dict.lookup("type")); + + Info<< "Selecting nucleationSiteModel: " + << nucleationSiteModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(nucleationSiteModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown nucleationSiteModelType type " + << nucleationSiteModelType << endl << endl + << "Valid nucleationSiteModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C new file mode 100644 index 000000000..fbf495a5e --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "nucleationSiteModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace wallBoilingModels + { + defineTypeNameAndDebug(nucleationSiteModel, 0); + defineRunTimeSelectionTable(nucleationSiteModel, dictionary); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::nucleationSiteModel::nucleationSiteModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::nucleationSiteModel::~nucleationSiteModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::wallBoilingModels::nucleationSiteModel::write(Ostream& os) const +{ + os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H new file mode 100644 index 000000000..6a26e4de7 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H @@ -0,0 +1,125 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::nucleationSiteModel + +Description + Base class for nucleation site density models + +SourceFiles + nucleationSiteModel.C + newnucleationSiteModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef nucleationSiteModel_H +#define nucleationSiteModel_H + +#include "volFields.H" +#include "dictionary.H" +#include "runTimeSelectionTables.H" + +#include "phaseModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ + +/*---------------------------------------------------------------------------*\ + Class nucleationSiteModel Declaration +\*---------------------------------------------------------------------------*/ + +class nucleationSiteModel +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + nucleationSiteModel(const nucleationSiteModel&); + + //- Disallow default bitwise assignment + void operator=(const nucleationSiteModel&); + + +public: + + //- Runtime type information + TypeName("nucleationSiteModel"); + + + //- Declare runtime construction + declareRunTimeSelectionTable + ( + autoPtr, + nucleationSiteModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct null + nucleationSiteModel(); + + + // Selectors + + //- Select null constructed + static autoPtr New(const dictionary& dict); + + + //- Destructor + virtual ~nucleationSiteModel(); + + + // Member Functions + + //- Calculate and return the nucleation-site density + virtual tmp N + ( + const phaseModel& liquid, + const phaseModel& vapor, + const label patchi, + const fvPatchScalarField& Tsatw + ) const = 0; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C new file mode 100644 index 000000000..8feaaf8ca --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "Lavieville.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + defineTypeNameAndDebug(Lavieville, 0); + addToRunTimeSelectionTable + ( + partitioningModel, + Lavieville, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +Lavieville::Lavieville(const dictionary& dict) +: + partitioningModel(), + alphaCrit_(readScalar(dict.lookup("alphaCrit"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +Lavieville::~Lavieville() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::partitioningModels:: +Lavieville::fLiquid +( + const scalarField& alphaLiquid +) const +{ + return + pos(alphaLiquid-alphaCrit_) + *( + 1 - 0.5*exp(-20*(alphaLiquid - alphaCrit_)) + ) + + neg(alphaLiquid - alphaCrit_) + *( + pow(0.5*(alphaLiquid/alphaCrit_), 20*alphaCrit_) + ); +} + + +void Foam::wallBoilingModels::partitioningModels:: +Lavieville::write(Ostream& os) const +{ + partitioningModel::write(os); + os.writeKeyword("alphaCrit") << alphaCrit_ << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.H new file mode 100644 index 000000000..fda516fe9 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::Lavieville + +Description + Lavieville wall heat flux partitioning model. + + Model parameters: + alphaCrit: critical liquid fraction + + Reference: + \verbatim + Lavieville, J., Quemerais, E., Mimouni, S., Boucker, M., & + Mechitoua, N. (2006). + NEPTUNE CFD V1. 0 theory manual. + NEPTUNE report Nept_2004_L1, 2(3). + \endverbatim + +SourceFiles + Lavieville.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Lavieville_H +#define Lavieville_H + +#include "partitioningModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + +/*---------------------------------------------------------------------------*\ + Class Lavieville Declaration +\*---------------------------------------------------------------------------*/ + +class Lavieville +: + public partitioningModel +{ + // Private data + + //- Critical liquid fraction + scalar alphaCrit_; + + +public: + + //- Runtime type information + TypeName("Lavieville"); + + + // Constructors + + //- Construct from a dictionary + Lavieville(const dictionary& dict); + + + //- Destructor + virtual ~Lavieville(); + + + // Member Functions + + //- Liquid blending function + virtual tmp fLiquid(const scalarField& alphaLiquid) const; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace partitioningModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C new file mode 100644 index 000000000..69818cf60 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C @@ -0,0 +1,107 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "cosine.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + defineTypeNameAndDebug(cosine, 0); + addToRunTimeSelectionTable + ( + partitioningModel, + cosine, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +cosine::cosine(const dictionary& dict) +: + partitioningModel(), + alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))), + alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +cosine::~cosine() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::partitioningModels:: +cosine::fLiquid +( + const scalarField& alphaLiquid +) const +{ + return + pos(alphaLiquid1_ - alphaLiquid) + *( + neg(alphaLiquid0_ - alphaLiquid) + *( + 0.5 + *( + 1 - cos + ( + constant::mathematical::pi + *(alphaLiquid1_ - alphaLiquid) + /(alphaLiquid1_ - alphaLiquid0_) + ) + ) + ) + ) + + neg(alphaLiquid1_ - alphaLiquid); +} + + +void Foam::wallBoilingModels::partitioningModels:: +cosine::write(Ostream& os) const +{ + partitioningModel::write(os); + os.writeKeyword("alphaLiquid1") << alphaLiquid1_ + << token::END_STATEMENT << nl; + os.writeKeyword("alphaLiquid0") << alphaLiquid0_ + << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H new file mode 100644 index 000000000..17815d94a --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::cosine + +Description + Cosine wall heat flux partitioning model. + + Proposed threshold liquid fractions: + - alphaLiquid1 0.1 + - alphaLiquid0 0.05 + + \verbatim + Ioilev, A., Samigulin, M., Ustinenko, V., Kucherova, P., Tentner, + A., Lo, S., & Splawski, A. (2007). + Advances in the modeling of cladding heat transfer + and critical heat flux in boiling water reactor fuel assemblies. + In Proc. 12th International Topical Meeting on Nuclear Reactor + Thermal Hydraulics (NURETH-12), + Pittsburgh, Pennsylvania, USA. + \endverbatim + +SourceFiles + cosine.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cosine_H +#define cosine_H + +#include "partitioningModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + +/*---------------------------------------------------------------------------*\ + Class cosine Declaration +\*---------------------------------------------------------------------------*/ + +class cosine +: + public partitioningModel +{ + // Private data + + // Model parameters, threshold liquid phase fractions + scalar alphaLiquid1_; + scalar alphaLiquid0_; + + +public: + + //- Runtime type information + TypeName("cosine"); + + + // Constructors + + //- Construct from a dictionary + cosine(const dictionary& dict); + + + //- Destructor + virtual ~cosine(); + + + // Member Functions + + //- Calculate and return the wall heat-flux partioning + virtual tmp fLiquid(const scalarField& alphaLiquid) const; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace partitioningModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C new file mode 100644 index 000000000..dd1142b13 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "linear.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + defineTypeNameAndDebug(linear, 0); + addToRunTimeSelectionTable + ( + partitioningModel, + linear, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +linear::linear(const dictionary& dict) +: + partitioningModel(), + alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))), + alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +linear::~linear() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::partitioningModels:: +linear::fLiquid +( + const scalarField& alphaLiquid +) const +{ + return max + ( + scalar(0), + min + ( + scalar(1)-(alphaLiquid1_ - alphaLiquid) + /(alphaLiquid1_ - alphaLiquid0_), + scalar(1) + ) + ); +} + + +void Foam::wallBoilingModels::partitioningModels:: +linear::write(Ostream& os) const +{ + partitioningModel::write(os); + os.writeKeyword("alphaLiquid1") << alphaLiquid1_ + << token::END_STATEMENT << nl; + os.writeKeyword("alphaLiquid0") << alphaLiquid0_ + << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H new file mode 100644 index 000000000..3e635de08 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::linear + +Description + Linear wall heat flux partitioning model. + + Proposed threshold liquid fractions: + - alphaLiquid1 0.1 + - alphaLiquid0 0.05 + + Reference: + \verbatim + Ioilev, A., Samigulin, M., Ustinenko, V., Kucherova, P., Tentner, A., + Lo, S., & Splawski, A. (2007). + Advances in the modeling of cladding heat transfer + and critical heat flux in boiling water reactor fuel assemblies. + In Proc. 12th International Topical Meeting on + Nuclear Reactor Thermal Hydraulics (NURETH-12), + Pittsburgh, Pennsylvania, USA. + \endverbatim + +SourceFiles + linear.C + +\*---------------------------------------------------------------------------*/ + +#ifndef linear_H +#define linear_H + +#include "partitioningModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + +/*---------------------------------------------------------------------------*\ + Class linear Declaration +\*---------------------------------------------------------------------------*/ + +class linear +: + public partitioningModel +{ + // Private data + + //- Model parameters, threshold liquid phase fractions + scalar alphaLiquid1_; + scalar alphaLiquid0_; + + +public: + + //- Runtime type information + TypeName("linear"); + + + // Constructors + + //- Construct from a dictionary + linear(const dictionary& dict); + + + //- Destructor + virtual ~linear(); + + + // Member Functions + + //- Calculate and return the wall heat-flux partioning + virtual tmp fLiquid(const scalarField& alphaLiquid) const; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace partitioningModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C new file mode 100644 index 000000000..adfa944c9 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "partitioningModel.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::wallBoilingModels::partitioningModel::New +( + const dictionary& dict +) +{ + word partitioningModelType(dict.lookup("type")); + + Info<< "Selecting partitioningModel: " + << partitioningModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(partitioningModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown partitioningModelType type " + << partitioningModelType << endl << endl + << "Valid partitioningModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C new file mode 100644 index 000000000..7b68289d9 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "partitioningModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace wallBoilingModels + { + defineTypeNameAndDebug(partitioningModel, 0); + defineRunTimeSelectionTable(partitioningModel, dictionary); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModel::partitioningModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModel::~partitioningModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::wallBoilingModels::partitioningModel::write(Ostream& os) const +{ + os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H new file mode 100644 index 000000000..c9f635624 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::partitioningModel + +Description + Base class for wall heat flux partitioning models + +SourceFiles + partitioningModel.C + newpartitioningModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef partitioningModel_H +#define partitioningModel_H + +#include "volFields.H" +#include "dictionary.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ + +/*---------------------------------------------------------------------------*\ + Class partitioningModel Declaration +\*---------------------------------------------------------------------------*/ + +class partitioningModel +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + partitioningModel(const partitioningModel&); + + //- Disallow default bitwise assignment + void operator=(const partitioningModel&); + + +public: + + //- Runtime type information + TypeName("partitioningModel"); + + + //- Declare runtime construction + declareRunTimeSelectionTable + ( + autoPtr, + partitioningModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct null + partitioningModel(); + + + // Selectors + + //- Select null constructed + static autoPtr New(const dictionary& dict); + + + //- Destructor + virtual ~partitioningModel(); + + + // Member Functions + + //- Calculate and return the wall heat-flux partitioning + virtual tmp fLiquid + ( + const scalarField& alphaLiquid + ) const = 0; + + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.C new file mode 100644 index 000000000..74ce07af8 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "phaseFraction.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + defineTypeNameAndDebug(phaseFraction, 0); + addToRunTimeSelectionTable + ( + partitioningModel, + phaseFraction, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +phaseFraction::phaseFraction(const dictionary& dict) +: + partitioningModel() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallBoilingModels::partitioningModels:: +phaseFraction::~phaseFraction() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallBoilingModels::partitioningModels:: +phaseFraction::fLiquid +( + const scalarField& alphaLiquid +) const +{ + return tmp(alphaLiquid); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.H new file mode 100644 index 000000000..0752c56a8 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.H @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::wallBoilingModels::phaseFraction + +Description + Wall heat-flux partitioned according to the phase volume fraction. + +SourceFiles + phaseFraction.C + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseFraction_H +#define phaseFraction_H + +#include "partitioningModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallBoilingModels +{ +namespace partitioningModels +{ + +/*---------------------------------------------------------------------------*\ + Class phaseFraction Declaration +\*---------------------------------------------------------------------------*/ + +class phaseFraction +: + public partitioningModel +{ + +public: + + //- Runtime type information + TypeName("phaseFraction"); + + + // Constructors + + //- Construct from a dictionary + phaseFraction(const dictionary& dict); + + + //- Destructor + virtual ~phaseFraction(); + + + // Member Functions + + //- Calculate and return the wall heat-flux partioning + virtual tmp fLiquid(const scalarField& alphaLiquid) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace partitioningModels +} // End namespace wallBoilingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.gas index 03e38e98a..c3a2b2260 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.gas +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.gas @@ -1979,11 +1979,17 @@ boundaryField } wall2 { - type compressible::alphatPhaseChangeJayatillekeWallFunction; + type compressible::alphatWallBoilingWallFunction; + phaseType vapor; Prt 0.85; Cmu 0.09; kappa 0.41; E 9.8; + partitioningModel + { + type Lavieville; + alphaCrit 0.2; + } value uniform 0; } defaultFaces diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.liquid index c04002047..249e85a64 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.liquid +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/alphat.liquid @@ -2060,12 +2060,30 @@ boundaryField wall2 { type compressible::alphatWallBoilingWallFunction; + phaseType liquid; Prt 0.85; Cmu 0.09; kappa 0.41; E 9.8; - relax 0.001; + relax 0.001; dmdt uniform 0; + partitioningModel + { + type Lavieville; + alphaCrit 0.2; + } + nucleationSiteModel + { + type LemmertChawla; + } + departureDiamModel + { + type TolubinskiKostanchuk; + } + departureFreqModel + { + type Cole; + } value uniform 0.01; } defaultFaces