diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index 9d9134f950..e3d00dea69 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,7 +42,8 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField : mixedFvPatchField(p, iF), phiName_("phi"), - rhoName_("none") + rhoName_("none"), + massFluxFraction_(1.0) { refValue() = 0.0; refGrad() = 0.0; @@ -60,7 +61,8 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField : mixedFvPatchField(p, iF), phiName_(dict.lookupOrDefault("phi", "phi")), - rhoName_(dict.lookupOrDefault("rho", "none")) + rhoName_(dict.lookupOrDefault("rho", "none")), + massFluxFraction_(dict.lookupOrDefault("massFluxFraction", 1.0)) { refValue() = 1.0; @@ -91,7 +93,8 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField : mixedFvPatchField(ptf, p, iF, mapper), phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_) + rhoName_(ptf.rhoName_), + massFluxFraction_(ptf.massFluxFraction_) {} @@ -103,7 +106,8 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField : mixedFvPatchField(tppsf), phiName_(tppsf.phiName_), - rhoName_(tppsf.rhoName_) + rhoName_(tppsf.rhoName_), + massFluxFraction_(tppsf.massFluxFraction_) {} Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField:: @@ -115,7 +119,8 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField : mixedFvPatchField(tppsf, iF), phiName_(tppsf.phiName_), - rhoName_(tppsf.rhoName_) + rhoName_(tppsf.rhoName_), + massFluxFraction_(tppsf.massFluxFraction_) {} @@ -160,7 +165,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() const scalarField alphap(turbulence.alphaEff(patchI)); - refValue() = 1.0; + refValue() = massFluxFraction_; refGrad() = 0.0; valueFraction() = @@ -192,6 +197,8 @@ write(Ostream& os) const fvPatchField::write(os); os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl; + os.writeKeyword("massFluxFraction") << massFluxFraction_ + << token::END_STATEMENT << nl; this->writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H index 562362efed..79a1da68ef 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H @@ -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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,10 @@ Class Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField Description - Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField + This BC is used for species inlets. The diffusion and advection fluxes are + considered to calculate the inlet value for the species + The massFluxFraction sets the fraction of the flux of each particular + species. SourceFiles totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -59,6 +62,8 @@ class totalFlowRateAdvectiveDiffusiveFvPatchScalarField // if neccessary word rhoName_; + //- Mass flux fraction + scalar massFluxFraction_; public: @@ -137,13 +142,6 @@ public: // Member functions - // Access - - //- Return reference to the name of the flux field - word& phiName() - { - return phiName_; - } // Mapping functions