From aeadea4377c8b9071fd3c73ce7c357e3ae26b149 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Wed, 22 Feb 2023 12:17:50 +0000 Subject: [PATCH] Standardised name of area-per-unit-volume to Av This change applies to diameter models within the multiphaseEuler module, heat transfer fvModels, and the LopesdaCosta porosity and turbulence models. User input changes have been made backwards-compatible, so existing AoV/a/Sigma/... entries and fields should continue to work. --- .../populationBalanceMoments.C | 3 +- .../phaseSurfaceArrheniusReactionRate.H | 4 +- .../phaseSurfaceArrheniusReactionRateI.H | 12 ++-- .../phaseSystems/diameterModels/IATE/IATE.C | 4 +- .../phaseSystems/diameterModels/IATE/IATE.H | 4 +- .../IATEwakeEntrainmentCoalescence.C | 4 +- .../diameterModel/diameterModel.H | 4 +- .../diameterModels/noDiameter/noDiameter.C | 4 +- .../diameterModels/noDiameter/noDiameter.H | 4 +- .../sphericalDiameter/sphericalDiameter.C | 4 +- .../sphericalDiameter/sphericalDiameter.H | 4 +- .../velocityGroup/velocityGroup.C | 4 +- .../velocityGroup/velocityGroup.H | 4 +- .../kEpsilonLopesdaCosta.C | 18 +++--- .../kEpsilonLopesdaCosta.H | 6 +- .../powerLawLopesdaCosta.C | 21 +++++-- .../powerLawLopesdaCosta.H | 10 ++-- .../powerLawLopesdaCostaTemplates.C | 6 +- src/fvModels/Make/files | 2 +- .../derived/heatTransfer/heatTransfer.C | 16 +++--- .../derived/heatTransfer/heatTransfer.H | 12 ++-- .../heatTransferAv.C} | 57 ++++++++++++------- .../heatTransferAv.H} | 28 ++++----- .../interRegionHeatTransfer.C | 28 ++++----- .../interRegionHeatTransfer.H | 12 ++-- .../heatExchanger/constant/porous/fvModels | 2 +- 26 files changed, 151 insertions(+), 126 deletions(-) rename src/fvModels/derived/heatTransfer/{heatTransferAoV/heatTransferAoV.C => heatTransferAv/heatTransferAv.C} (60%) rename src/fvModels/derived/heatTransfer/{heatTransferAoV/heatTransferAoV.H => heatTransferAv/heatTransferAv.H} (82%) diff --git a/applications/solvers/modules/multiphaseEuler/functionObjects/populationBalanceMoments/populationBalanceMoments.C b/applications/solvers/modules/multiphaseEuler/functionObjects/populationBalanceMoments/populationBalanceMoments.C index 236ba67a25..55205d3e02 100644 --- a/applications/solvers/modules/multiphaseEuler/functionObjects/populationBalanceMoments/populationBalanceMoments.C +++ b/applications/solvers/modules/multiphaseEuler/functionObjects/populationBalanceMoments/populationBalanceMoments.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -680,7 +680,6 @@ Foam::functionObjects::populationBalanceMoments::variance() variance += sqr(fi.x() - mean)*concentration/totalConcentration; - break; } case coordinateType::area: diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRate.H b/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRate.H index 0ad91c8d0d..b3f4b4c95d 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRate.H +++ b/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ class phaseSurfaceArrheniusReactionRate const objectRegistry& ob_; //- Surface area per unit volume field - mutable tmp tA_; + mutable tmp tAv_; public: diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRateI.H b/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRateI.H index 662aeee248..c00945120e 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRateI.H +++ b/applications/solvers/modules/multiphaseEuler/multiphaseReactions/phaseSurfaceArrheniusReactionRate/phaseSurfaceArrheniusReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ phaseSurfaceArrheniusReactionRate ArrheniusReactionRate(species, dict), phaseName_(dict.lookup("phase")), ob_(ob), - tA_(nullptr) + tAv_(nullptr) {} @@ -53,7 +53,7 @@ inline void Foam::phaseSurfaceArrheniusReactionRate::preEvaluate() const const phaseModel& phase = ob_.lookupObject(IOobject::groupName("alpha", phaseName_)); - tA_ = phase.dPtr()->a(); + tAv_ = phase.dPtr()->Av(); } @@ -61,7 +61,7 @@ inline void Foam::phaseSurfaceArrheniusReactionRate::postEvaluate() const { ArrheniusReactionRate::postEvaluate(); - tA_.clear(); + tAv_.clear(); } @@ -73,7 +73,7 @@ inline Foam::scalar Foam::phaseSurfaceArrheniusReactionRate::operator() const label li ) const { - return ArrheniusReactionRate::operator()(p, T, c, li)*tA_()[li]; + return ArrheniusReactionRate::operator()(p, T, c, li)*tAv_()[li]; } @@ -85,7 +85,7 @@ inline Foam::scalar Foam::phaseSurfaceArrheniusReactionRate::ddT const label li ) const { - return ArrheniusReactionRate::ddT(p, T, c, li)*tA_()[li]; + return ArrheniusReactionRate::ddT(p, T, c, li)*tAv_()[li]; } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C index 6691b61203..efb0972b06 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,7 +100,7 @@ Foam::tmp Foam::diameterModels::IATE::d() const } -Foam::tmp Foam::diameterModels::IATE::a() const +Foam::tmp Foam::diameterModels::IATE::Av() const { return phase()*kappai_; } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.H index a6f1910bbb..15a50dadfe 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ public: virtual tmp d() const; //- Get the surface area per unit volume field - virtual tmp a() const; + virtual tmp Av() const; //- Correct the model virtual void correct(); diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATEsources/wakeEntrainmentCoalescence/IATEwakeEntrainmentCoalescence.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATEsources/wakeEntrainmentCoalescence/IATEwakeEntrainmentCoalescence.C index 42be5908a7..f026f227c3 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATEsources/wakeEntrainmentCoalescence/IATEwakeEntrainmentCoalescence.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATEsources/wakeEntrainmentCoalescence/IATEwakeEntrainmentCoalescence.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ Foam::diameterModels::IATEsources::wakeEntrainmentCoalescence::R volScalarField& kappai ) const { - return -fvm::SuSp(12*phi()*Cwe_*cbrt(CD())*iate_.a()*Ur(), kappai); + return -fvm::SuSp(12*phi()*Cwe_*cbrt(CD())*iate_.Av()*Ur(), kappai); } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/diameterModel/diameterModel.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/diameterModel/diameterModel.H index f6b61a69ae..508c870718 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/diameterModel/diameterModel.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/diameterModel/diameterModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,7 +123,7 @@ public: virtual tmp d() const = 0; //- Return the surface area per unit volume - virtual tmp a() const = 0; + virtual tmp Av() const = 0; //- Correct the model virtual void correct(); diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.C index ea7383d578..f1a8a69071 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,7 +71,7 @@ Foam::diameterModels::noDiameter::d() const Foam::tmp -Foam::diameterModels::noDiameter::a() const +Foam::diameterModels::noDiameter::Av() const { FatalErrorInFunction << "Requested surface area per unit volume of phase " << phase().name() diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.H index 3ed2ea4c48..ac7cf21154 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/noDiameter/noDiameter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,7 +78,7 @@ public: virtual tmp d() const; //- Return the surface area per unit volume - virtual tmp a() const; + virtual tmp Av() const; }; diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.C index 4c21c3d52f..5419e590d7 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ Foam::diameterModels::spherical::spherical // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp Foam::diameterModels::spherical::a() const +Foam::tmp Foam::diameterModels::spherical::Av() const { return 6*phase()/d(); } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.H index b2f0f08ff4..ca1b243fb8 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/sphericalDiameter/sphericalDiameter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ public: // Member Functions //- Get the surface area per unit volume field - virtual tmp a() const; + virtual tmp Av() const; }; diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.C index 5e50e3f3bc..d45e511a39 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -182,7 +182,7 @@ Foam::tmp Foam::diameterModels::velocityGroup::d() const } -Foam::tmp Foam::diameterModels::velocityGroup::a() const +Foam::tmp Foam::diameterModels::velocityGroup::Av() const { tmp tA ( diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.H index 35655be650..8b99de1076 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/velocityGroup/velocityGroup.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -147,7 +147,7 @@ public: virtual tmp d() const; //- Get the surface area per unit volume field - virtual tmp a() const; + virtual tmp Av() const; //- Correct the model virtual void correct(); diff --git a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C index d1c38c9b1d..46e02525a3 100644 --- a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C +++ b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ void kEpsilonLopesdaCosta::setPorosityCoefficient template -void kEpsilonLopesdaCosta::setCdSigma +void kEpsilonLopesdaCosta::setCdAv ( volScalarField::Internal& C, const porosityModels::powerLawLopesdaCosta& pm @@ -76,7 +76,7 @@ void kEpsilonLopesdaCosta::setCdSigma if (pm.dict().found(C.name())) { const labelList& cellZoneIDs = pm.cellZoneIDs(); - const scalarField& Sigma = pm.Sigma(); + const scalarField& Av = pm.Av(); const scalar Cpm = pm.dict().lookup(C.name()); @@ -88,7 +88,7 @@ void kEpsilonLopesdaCosta::setCdSigma forAll(cells, i) { const label celli = cells[i]; - C[celli] = Cpm*Sigma[celli]; + C[celli] = Cpm*Av[celli]; } } } @@ -125,7 +125,7 @@ setPorosityCoefficients() setPorosityCoefficient(sigmak_, pm); setPorosityCoefficient(sigmaEps_, pm); - setCdSigma(CdSigma_, pm); + setCdAv(CdAv_, pm); setPorosityCoefficient(betap_, pm); setPorosityCoefficient(betad_, pm); setPorosityCoefficient(C4_, pm); @@ -152,7 +152,7 @@ tmp kEpsilonLopesdaCosta::kSource const volScalarField::Internal& magU3 ) const { - return fvm::Su(CdSigma_*(betap_*magU3 - betad_*magU*k_()), k_); + return fvm::Su(CdAv_*(betap_*magU3 - betad_*magU*k_()), k_); } @@ -166,7 +166,7 @@ kEpsilonLopesdaCosta::epsilonSource { return fvm::Su ( - CdSigma_ + CdAv_ *(C4_*betap_*epsilon_()/k_()*magU3 - C5_*betad_*magU*epsilon_()), epsilon_ ); @@ -279,11 +279,11 @@ kEpsilonLopesdaCosta::kEpsilonLopesdaCosta ) ), - CdSigma_ + CdAv_ ( IOobject ( - "CdSigma", + "CdAv", this->runTime_.name(), this->mesh_ ), diff --git a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.H b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.H index e5b687b478..3f5089cb81 100644 --- a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.H +++ b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,7 +93,7 @@ protected: // Lopes da Costa porosity coefficients - volScalarField::Internal CdSigma_; + volScalarField::Internal CdAv_; volScalarField::Internal betap_; volScalarField::Internal betad_; volScalarField::Internal C4_; @@ -114,7 +114,7 @@ protected: const porosityModels::powerLawLopesdaCosta& pm ); - void setCdSigma + void setCdAv ( volScalarField::Internal& C, const porosityModels::powerLawLopesdaCosta& pm diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C index fb116577a5..4960100cd1 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,9 +71,18 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone // Functional form of the porosity surface area per unit volume as a // function of the normalised vertical position - autoPtr> SigmaFunc + autoPtr> AvFunc ( - Function1::New("Sigma", dict) + Function1::New + ( + dict.lookupEntryBackwardsCompatible + ( + {"Av", "Sigma"}, + false, + true + ).keyword(), + dict + ) ); // Searchable triSurface for the top of the porous region @@ -252,7 +261,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone scalarField zNorm(zBottom/(zBottom + zTop)); // Create the porosity surface area per unit volume zone field - Sigma_ = SigmaFunc->value(zNorm); + Av_ = AvFunc->value(zNorm); // Create the porous region cellZone and add to the mesh cellZones @@ -320,9 +329,9 @@ Foam::porosityModels::powerLawLopesdaCosta::~powerLawLopesdaCosta() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::scalarField& -Foam::porosityModels::powerLawLopesdaCostaZone::Sigma() const +Foam::porosityModels::powerLawLopesdaCostaZone::Av() const { - return Sigma_; + return Av_; } diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.H b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.H index 78987c756a..0bcaab1a1a 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.H +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,12 +31,12 @@ Description given by: \f[ - S = -\rho C_d \Sigma |U|^{(C_1 - 1)} U + S = -\rho C_d A_v |U|^{(C_1 - 1)} U \f] where \vartable - \Sigma | Porosity surface area per unit volume + A_v | Porosity surface area per unit volume C_d | Model linear coefficient C_1 | Model exponent coefficient \endvartable @@ -83,7 +83,7 @@ protected: const word zoneName_; //- Porosity surface area per unit volume zone field - scalarField Sigma_; + scalarField Av_; public: @@ -100,7 +100,7 @@ public: // Member Functions //- Return the porosity surface area per unit volume zone field - const scalarField& Sigma() const; + const scalarField& Av() const; }; diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCostaTemplates.C b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCostaTemplates.C index c3641ced57..83302a6c42 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCostaTemplates.C +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCostaTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ void Foam::porosityModels::powerLawLopesdaCosta::apply Udiag[celli] += V[celli]*rho[celli] - *Cd_*Sigma_[i]*pow(magSqr(U[celli]), C1m1b2); + *Cd_*Av_[i]*pow(magSqr(U[celli]), C1m1b2); } } } @@ -76,7 +76,7 @@ void Foam::porosityModels::powerLawLopesdaCosta::apply AU[celli] + I *( - 0.5*rho[celli]*Cd_*Sigma_[i] + 0.5*rho[celli]*Cd_*Av_[i] *pow(magSqr(U[celli]), C1m1b2) ); } diff --git a/src/fvModels/Make/files b/src/fvModels/Make/files index e621760d87..98e4d1a2e3 100644 --- a/src/fvModels/Make/files +++ b/src/fvModels/Make/files @@ -32,7 +32,7 @@ interRegion/interRegionModel/interRegionModel.C interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C interRegion/interRegionHeatTransfer/interRegionHeatTransfer.C -derived/heatTransfer/heatTransferAoV/heatTransferAoV.C +derived/heatTransfer/heatTransferAv/heatTransferAv.C derived/heatTransfer/heatTransferCoefficientModels/heatTransferCoefficientModel/heatTransferCoefficientModel.C derived/heatTransfer/heatTransferCoefficientModels/constant/constant.C diff --git a/src/fvModels/derived/heatTransfer/heatTransfer.C b/src/fvModels/derived/heatTransfer/heatTransfer.C index c960b0b371..cb841ecd79 100644 --- a/src/fvModels/derived/heatTransfer/heatTransfer.C +++ b/src/fvModels/derived/heatTransfer/heatTransfer.C @@ -58,7 +58,7 @@ void Foam::fv::heatTransfer::readCoeffs() Ta_ = dimensionedScalar("Ta", dimTemperature, coeffs()); - heatTransferAoV_.reset(new heatTransferAoV(coeffs(), mesh())); + heatTransferAv_.reset(new heatTransferAv(coeffs(), mesh())); heatTransferCoefficientModel_ = heatTransferCoefficientModel::New(coeffs(), mesh()); @@ -80,7 +80,7 @@ Foam::fv::heatTransfer::heatTransfer semiImplicit_(false), TName_(word::null), Ta_("Ta", dimTemperature, NaN), - heatTransferAoV_(nullptr), + heatTransferAv_(nullptr), heatTransferCoefficientModel_(nullptr) { readCoeffs(); @@ -118,9 +118,9 @@ void Foam::fv::heatTransfer::addSup tmp mask = volScalarField::New("mask", mesh(), dimensionedScalar(dimless, 0)); UIndirectList(mask.ref().primitiveFieldRef(), set_.cells()) = 1; - const volScalarField htcAoV + const volScalarField htcAv ( - mask*heatTransferCoefficientModel_->htc()*heatTransferAoV_->AoV() + mask*heatTransferCoefficientModel_->htc()*heatTransferAv_->Av() ); if (semiImplicit_) @@ -130,18 +130,18 @@ void Foam::fv::heatTransfer::addSup const basicThermo& thermo = mesh().lookupObject(physicalProperties::typeName); - const volScalarField htcAoVByCpv(htcAoV/thermo.Cpv()); + const volScalarField htcAvByCpv(htcAv/thermo.Cpv()); - eqn += htcAoV*(Ta_ - T) + htcAoVByCpv*he - fvm::Sp(htcAoVByCpv, he); + eqn += htcAv*(Ta_ - T) + htcAvByCpv*he - fvm::Sp(htcAvByCpv, he); } else if (he.dimensions() == dimTemperature) { - eqn += htcAoV*Ta_ - fvm::Sp(htcAoV, he); + eqn += htcAv*Ta_ - fvm::Sp(htcAv, he); } } else { - eqn += htcAoV*(Ta_ - T); + eqn += htcAv*(Ta_ - T); } } diff --git a/src/fvModels/derived/heatTransfer/heatTransfer.H b/src/fvModels/derived/heatTransfer/heatTransfer.H index ee33a17d1b..cb0fafcea4 100644 --- a/src/fvModels/derived/heatTransfer/heatTransfer.H +++ b/src/fvModels/derived/heatTransfer/heatTransfer.H @@ -27,17 +27,17 @@ Class Description Model for heat exchange. Requires specification of an ambient temperature with which to exchange heat, and a model for the heat transfer coefficient - (htc) and the area per unit volume (AoV). These are then used to apply the + (htc) and the area per unit volume (Av). These are then used to apply the following source to the energy equation: \f[ - -htc*AoV*(T_a - T) + -htc*Av*(T_a - T) \f] If the semiImplicit option is set, then this becomes: \f[ - -htc*AoV*(T_a - T) + htc*AoV/Cp*h - Sp(htc*AoV/Cp, h); + -htc*Av*(T_a - T) + htc*Av/Cp*h - Sp(htc*Av/Cp, h); \f] Usage @@ -54,7 +54,7 @@ Usage Ta 300; - AoV 200; + Av 200; heatTransferCoefficientModel constant; @@ -76,7 +76,7 @@ SourceFiles #include "fvModel.H" #include "fvCellSet.H" #include "heatTransferCoefficientModel.H" -#include "heatTransferAoV.H" +#include "heatTransferAv.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -108,7 +108,7 @@ class heatTransfer dimensionedScalar Ta_; //- The heat transfer area per unit volume - autoPtr heatTransferAoV_; + autoPtr heatTransferAv_; //- The heat transfer model autoPtr heatTransferCoefficientModel_; diff --git a/src/fvModels/derived/heatTransfer/heatTransferAoV/heatTransferAoV.C b/src/fvModels/derived/heatTransfer/heatTransferAv/heatTransferAv.C similarity index 60% rename from src/fvModels/derived/heatTransfer/heatTransferAoV/heatTransferAoV.C rename to src/fvModels/derived/heatTransfer/heatTransferAv/heatTransferAv.C index badd8f05b3..725ab093e7 100644 --- a/src/fvModels/derived/heatTransfer/heatTransferAoV/heatTransferAoV.C +++ b/src/fvModels/derived/heatTransfer/heatTransferAv/heatTransferAv.C @@ -23,13 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "heatTransferAoV.H" +#include "heatTransferAv.H" #include "heatTransfer.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::fv::heatTransferAoV::readCoeffs(const dictionary& dict) +void Foam::fv::heatTransferAv::readCoeffs(const dictionary& dict) { + typeIOobject AvIO + ( + "Av", + mesh_.time().constant(), + mesh_, + IOobject::MUST_READ, + IOobject::NO_WRITE + ); typeIOobject AoVIO ( "AoV", @@ -39,38 +47,47 @@ void Foam::fv::heatTransferAoV::readCoeffs(const dictionary& dict) IOobject::NO_WRITE ); - if (dict.found("AoV")) + if (dict.found("Av")) { - AoV_ = dimensionedScalar("AoV", dimless/dimLength, dict); - AoVPtr_.clear(); + Av_ = dimensionedScalar("Av", dimless/dimLength, dict); + AvPtr_.clear(); + } + else if (dict.found("AoV")) + { + Av_ = dimensionedScalar("AoV", dimless/dimLength, dict); + AvPtr_.clear(); + } + else if (AvIO.headerOk()) + { + Av_ = dimensionedScalar("Av", dimless/dimLength, NaN); + AvPtr_.set(new volScalarField(AvIO, mesh_)); } else if (AoVIO.headerOk()) { - AoV_ = dimensionedScalar("AoV", dimless/dimLength, NaN); - AoVPtr_.set(new volScalarField(AoVIO, mesh_)); + Av_ = dimensionedScalar("AoV", dimless/dimLength, NaN); + AvPtr_.set(new volScalarField(AoVIO, mesh_)); } else { FatalIOErrorInFunction(dict) - << "Area per unit volume (AoV) not found. A uniform AoV " - << "value should be specified, or a non-uniform field should " - << "exist at " << AoVIO.objectPath() - << exit(FatalIOError); + << "Area per unit volume (Av) not found. A uniform Av value " + << "should be specified, or a non-uniform field should exist at " + << AvIO.objectPath() << exit(FatalIOError); } } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fv::heatTransferAoV::heatTransferAoV +Foam::fv::heatTransferAv::heatTransferAv ( const dictionary& dict, const fvMesh& mesh ) : mesh_(mesh), - AoV_("AoV", dimless/dimLength, NaN), - AoVPtr_(nullptr) + Av_("Av", dimless/dimLength, NaN), + AvPtr_(nullptr) { readCoeffs(dict); } @@ -78,26 +95,26 @@ Foam::fv::heatTransferAoV::heatTransferAoV // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::fv::heatTransferAoV::~heatTransferAoV() +Foam::fv::heatTransferAv::~heatTransferAv() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -Foam::tmp Foam::fv::heatTransferAoV::AoV() const +Foam::tmp Foam::fv::heatTransferAv::Av() const { - if (!AoVPtr_.valid()) + if (!AvPtr_.valid()) { - return volScalarField::New(typedName("AoV"), mesh_, AoV_); + return volScalarField::New(typedName("Av"), mesh_, Av_); } else { - return AoVPtr_(); + return AvPtr_(); } } -bool Foam::fv::heatTransferAoV::read(const dictionary& dict) +bool Foam::fv::heatTransferAv::read(const dictionary& dict) { readCoeffs(dict); diff --git a/src/fvModels/derived/heatTransfer/heatTransferAoV/heatTransferAoV.H b/src/fvModels/derived/heatTransfer/heatTransferAv/heatTransferAv.H similarity index 82% rename from src/fvModels/derived/heatTransfer/heatTransferAoV/heatTransferAoV.H rename to src/fvModels/derived/heatTransfer/heatTransferAv/heatTransferAv.H index ddbcd9ae12..8afa0c77ad 100644 --- a/src/fvModels/derived/heatTransfer/heatTransferAoV/heatTransferAoV.H +++ b/src/fvModels/derived/heatTransfer/heatTransferAv/heatTransferAv.H @@ -22,20 +22,20 @@ License along with OpenFOAM. If not, see . Class - Foam::fv::heatTransferAoV + Foam::fv::heatTransferAv Description - Class to handle area per unit volume [1/m] (AoV) for heat transfer - fvModels, which must be provided as a value in the coefficients dictionary - or as a field in constant. + Class to handle area per unit volume [1/m] (Av) for heat transfer fvModels, + which must be provided as a value in the coefficients dictionary or as a + field in constant. SourceFiles - heatTransferAoV.C + heatTransferAv.C \*---------------------------------------------------------------------------*/ -#ifndef heatTransferAoV_H -#define heatTransferAoV_H +#ifndef heatTransferAv_H +#define heatTransferAv_H #include "volFields.H" @@ -47,10 +47,10 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class heatTransferAoV Declaration + Class heatTransferAv Declaration \*---------------------------------------------------------------------------*/ -class heatTransferAoV +class heatTransferAv { // Private Member Data @@ -58,10 +58,10 @@ class heatTransferAoV const fvMesh& mesh_; //- Area per unit volume [1/m] - dimensionedScalar AoV_; + dimensionedScalar Av_; //- Area per unit volume [1/m] - autoPtr AoVPtr_; + autoPtr AvPtr_; // Private Member Functions @@ -75,7 +75,7 @@ public: // Constructors //- Construct from dictionary and mesh - heatTransferAoV + heatTransferAv ( const dictionary& dict, const fvMesh& mesh @@ -83,13 +83,13 @@ public: //- Destructor - virtual ~heatTransferAoV(); + virtual ~heatTransferAv(); // Member Functions //- Get the area per unit volume - tmp AoV() const; + tmp Av() const; //- Read dictionary virtual bool read(const dictionary& dict); diff --git a/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.C b/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.C index 850b907b1c..300599c499 100644 --- a/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.C +++ b/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.C @@ -59,7 +59,7 @@ void Foam::fv::interRegionHeatTransfer::readCoeffs() if (master()) { - heatTransferAoV_.reset(new heatTransferAoV(coeffs(), mesh())); + heatTransferAv_.reset(new heatTransferAv(coeffs(), mesh())); heatTransferCoefficientModel_ = heatTransferCoefficientModel::New(coeffs(), *this); @@ -88,7 +88,7 @@ Foam::fv::interRegionHeatTransfer::interRegionHeatTransfer semiImplicit_(false), TName_(word::null), TNbrName_(word::null), - heatTransferAoV_(nullptr), + heatTransferAv_(nullptr), heatTransferCoefficientModel_(nullptr) { readCoeffs(); @@ -132,7 +132,7 @@ void Foam::fv::interRegionHeatTransfer::addSup const volScalarField& Tnbr = tTnbr(); // Get the heat transfer coefficient field - tmp tHtcAoV; + tmp tHtcAv; if (master()) { tmp mask = @@ -150,26 +150,26 @@ void Foam::fv::interRegionHeatTransfer::addSup dimensionedScalar(dimless, 1) ); interpolate(oneNbr(), mask.ref().primitiveFieldRef()); - tHtcAoV = + tHtcAv = mask *heatTransferCoefficientModel_->htc() - *heatTransferAoV_->AoV(); + *heatTransferAv_->Av(); } else { tmp tHtcNbr = nbrHeatTransfer().heatTransferCoefficientModel_->htc() - *nbrHeatTransfer().heatTransferAoV_->AoV(); - tHtcAoV = + *nbrHeatTransfer().heatTransferAv_->Av(); + tHtcAv = volScalarField::New ( tHtcNbr().name(), mesh(), dimensionedScalar(tHtcNbr().dimensions(), 0) ); - interpolate(tHtcNbr(), tHtcAoV.ref().primitiveFieldRef()); + interpolate(tHtcNbr(), tHtcAv.ref().primitiveFieldRef()); } - const volScalarField& htcAoV = tHtcAoV(); + const volScalarField& htcAv = tHtcAv(); if (semiImplicit_) { @@ -178,20 +178,20 @@ void Foam::fv::interRegionHeatTransfer::addSup const basicThermo& thermo = mesh().lookupObject(physicalProperties::typeName); - const volScalarField htcAoVByCpv(htcAoV/thermo.Cpv()); + const volScalarField htcAvByCpv(htcAv/thermo.Cpv()); eqn += - htcAoV*(Tnbr - T) - + htcAoVByCpv*he - fvm::Sp(htcAoVByCpv, he); + htcAv*(Tnbr - T) + + htcAvByCpv*he - fvm::Sp(htcAvByCpv, he); } else if (he.dimensions() == dimTemperature) { - eqn += htcAoV*Tnbr - fvm::Sp(htcAoV, he); + eqn += htcAv*Tnbr - fvm::Sp(htcAv, he); } } else { - eqn += htcAoV*(Tnbr - T); + eqn += htcAv*(Tnbr - T); } } diff --git a/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.H b/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.H index 6d95792df4..cf6409655b 100644 --- a/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.H +++ b/src/fvModels/interRegion/interRegionHeatTransfer/interRegionHeatTransfer.H @@ -26,17 +26,17 @@ Class Description Model for inter-region heat exchange. Requires specification of a model for - the heat transfer coefficient (htc) and the area per unit volume (AoV). + the heat transfer coefficient (htc) and the area per unit volume (Av). These are then used to apply the following source to the energy equation: \f[ - -htc*AoV*(T_{nbr,mapped} - T) + -htc*Av*(T_{nbr,mapped} - T) \f] If the semiImplicit option is set, then this becomes: \f[ - -htc*AoV*(T_{nbr,mapped} - T) + htc*AoV/Cp*h - Sp(htc*AoV/Cp, h); + -htc*Av*(T_{nbr,mapped} - T) + htc*Av/Cp*h - Sp(htc*Av/Cp, h); \f] Usage @@ -53,7 +53,7 @@ Usage semiImplicit no; - AoV 200; + Av 200; heatTransferCoefficientModel constant; @@ -74,7 +74,7 @@ SourceFiles #include "interRegionModel.H" #include "heatTransferCoefficientModel.H" -#include "heatTransferAoV.H" +#include "heatTransferAv.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -103,7 +103,7 @@ class interRegionHeatTransfer word TNbrName_; //- The heat transfer area per unit volume - autoPtr heatTransferAoV_; + autoPtr heatTransferAv_; //- The heat transfer model autoPtr heatTransferCoefficientModel_; diff --git a/tutorials/modules/CHT/heatExchanger/constant/porous/fvModels b/tutorials/modules/CHT/heatExchanger/constant/porous/fvModels index 4e275aac0b..1f2185e51d 100644 --- a/tutorials/modules/CHT/heatExchanger/constant/porous/fvModels +++ b/tutorials/modules/CHT/heatExchanger/constant/porous/fvModels @@ -25,7 +25,7 @@ porousToair semiImplicit no; - AoV 200; + Av 200; heatTransferCoefficientModel constant;