externalWallHeatFluxTemperature, turbulentTemperatureRadCoupledMixed, turbulentTemperatureCoupledBaffleMixed: Added phase support
External and coupled Heat transfer boundary conditions are now supported for multiphase simulations and can be applied per-phase.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -358,7 +358,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
case fixedPower:
|
||||
{
|
||||
refGrad() = (Q_/gSum(patch().magSf()) + qr)/kappa(Tp);
|
||||
refGrad() = (Q_/gSum(patch().magSf()) + qr)/kappa(*this);
|
||||
refValue() = Tp;
|
||||
valueFraction() = 0;
|
||||
|
||||
@ -366,7 +366,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
case fixedHeatFlux:
|
||||
{
|
||||
refGrad() = (q_ + qr)/kappa(Tp);
|
||||
refGrad() = (q_ + qr)/kappa(*this);
|
||||
refValue() = Tp;
|
||||
valueFraction() = 0;
|
||||
|
||||
@ -417,7 +417,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const scalarField kappaDeltaCoeffs
|
||||
(
|
||||
this->kappa(Tp)*patch().deltaCoeffs()
|
||||
this->kappa(*this)*patch().deltaCoeffs()
|
||||
);
|
||||
|
||||
refGrad() = 0;
|
||||
@ -452,7 +452,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
|
||||
if (debug)
|
||||
{
|
||||
const scalar Q = gSum(kappa(Tp)*patch().magSf()*snGrad());
|
||||
const scalar Q = gSum(kappa(*this)*patch().magSf()*snGrad());
|
||||
|
||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||
<< patch().name() << ':'
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,30 +67,38 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
(
|
||||
const scalarField& Tp
|
||||
const fvPatchScalarField& Tp
|
||||
) const
|
||||
{
|
||||
const fvMesh& mesh = patch_.boundaryMesh().mesh();
|
||||
const label patchi = patch_.index();
|
||||
|
||||
if (mesh.foundObject<fluidThermo>(basicThermo::dictName))
|
||||
const word& phase(Tp.internalField().group());
|
||||
const word fluidThermoName
|
||||
(
|
||||
IOobject::groupName(basicThermo::dictName, phase)
|
||||
);
|
||||
|
||||
if (mesh.foundObject<fluidThermo>(fluidThermoName))
|
||||
{
|
||||
typedef compressible::turbulenceModel turbulenceModel;
|
||||
|
||||
if (mesh.foundObject<turbulenceModel>(turbulenceModel::propertiesName))
|
||||
const word turbulenceModelName
|
||||
(
|
||||
IOobject::groupName(turbulenceModel::propertiesName, phase)
|
||||
);
|
||||
|
||||
if (mesh.foundObject<turbulenceModel>(turbulenceModelName))
|
||||
{
|
||||
const turbulenceModel& turbModel =
|
||||
mesh.lookupObject<turbulenceModel>
|
||||
(
|
||||
turbulenceModel::propertiesName
|
||||
);
|
||||
mesh.lookupObject<turbulenceModel>( turbulenceModelName);
|
||||
|
||||
return turbModel.kappaEff(patchi);
|
||||
}
|
||||
else
|
||||
{
|
||||
const fluidThermo& thermo =
|
||||
mesh.lookupObject<fluidThermo>(basicThermo::dictName);
|
||||
mesh.lookupObject<fluidThermo>(fluidThermoName);
|
||||
|
||||
return thermo.kappa(patchi);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -103,7 +103,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Given patch temperature calculate corresponding K field
|
||||
tmp<scalarField> kappa(const scalarField& Tp) const;
|
||||
tmp<scalarField> kappa(const fvPatchScalarField& Tp) const;
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -220,7 +220,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
mpp.distribute(KDeltaNbr);
|
||||
|
||||
scalarField KDelta(kappa(Tp)*patch().deltaCoeffs());
|
||||
scalarField KDelta(kappa(*this)*patch().deltaCoeffs());
|
||||
|
||||
scalarField qr(Tp.size(), 0.0);
|
||||
if (qrName_ != "none")
|
||||
@ -237,13 +237,13 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
|
||||
valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
|
||||
refValue() = TcNbr;
|
||||
refGrad() = (qr + qrNbr)/kappa(Tp);
|
||||
refGrad() = (qr + qrNbr)/kappa(*this);
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
scalar Q = gSum(kappa(Tp)*patch().magSf()*snGrad());
|
||||
scalar Q = gSum(kappa(*this)*patch().magSf()*snGrad());
|
||||
|
||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||
<< patch().name() << ':'
|
||||
|
||||
Reference in New Issue
Block a user