erge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x
This commit is contained in:
commit
3aee371e7c
13 changed files with 384 additions and 22 deletions
|
|
@ -19,16 +19,7 @@
|
||||||
).fvmDiv(phi, alpha1)
|
).fvmDiv(phi, alpha1)
|
||||||
);
|
);
|
||||||
|
|
||||||
solve
|
solve(alpha1Eqn);
|
||||||
(
|
|
||||||
alpha1Eqn
|
|
||||||
- fv::gaussLaplacianScheme<scalar, scalar>
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
linear<scalar>(mesh),
|
|
||||||
fv::uncorrectedSnGrad<scalar>(mesh)
|
|
||||||
).fvmLaplacian(fvc::interpolate(turbulence->nut()), alpha1)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Phase-1 volume fraction = "
|
Info<< "Phase-1 volume fraction = "
|
||||||
<< alpha1.weightedAverage(mesh.Vsc()).value()
|
<< alpha1.weightedAverage(mesh.Vsc()).value()
|
||||||
|
|
@ -42,6 +33,7 @@
|
||||||
if (alphaApplyPrevCorr && tphiAlphaCorr0.valid())
|
if (alphaApplyPrevCorr && tphiAlphaCorr0.valid())
|
||||||
{
|
{
|
||||||
Info<< "Applying the previous iteration correction flux" << endl;
|
Info<< "Applying the previous iteration correction flux" << endl;
|
||||||
|
|
||||||
#ifdef LTSSOLVE
|
#ifdef LTSSOLVE
|
||||||
MULES::LTScorrect
|
MULES::LTScorrect
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@
|
||||||
|
|
||||||
// Apply the diffusion term separately to allow implicit solution
|
// Apply the diffusion term separately to allow implicit solution
|
||||||
// and boundedness of the explicit advection
|
// and boundedness of the explicit advection
|
||||||
if (!MULESCorr)
|
|
||||||
{
|
{
|
||||||
fvScalarMatrix alpha1Eqn
|
fvScalarMatrix alpha1Eqn
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -503,6 +503,7 @@ $(mapPolyMesh)/faceMapper/faceMapper.C
|
||||||
$(mapPolyMesh)/cellMapper/cellMapper.C
|
$(mapPolyMesh)/cellMapper/cellMapper.C
|
||||||
$(mapPolyMesh)/mapDistribute/mapDistribute.C
|
$(mapPolyMesh)/mapDistribute/mapDistribute.C
|
||||||
$(mapPolyMesh)/mapDistribute/mapDistributePolyMesh.C
|
$(mapPolyMesh)/mapDistribute/mapDistributePolyMesh.C
|
||||||
|
$(mapPolyMesh)/mapDistribute/IOmapDistribute.C
|
||||||
$(mapPolyMesh)/mapAddedPolyMesh.C
|
$(mapPolyMesh)/mapAddedPolyMesh.C
|
||||||
|
|
||||||
PrimitivePatch = $(primitiveMesh)/PrimitivePatch
|
PrimitivePatch = $(primitiveMesh)/PrimitivePatch
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,159 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||||
|
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "IOmapDistribute.H"
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(IOmapDistribute, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::IOmapDistribute::IOmapDistribute(const IOobject& io)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
// Temporary warning
|
||||||
|
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
|
||||||
|
{
|
||||||
|
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)")
|
||||||
|
<< "IOmapDistribute " << name()
|
||||||
|
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
|
||||||
|
" but IOmapDistribute does not support automatic rereading."
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| io.readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
||||||
|
)
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readStream(typeName) >> *this;
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::IOmapDistribute::IOmapDistribute
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const mapDistribute& map
|
||||||
|
)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
// Temporary warning
|
||||||
|
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
|
||||||
|
{
|
||||||
|
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)")
|
||||||
|
<< "IOmapDistribute " << name()
|
||||||
|
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
|
||||||
|
" but IOmapDistribute does not support automatic rereading."
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| io.readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
||||||
|
)
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readStream(typeName) >> *this;
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mapDistribute::operator=(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::IOmapDistribute::IOmapDistribute
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const Xfer<mapDistribute>& map
|
||||||
|
)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
// Temporary warning
|
||||||
|
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
|
||||||
|
{
|
||||||
|
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)")
|
||||||
|
<< "IOmapDistribute " << name()
|
||||||
|
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
|
||||||
|
" but IOmapDistribute does not support automatic rereading."
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
mapDistribute::transfer(map());
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| io.readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
||||||
|
)
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readStream(typeName) >> *this;
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::IOmapDistribute::~IOmapDistribute()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::IOmapDistribute::readData(Istream& is)
|
||||||
|
{
|
||||||
|
return (is >> *this).good();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::IOmapDistribute::writeData(Ostream& os) const
|
||||||
|
{
|
||||||
|
return (os << *this).good();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||||
|
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::IOmapDistribute
|
||||||
|
|
||||||
|
Description
|
||||||
|
IOmapDistribute is derived from mapDistribute and
|
||||||
|
IOobject to give the mapDistribute
|
||||||
|
automatic IO functionality via the objectRegistry.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
IOmapDistribute.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef IOmapDistribute_H
|
||||||
|
#define IOmapDistribute_H
|
||||||
|
|
||||||
|
#include "mapDistribute.H"
|
||||||
|
#include "regIOobject.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class IOmapDistribute Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class IOmapDistribute
|
||||||
|
:
|
||||||
|
public regIOobject,
|
||||||
|
public mapDistribute
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("mapDistribute");
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct given an IOobject
|
||||||
|
IOmapDistribute(const IOobject&);
|
||||||
|
|
||||||
|
//- Construct given an IOobject and mapDistribute
|
||||||
|
IOmapDistribute(const IOobject&, const mapDistribute&);
|
||||||
|
|
||||||
|
//- Construct by transferring the mapDistribute contents
|
||||||
|
IOmapDistribute(const IOobject&, const Xfer<mapDistribute>&);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~IOmapDistribute();
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
//- ReadData function required for regIOobject read operation
|
||||||
|
virtual bool readData(Istream&);
|
||||||
|
|
||||||
|
//- WriteData function required for regIOobject write operation
|
||||||
|
virtual bool writeData(Ostream&) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -1341,4 +1341,31 @@ void Foam::mapDistribute::operator=(const mapDistribute& rhs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Istream Operator * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::Istream& Foam::operator>>(Istream& is, mapDistribute& map)
|
||||||
|
{
|
||||||
|
is.fatalCheck("operator>>(Istream&, mapDistribute&)");
|
||||||
|
|
||||||
|
is >> map.constructSize_ >> map.subMap_ >> map.constructMap_
|
||||||
|
>> map.transformElements_ >> map.transformStart_;
|
||||||
|
|
||||||
|
return is;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::Ostream& Foam::operator<<(Ostream& os, const mapDistribute& map)
|
||||||
|
{
|
||||||
|
os << map.constructSize_ << token::NL
|
||||||
|
<< map.subMap_ << token::NL
|
||||||
|
<< map.constructMap_ << token::NL
|
||||||
|
<< map.transformElements_ << token::NL
|
||||||
|
<< map.transformStart_ << token::NL;
|
||||||
|
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -676,6 +676,15 @@ public:
|
||||||
|
|
||||||
void operator=(const mapDistribute&);
|
void operator=(const mapDistribute&);
|
||||||
|
|
||||||
|
|
||||||
|
// IOstream operators
|
||||||
|
|
||||||
|
//- Read dictionary from Istream
|
||||||
|
friend Istream& operator>>(Istream&, mapDistribute&);
|
||||||
|
|
||||||
|
//- Write dictionary to Ostream
|
||||||
|
friend Ostream& operator<<(Ostream&, const mapDistribute&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -107,6 +107,7 @@ void Foam::MULES::correct
|
||||||
psiMax, psiMin,
|
psiMax, psiMin,
|
||||||
nLimiterIter
|
nLimiterIter
|
||||||
);
|
);
|
||||||
|
|
||||||
correct(rDeltaT, rho, psi, phi, phiCorr, Sp, Su);
|
correct(rDeltaT, rho, psi, phi, phiCorr, Sp, Su);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -172,6 +173,13 @@ void Foam::MULES::limiterCorr
|
||||||
|
|
||||||
const fvMesh& mesh = psi.mesh();
|
const fvMesh& mesh = psi.mesh();
|
||||||
|
|
||||||
|
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
|
||||||
|
|
||||||
|
scalar extremaCoeff
|
||||||
|
(
|
||||||
|
MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
const labelUList& owner = mesh.owner();
|
const labelUList& owner = mesh.owner();
|
||||||
const labelUList& neighb = mesh.neighbour();
|
const labelUList& neighb = mesh.neighbour();
|
||||||
tmp<volScalarField::DimensionedInternalField> tVsc = mesh.Vsc();
|
tmp<volScalarField::DimensionedInternalField> tVsc = mesh.Vsc();
|
||||||
|
|
@ -283,8 +291,8 @@ void Foam::MULES::limiterCorr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
psiMaxn = min(psiMaxn, psiMax);
|
psiMaxn = min(psiMaxn + extremaCoeff*(psiMax - psiMin), psiMax);
|
||||||
psiMinn = max(psiMinn, psiMin);
|
psiMinn = max(psiMinn - extremaCoeff*(psiMax - psiMin), psiMin);
|
||||||
|
|
||||||
// scalar smooth = 0.5;
|
// scalar smooth = 0.5;
|
||||||
// psiMaxn = min((1.0 - smooth)*psiIf + smooth*psiMaxn, psiMax);
|
// psiMaxn = min((1.0 - smooth)*psiIf + smooth*psiMaxn, psiMax);
|
||||||
|
|
|
||||||
|
|
@ -334,8 +334,14 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||||
|
|
||||||
p.stepFraction() = newStepFraction;
|
p.stepFraction() = newStepFraction;
|
||||||
|
|
||||||
|
bool calcParcel = true;
|
||||||
|
if (!tracking && td.cloud().solution().steadyState())
|
||||||
|
{
|
||||||
|
calcParcel = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Avoid problems with extremely small timesteps
|
// Avoid problems with extremely small timesteps
|
||||||
if (dt > ROOTVSMALL)
|
if ((dt > ROOTVSMALL) && calcParcel)
|
||||||
{
|
{
|
||||||
// Update cell based properties
|
// Update cell based properties
|
||||||
p.setCellValues(td, dt, cellI);
|
p.setCellValues(td, dt, cellI);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -700,4 +700,38 @@ Foam::label Foam::edgeIntersections::removeDegenerates
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::edgeIntersections::replace
|
||||||
|
(
|
||||||
|
const edgeIntersections& subInfo,
|
||||||
|
const labelList& edgeMap,
|
||||||
|
const labelList& faceMap
|
||||||
|
)
|
||||||
|
{
|
||||||
|
forAll(subInfo, subI)
|
||||||
|
{
|
||||||
|
const List<pointIndexHit>& subHits = subInfo[subI];
|
||||||
|
const labelList& subClass = subInfo.classification()[subI];
|
||||||
|
|
||||||
|
label edgeI = edgeMap[subI];
|
||||||
|
List<pointIndexHit>& intersections = operator[](edgeI);
|
||||||
|
labelList& intersectionTypes = classification_[edgeI];
|
||||||
|
|
||||||
|
intersections.setSize(subHits.size());
|
||||||
|
intersectionTypes.setSize(subHits.size());
|
||||||
|
|
||||||
|
forAll(subHits, i)
|
||||||
|
{
|
||||||
|
const pointIndexHit& subHit = subHits[i];
|
||||||
|
intersections[i] = pointIndexHit
|
||||||
|
(
|
||||||
|
subHit.hit(),
|
||||||
|
subHit.rawPoint(),
|
||||||
|
faceMap[subHit.index()]
|
||||||
|
);
|
||||||
|
intersectionTypes[i] = subClass[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -197,6 +197,15 @@ public:
|
||||||
const scalarField& surf1PointTol,
|
const scalarField& surf1PointTol,
|
||||||
pointField& points1
|
pointField& points1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Replace edge intersection for a subset (given as edge map and
|
||||||
|
// face map - for face indices stored in pointIndexHit.index())
|
||||||
|
void replace
|
||||||
|
(
|
||||||
|
const edgeIntersections&,
|
||||||
|
const labelList& edgeMap,
|
||||||
|
const labelList& faceMap
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||||
q_(p.size(), 0.0),
|
q_(p.size(), 0.0),
|
||||||
h_(p.size(), 0.0),
|
h_(p.size(), 0.0),
|
||||||
Ta_(p.size(), 0.0),
|
Ta_(p.size(), 0.0),
|
||||||
|
QrName_("undefined-Qr"),
|
||||||
thicknessLayers_(),
|
thicknessLayers_(),
|
||||||
kappaLayers_()
|
kappaLayers_()
|
||||||
{
|
{
|
||||||
|
|
@ -93,6 +94,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||||
q_(ptf.q_, mapper),
|
q_(ptf.q_, mapper),
|
||||||
h_(ptf.h_, mapper),
|
h_(ptf.h_, mapper),
|
||||||
Ta_(ptf.Ta_, mapper),
|
Ta_(ptf.Ta_, mapper),
|
||||||
|
QrName_(ptf.QrName_),
|
||||||
thicknessLayers_(ptf.thicknessLayers_),
|
thicknessLayers_(ptf.thicknessLayers_),
|
||||||
kappaLayers_(ptf.kappaLayers_)
|
kappaLayers_(ptf.kappaLayers_)
|
||||||
{}
|
{}
|
||||||
|
|
@ -112,6 +114,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||||
q_(p.size(), 0.0),
|
q_(p.size(), 0.0),
|
||||||
h_(p.size(), 0.0),
|
h_(p.size(), 0.0),
|
||||||
Ta_(p.size(), 0.0),
|
Ta_(p.size(), 0.0),
|
||||||
|
QrName_(dict.lookupOrDefault<word>("Qr", "none")),
|
||||||
thicknessLayers_(),
|
thicknessLayers_(),
|
||||||
kappaLayers_()
|
kappaLayers_()
|
||||||
{
|
{
|
||||||
|
|
@ -181,6 +184,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||||
q_(tppsf.q_),
|
q_(tppsf.q_),
|
||||||
h_(tppsf.h_),
|
h_(tppsf.h_),
|
||||||
Ta_(tppsf.Ta_),
|
Ta_(tppsf.Ta_),
|
||||||
|
QrName_(tppsf.QrName_),
|
||||||
thicknessLayers_(tppsf.thicknessLayers_),
|
thicknessLayers_(tppsf.thicknessLayers_),
|
||||||
kappaLayers_(tppsf.kappaLayers_)
|
kappaLayers_(tppsf.kappaLayers_)
|
||||||
{}
|
{}
|
||||||
|
|
@ -199,6 +203,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||||
q_(tppsf.q_),
|
q_(tppsf.q_),
|
||||||
h_(tppsf.h_),
|
h_(tppsf.h_),
|
||||||
Ta_(tppsf.Ta_),
|
Ta_(tppsf.Ta_),
|
||||||
|
QrName_(tppsf.QrName_),
|
||||||
thicknessLayers_(tppsf.thicknessLayers_),
|
thicknessLayers_(tppsf.thicknessLayers_),
|
||||||
kappaLayers_(tppsf.kappaLayers_)
|
kappaLayers_(tppsf.kappaLayers_)
|
||||||
{}
|
{}
|
||||||
|
|
@ -245,6 +250,12 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||||
const scalarField Tp(*this);
|
const scalarField Tp(*this);
|
||||||
scalarField hp(patch().size(), 0.0);
|
scalarField hp(patch().size(), 0.0);
|
||||||
|
|
||||||
|
scalarField Qr(Tp.size(), 0.0);
|
||||||
|
if (QrName_ != "none")
|
||||||
|
{
|
||||||
|
Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_);
|
||||||
|
}
|
||||||
|
|
||||||
switch (mode_)
|
switch (mode_)
|
||||||
{
|
{
|
||||||
case fixedHeatFlux:
|
case fixedHeatFlux:
|
||||||
|
|
@ -281,15 +292,17 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||||
|
|
||||||
if (mode_ == fixedHeatFlux)
|
if (mode_ == fixedHeatFlux)
|
||||||
{
|
{
|
||||||
refGrad() = q_/kappa(Tp);
|
refGrad() = (q_ + Qr)/kappa(Tp);
|
||||||
refValue() = 0.0;
|
refValue() = 0.0;
|
||||||
valueFraction() = 0.0;
|
valueFraction() = 0.0;
|
||||||
}
|
}
|
||||||
else if (mode_ == fixedHeatTransferCoeff)
|
else if (mode_ == fixedHeatTransferCoeff)
|
||||||
{
|
{
|
||||||
|
Qr /= Tp;
|
||||||
refGrad() = 0.0;
|
refGrad() = 0.0;
|
||||||
refValue() = Ta_;
|
refValue() = hp*Ta_/(hp - Qr);
|
||||||
valueFraction() = hp/(hp + kappa(Tp)*patch().deltaCoeffs());
|
valueFraction() =
|
||||||
|
(hp - Qr)/((hp - Qr) + kappa(Tp)*patch().deltaCoeffs());
|
||||||
}
|
}
|
||||||
|
|
||||||
mixedFvPatchScalarField::updateCoeffs();
|
mixedFvPatchScalarField::updateCoeffs();
|
||||||
|
|
@ -318,9 +331,11 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
temperatureCoupledBase::write(os);
|
temperatureCoupledBase::write(os);
|
||||||
|
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||||
|
|
||||||
switch (mode_)
|
switch (mode_)
|
||||||
{
|
{
|
||||||
|
|
||||||
case fixedHeatFlux:
|
case fixedHeatFlux:
|
||||||
{
|
{
|
||||||
q_.writeEntry("q", os);
|
q_.writeEntry("q", os);
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ Description
|
||||||
thicknessLayers | list of thicknesses per layer [m] | yes |
|
thicknessLayers | list of thicknesses per layer [m] | yes |
|
||||||
kappaLayers | list of thermal conductivites per layer [W/m/K] | yes |
|
kappaLayers | list of thermal conductivites per layer [W/m/K] | yes |
|
||||||
kappaName | name of thermal conductivity field | yes |
|
kappaName | name of thermal conductivity field | yes |
|
||||||
|
QrName | name of the radiative field | no | no
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
|
|
@ -75,6 +76,7 @@ Description
|
||||||
kappaLayers (1 2 3 4)
|
kappaLayers (1 2 3 4)
|
||||||
value uniform 300.0;
|
value uniform 300.0;
|
||||||
kappaName none;
|
kappaName none;
|
||||||
|
QrName none;
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
|
@ -137,6 +139,9 @@ private:
|
||||||
//- Ambient temperature / [K]
|
//- Ambient temperature / [K]
|
||||||
scalarField Ta_;
|
scalarField Ta_;
|
||||||
|
|
||||||
|
//- Name of the radiative heat flux
|
||||||
|
const word QrName_;
|
||||||
|
|
||||||
//- Thickness of layers
|
//- Thickness of layers
|
||||||
scalarList thicknessLayers_;
|
scalarList thicknessLayers_;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue