diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C index b0f8d1629a919d008f1267e6dcb99cc5562aef3b..1ffe2ae82f034af094ffa5ea933b9eb9dad4b8f0 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,8 +40,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), phiName_("phi"), - rhoName_("rho"), - deltaWet_(1e-6) + rhoName_("rho") {} @@ -56,8 +55,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField : fixedValueFvPatchScalarField(ptf, p, iF, mapper), phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_), - deltaWet_(ptf.deltaWet_) + rhoName_(ptf.rhoName_) {} @@ -71,8 +69,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - deltaWet_(dict.lookupOrDefault<scalar>("deltaWet", 1e-6)) + rhoName_(dict.lookupOrDefault<word>("rho", "rho")) { fvPatchScalarField::operator=(scalarField("value", dict, p.size())); } @@ -86,8 +83,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField : fixedValueFvPatchScalarField(fptpsf), phiName_(fptpsf.phiName_), - rhoName_(fptpsf.rhoName_), - deltaWet_(fptpsf.deltaWet_) + rhoName_(fptpsf.rhoName_) {} @@ -100,8 +96,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField : fixedValueFvPatchScalarField(fptpsf, iF), phiName_(fptpsf.phiName_), - rhoName_(fptpsf.rhoName_), - deltaWet_(fptpsf.deltaWet_) + rhoName_(fptpsf.rhoName_) {} @@ -151,13 +146,12 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs() const label filmPatchI = filmModel.regionPatchID(patchI); - scalarField deltaFilm = filmModel.delta().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, deltaFilm); + scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchI]; + filmModel.toPrimary(filmPatchI, alphaFilm); scalarField TFilm = filmModel.Ts().boundaryField()[filmPatchI]; filmModel.toPrimary(filmPatchI, TFilm); - // Retrieve pyrolysis model const pyrModelType& pyrModel = db().lookupObject<pyrModelType>("pyrolysisProperties"); @@ -168,19 +162,8 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs() pyrModel.toPrimary(pyrPatchI, TPyr); - forAll(deltaFilm, i) - { - if (deltaFilm[i] > deltaWet_) - { - // temperature set by film - Tp[i] = TFilm[i]; - } - else - { - // temperature set by pyrolysis model - Tp[i] = TPyr[i]; - } - } + // Evaluate temperature + Tp = alphaFilm*TFilm + (1.0 - alphaFilm)*TPyr; // Restore tag UPstream::msgType() = oldTag; @@ -197,7 +180,6 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::write fvPatchScalarField::write(os); writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); - os.writeKeyword("deltaWet") << deltaWet_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H index 503b023f955c89dccc683a0311766352aaf38413..bc4ace8abdfcdcd7b84b36af1d481f5af8f7e27a 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H @@ -28,15 +28,7 @@ Description This boundary condition is designed to be used in conjunction with surface film and pyrolysis modelling. It provides a temperature boundary condition for patches on the primary region based on whether the patch is seen to - be 'wet', specified by: - - \f[ - delta > delta_wet - \f] - - where - \var delta = film height [m] - \var delta_wet = film height above which the surface is considered wet + be 'wet', retrieved from the film alpha field. \li if the patch is wet, the temperature is set using the film temperature \li otherwise, it is set using pyrolysis temperature @@ -84,9 +76,6 @@ class filmPyrolysisTemperatureCoupledFvPatchScalarField //- Name of density field word rhoName_; - //- Film height threshold beyond which it is considered 'wet' [m] - scalar deltaWet_; - public: diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C index 29b3e345868bcc112d33535b76bb42e1f89448f6..9210d30e576f1b7ba86518265760cf5764a60045 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,8 +40,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField : fixedValueFvPatchVectorField(p, iF), phiName_("phi"), - rhoName_("rho"), - deltaWet_(1e-6) + rhoName_("rho") {} @@ -56,8 +55,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField : fixedValueFvPatchVectorField(ptf, p, iF, mapper), phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_), - deltaWet_(ptf.deltaWet_) + rhoName_(ptf.rhoName_) {} @@ -71,8 +69,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField : fixedValueFvPatchVectorField(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - deltaWet_(dict.lookupOrDefault<scalar>("deltaWet", 1e-6)) + rhoName_(dict.lookupOrDefault<word>("rho", "rho")) { fvPatchVectorField::operator=(vectorField("value", dict, p.size())); } @@ -86,8 +83,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField : fixedValueFvPatchVectorField(fpvpvf), phiName_(fpvpvf.phiName_), - rhoName_(fpvpvf.rhoName_), - deltaWet_(fpvpvf.deltaWet_) + rhoName_(fpvpvf.rhoName_) {} @@ -100,8 +96,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField : fixedValueFvPatchVectorField(fpvpvf, iF), phiName_(fpvpvf.phiName_), - rhoName_(fpvpvf.rhoName_), - deltaWet_(fpvpvf.deltaWet_) + rhoName_(fpvpvf.rhoName_) {} @@ -154,13 +149,12 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs() const label filmPatchI = filmModel.regionPatchID(patchI); - scalarField deltaFilm = filmModel.delta().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, deltaFilm); + scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchI]; + filmModel.toPrimary(filmPatchI, alphaFilm); vectorField UFilm = filmModel.Us().boundaryField()[filmPatchI]; filmModel.toPrimary(filmPatchI, UFilm); - // Retrieve pyrolysis model const pyrModelType& pyrModel = db().objectRegistry::lookupObject<pyrModelType> @@ -203,19 +197,9 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs() const scalarField UAvePyr(-phiPyr/patch().magSf()); const vectorField& nf = patch().nf(); - forAll(deltaFilm, i) - { - if (deltaFilm[i] > deltaWet_) - { - // velocity set by film - Up[i] = UFilm[i]; - } - else - { - // velocity set by pyrolysis model - Up[i] = UAvePyr[i]*nf[i]; - } - } + + // Evaluate velocity + Up = alphaFilm*UFilm + (1.0 - alphaFilm)*UAvePyr*nf; // Restore tag UPstream::msgType() = oldTag; @@ -232,7 +216,6 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::write fvPatchVectorField::write(os); writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); - os.writeKeyword("deltaWet") << deltaWet_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H index c7c4c5d24be220b83c3bb478b61b40148895b104..b37157ddf0251f6e1a7d0c8a8169c153d7fa0f80 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H @@ -28,15 +28,7 @@ Description This boundary condition is designed to be used in conjunction with surface film and pyrolysis modelling. It provides a velocity boundary condition for patches on the primary region based on whether the patch is seen to - be 'wet', specified by: - - \f[ - delta > delta_wet - \f] - - where - \var delta = film height [m] - \var delta_wet = film height above which the surface is considered wet + be 'wet', retrieved from the film alpha field. \li if the patch is wet, the velocity is set using the film velocity \li otherwise, it is set using pyrolysis out-gassing velocity @@ -84,9 +76,6 @@ class filmPyrolysisVelocityCoupledFvPatchVectorField //- Name of density field word rhoName_; - //- Film height threshold beyond which it is considered 'wet' - scalar deltaWet_; - public: