Commit efe4a9a4 authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

ENH: TurbulenceModels: Obtain the group name from alphaRhoPhi rather than U

to support multiphase solvers in which the phases have the same velocity field.
parent 405bb941
IOobject alphaPhi10Header
(
"alphaPhi10",
IOobject::groupName("alphaPhi0", alpha1.group()),
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -77,7 +77,7 @@ Foam::EddyDiffusivity<BasicTurbulenceModel>::EddyDiffusivity
(
IOobject
(
IOobject::groupName("alphat", U.group()),
IOobject::groupName("alphat", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -122,7 +122,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat() const
(
IOobject
(
IOobject::groupName("alphat", this->U_.group()),
IOobject::groupName("alphat", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -151,7 +151,7 @@ LamBremhorstKE::LamBremhorstKE
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -164,7 +164,7 @@ LamBremhorstKE::LamBremhorstKE
(
IOobject
(
IOobject::groupName("epsilon", U.group()),
IOobject::groupName("epsilon", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -301,7 +301,7 @@ LienCubicKE::LienCubicKE
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -314,7 +314,7 @@ LienCubicKE::LienCubicKE
(
IOobject
(
IOobject::groupName("epsilon", U.group()),
IOobject::groupName("epsilon", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -195,7 +195,7 @@ LienLeschziner::LienLeschziner
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -208,7 +208,7 @@ LienLeschziner::LienLeschziner
(
IOobject
(
IOobject::groupName("epsilon", U.group()),
IOobject::groupName("epsilon", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -195,7 +195,7 @@ ShihQuadraticKE::ShihQuadraticKE
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -208,7 +208,7 @@ ShihQuadraticKE::ShihQuadraticKE
(
IOobject
(
IOobject::groupName("epsilon", U.group()),
IOobject::groupName("epsilon", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -490,7 +490,7 @@ kkLOmega::kkLOmega
(
IOobject
(
IOobject::groupName("kt", U.group()),
IOobject::groupName("kt", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -502,7 +502,7 @@ kkLOmega::kkLOmega
(
IOobject
(
IOobject::groupName("kl", U.group()),
IOobject::groupName("kl", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -514,7 +514,7 @@ kkLOmega::kkLOmega
(
IOobject
(
IOobject::groupName("omega", U.group()),
IOobject::groupName("omega", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -153,7 +153,7 @@ qZeta::qZeta
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -166,7 +166,7 @@ qZeta::qZeta
(
IOobject
(
IOobject::groupName("epsilon", U.group()),
IOobject::groupName("epsilon", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
......@@ -179,7 +179,7 @@ qZeta::qZeta
(
IOobject
(
IOobject::groupName("q", U.group()),
IOobject::groupName("q", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
......@@ -193,7 +193,7 @@ qZeta::qZeta
(
IOobject
(
IOobject::groupName("zeta", U.group()),
IOobject::groupName("zeta", alphaRhoPhi.group()),
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -108,7 +108,7 @@ Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrime() const
(
IOobject
(
IOobject::groupName("pPrime", this->U_.group()),
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......@@ -128,7 +128,7 @@ Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrimef() const
(
IOobject
(
IOobject::groupName("pPrimef", this->U_.group()),
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -68,7 +68,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::continuousGasKEpsilon
(
IOobject
(
IOobject::groupName("nutEff", U.group()),
IOobject::groupName("nutEff", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::READ_IF_PRESENT,
......@@ -189,7 +189,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::nuEff() const
(
new volScalarField
(
IOobject::groupName("nuEff", this->U_.group()),
IOobject::groupName("nuEff", this->alphaRhoPhi_.group()),
blend*this->nut_
+ (1.0 - blend)*rhoEff()*nutEff_/this->transport().rho()
+ this->nu()
......@@ -210,7 +210,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::rhoEff() const
(
new volScalarField
(
IOobject::groupName("rhoEff", this->U_.group()),
IOobject::groupName("rhoEff", this->alphaRhoPhi_.group()),
gas.rho() + (fluid.virtualMass(gas).Cvm() + 3.0/20.0)*liquid.rho()
)
);
......@@ -278,7 +278,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::R() const
(
IOobject
(
IOobject::groupName("R", this->U_.group()),
IOobject::groupName("R", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -136,7 +136,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......@@ -148,7 +148,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon
(
IOobject
(
IOobject::groupName("epsilon", U.group()),
IOobject::groupName("epsilon", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -107,7 +107,7 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrime() const
(
IOobject
(
IOobject::groupName("pPrime", this->U_.group()),
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......@@ -127,7 +127,7 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrimef() const
(
IOobject
(
IOobject::groupName("pPrimef", this->U_.group()),
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......@@ -160,8 +160,7 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::divDevReff
template<class TransportModel>
Foam::tmp<Foam::volSymmTensorField>
Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::
devRhoReff() const
Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::devRhoReff() const
{
NotImplemented;
......@@ -171,8 +170,7 @@ devRhoReff() const
template<class TransportModel>
Foam::tmp<Foam::fvVectorMatrix>
Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::
divDevRhoReff
Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::divDevRhoReff
(
volVectorField& U
) const
......
......@@ -365,7 +365,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase
(
IOobject
(
IOobject::groupName("k", U.group()),
IOobject::groupName("k", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......@@ -377,7 +377,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase
(
IOobject
(
IOobject::groupName("omega", U.group()),
IOobject::groupName("omega", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -150,7 +150,7 @@ tmp<volScalarField> DeardorffDiffStress<BasicTurbulenceModel>::epsilon() const
(
IOobject
(
IOobject::groupName("epsilon", this->U_.group()),
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -106,7 +106,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel
(
LESdelta::New
(
IOobject::groupName("delta", U.group()),
IOobject::groupName("delta", alphaRhoPhi.group()),
*this,
LESDict_
)
......@@ -141,7 +141,7 @@ Foam::LESModel<BasicTurbulenceModel>::New
(
IOobject
(
IOobject::groupName(propertiesName, U.group()),
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -212,7 +212,7 @@ public:
(
new volScalarField
(
IOobject::groupName("nuEff", this->U_.group()),
IOobject::groupName("nuEff", this->alphaRhoPhi_.group()),
this->nut() + this->nu()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
......@@ -101,7 +101,7 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
(
IOobject
(
IOobject::groupName("epsilon", this->U_.group()),
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -53,7 +53,7 @@ tmp<volScalarField> Smagorinsky<BasicTurbulenceModel>::k
(
IOobject
(
IOobject::groupName("k", this->U_.group()),
IOobject::groupName("k", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
......@@ -149,7 +149,7 @@ tmp<volScalarField> Smagorinsky<BasicTurbulenceModel>::epsilon() const
(
IOobject
(
IOobject::groupName("epsilon", this->U_.group()),
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -59,7 +59,7 @@ tmp<volScalarField> WALE<BasicTurbulenceModel>::k
(
IOobject
(
IOobject::groupName("k", this->U_.group()),
IOobject::groupName("k", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
......@@ -180,7 +180,7 @@ tmp<volScalarField> WALE<BasicTurbulenceModel>::epsilon() const
(
IOobject
(
IOobject::groupName("epsilon", this->U_.group()),
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -178,7 +178,7 @@ dynamicKEqn<BasicTurbulenceModel>::dynamicKEqn
(
IOobject
(
IOobject::groupName("k", this->U_.group()),
IOobject::groupName("k", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......@@ -227,7 +227,7 @@ tmp<volScalarField> dynamicKEqn<BasicTurbulenceModel>::epsilon() const
(
IOobject
(
IOobject::groupName("epsilon", this->U_.group()),
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
......
......@@ -87,7 +87,7 @@ dynamicLagrangian<BasicTurbulenceModel>::dynamicLagrangian
(
IOobject
(
IOobject::groupName("flm", this->U_.group()),
IOobject::groupName("flm", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......@@ -99,7 +99,7 @@ dynamicLagrangian<BasicTurbulenceModel>::dynamicLagrangian
(
IOobject
(
IOobject::groupName("fmm", this->U_.group()),
IOobject::groupName("fmm", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -92,7 +92,7 @@ kEqn<BasicTurbulenceModel>::kEqn
(
IOobject
(