mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
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;
|
||||
}
|
||||
|
||||
@ -44,7 +44,14 @@ int main(int argc, char *argv[])
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
IOprobes sniff(mesh, "probesDict", IOobject::MUST_READ, true);
|
||||
IOprobes sniff
|
||||
(
|
||||
probes::typeName,
|
||||
mesh,
|
||||
"probesDict",
|
||||
IOobject::MUST_READ,
|
||||
true
|
||||
);
|
||||
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
|
||||
@ -101,8 +101,23 @@ int main(int argc, char *argv[])
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
IOsampledSets sSets(mesh, "sampleDict", IOobject::MUST_READ, true);
|
||||
IOsampledSurfaces sSurfs(mesh, "sampleDict", IOobject::MUST_READ, true);
|
||||
IOsampledSets sSets
|
||||
(
|
||||
sampledSets::typeName,
|
||||
mesh,
|
||||
"sampleDict",
|
||||
IOobject::MUST_READ,
|
||||
true
|
||||
);
|
||||
|
||||
IOsampledSurfaces sSurfs
|
||||
(
|
||||
sampledSurfaces::typeName,
|
||||
mesh,
|
||||
"sampleDict",
|
||||
IOobject::MUST_READ,
|
||||
true
|
||||
);
|
||||
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
|
||||
@ -149,7 +149,7 @@ void getSymbolForRaw
|
||||
const word& address
|
||||
)
|
||||
{
|
||||
if (filename[0] == '/')
|
||||
if (filename.size() > 0 && filename[0] == '/')
|
||||
{
|
||||
string fcnt = pOpen
|
||||
(
|
||||
@ -220,6 +220,7 @@ void error::printStack(Ostream& os)
|
||||
if (lPos != string::npos && rPos != string::npos && lPos<rPos)
|
||||
{
|
||||
address = msg.substr(lPos+1, rPos-lPos-1);
|
||||
msg = msg.substr(0, lPos);
|
||||
}
|
||||
|
||||
string::size_type bracketPos = msg.find('(');
|
||||
|
||||
@ -65,8 +65,8 @@ inline void Foam::IOobject::writeBanner(Stream& os, bool noHint)
|
||||
"| ========= | |\n"
|
||||
"| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |\n"
|
||||
"| \\\\ / O peration | Version: " << FOAMversion << spaces << "|\n"
|
||||
"| \\\\ / A nd | |\n"
|
||||
"| \\\\/ M anipulation | www.OpenFOAM.org |\n"
|
||||
"| \\\\ / A nd | Web: www.OpenFOAM.org |\n"
|
||||
"| \\\\/ M anipulation | |\n"
|
||||
"\\*---------------------------------------------------------------------------*/\n";
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,12 @@ void Foam::Time::readDict()
|
||||
case wcAdjustableRunTime:
|
||||
// Recalculate outputTimeIndex_ to be in units of current
|
||||
// writeInterval.
|
||||
outputTimeIndex_ *= oldWriteInterval/writeInterval_;
|
||||
outputTimeIndex_ = label
|
||||
(
|
||||
outputTimeIndex_
|
||||
* oldWriteInterval
|
||||
/ writeInterval_
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@ -37,6 +37,11 @@ Description
|
||||
|
||||
const char* const Foam::FOAMversion = "WM_PROJECT_VERSION";
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Static initializers for string::null, word::null and fileName::null
|
||||
|
||||
#include "stringsGlobals.C"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Setup an error handler for the global new operator
|
||||
|
||||
|
||||
@ -33,7 +33,6 @@ License
|
||||
|
||||
const char* const Foam::fileName::typeName = "fileName";
|
||||
int Foam::fileName::debug(debug::debugSwitch(fileName::typeName, 0));
|
||||
const Foam::fileName Foam::fileName::null;
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ License
|
||||
|
||||
const char* const Foam::string::typeName = "string";
|
||||
int Foam::string::debug(debug::debugSwitch(string::typeName, 0));
|
||||
const Foam::string Foam::string::null;
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
45
src/OpenFOAM/primitives/strings/stringsGlobals.C
Normal file
45
src/OpenFOAM/primitives/strings/stringsGlobals.C
Normal file
@ -0,0 +1,45 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
Description
|
||||
Static initializers for
|
||||
Foam::string::null
|
||||
Foam::word::null
|
||||
Foam::fileName::null.
|
||||
This file is included in global.Cver since these members are required by
|
||||
debug.C.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "string.H"
|
||||
#include "word.H"
|
||||
#include "fileName.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::string Foam::string::null;
|
||||
const Foam::word Foam::word::null;
|
||||
const Foam::fileName Foam::fileName::null;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -31,6 +31,5 @@ License
|
||||
|
||||
const char* const Foam::word::typeName = "word";
|
||||
int Foam::word::debug(Foam::debug::debugSwitch(word::typeName, 0));
|
||||
const Foam::word Foam::word::null;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -44,7 +44,6 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Return a string representation of an uint
|
||||
word name(const unsigned int i)
|
||||
{
|
||||
std::ostringstream osBuffer;
|
||||
@ -66,7 +65,7 @@ Istream& operator>>(Istream& is, unsigned int& i)
|
||||
|
||||
if (t.isLabel())
|
||||
{
|
||||
i = uint(t.labelToken());
|
||||
i = unsigned(t.labelToken());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -59,7 +59,7 @@ const NamedEnum<shellSurfaces::refineMode, 3> shellSurfaces::refineModeNames_;
|
||||
|
||||
void Foam::shellSurfaces::setAndCheckLevels
|
||||
(
|
||||
const scalar shellI,
|
||||
const label shellI,
|
||||
const List<Tuple2<scalar, label> >& distLevels
|
||||
)
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ private:
|
||||
//- Helper function for initialisation.
|
||||
void setAndCheckLevels
|
||||
(
|
||||
const scalar shellI,
|
||||
const label shellI,
|
||||
const List<Tuple2<scalar, label> >&
|
||||
);
|
||||
|
||||
|
||||
@ -78,11 +78,14 @@ Type Foam::Table<Type>::value(const scalar x) const
|
||||
i++;
|
||||
}
|
||||
|
||||
// Linear interpolation to find value
|
||||
return
|
||||
// Linear interpolation to find value. Note constructor needed for
|
||||
// Table<label> to convert intermediate scalar back to label.
|
||||
return Type
|
||||
(
|
||||
(x - table_[i].first())/(table_[i+1].first() - table_[i].first())
|
||||
* (table_[i+1].second() - table_[i].second())
|
||||
+ table_[i].second();
|
||||
+ table_[i].second()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ Foam::scalar Foam::pairPotential::forceLookup(const scalar r) const
|
||||
{
|
||||
scalar k_rIJ = (r - rMin_)/dr_;
|
||||
|
||||
label k(k_rIJ);
|
||||
label k = label(k_rIJ);
|
||||
|
||||
if (k < 0)
|
||||
{
|
||||
@ -135,7 +135,7 @@ Foam::scalar Foam::pairPotential::energyLookup(const scalar r) const
|
||||
{
|
||||
scalar k_rIJ = (r - rMin_)/dr_;
|
||||
|
||||
label k(k_rIJ);
|
||||
label k = label(k_rIJ);
|
||||
|
||||
if (k < 0)
|
||||
{
|
||||
|
||||
@ -32,6 +32,7 @@ License
|
||||
template<class OutputFilter>
|
||||
Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
|
||||
(
|
||||
const word& outputFilterName,
|
||||
const objectRegistry& obr,
|
||||
const fileName& dictName,
|
||||
const IOobject::readOption rOpt,
|
||||
@ -49,7 +50,7 @@ Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
OutputFilter(OutputFilter::typeName, obr, *this, readFromFiles)
|
||||
OutputFilter(outputFilterName, obr, *this, readFromFiles)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ class IOOutputFilter
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct and assignment
|
||||
// Disallow default bitwise copy construct and assignment
|
||||
IOOutputFilter(const IOOutputFilter&);
|
||||
void operator=(const IOOutputFilter&);
|
||||
|
||||
@ -74,6 +74,7 @@ public:
|
||||
// Allow the possibility to load fields from files
|
||||
IOOutputFilter
|
||||
(
|
||||
const word& outputFilterName,
|
||||
const objectRegistry&,
|
||||
const fileName& dictName = OutputFilter::typeName() + "Dict",
|
||||
const IOobject::readOption rOpt = IOobject::MUST_READ,
|
||||
@ -81,9 +82,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~IOOutputFilter();
|
||||
//- Destructor
|
||||
virtual ~IOOutputFilter();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -78,6 +78,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
|
||||
(
|
||||
new IOOutputFilter<OutputFilter>
|
||||
(
|
||||
name_,
|
||||
time_.lookupObject<objectRegistry>(regionName_),
|
||||
dictName_
|
||||
)
|
||||
|
||||
@ -102,7 +102,7 @@ bool Foam::sampledSets::checkFieldTypes()
|
||||
nFields += grep(symmTensorFields_, fieldTypes);
|
||||
nFields += grep(tensorFields_, fieldTypes);
|
||||
|
||||
if (Pstream::master)
|
||||
if (Pstream::master())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -26,7 +26,6 @@ License
|
||||
|
||||
#include "laminar.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "wallDist.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
.SUFFIXES: .L
|
||||
|
||||
Ltoo = flex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
|
||||
Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
|
||||
|
||||
.L.dep:
|
||||
$(MAKE_DEP)
|
||||
|
||||
Reference in New Issue
Block a user