mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
new bc
This commit is contained in:
@ -5,7 +5,7 @@ coupleManager/coupleManager.C
|
||||
derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C
|
||||
derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C
|
||||
|
||||
chtMultiRegionFoam.C
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "coupleManager.H"
|
||||
#include "OFstream.H"
|
||||
#include "regionProperties.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -74,6 +75,51 @@ Foam::coupleManager::~coupleManager()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::coupleManager::regionOwner() const
|
||||
{
|
||||
const fvMesh& nbrRegion = neighbourRegion();
|
||||
|
||||
const regionProperties& props =
|
||||
localRegion_.objectRegistry::parent().lookupObject<regionProperties>
|
||||
(
|
||||
"regionProperties"
|
||||
);
|
||||
|
||||
label myIndex = findIndex(props.fluidRegionNames(), localRegion_.name());
|
||||
if (myIndex == -1)
|
||||
{
|
||||
label i = findIndex(props.solidRegionNames(), localRegion_.name());
|
||||
|
||||
if (i == -1)
|
||||
{
|
||||
FatalErrorIn("coupleManager::regionOwner() const")
|
||||
<< "Cannot find region " << localRegion_.name()
|
||||
<< " neither in fluids " << props.fluidRegionNames()
|
||||
<< " nor in solids " << props.solidRegionNames()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
myIndex = props.fluidRegionNames().size() + i;
|
||||
}
|
||||
label nbrIndex = findIndex(props.fluidRegionNames(), nbrRegion.name());
|
||||
if (nbrIndex == -1)
|
||||
{
|
||||
label i = findIndex(props.solidRegionNames(), nbrRegion.name());
|
||||
|
||||
if (i == -1)
|
||||
{
|
||||
FatalErrorIn("coupleManager::regionOwner() const")
|
||||
<< "Cannot find region " << nbrRegion.name()
|
||||
<< " neither in fluids " << props.fluidRegionNames()
|
||||
<< " nor in solids " << props.solidRegionNames()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
nbrIndex = props.fluidRegionNames().size() + i;
|
||||
}
|
||||
|
||||
return myIndex < nbrIndex;
|
||||
}
|
||||
|
||||
|
||||
void Foam::coupleManager::checkCouple() const
|
||||
{
|
||||
Info<< "neighbourRegionName_ = " << neighbourRegionName_ << endl;
|
||||
|
||||
@ -74,9 +74,6 @@ class coupleManager
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
// coupleManager(const coupleManager&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const coupleManager&);
|
||||
|
||||
@ -129,6 +126,9 @@ public:
|
||||
template<class Type>
|
||||
inline const fvPatchField<Type>& neighbourPatchField() const;
|
||||
|
||||
//- Am I owner (= first to evaluate) of this region interface?
|
||||
bool regionOwner() const;
|
||||
|
||||
//- Check that the couple is valid
|
||||
void checkCouple() const;
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ void Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField::updateCoeffs()
|
||||
const fvPatchField<scalar>& K =
|
||||
patch().lookupPatchField<volScalarField, scalar>(KName_);
|
||||
|
||||
gradient() = refCast<const solidWallTemperatureCoupledFvPatchScalarField>
|
||||
gradient() = -refCast<const solidWallTemperatureCoupledFvPatchScalarField>
|
||||
(neighbourField).flux()/K;
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
|
||||
@ -0,0 +1,252 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "solidWallMixedTemperatureCoupledFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "regionProperties.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
coupleManager_(p),
|
||||
KName_("undefined-K")
|
||||
{
|
||||
this->refValue() = 0.0;
|
||||
this->refGrad() = 0.0;
|
||||
this->valueFraction() = 1.0;
|
||||
this->fixesValue_ = true;
|
||||
}
|
||||
|
||||
|
||||
Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const solidWallMixedTemperatureCoupledFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
coupleManager_(ptf.coupleManager_),
|
||||
KName_(ptf.KName_),
|
||||
fixesValue_(ptf.fixesValue_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
coupleManager_(p, dict),
|
||||
KName_(dict.lookup("K"))
|
||||
{
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
refValue() = static_cast<scalarField>(*this);
|
||||
refGrad() = 0.0;
|
||||
valueFraction() = 1.0;
|
||||
fixesValue_ = true;
|
||||
}
|
||||
|
||||
|
||||
Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const solidWallMixedTemperatureCoupledFvPatchScalarField& wtcsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(wtcsf, iF),
|
||||
coupleManager_(wtcsf.coupleManager_),
|
||||
KName_(wtcsf.KName_),
|
||||
fixesValue_(wtcsf.fixesValue_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::fvPatchScalarField&
|
||||
Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::K() const
|
||||
{
|
||||
return this->patch().lookupPatchField<volScalarField, scalar>(KName_);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
tmp<scalarField> intFld = patchInternalField();
|
||||
|
||||
label nFixed = 0;
|
||||
|
||||
// Like snGrad but bypass switching on refValue/refGrad.
|
||||
tmp<scalarField> normalGradient =
|
||||
(*this-intFld())
|
||||
* patch().deltaCoeffs();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "solidWallMixedTemperatureCoupledFvPatchScalarField::"
|
||||
<< "updateCoeffs() :"
|
||||
<< " walltemperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(*this, i)
|
||||
{
|
||||
// if outgoing flux use fixed value.
|
||||
if (intFld()[i] > operator[](i))
|
||||
{
|
||||
this->refValue()[i] = operator[](i);
|
||||
this->refGrad()[i] = 0.0; // not used
|
||||
this->valueFraction()[i] = 1.0;
|
||||
nFixed++;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->refValue()[i] = 0.0; // not used
|
||||
this->refGrad()[i] = normalGradient()[i];
|
||||
this->valueFraction()[i] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
reduce(nFixed, sumOp<label>());
|
||||
|
||||
fixesValue_ = (nFixed > 0);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
label nTotSize = returnReduce(this->size(), sumOp<label>());
|
||||
|
||||
Info<< "solidWallMixedTemperatureCoupledFvPatchScalarField::"
|
||||
<< "updateCoeffs() : Out of " << nTotSize
|
||||
<< " fixedBC:" << nFixed
|
||||
<< " gradient:" << nTotSize-nFixed << endl;
|
||||
}
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
this->updateCoeffs();
|
||||
}
|
||||
|
||||
if (!coupleManager_.regionOwner())
|
||||
{
|
||||
// I am the last one to evaluate.
|
||||
|
||||
tmp<scalarField> intFld = patchInternalField();
|
||||
|
||||
const fvPatch& nbrPatch = coupleManager_.neighbourPatch();
|
||||
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField& nbrField =
|
||||
refCast<solidWallMixedTemperatureCoupledFvPatchScalarField>
|
||||
(
|
||||
const_cast<fvPatchField<scalar>&>
|
||||
(
|
||||
coupleManager_.neighbourPatchField<scalar>()
|
||||
)
|
||||
);
|
||||
tmp<scalarField> nbrIntFld = nbrField.patchInternalField();
|
||||
tmp<scalarField> myKDelta = K()*patch().deltaCoeffs();
|
||||
tmp<scalarField> nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs();
|
||||
|
||||
// Calculate common wall temperature and assign to both sides
|
||||
scalarField::operator=
|
||||
(
|
||||
(myKDelta()*intFld + nbrKDelta()*nbrIntFld)
|
||||
/ (myKDelta() + nbrKDelta())
|
||||
);
|
||||
|
||||
nbrField.scalarField::operator=(*this);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Setting master and slave to wall temperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
fvPatchScalarField::evaluate();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
coupleManager_.writeEntries(os);
|
||||
os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,184 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
|
||||
Description
|
||||
Mixed boundary condition for temperature, to be used by the
|
||||
conjugate heat transfer solver.
|
||||
If my temperature is T1, neighbour is T2:
|
||||
|
||||
T1 > T2: my side becomes fixedValue T2 bc, other side becomes fixedGradient.
|
||||
|
||||
|
||||
Example usage:
|
||||
myInterfacePatchName
|
||||
{
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName fluid;
|
||||
neighbourPatchName fluidSolidInterface;
|
||||
neighbourFieldName T;
|
||||
K K;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
SourceFiles
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef solidWallMixedTemperatureCoupledFvPatchScalarField_H
|
||||
#define solidWallMixedTemperatureCoupledFvPatchScalarField_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "coupleManager.H"
|
||||
#include "fvPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class solidWallMixedTemperatureCoupledFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Couple manager object
|
||||
coupleManager coupleManager_;
|
||||
|
||||
//- Name of thermal conductivity field
|
||||
word KName_;
|
||||
|
||||
bool fixesValue_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("solidWallMixedTemperatureCoupled");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
// onto a new patch
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const solidWallMixedTemperatureCoupledFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new solidWallMixedTemperatureCoupledFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
const solidWallMixedTemperatureCoupledFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new solidWallMixedTemperatureCoupledFvPatchScalarField
|
||||
(
|
||||
*this,
|
||||
iF
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Get corresponding K field
|
||||
const fvPatchScalarField& K() const;
|
||||
|
||||
//- Return true if this patch field fixes a value.
|
||||
// Needed to check if a level has to be specified while solving
|
||||
// Poissons equations.
|
||||
virtual bool fixesValue() const
|
||||
{
|
||||
return fixesValue_;
|
||||
}
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -136,7 +136,7 @@ Foam::solidWallTemperatureCoupledFvPatchScalarField::flux() const
|
||||
|
||||
const fvPatchScalarField& Tw = *this;
|
||||
|
||||
return Tw.snGrad()*patch().magSf()*Kw;
|
||||
return Tw.snGrad()*Kw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -138,7 +138,7 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Flux
|
||||
//- (intensive) flux
|
||||
tmp<scalarField> flux() const;
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
thermof[i].rho()*thermof[i].Cp()*thermof[i].alpha()
|
||||
thermof[i].Cp()*thermof[i].alpha()
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -56,5 +56,5 @@
|
||||
}
|
||||
|
||||
// Update thermal conductivity
|
||||
Kf[i] = rhof[i]*thermof[i].Cp()*turb[i].alphaEff();
|
||||
Kf[i] = thermof[i].Cp()*turb[i].alphaEff();
|
||||
}
|
||||
|
||||
@ -6,4 +6,7 @@
|
||||
fvm::ddt(rhosCps[i], Ts[i]) - fvm::laplacian(Ks[i], Ts[i])
|
||||
);
|
||||
}
|
||||
|
||||
Info<< "Min/max T:" << min(Ts[i]) << ' ' << max(Ts[i])
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ dictionaryReplacement
|
||||
}
|
||||
bottomAir_to_leftSolid
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName leftSolid;
|
||||
neighbourPatchName leftSolid_to_bottomAir;
|
||||
neighbourFieldName T;
|
||||
@ -71,7 +71,7 @@ dictionaryReplacement
|
||||
}
|
||||
bottomAir_to_heater
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName heater;
|
||||
neighbourPatchName heater_to_bottomAir;
|
||||
neighbourFieldName T;
|
||||
@ -80,7 +80,7 @@ dictionaryReplacement
|
||||
}
|
||||
bottomAir_to_rightSolid
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName rightSolid;
|
||||
neighbourPatchName rightSolid_to_bottomAir;
|
||||
neighbourFieldName T;
|
||||
@ -254,49 +254,49 @@ dictionaryReplacement
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 1000000;
|
||||
internalField uniform 100000;
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
bottomAir_to_leftSolid
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
bottomAir_to_heater
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
bottomAir_to_rightSolid
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,192 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minY
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 500;
|
||||
}
|
||||
|
||||
minZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
heater_to_domain0
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
neighbourRegionName domain0;
|
||||
neighbourPatchName domain0_to_heater;
|
||||
neighbourFieldName T;
|
||||
K K;
|
||||
value uniform 300;
|
||||
|
||||
}
|
||||
heater_to_solid1
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
neighbourRegionName solid1;
|
||||
neighbourPatchName solid1_to_heater;
|
||||
neighbourFieldName T;
|
||||
K K;
|
||||
value uniform 300;
|
||||
}
|
||||
heater_to_solid3
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
neighbourRegionName solid3;
|
||||
neighbourPatchName solid3_to_heater;
|
||||
neighbourFieldName T;
|
||||
K K;
|
||||
value uniform 300;
|
||||
}
|
||||
heater_to_domain3
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
neighbourRegionName domain3;
|
||||
neighbourPatchName domain3_to_heater;
|
||||
neighbourFieldName T;
|
||||
K K;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rho
|
||||
{
|
||||
internalField uniform 8000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minY
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_domain0
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_solid1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_solid3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_domain3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
K
|
||||
{
|
||||
internalField uniform 80;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minY
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_domain0
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_solid1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_solid3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_domain3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cp
|
||||
{
|
||||
internalField uniform 450;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minY
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_domain0
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_solid1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_solid3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
heater_to_domain3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,59 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
grad(gamma) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(rho*phi,U) Gauss upwind; //limitedLinearV 1;
|
||||
div(phi,gamma) Gauss vanLeer;
|
||||
div(phirb,gamma) Gauss interfaceCompression;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd;
|
||||
pcorr;
|
||||
gamma;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,123 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
pcorr PCG
|
||||
{
|
||||
preconditioner GAMG
|
||||
{
|
||||
tolerance 1e-3;
|
||||
relTol 0;
|
||||
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nBottomSweeps 2;
|
||||
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
tolerance 1e-4;
|
||||
relTol 0;
|
||||
maxIter 100;
|
||||
};
|
||||
|
||||
pd GAMG
|
||||
{
|
||||
tolerance 1e-8;
|
||||
relTol 0.05;
|
||||
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
pdFinal PCG
|
||||
{
|
||||
preconditioner GAMG
|
||||
{
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
|
||||
nVcycles 2;
|
||||
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
maxIter 20;
|
||||
};
|
||||
|
||||
U smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
nSweeps 1;
|
||||
};
|
||||
|
||||
k PBiCG
|
||||
{
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
};
|
||||
B PBiCG
|
||||
{
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
};
|
||||
nuTilda PBiCG
|
||||
{
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
};
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nGammaCorr 1;
|
||||
nGammaSubCycles 3;
|
||||
cGamma 1;
|
||||
pdRefCell 0;
|
||||
pdRefValue 0;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -39,7 +39,7 @@ dictionaryReplacement
|
||||
|
||||
heater_to_bottomAir
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName bottomAir;
|
||||
neighbourPatchName bottomAir_to_heater;
|
||||
neighbourFieldName T;
|
||||
@ -49,7 +49,7 @@ dictionaryReplacement
|
||||
}
|
||||
heater_to_leftSolid
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName leftSolid;
|
||||
neighbourPatchName leftSolid_to_heater;
|
||||
neighbourFieldName T;
|
||||
@ -58,7 +58,7 @@ dictionaryReplacement
|
||||
}
|
||||
heater_to_rightSolid
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName rightSolid;
|
||||
neighbourPatchName rightSolid_to_heater;
|
||||
neighbourFieldName T;
|
||||
@ -67,7 +67,7 @@ dictionaryReplacement
|
||||
}
|
||||
heater_to_topAir
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName topAir;
|
||||
neighbourPatchName topAir_to_heater;
|
||||
neighbourFieldName T;
|
||||
|
||||
@ -36,7 +36,7 @@ dictionaryReplacement
|
||||
}
|
||||
leftSolid_to_bottomAir
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName bottomAir;
|
||||
neighbourPatchName bottomAir_to_leftSolid;
|
||||
neighbourFieldName T;
|
||||
@ -46,7 +46,7 @@ dictionaryReplacement
|
||||
}
|
||||
leftSolid_to_heater
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName heater;
|
||||
neighbourPatchName heater_to_leftSolid;
|
||||
neighbourFieldName T;
|
||||
@ -55,7 +55,7 @@ dictionaryReplacement
|
||||
}
|
||||
leftSolid_to_topAir
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName topAir;
|
||||
neighbourPatchName topAir_to_leftSolid;
|
||||
neighbourFieldName T;
|
||||
|
||||
@ -36,7 +36,7 @@ dictionaryReplacement
|
||||
}
|
||||
rightSolid_to_heater
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName heater;
|
||||
neighbourPatchName heater_to_rightSolid;
|
||||
neighbourFieldName T;
|
||||
@ -45,7 +45,7 @@ dictionaryReplacement
|
||||
}
|
||||
rightSolid_to_bottomAir
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName bottomAir;
|
||||
neighbourPatchName bottomAir_to_rightSolid;
|
||||
neighbourFieldName T;
|
||||
@ -54,7 +54,7 @@ dictionaryReplacement
|
||||
}
|
||||
rightSolid_to_topAir
|
||||
{
|
||||
type solidWallHeatFluxTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName topAir;
|
||||
neighbourPatchName topAir_to_rightSolid;
|
||||
neighbourFieldName T;
|
||||
|
||||
@ -62,7 +62,7 @@ dictionaryReplacement
|
||||
}
|
||||
topAir_to_leftSolid
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName leftSolid;
|
||||
neighbourPatchName leftSolid_to_topAir;
|
||||
neighbourFieldName T;
|
||||
@ -72,7 +72,7 @@ dictionaryReplacement
|
||||
}
|
||||
topAir_to_heater
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName heater;
|
||||
neighbourPatchName heater_to_topAir;
|
||||
neighbourFieldName T;
|
||||
@ -81,7 +81,7 @@ dictionaryReplacement
|
||||
}
|
||||
topAir_to_rightSolid
|
||||
{
|
||||
type solidWallTemperatureCoupled;
|
||||
type solidWallMixedTemperatureCoupled;
|
||||
neighbourRegionName rightSolid;
|
||||
neighbourPatchName rightSolid_to_topAir;
|
||||
neighbourFieldName T;
|
||||
@ -263,50 +263,50 @@ dictionaryReplacement
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 1000000;
|
||||
internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
maxY
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
topAir_to_leftSolid
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
topAir_to_heater
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
topAir_to_rightSolid
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1000000;
|
||||
value uniform 100000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user