Skip to content
Snippets Groups Projects
Commit 8f4960bd authored by sergio's avatar sergio Committed by Andrew Heather
Browse files

BUG: Typo in temperatureCoupledBase constructor from components

parent e775be6e
Branches
Tags
No related merge requests found
Showing with 47 additions and 23 deletions
......@@ -64,7 +64,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
)
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"),
mode_(unknown),
q_(p.size(), 0.0),
h_(p.size(), 0.0),
......@@ -88,7 +88,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
)
:
mixedFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()),
temperatureCoupledBase(patch(), ptf),
mode_(ptf.mode_),
q_(ptf.q_, mapper),
h_(ptf.h_, mapper),
......@@ -194,7 +194,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
)
:
mixedFvPatchScalarField(tppsf, iF),
temperatureCoupledBase(patch(), tppsf.KMethod(), tppsf.kappaName()),
temperatureCoupledBase(patch(), tppsf),
mode_(tppsf.mode_),
q_(tppsf.q_),
h_(tppsf.h_),
......
......@@ -58,13 +58,14 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
(
const fvPatch& patch,
const word& calculationType,
const word& kappaName
const word& kappaName,
const word& alphaAniName
)
:
patch_(patch),
method_(KMethodTypeNames_[calculationType]),
kappaName_(kappaName),
alphaAniName_(alphaAniName_)
alphaAniName_(alphaAniName)
{}
......@@ -81,6 +82,19 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
{}
Foam::temperatureCoupledBase::temperatureCoupledBase
(
const fvPatch& patch,
const temperatureCoupledBase& base
)
:
patch_(patch),
method_(base.method_),
kappaName_(base.kappaName_),
alphaAniName_(base.alphaAniName_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
......@@ -89,6 +103,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
) const
{
const fvMesh& mesh = patch_.boundaryMesh().mesh();
const label patchI = patch_.index();
switch (method_)
{
......@@ -101,14 +116,14 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
const turbulenceModel& turbModel =
mesh.lookupObject<turbulenceModel>("turbulenceModel");
return turbModel.kappaEff(patch_.index());
return turbModel.kappaEff(patchI);
}
else if (mesh.foundObject<fluidThermo>("thermophysicalProperties"))
{
const fluidThermo& thermo =
mesh.lookupObject<fluidThermo>("thermophysicalProperties");
return thermo.kappa(patch_.index());
return thermo.kappa(patchI);
}
else
{
......@@ -129,7 +144,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
const solidThermo& thermo =
mesh.lookupObject<solidThermo>("thermophysicalProperties");
return thermo.kappa(patch_.index());
return thermo.kappa(patchI);
break;
}
......@@ -138,14 +153,15 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
const solidThermo& thermo =
mesh.lookupObject<solidThermo>("thermophysicalProperties");
const symmTensorField& Anialpha =
const symmTensorField& alphaAni =
patch_.lookupPatchField<volSymmTensorField, scalar>
(
alphaAniName_
);
const symmTensorField kappa =
Anialpha*thermo.Cp()().boundaryField()[patch_.index()];
const scalarField& pp = thermo.p().boundaryField()[patchI];
const symmTensorField kappa(alphaAni*thermo.Cp(pp, Tp, patchI));
const vectorField n(patch_.nf());
......
......@@ -102,7 +102,8 @@ public:
(
const fvPatch& patch,
const word& calculationMethod,
const word& KName
const word& kappaName,
const word& alphaAniName
);
//- Construct from patch and dictionary
......@@ -112,6 +113,13 @@ public:
const dictionary& dict
);
//- Construct from patch and temperatureCoupledBase
temperatureCoupledBase
(
const fvPatch& patch,
const temperatureCoupledBase& base
);
// Member functions
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -76,7 +76,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
)
:
fixedGradientFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"),
heatSource_(hsPower),
q_(p.size(), 0.0),
QrName_("undefinedQr")
......@@ -93,7 +93,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
)
:
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()),
temperatureCoupledBase(patch(), ptf),
heatSource_(ptf.heatSource_),
q_(ptf.q_, mapper),
QrName_(ptf.QrName_)
......@@ -135,7 +135,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
)
:
fixedGradientFvPatchScalarField(thftpsf),
temperatureCoupledBase(patch(), thftpsf.KMethod(), thftpsf.kappaName()),
temperatureCoupledBase(patch(), thftpsf),
heatSource_(thftpsf.heatSource_),
q_(thftpsf.q_),
QrName_(thftpsf.QrName_)
......@@ -150,7 +150,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
)
:
fixedGradientFvPatchScalarField(thftpsf, iF),
temperatureCoupledBase(patch(), thftpsf.KMethod(), thftpsf.kappaName()),
temperatureCoupledBase(patch(), thftpsf),
heatSource_(thftpsf.heatSource_),
q_(thftpsf.q_),
QrName_(thftpsf.QrName_)
......
......@@ -46,7 +46,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
)
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"),
TnbrName_("undefined-Tnbr"),
thicknessLayers_(0),
kappaLayers_(0),
......@@ -68,7 +68,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
)
:
mixedFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()),
temperatureCoupledBase(patch(), ptf),
TnbrName_(ptf.TnbrName_),
thicknessLayers_(ptf.thicknessLayers_),
kappaLayers_(ptf.kappaLayers_),
......@@ -155,7 +155,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
)
:
mixedFvPatchScalarField(wtcsf, iF),
temperatureCoupledBase(patch(), wtcsf.KMethod(), wtcsf.kappaName()),
temperatureCoupledBase(patch(), wtcsf),
TnbrName_(wtcsf.TnbrName_),
thicknessLayers_(wtcsf.thicknessLayers_),
kappaLayers_(wtcsf.kappaLayers_),
......
......@@ -46,7 +46,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
)
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"),
TnbrName_("undefined-Tnbr"),
QrNbrName_("undefined-QrNbr"),
QrName_("undefined-Qr"),
......@@ -70,7 +70,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
)
:
mixedFvPatchScalarField(psf, p, iF, mapper),
temperatureCoupledBase(patch(), psf.KMethod(), psf.kappaName()),
temperatureCoupledBase(patch(), psf),
TnbrName_(psf.TnbrName_),
QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_),
......@@ -161,7 +161,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
)
:
mixedFvPatchScalarField(psf, iF),
temperatureCoupledBase(patch(), psf.KMethod(), psf.kappaName()),
temperatureCoupledBase(patch(), psf),
TnbrName_(psf.TnbrName_),
QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment