GIT: Resolved merge conflict

This commit is contained in:
andy
2014-01-10 09:59:37 +00:00
267 changed files with 1828 additions and 7849 deletions

View File

@ -14,6 +14,7 @@ heatTransferModels/RanzMarshall/RanzMarshall.C
liftModels/liftModel/liftModel.C
liftModels/liftModel/newLiftModel.C
liftModels/noLift/noLift.C
liftModels/constantCoefficient/constantCoefficient.C
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels

View File

@ -56,7 +56,8 @@ Foam::liftModels::constantCoefficient::constantCoefficient
)
:
liftModel(dict, alpha1, phase1, phase2),
Cl_("Cl", dimless, dict.lookup("Cl"))
coeffDict_(dict.subDict(typeName + "Coeffs")),
Cl_("Cl", dimless, coeffDict_.lookup("Cl"))
{}

View File

@ -53,6 +53,9 @@ class constantCoefficient
{
// Private data
//- Coefficient dictionary
const dictionary& coeffDict_;
//- Constant lift coefficient
dimensionedScalar Cl_;

View File

@ -85,6 +85,10 @@ public:
// Constructors
//- Construct null
liftModel();
//- Construct from components
liftModel
(
const dictionary& dict,

View File

@ -61,7 +61,7 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
return
cstrIter()
(
dict.subDict(phase1.name()).subDict(liftModelType + "Coeffs"),
dict.subDict(phase1.name()),
alpha1,
phase1,
phase2

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "noLift.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
defineTypeNameAndDebug(noLift, 0);
addToRunTimeSelectionTable
(
liftModel,
noLift,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::liftModels::noLift::noLift
(
const dictionary& dict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
liftModel(dict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::liftModels::noLift::~noLift()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F
(
const volVectorField& U
) const
{
return
tmp<volVectorField>
(
new volVectorField
(
IOobject
(
"zero",
U.time().timeName(),
U.mesh()
),
U.mesh(),
dimensionedVector
(
"zero",
dimensionSet(1, -2, -2, 0, 0, 0, 0),
vector::zero
)
)
);
}
// ************************************************************************* //

View File

@ -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::liftModels::noLift
Description
SourceFiles
noLift.C
\*---------------------------------------------------------------------------*/
#ifndef noLift_H
#define noLift_H
#include "liftModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
/*---------------------------------------------------------------------------*\
Class noLift Declaration
\*---------------------------------------------------------------------------*/
class noLift
:
public liftModel
{
// Private data
//- Constant lift coefficient
dimensionedScalar Cl_;
public:
//- Runtime type information
TypeName("none");
// Constructors
//- Construct from components
noLift
(
const dictionary& dict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~noLift();
// Member Functions
//- Lift force
tmp<volVectorField> F(const volVectorField& U) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace liftModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -55,8 +55,6 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
phase_(phase),
draga_(phase.fluid().drag1()),
viscosityModel_
(
kineticTheoryModels::viscosityModel::New
@ -401,7 +399,11 @@ void Foam::RASModels::kineticTheoryModel::correct()
(
alpha*(1.0 - alpha),
phase_.fluid().residualPhaseFraction()
)*draga_.K(magUr + phase_.fluid().residualSlip())/rho
)
*phase_.fluid().drag(phase_).K
(
magUr + phase_.fluid().residualSlip()
)/rho
);
// Eq. 3.25, p. 50 Js = J1 - J2

View File

@ -82,8 +82,8 @@ class kineticTheoryModel
const phaseModel& phase_;
//- Drag model
const dragModel& draga_;
////- Drag model
//const dragModel& draga_;
// Sub-models

View File

@ -82,7 +82,7 @@ class twoPhaseSystem
//- Total volumetric flux
surfaceScalarField phi_;
//-
//- Dilatation term
volScalarField dgdt_;
//- Surface tension coefficient
@ -224,7 +224,7 @@ public:
return phi_;
}
//- Return
//- Return the dilatation term
const volScalarField& dgdt() const
{
return dgdt_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -475,7 +475,11 @@ int main(int argc, char *argv[])
word regionName = polyMesh::defaultRegion;
word regionDir = word::null;
if (args.optionReadIfPresent("region", regionName))
if
(
args.optionReadIfPresent("region", regionName)
&& regionName != polyMesh::defaultRegion
)
{
regionDir = regionName;
Info<< "Operating on region " << regionName << nl << endl;
@ -578,7 +582,7 @@ int main(int argc, char *argv[])
// Loop over all times
forAll(Times, timeI)
for (label timeI = startTime; timeI < endTime; timeI++)
{
// Set time for global database
runTime.setTime(Times[timeI], timeI);
@ -591,6 +595,19 @@ int main(int argc, char *argv[])
databases[procI].setTime(Times[timeI], timeI);
}
const fileName meshPath =
databases[0].path()
/databases[0].timeName()
/regionDir
/polyMesh::meshSubDir;
if (!isFile(meshPath/"faces"))
{
Info<< "No mesh." << nl << endl;
continue;
}
// Read point on individual processors to determine merge tolerance
// (otherwise single cell domains might give problems)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -458,6 +458,8 @@ int main(int argc, char *argv[])
regIOobject::fileModificationChecking = regIOobject::timeStamp;
# include "createTime.H"
runTime.functionObjects().off();
word regionName = polyMesh::defaultRegion;
fileName meshSubDir;

View File

@ -1,9 +1,11 @@
EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
EXE_LIBS = \
-lsampling \
-ltriSurface \
-lsurfMesh \
-lmeshTools

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,6 +39,7 @@ Description
#include "surfaceIntersection.H"
#include "SortableList.H"
#include "PatchTools.H"
#include "vtkSurfaceWriter.H"
using namespace Foam;
@ -183,6 +184,12 @@ int main(int argc, char *argv[])
"also check for self-intersection"
);
argList::addBoolOption
(
"splitNonManifold",
"split surface along non-manifold edges"
" (default split is fully disconnected)"
);
argList::addBoolOption
(
"verbose",
"verbose operation"
@ -198,6 +205,7 @@ int main(int argc, char *argv[])
const fileName surfFileName = args[1];
const bool checkSelfIntersect = args.optionFound("checkSelfIntersection");
const bool verbose = args.optionFound("verbose");
const bool splitNonManifold = args.optionFound("splitNonManifold");
Info<< "Reading surface from " << surfFileName << " ..." << nl << endl;
@ -565,56 +573,108 @@ int main(int argc, char *argv[])
// Check singly connected domain
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
labelList faceZone;
label numZones = surf.markZones(boolList(surf.nEdges(), false), faceZone);
Info<< "Number of unconnected parts : " << numZones << endl;
if (numZones > 1)
{
Info<< "Splitting surface into parts ..." << endl << endl;
fileName surfFileNameBase(surfFileName.name());
const word fileType = surfFileNameBase.ext();
// Strip extension
surfFileNameBase = surfFileNameBase.lessExt();
// If extension was .gz strip original extension
if (fileType == "gz")
boolList borderEdge(surf.nEdges(), false);
if (splitNonManifold)
{
surfFileNameBase = surfFileNameBase.lessExt();
}
for (label zone = 0; zone < numZones; zone++)
{
boolList includeMap(surf.size(), false);
forAll(faceZone, faceI)
const labelListList& eFaces = surf.edgeFaces();
forAll(eFaces, edgeI)
{
if (faceZone[faceI] == zone)
if (eFaces[edgeI].size() > 2)
{
includeMap[faceI] = true;
borderEdge[edgeI] = true;
}
}
}
labelList pointMap;
labelList faceMap;
labelList faceZone;
label numZones = surf.markZones(borderEdge, faceZone);
triSurface subSurf
(
surf.subsetMesh
Info<< "Number of unconnected parts : " << numZones << endl;
if (numZones > 1)
{
Info<< "Splitting surface into parts ..." << endl << endl;
fileName surfFileNameBase(surfFileName.name());
const word fileType = surfFileNameBase.ext();
// Strip extension
surfFileNameBase = surfFileNameBase.lessExt();
// If extension was .gz strip original extension
if (fileType == "gz")
{
surfFileNameBase = surfFileNameBase.lessExt();
}
{
Info<< "Writing zoning to "
<< fileName
(
"zone_"
+ surfFileNameBase
+ '.'
+ vtkSurfaceWriter::typeName
)
<< "..." << endl << endl;
// Convert data
scalarField scalarFaceZone(faceZone.size());
forAll(faceZone, i)
{
scalarFaceZone[i] = faceZone[i];
}
faceList faces(surf.size());
forAll(surf, i)
{
faces[i] = surf[i].triFaceFace();
}
vtkSurfaceWriter().write
(
includeMap,
pointMap,
faceMap
)
);
surfFileName.path(),
surfFileNameBase,
surf.points(),
faces,
"zone",
scalarFaceZone,
true
);
}
fileName subFileName(surfFileNameBase + "_" + name(zone) + ".obj");
Info<< "writing part " << zone << " size " << subSurf.size()
<< " to " << subFileName << endl;
for (label zone = 0; zone < numZones; zone++)
{
boolList includeMap(surf.size(), false);
subSurf.write(subFileName);
forAll(faceZone, faceI)
{
if (faceZone[faceI] == zone)
{
includeMap[faceI] = true;
}
}
labelList pointMap;
labelList faceMap;
triSurface subSurf
(
surf.subsetMesh
(
includeMap,
pointMap,
faceMap
)
);
fileName subName(surfFileNameBase + "_" + name(zone) + ".obj");
Info<< "writing part " << zone << " size " << subSurf.size()
<< " to " << subName << endl;
subSurf.write(subName);
}
}
}

View File

@ -188,12 +188,12 @@ Foam::OSstream& Foam::messageStream::operator()
Foam::OSstream& Foam::messageStream::operator()(const bool output)
{
if (output && level)
if (level)
{
bool collect = (severity_ == INFO || severity_ == WARNING);
// Report the error
if (collect)
if (!output && collect)
{
return Snull;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -652,7 +652,7 @@ Foam::Ostream& Foam::dimensionSet::write
os << token::BEGIN_SQR;
if (writeUnits.valid())
if (writeUnits.valid() && os.format() == IOstream::ASCII)
{
scalarField exponents(dimensionSet::nDimensions);
for (int d=0; d<dimensionSet::nDimensions; d++)

View File

@ -352,7 +352,11 @@ void Foam::GAMGSolver::Vcycle
// Scale coarse-grid correction field
// but not on the coarsest level because it evaluates to 1
if (scaleCorrection_ && leveli < coarsestLevel - 1)
if
(
scaleCorrection_
&& (interpolateCorrection_ || leveli < coarsestLevel - 1)
)
{
scale
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,7 +43,7 @@ Foam::Ostream& Foam::operator<<
os.write
(
reinterpret_cast<const char*>(&tbl.table_),
sizeof(tbl.table_)
tbl.table_.byteSize()
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -261,7 +261,7 @@ Foam::label Foam::UIPstream::read
(
buf,
bufSize,
MPI_PACKED,
MPI_BYTE,
fromProcNo,
tag,
PstreamGlobals::MPICommunicators_[communicator],
@ -317,7 +317,7 @@ Foam::label Foam::UIPstream::read
(
buf,
bufSize,
MPI_PACKED,
MPI_BYTE,
fromProcNo,
tag,
PstreamGlobals::MPICommunicators_[communicator],

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,7 +74,7 @@ bool Foam::UOPstream::write
(
const_cast<char*>(buf),
bufSize,
MPI_PACKED,
MPI_BYTE,
toProcNo, //procID(toProcNo),
tag,
PstreamGlobals::MPICommunicators_[communicator] //MPI_COMM_WORLD
@ -94,7 +94,7 @@ bool Foam::UOPstream::write
(
const_cast<char*>(buf),
bufSize,
MPI_PACKED,
MPI_BYTE,
toProcNo, //procID(toProcNo),
tag,
PstreamGlobals::MPICommunicators_[communicator] //MPI_COMM_WORLD
@ -116,7 +116,7 @@ bool Foam::UOPstream::write
(
const_cast<char*>(buf),
bufSize,
MPI_PACKED,
MPI_BYTE,
toProcNo, //procID(toProcNo),
tag,
PstreamGlobals::MPICommunicators_[communicator],//MPI_COMM_WORLD,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,15 +81,6 @@ private:
const label unmappedIndex
);
//- Map from old to new according to map. Handles map = -1.
template<class Type>
static void map
(
const Field<Type>&,
const labelList& map,
Field<Type>&
);
//- Update single volField.
template<class Type>
static void MapVolField

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,26 +30,6 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::fvMeshAdder::map
(
const Field<Type>& oldFld,
const labelList& oldToNew,
Field<Type>& fld
)
{
forAll(oldFld, cellI)
{
label newCellI = oldToNew[cellI];
if (newCellI >= 0 && newCellI < fld.size())
{
fld[newCellI] = oldFld[cellI];
}
}
}
template<class Type>
void Foam::fvMeshAdder::MapVolField
(
@ -73,8 +53,8 @@ void Foam::fvMeshAdder::MapVolField
intFld.setSize(mesh.nCells());
map(oldInternalField, meshMap.oldCellMap(), intFld);
map(fldToAdd.internalField(), meshMap.addedCellMap(), intFld);
intFld.rmap(oldInternalField, meshMap.oldCellMap());
intFld.rmap(fldToAdd.internalField(), meshMap.addedCellMap());
}
@ -156,7 +136,7 @@ void Foam::fvMeshAdder::MapVolField
oldPatchSizes[patchI],
meshMap.oldFaceMap(),
mesh.boundaryMesh()[newPatchI],
0 // unmapped value
-1 // unmapped value
)
);
@ -218,7 +198,7 @@ void Foam::fvMeshAdder::MapVolField
oldPatch.size(),
meshMap.addedFaceMap(),
newPatch,
0 // unmapped values
-1 // unmapped values
)
);
@ -241,34 +221,23 @@ void Foam::fvMeshAdder::MapVolField
// PatchField will have correct size already. Just slot in
// my elements.
// From new patch faces to patch faces on added mesh. This
// time keep unmapped elements -1.
labelList newToAdded
(
calcPatchMap
(
oldPatch.start(),
oldPatch.size(),
meshMap.addedFaceMap(),
newPatch,
-1 // unmapped values
)
);
const fvPatchField<Type>& addedFld =
fldToAdd.boundaryField()[patchI];
fvPatchField<Type>& newFld = bfld[newPatchI];
forAll(newFld, i)
labelList addedToNew(oldPatch.size(), -1);
forAll(addedToNew, i)
{
label oldFaceI = newToAdded[i];
if (oldFaceI >= 0 && oldFaceI < addedFld.size())
label addedFaceI = oldPatch.start()+i;
label newFaceI = meshMap.addedFaceMap()[addedFaceI];
label patchFaceI = newFaceI-newPatch.start();
if (patchFaceI >= 0 && patchFaceI < newPatch.size())
{
newFld[i] = addedFld[oldFaceI];
addedToNew[i] = patchFaceI;
}
}
bfld[newPatchI].rmap
(
fldToAdd.boundaryField()[patchI],
addedToNew
);
}
}
}
@ -375,8 +344,9 @@ void Foam::fvMeshAdder::MapSurfaceField
intFld.setSize(mesh.nInternalFaces());
map(oldField, meshMap.oldFaceMap(), intFld);
map(fldToAdd, meshMap.addedFaceMap(), intFld);
intFld.rmap(oldField, meshMap.oldFaceMap());
intFld.rmap(fldToAdd, meshMap.addedFaceMap());
// Faces that were boundary faces but are not anymore.
// Use owner value (so lowest numbered cell, i.e. from 'old' not 'added'
@ -474,13 +444,12 @@ void Foam::fvMeshAdder::MapSurfaceField
oldPatchSizes[patchI],
meshMap.oldFaceMap(),
mesh.boundaryMesh()[newPatchI],
0 // unmapped value
-1 // unmapped value
)
);
directFvPatchFieldMapper patchMapper(newToOld);
// Create new patchField with same type as existing one.
// Note:
// - boundaryField already in new order so access with newPatchI
@ -536,7 +505,7 @@ void Foam::fvMeshAdder::MapSurfaceField
oldPatch.size(),
meshMap.addedFaceMap(),
newPatch,
0 // unmapped values
-1 // unmapped values
)
);
@ -559,34 +528,23 @@ void Foam::fvMeshAdder::MapSurfaceField
// PatchField will have correct size already. Just slot in
// my elements.
// From new patch faces to patch faces on added mesh. This
// time keep unmapped elements -1.
labelList newToAdded
(
calcPatchMap
(
oldPatch.start(),
oldPatch.size(),
meshMap.addedFaceMap(),
newPatch,
-1 // unmapped values
)
);
const fvsPatchField<Type>& addedFld =
fldToAdd.boundaryField()[patchI];
fvsPatchField<Type>& newFld = bfld[newPatchI];
forAll(newFld, i)
labelList addedToNew(oldPatch.size(), -1);
forAll(addedToNew, i)
{
label oldFaceI = newToAdded[i];
if (oldFaceI >= 0 && oldFaceI < addedFld.size())
label addedFaceI = oldPatch.start()+i;
label newFaceI = meshMap.addedFaceMap()[addedFaceI];
label patchFaceI = newFaceI-newPatch.start();
if (patchFaceI >= 0 && patchFaceI < newPatch.size())
{
newFld[i] = addedFld[oldFaceI];
addedToNew[i] = patchFaceI;
}
}
bfld[newPatchI].rmap
(
fldToAdd.boundaryField()[patchI],
addedToNew
);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1058,7 +1058,7 @@ void Foam::fvMeshDistribute::sendMesh
const labelList& sourceProc,
const labelList& sourcePatch,
const labelList& sourceNewNbrProc,
UOPstream& toDomain
Ostream& toDomain
)
{
if (debug)
@ -1217,7 +1217,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
labelList& domainSourceProc,
labelList& domainSourcePatch,
labelList& domainSourceNewNbrProc,
UIPstream& fromNbr
Istream& fromNbr
)
{
pointField domainPoints(fromNbr);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -255,7 +255,7 @@ class fvMeshDistribute
const labelList& sourceProc,
const labelList& sourcePatch,
const labelList& sourceNewProc,
UOPstream& toDomain
Ostream& toDomain
);
//- Send subset of fields
template<class GeoField>
@ -264,7 +264,7 @@ class fvMeshDistribute
const label domain,
const wordList& fieldNames,
const fvMeshSubset&,
UOPstream& toNbr
Ostream& toNbr
);
//- Receive mesh. Opposite of sendMesh
@ -279,7 +279,7 @@ class fvMeshDistribute
labelList& domainSourceProc,
labelList& domainSourcePatch,
labelList& domainSourceNewProc,
UIPstream& fromNbr
Istream& fromNbr
);
//- Receive fields. Opposite of sendFields

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -216,7 +216,7 @@ void Foam::fvMeshDistribute::sendFields
const label domain,
const wordList& fieldNames,
const fvMeshSubset& subsetter,
UOPstream& toNbr
Ostream& toNbr
)
{
toNbr << GeoField::typeName << token::NL << token::BEGIN_BLOCK << token::NL;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -475,7 +475,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
{
scalarField targetFaceSizes(mesh_.nFaces(), -1);
const scalarField& cellVolumes = mesh_.cellVolumes();
const scalarField& V = mesh_.cellVolumes();
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
const labelList& cellOwner = mesh_.faceOwner();
@ -486,8 +486,8 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
// Calculate face size from cell volumes for internal faces
for (label intFaceI = 0; intFaceI < mesh_.nInternalFaces(); ++intFaceI)
{
const scalar cellOwnerVol = cellVolumes[cellOwner[intFaceI]];
const scalar cellNeighbourVol = cellVolumes[cellNeighbour[intFaceI]];
const scalar cellOwnerVol = max(0.0, V[cellOwner[intFaceI]]);
const scalar cellNeighbourVol = max(0.0, V[cellNeighbour[intFaceI]]);
scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0);
scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0);
@ -512,7 +512,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
forAll(faceCells, facei)
{
neiCellVolumes[bFaceI++] = cellVolumes[faceCells[facei]];
neiCellVolumes[bFaceI++] = max(0.0, V[faceCells[facei]]);
}
}
else
@ -522,7 +522,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
forAll(patch, patchFaceI)
{
const label extFaceI = patchFaceI + patch.start();
const scalar cellOwnerVol = cellVolumes[cellOwner[extFaceI]];
const scalar cellOwnerVol = max(0.0, V[cellOwner[extFaceI]]);
targetFaceSizes[extFaceI] = Foam::pow(cellOwnerVol, 1.0/3.0);
}
@ -542,7 +542,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
forAll(patch, patchFaceI)
{
const label localFaceI = patchFaceI + patch.start();
const scalar cellOwnerVol = cellVolumes[cellOwner[localFaceI]];
const scalar cellOwnerVol = max(0.0, V[cellOwner[localFaceI]]);
const scalar cellNeighbourVol = neiCellVolumes[bFaceI++];
scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,9 +102,10 @@ Foam::porosityModels::DarcyForchheimer::DarcyForchheimer
D_[zoneI][i].yy() = d.value().y();
D_[zoneI][i].zz() = d.value().z();
F_[zoneI][i].xx() = f.value().x();
F_[zoneI][i].yy() = f.value().y();
F_[zoneI][i].zz() = f.value().z();
// leading 0.5 is from 1/2*rho
F_[zoneI][i].xx() = 0.5*f.value().x();
F_[zoneI][i].yy() = 0.5*f.value().y();
F_[zoneI][i].zz() = 0.5*f.value().z();
}
D_[zoneI] = coordSys_.R().transformTensor(D_[zoneI], cells);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ Ostream& operator<<(Ostream& os, const porosityModelList& models);
class porosityModelList
:
PtrList<porosityModel>
public PtrList<porosityModel>
{
private:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,6 @@ SourceFiles
#define uniformTotalPressureFvPatchScalarField_H
#include "fixedValueFvPatchFields.H"
#include "interpolationTable.H"
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,8 +25,8 @@ License
#include "MGridGenGAMGAgglomeration.H"
#include "fvMesh.H"
#include "processorPolyPatch.H"
#include "addToRunTimeSelectionTable.H"
#include "processorLduInterface.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -43,6 +43,121 @@ namespace Foam
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::MGridGenGAMGAgglomeration::swap
(
const lduInterfacePtrsList& interfaces,
const labelUList& cellValues,
PtrList<labelList>& nbrValues
) const
{
// Initialise transfer of restrict addressing on the interface
forAll(interfaces, inti)
{
if (interfaces.set(inti))
{
interfaces[inti].initInternalFieldTransfer
(
Pstream::nonBlocking,
cellValues
);
}
}
if (Pstream::parRun())
{
Pstream::waitRequests();
}
// Get the interface agglomeration
nbrValues.setSize(interfaces.size());
forAll(interfaces, inti)
{
if (interfaces.set(inti))
{
nbrValues.set
(
inti,
new labelList
(
interfaces[inti].internalFieldTransfer
(
Pstream::nonBlocking,
cellValues
)
)
);
}
}
}
void Foam::MGridGenGAMGAgglomeration::getNbrAgglom
(
const lduAddressing& addr,
const lduInterfacePtrsList& interfaces,
const PtrList<labelList>& nbrGlobalAgglom,
labelList& cellToNbrAgglom
) const
{
cellToNbrAgglom.setSize(addr.size());
cellToNbrAgglom = -1;
forAll(interfaces, inti)
{
if (interfaces.set(inti))
{
if (isA<processorLduInterface>(interfaces[inti]))
{
const processorLduInterface& pldui =
refCast<const processorLduInterface>(interfaces[inti]);
if (pldui.myProcNo() > pldui.neighbProcNo())
{
const labelUList& faceCells =
interfaces[inti].faceCells();
const labelList& nbrData = nbrGlobalAgglom[inti];
forAll(faceCells, i)
{
cellToNbrAgglom[faceCells[i]] = nbrData[i];
}
}
}
}
}
}
void Foam::MGridGenGAMGAgglomeration::detectSharedFaces
(
const lduMesh& mesh,
const labelList& value,
labelHashSet& sharedFaces
) const
{
const lduAddressing& addr = mesh.lduAddr();
const labelUList& lower = addr.lowerAddr();
const labelUList& upper = addr.upperAddr();
sharedFaces.clear();
sharedFaces.resize(addr.lowerAddr().size()/100);
// Detect any faces inbetween same value
forAll(lower, faceI)
{
label lowerData = value[lower[faceI]];
label upperData = value[upper[faceI]];
if (lowerData != -1 && lowerData == upperData)
{
sharedFaces.insert(faceI);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
@ -58,6 +173,13 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
label minSize(readLabel(controlDict.lookup("minSize")));
label maxSize(readLabel(controlDict.lookup("maxSize")));
// Number of iterations applied to improve agglomeration consistency across
// processor boundaries
label nProcConsistencyIter
(
readLabel(controlDict.lookup("nProcConsistencyIter"))
);
// Start geometric agglomeration from the cell volumes and areas of the mesh
scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes());
@ -87,28 +209,6 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
}
}
/*
{
scalarField& magSb = *magSbPtr;
const polyBoundaryMesh& patches = fvMesh_.boundaryMesh();
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchi];
if (!(Pstream::parRun() && isA<processorPolyPatch>(pp)))
{
const labelUList& faceCells = pp.faceCells();
const vectorField& pSf = pp.faceAreas();
forAll(faceCells, pfi)
{
magSb[faceCells[pfi]] += mag(pSf[pfi]);
}
}
}
}
*/
// Agglomerate until the required number of cells in the coarsest level
// is reached
@ -129,6 +229,63 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
*magSbPtr
);
// Adjust weights only
for (int i=0; i<nProcConsistencyIter; i++)
{
const lduMesh& mesh = meshLevel(nCreatedLevels);
const lduAddressing& addr = mesh.lduAddr();
const lduInterfacePtrsList interfaces = mesh.interfaces();
const labelField& agglom = finalAgglomPtr();
// Global nubmering
const globalIndex globalNumbering(nCoarseCells);
labelField globalAgglom(addr.size());
forAll(agglom, cellI)
{
globalAgglom[cellI] = globalNumbering.toGlobal(agglom[cellI]);
}
// Get the interface agglomeration
PtrList<labelList> nbrGlobalAgglom;
swap(interfaces, globalAgglom, nbrGlobalAgglom);
// Get the interface agglomeration on a cell basis (-1 for all
// other cells)
labelList cellToNbrAgglom;
getNbrAgglom(addr, interfaces, nbrGlobalAgglom, cellToNbrAgglom);
// Mark all faces inbetween cells with same nbragglomeration
labelHashSet sharedFaces(addr.size()/100);
detectSharedFaces(mesh, cellToNbrAgglom, sharedFaces);
//- Note: in-place update of weights is more effective it seems?
// Should not be. fluke?
//scalarField weights(*faceWeightsPtr);
scalarField weights = *magSfPtr;
forAllConstIter(labelHashSet, sharedFaces, iter)
{
label faceI= iter.key();
weights[faceI] *= 2.0;
}
// Redo the agglomeration using the new weights
finalAgglomPtr = agglomerate
(
nCoarseCells,
minSize,
maxSize,
meshLevel(nCreatedLevels).lduAddr(),
*VPtr,
weights,
*magSbPtr
);
}
if (continueAgglomerating(nCoarseCells))
{
nCells_[nCreatedLevels] = nCoarseCells;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,6 +67,29 @@ class MGridGenGAMGAgglomeration
// Private Member Functions
void swap
(
const lduInterfacePtrsList& interfaces,
const labelUList& cellValues,
PtrList<labelList>& nbrValues
) const;
void getNbrAgglom
(
const lduAddressing& addr,
const lduInterfacePtrsList& interfaces,
const PtrList<labelList>& nbrGlobalAgglom,
labelList& cellToNbrAgglom
) const;
void detectSharedFaces
(
const lduMesh& mesh,
const labelList& value,
labelHashSet& sharedFaces
) const;
//- Construct the CSR format addressing
void makeCompactCellFaceAddressingAndFaceWeights
(

View File

@ -65,14 +65,14 @@ void Foam::fv::CodedSource<Type>::prepare
dynCode.setMakeOptions
(
"EXE_INC = -g \\\n"
"-I$(LIB_SRC)/fieldSources/lnInclude \\\n"
"-I$(LIB_SRC)/fvOptions/lnInclude \\\n"
"-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
"-I$(LIB_SRC)/meshTools/lnInclude \\\n"
"-I$(LIB_SRC)/sampling/lnInclude \\\n"
+ context.options()
+ "\n\nLIB_LIBS = \\\n"
+ " -lmeshTools \\\n"
+ " -lfieldSources \\\n"
+ " -lfvOptions \\\n"
+ " -lsampling \\\n"
+ " -lfiniteVolume \\\n"
+ context.libs()

View File

@ -25,44 +25,85 @@ Class
Foam::fv::codedSource
Description
Constructs on-the-fly source
Constructs on-the-fly fvOption source
The hook functions take the following arguments:
codeCorrect
(
GeometricField<Type, fvPatchField, volMesh>& fld
)
codeAddSup
(
fvMatrix<Type}>& eqn,
const label fieldI
)
setValue
(
fvMatrix<Type}>& eqn,
const label fieldI
)
where :
fld is the field in fieldNames
eqn is the fvMatrix
\heading Source usage
Example usage:
Example usage in controlDict:
\verbatim
vectorCodedSourceCoeffs
energySource
{
fieldNames (U);
redirectType ramp;
type scalarCodedSource;
codeCorrect
#{
Pout<< "**codeCorrect**" << endl;
#};
active true;
selectionMode all;
codeAddSup
#{
Pout<< "**codeAddSup**" << endl;
#};
scalarCodedSourceCoeffs
{
fieldNames (h);
redirectType sourceTime;
codeSetValue
#{
Pout<< "**codeSetValue**" << endl;
#};
codeInclude
#{
// Dummy entry. Make dependent on above to trigger recompilation
code
#{
$codeCorrect
$codeAddSup
$codeSetValue
#};
#};
codeCorrect
#{
Pout<< "**codeCorrect**" << endl;
#};
codeAddSup
#{
const Time& time = mesh().time();
const scalarField& V = mesh_.V();
scalarField& heSource = eqn.source();
heSource -= 0.1*sqr(time.value())*V;
#};
codeSetValue
#{
Pout<< "**codeSetValue**" << endl;
#};
// Dummy entry. Make dependent on above to trigger recompilation
code
#{
$codeInclude
$codeCorrect
$codeAddSup
$codeSetValue
#};
}
sourceTimeCoeffs
{
// Dummy entry
}
}
// Dummy entry
rampCoeffs
{}
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -173,7 +173,7 @@ void Foam::refinementFeatures::read
labelListList(0), // edgeNormals
labelListList(0), // featurePointNormals
labelListList(0), // featurePointEdges
labelList(0) // regionEdges
identity(newEdges.size()) // regionEdges
);
@ -313,6 +313,58 @@ void Foam::refinementFeatures::buildTrees(const label featI)
}
const Foam::PtrList<Foam::indexedOctree<Foam::treeDataEdge> >&
Foam::refinementFeatures::regionEdgeTrees() const
{
if (!regionEdgeTreesPtr_.valid())
{
regionEdgeTreesPtr_.reset
(
new PtrList<indexedOctree<treeDataEdge> >(size())
);
PtrList<indexedOctree<treeDataEdge> >& trees = regionEdgeTreesPtr_();
forAll(*this, featI)
{
const extendedEdgeMesh& eMesh = operator[](featI);
const pointField& points = eMesh.points();
const edgeList& edges = eMesh.edges();
// Calculate bb of all points
treeBoundBox bb(points);
// Random number generator. Bit dodgy since not exactly random ;-)
Random rndGen(65431);
// Slightly extended bb. Slightly off-centred just so on symmetric
// geometry there are less face/edge aligned items.
bb = bb.extend(rndGen, 1e-4);
bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
trees.set
(
featI,
new indexedOctree<treeDataEdge>
(
treeDataEdge
(
false, // do not cache bb
edges,
points,
eMesh.regionEdges()
),
bb, // overall search domain
8, // maxLevel
10, // leafsize
3.0 // duplicity
)
);
}
}
return regionEdgeTreesPtr_();
}
// Find maximum level of a shell.
void Foam::refinementFeatures::findHigherLevel
@ -543,6 +595,68 @@ void Foam::refinementFeatures::findNearestEdge
}
void Foam::refinementFeatures::findNearestRegionEdge
(
const pointField& samples,
const scalarField& nearestDistSqr,
labelList& nearFeature,
List<pointIndexHit>& nearInfo,
vectorField& nearNormal
) const
{
nearFeature.setSize(samples.size());
nearFeature = -1;
nearInfo.setSize(samples.size());
nearInfo = pointIndexHit();
nearNormal.setSize(samples.size());
nearNormal = vector::zero;
const PtrList<indexedOctree<treeDataEdge> >& regionTrees =
regionEdgeTrees();
forAll(regionTrees, featI)
{
const indexedOctree<treeDataEdge>& regionTree = regionTrees[featI];
forAll(samples, sampleI)
{
const point& sample = samples[sampleI];
scalar distSqr;
if (nearInfo[sampleI].hit())
{
distSqr = magSqr(nearInfo[sampleI].hitPoint()-sample);
}
else
{
distSqr = nearestDistSqr[sampleI];
}
// Find anything closer than current best
pointIndexHit info = regionTree.findNearest(sample, distSqr);
if (info.hit())
{
const treeDataEdge& td = regionTree.shapes();
nearFeature[sampleI] = featI;
nearInfo[sampleI] = pointIndexHit
(
info.hit(),
info.hitPoint(),
regionTree.shapes().edgeLabels()[info.index()]
);
const edge& e = td.edges()[nearInfo[sampleI].index()];
nearNormal[sampleI] = e.vec(td.points());
nearNormal[sampleI] /= mag(nearNormal[sampleI])+VSMALL;
}
}
}
}
//void Foam::refinementFeatures::findNearestPoint
//(
// const pointField& samples,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,6 +69,10 @@ private:
//- Features points
PtrList<indexedOctree<treeDataPoint> > pointTrees_;
//- Region edge trees (demand driven)
mutable autoPtr<PtrList<indexedOctree<treeDataEdge> > >
regionEdgeTreesPtr_;
// Private Member Functions
@ -100,6 +104,8 @@ protected:
}
const PtrList<indexedOctree<treeDataEdge> >& regionEdgeTrees() const;
public:
// Constructors
@ -149,6 +155,21 @@ public:
vectorField& nearNormal
) const;
//- Find nearest point on nearest region edge. Sets
// - nearFeature: index of feature mesh
// - nearInfo : location on feature edge and edge index
// (note: not feature edge index but index into
// edges() directly)
// - nearNormal : local feature edge normal
void findNearestRegionEdge
(
const pointField& samples,
const scalarField& nearestDistSqr,
labelList& nearFeature,
List<pointIndexHit>& nearInfo,
vectorField& nearNormal
) const;
//- Find nearest feature point. Sets
// - nearFeature: index of feature mesh
// - nearInfo : location on feature point and point index.

View File

@ -55,7 +55,7 @@ Description
In between ratio 0 and 1 the gradient and value contributions are
weighted using the ratio field in the followig way:
qConv = ratio*htcwfilm*(Tfilm - *this)*convectiveScaling_;
qConv = ratio*htcwfilm*(Tfilm - *this);
qRad = (1.0 - ratio)*Qr;
Then the solid can gain or loose energy through radiation or conduction

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,112 +39,114 @@ Description
- 2-D, normal and tangential components
The thermodynamic properties of the baffle material are specified via
dictionary entries.
dictionary entries on the master patch
\heading Patch usage
Example of the boundary condition specification:
\verbatim
myPatch
myPatch_master
{
type compressible::temperatureThermoBaffle;
type compressible::thermalBaffle;
// Underlaying coupled boundary condition
Tnbr T;
kappa fluidThermo; // or solidThermo
KappaName none;
QrNbr Qr;//or none.Name of Qr field on neighbourregion
Qr none;// or none.Name of Qr field on localregion
value uniform 300;
Tnbr T;
kappa fluidThermo; // or solidThermo
KappaName none;
QrNbr Qr;//or none.Name of Qr field on neighbourregion
Qr none;// or none.Name of Qr field on localregion
value uniform 300;
// Thermo baffle model
regionName baffleRegion; // solid region name
infoOutput yes;
active yes;
// Baffle region name
regionName baffleRegion;
active yes;
// Solid thermo in solid region
thermoType
{
type heSolidThermo;
mixture pureSolidMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
mixture
mixture
{
specie
{
specie
{
nMoles 1;
molWeight 20;
}
transport
{
kappa 0.01;
}
thermodynamics
{
Hf 0;
Cp 15;
}
density
{
rho 80;
}
nMoles 1;
molWeight 20;
}
transport
{
kappa 0.01;
}
thermodynamics
{
Hf 0;
Cp 15;
}
density
{
rho 80;
}
}
radiation
{
radiationModel opaqueSolid;
absorptionEmissionModel none;
scatterModel none;
}
radiation
{
radiationModel opaqueSolid;
absorptionEmissionModel none;
scatterModel none;
}
// Extrude model for new region
extrudeModel linearNormal;
nLayers 50;
expansionRatio 1;
columnCells false; //3D or 1D
linearNormalCoeffs
{
thickness 0.02;
}
extrudeModel linearNormal;
nLayers 50;
expansionRatio 1;
columnCells false; //3D or 1D
linearNormalCoeffs
{
thickness 0.02;
}
// New mesh polyPatch information
bottomCoeffs
{
name "bottom";
type mappedWall;
sampleMode nearestPatchFace;
samplePatch baffle3DWall_master;
offsetMode uniform;
offset (0 0 0);
}
topCoeffs
{
name "top";
type mappedWall;
sampleMode nearestPatchFace;
samplePatch baffle3DWall_slave;
offsetMode uniform;
offset (0 0 0);
}
sideCoeffs
{
name "side";
type patch;
}
}
\endverbatim
/- Slave patch on primary region
\verbatim
myPatch_slave
{
type compressible::thermalBaffle;
kappa fluidThermo;
kappaName none;
value uniform 300;
\endverbatim
/- Patches on baffle region
\verbatim
bottom
{
type compressible::thermalBaffle;
kappa solidThermo;
kappaName none;
value uniform 300;
}
top
{
type compressible::thermalBaffle;
kappa solidThermo;
kappaName none;
value uniform 300;
}
\endverbatim
SeeAlso
Foam::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::regionModels::thermalBaffleModels::thermalBaffleModel

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,6 +26,7 @@ License
#include "radiationModel.H"
#include "absorptionEmissionModel.H"
#include "scatterModel.H"
#include "sootModel.H"
#include "fvmSup.H"
#include "fluidThermo.H"
@ -83,6 +84,8 @@ void Foam::radiation::radiationModel::initialise()
);
scatter_.reset(scatterModel::New(*this, mesh_).ptr());
soot_.reset(sootModel::New(*this, mesh_).ptr());
}
}
@ -110,7 +113,8 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T)
solverFreq_(0),
firstIter_(true),
absorptionEmission_(NULL),
scatter_(NULL)
scatter_(NULL),
soot_(NULL)
{}
@ -129,7 +133,8 @@ Foam::radiation::radiationModel::radiationModel
solverFreq_(1),
firstIter_(true),
absorptionEmission_(NULL),
scatter_(NULL)
scatter_(NULL),
soot_(NULL)
{
if (readOpt() == IOobject::NO_READ)
{
@ -167,7 +172,8 @@ Foam::radiation::radiationModel::radiationModel
solverFreq_(1),
firstIter_(true),
absorptionEmission_(NULL),
scatter_(NULL)
scatter_(NULL),
soot_(NULL)
{
initialise();
}
@ -212,6 +218,11 @@ void Foam::radiation::radiationModel::correct()
calculate();
firstIter_ = false;
}
if (!soot_.empty())
{
soot_->correct();
}
}
@ -265,4 +276,22 @@ Foam::radiation::radiationModel::absorptionEmission() const
}
const Foam::radiation::sootModel&
Foam::radiation::radiationModel::soot() const
{
if (!soot_.valid())
{
FatalErrorIn
(
"const Foam::radiation::sootModel&"
"Foam::radiation::radiationModel::soot() const"
)
<< "Requested radiation sootModel model, but model is "
<< "not activate" << abort(FatalError);
}
return soot_();
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,6 +64,7 @@ namespace radiation
// Forward declaration of classes
class absorptionEmissionModel;
class scatterModel;
class sootModel;
/*---------------------------------------------------------------------------*\
Class radiationModel Declaration
@ -108,6 +109,9 @@ protected:
//- Scatter model
autoPtr<scatterModel> scatter_;
//- Soot model
autoPtr<sootModel> soot_;
private:
@ -232,6 +236,9 @@ public:
//- Access to absorptionEmission model
const absorptionEmissionModel& absorptionEmission() const;
//- Access to soot Model
const sootModel& soot() const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,10 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
TnbrName_("undefined-Tnbr")
TnbrName_("undefined-Tnbr"),
thicknessLayers_(0),
kappaLayers_(0),
contactRes_(0)
{
this->refValue() = 0.0;
this->refGrad() = 0.0;
@ -66,7 +69,10 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
:
mixedFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()),
TnbrName_(ptf.TnbrName_)
TnbrName_(ptf.TnbrName_),
thicknessLayers_(ptf.thicknessLayers_),
kappaLayers_(ptf.kappaLayers_),
contactRes_(ptf.contactRes_)
{}
@ -80,7 +86,10 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict),
TnbrName_(dict.lookup("Tnbr"))
TnbrName_(dict.lookup("Tnbr")),
thicknessLayers_(0),
kappaLayers_(0),
contactRes_(0.0)
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
@ -101,6 +110,24 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
<< exit(FatalError);
}
if (dict.found("thicknessLayers"))
{
dict.lookup("thicknessLayers") >> thicknessLayers_;
dict.lookup("kappaLayers") >> kappaLayers_;
if (thicknessLayers_.size() > 0)
{
forAll (thicknessLayers_, iLayer)
{
const scalar l = thicknessLayers_[iLayer];
if (l > 0.0)
{
contactRes_ += kappaLayers_[iLayer]/l;
}
}
}
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("refValue"))
@ -129,7 +156,10 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
:
mixedFvPatchScalarField(wtcsf, iF),
temperatureCoupledBase(patch(), wtcsf.KMethod(), wtcsf.kappaName()),
TnbrName_(wtcsf.TnbrName_)
TnbrName_(wtcsf.TnbrName_),
thicknessLayers_(wtcsf.thicknessLayers_),
kappaLayers_(wtcsf.kappaLayers_),
contactRes_(wtcsf.contactRes_)
{}
@ -155,7 +185,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
const fvPatch& nbrPatch =
refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI];
tmp<scalarField> intFld = patchInternalField();
//tmp<scalarField> intFld = patchInternalField();
// Calculate the temperature by harmonic averaging
@ -174,12 +204,22 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
);
// Swap to obtain full local values of neighbour internal field
scalarField nbrIntFld(nbrField.patchInternalField());
mpp.distribute(nbrIntFld);
tmp<scalarField> nbrIntFld(new scalarField(nbrField.size(), 0.0));
tmp<scalarField> nbrKDelta(new scalarField(nbrField.size(), 0.0));
// Swap to obtain full local values of neighbour kappa*delta
scalarField nbrKDelta(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs());
mpp.distribute(nbrKDelta);
if (contactRes_ == 0.0)
{
nbrIntFld() = nbrField.patchInternalField();
nbrKDelta() = nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs();
}
else
{
nbrIntFld() = nbrField;
nbrKDelta() = contactRes_;
}
mpp.distribute(nbrIntFld());
mpp.distribute(nbrKDelta());
tmp<scalarField> myKDelta = kappa(*this)*patch().deltaCoeffs();
@ -200,11 +240,11 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
// - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
this->refValue() = nbrIntFld;
this->refValue() = nbrIntFld();
this->refGrad() = 0.0;
this->valueFraction() = nbrKDelta/(nbrKDelta + myKDelta());
this->valueFraction() = nbrKDelta()/(nbrKDelta() + myKDelta());
mixedFvPatchScalarField::updateCoeffs();
@ -239,6 +279,9 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
mixedFvPatchScalarField::write(os);
os.writeKeyword("Tnbr")<< TnbrName_
<< token::END_STATEMENT << nl;
thicknessLayers_.writeEntry("thicknessLayers", os);
thicknessLayers_.writeEntry("kappaLayers", os);
temperatureCoupledBase::write(os);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,11 +22,20 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::
compressible::
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Description
Mixed boundary condition for temperature, to be used for heat-transfer
on back-to-back baffles.
on back-to-back baffles.Optional thin thermal layer
resistances can be specified through thicknessLayers and kappaLayers
entries.
The thermal conductivity, \c kappa, can either be retrieved from the
mesh database using the \c lookup option, or from a \c solidThermo
or \c fluidThermo thermophysical package.
Specifies gradient and temperature such that the equations are the same
on both sides:
@ -36,29 +45,41 @@ Description
where KDelta is heat-transfer coefficient K * deltaCoeffs
Example usage:
myInterfacePatchName
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
Tnbr T;
kappa lookup;
kappaName kappa;
value uniform 300;
}
\heading Patch usage
\table
Property | Description | Required | Default value
kappa | thermal conductivity option | yes |
kappaName | name of thermal conductivity field | no |
Tnbr | name of the field | no | T
thicknessLayers | list of thicknesses per layer [m] | no |
kappaLayers | list of thermal conductivites per layer [W/m/K] | no |
\endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
Tnbr T;
kappa lookup;
KappaName kappa;
thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4)
value uniform 300;
}
Needs to be on underlying mapped(Wall)FvPatch.
Note: kappa : heat conduction at patch. Gets supplied how to lookup
calculate kappa:
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name
- 'fluidThermo' : use fluidThermo and compressible::RASmodel to calculate
kappa
- 'solidThermo' : use solidThermo kappa()
- 'directionalSolidThermo' directionalKappa()
Note: runs in parallel with arbitrary decomposition. Uses mapped
functionality to calculate exchange.
SourceFiles
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
@ -69,6 +90,7 @@ SourceFiles
#include "mixedFvPatchFields.H"
#include "temperatureCoupledBase.H"
#include "scalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -91,6 +113,15 @@ class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
//- Name of field on the neighbour region
const word TnbrName_;
//- Thickness of layers
scalarList thicknessLayers_;
//- Conductivity of layers
scalarList kappaLayers_;
//- Total contact resistance
scalar contactRes_;
public:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,10 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
TnbrName_("undefined-Tnbr"),
QrNbrName_("undefined-QrNbr"),
QrName_("undefined-Qr")
QrName_("undefined-Qr"),
thicknessLayers_(0),
kappaLayers_(0),
contactRes_(0)
{
this->refValue() = 0.0;
this->refGrad() = 0.0;
@ -70,7 +73,10 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
temperatureCoupledBase(patch(), psf.KMethod(), psf.kappaName()),
TnbrName_(psf.TnbrName_),
QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_)
QrName_(psf.QrName_),
thicknessLayers_(psf.thicknessLayers_),
kappaLayers_(psf.kappaLayers_),
contactRes_(psf.contactRes_)
{}
@ -86,7 +92,10 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
temperatureCoupledBase(patch(), dict),
TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")),
QrNbrName_(dict.lookupOrDefault<word>("QrNbr", "none")),
QrName_(dict.lookupOrDefault<word>("Qr", "none"))
QrName_(dict.lookupOrDefault<word>("Qr", "none")),
thicknessLayers_(0),
kappaLayers_(0),
contactRes_(0.0)
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
@ -107,6 +116,24 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
<< exit(FatalError);
}
if (dict.found("thicknessLayers"))
{
dict.lookup("thicknessLayers") >> thicknessLayers_;
dict.lookup("kappaLayers") >> kappaLayers_;
if (thicknessLayers_.size() > 0)
{
forAll (thicknessLayers_, iLayer)
{
const scalar l = thicknessLayers_[iLayer];
if (l > 0.0)
{
contactRes_ += kappaLayers_[iLayer]/l;
}
}
}
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("refValue"))
@ -137,7 +164,10 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
temperatureCoupledBase(patch(), psf.KMethod(), psf.kappaName()),
TnbrName_(psf.TnbrName_),
QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_)
QrName_(psf.QrName_),
thicknessLayers_(psf.thicknessLayers_),
kappaLayers_(psf.kappaLayers_),
contactRes_(psf.contactRes_)
{}
@ -180,9 +210,17 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
// Swap to obtain full local values of neighbour K*delta
scalarField KDeltaNbr(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs());
mpp.distribute(KDeltaNbr);
tmp<scalarField> KDeltaNbr(new scalarField(TcNbr.size(), 0.0));
if (contactRes_ == 0.0)
{
// Swap to obtain full local values of neighbour K*delta
KDeltaNbr() = nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs();
}
else
{
KDeltaNbr() = contactRes_;
}
mpp.distribute(KDeltaNbr());
scalarField KDelta(kappa(*this)*patch().deltaCoeffs());
@ -199,16 +237,34 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
mpp.distribute(QrNbr);
}
scalarField alpha(KDeltaNbr - (Qr + QrNbr)/Tp);
scalarField alpha(KDeltaNbr() - (Qr + QrNbr)/Tp);
valueFraction() = alpha/(alpha + KDelta);
refValue() = (KDeltaNbr*TcNbr)/alpha;
refValue() = (KDeltaNbr()*TcNbr)/alpha;
mixedFvPatchScalarField::updateCoeffs();
if (debug)
{
scalar Q = gSum(kappa(*this)*patch().magSf()*snGrad());
Info<< patch().boundaryMesh().mesh().name() << ':'
<< patch().name() << ':'
<< this->dimensionedInternalField().name() << " <- "
<< nbrMesh.name() << ':'
<< nbrPatch.name() << ':'
<< this->dimensionedInternalField().name() << " :"
<< " heat transfer rate:" << Q
<< " walltemperature "
<< " min:" << gMin(*this)
<< " max:" << gMax(*this)
<< " avg:" << gAverage(*this)
<< endl;
}
// Restore tag
UPstream::msgType() = oldTag;
mixedFvPatchScalarField::updateCoeffs();
}
@ -221,6 +277,10 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::write
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
os.writeKeyword("QrNbr")<< QrNbrName_ << token::END_STATEMENT << nl;
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
thicknessLayers_.writeEntry("thicknessLayers", os);
thicknessLayers_.writeEntry("kappaLayers", os);
temperatureCoupledBase::write(os);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,23 +28,45 @@ Class
Description
Mixed boundary condition for temperature and radiation heat transfer
to be used for in multiregion cases
to be used for in multiregion cases. Optional thin thermal layer
resistances can be specified through thicknessLayers and kappaLayers
entries.
Example usage:
myInterfacePatchName
{
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; // name of T field on neighbour region
kappa lookup;
KappaName kappa;
QrNbr Qr; // or none. Name of Qr field on neighbour region
Qr Qr; // or none. Name of Qr field on local region
value uniform 300;
}
The thermal conductivity, \c kappa, can either be retrieved from the
mesh database using the \c lookup option, or from a \c solidThermo
or \c fluidThermo thermophysical package.
\heading Patch usage
\table
Property | Description | Required | Default value
kappa | thermal conductivity option | yes |
kappaName | name of thermal conductivity field | no |
Tnbr | name of the field | no | T
QrNbr | name of the radiative flux in the nbr region | no | none
Qr | name of the radiative flux in this region | no | none
thicknessLayers | list of thicknesses per layer [m] | no |
kappaLayers | list of thermal conductivites per layer [W/m/K] | no |
\endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T;
kappa lookup;
KappaName kappa;
QrNbr Qr; // or none. Name of Qr field on neighbour region
Qr Qr; // or none. Name of Qr field on local region
thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4)
value uniform 300;
}
Needs to be on underlying mapped(Wall)FvPatch.
Note: kappa : heat conduction at patch. Gets supplied how to
Note: kappa : heat conduction at patch. Gets supplied how to
lookup/calculate
kappa:
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name
@ -52,9 +74,6 @@ Description
- 'solidThermo' : use solidThermo kappa()
- 'directionalSolidThermo' directionalKappa()
Note: runs in parallel with arbitrary decomposition. Uses mapped
functionality to calculate exchange.
SourceFiles
turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
@ -65,6 +84,7 @@ SourceFiles
#include "mixedFvPatchFields.H"
#include "temperatureCoupledBase.H"
#include "scalarList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,6 +113,15 @@ class turbulentTemperatureRadCoupledMixedFvPatchScalarField
//- Name of the radiative heat flux in local region
const word QrName_;
//- Thickness of layers
scalarList thicknessLayers_;
//- Conductivity of layers
scalarList kappaLayers_;
//- Total contact resistance
scalar contactRes_;
public:

View File

@ -16,14 +16,15 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel opaqueSolid;
absorptionEmissionModel greyMeanSolidAbsorptionEmission;
greyMeanSolidAbsorptionEmissionCoeffs
{
wood
wood
{
absorptivity 0.17;
emissivity 0.17;

View File

@ -34,7 +34,7 @@ solvers
p_rgh
{
solver GAMG;
tolerance 1e-7;
tolerance 1e-6;
relTol 0.01;
smoother GaussSeidel;
cacheAgglomeration true;
@ -46,7 +46,7 @@ solvers
p_rghFinal
{
$p_rgh;
tolerance 1e-7;
tolerance 1e-6;
relTol 0;
};
@ -55,7 +55,7 @@ solvers
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-7;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
};
@ -63,32 +63,24 @@ solvers
"(U|Yi|k|h|omega)Final"
{
$U;
tolerance 1e-7;
tolerance 1e-6;
relTol 0;
};
"(h|hFinal|Yi)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-8;
relTol 0;
};
Ii
{
solver GAMG;
tolerance 1e-4;
relTol 0;
smoother symGaussSeidel;
cacheAgglomeration true;
solver GAMG;
tolerance 1e-4;
relTol 0;
smoother symGaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 1;
nPreSweeps 0;
nPostSweeps 1;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 1;
nPreSweeps 0;
nPostSweeps 1;
}
"(G)Final"
@ -105,7 +97,7 @@ PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 3;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

View File

@ -32,18 +32,18 @@ divSchemes
laplacianSchemes
{
default none;
laplacian(thermo:alpha,h) Gauss linear uncorrected;
laplacian(kappa,T) Gauss harmonic uncorrected;
laplacian(thermo:alpha,h) Gauss linear corrected;
laplacian(kappa,T) Gauss harmonic corrected;
}
interpolationSchemes
{
default linear;
default linear;
}
snGradSchemes
{
default uncorrected;
default corrected;
}
fluxRequired

View File

@ -23,7 +23,7 @@ boundaryField
{
".*"
{
type calculate;
type calculated;
}
frontAndBack

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
(
base
{
type patch;
nFaces 134;
startFace 44700;
}
outlet
{
type patch;
nFaces 150;
startFace 44834;
}
sides
{
type patch;
nFaces 300;
startFace 44984;
}
frontAndBack
{
type empty;
inGroups 1(empty);
nFaces 45000;
startFace 45284;
}
inlet
{
type patch;
nFaces 16;
startFace 90284;
}
)
// ************************************************************************* //

View File

@ -22,22 +22,22 @@ solvers
{
solver PCG;
preconditioner DIC;
tolerance 1e-7;
tolerance 1e-6;
relTol 0.1;
};
rhoFinal
{
$rho;
tolerance 1e-7;
tolerance 1e-6;
relTol 0;
};
p_rgh
{
solver GAMG;
tolerance 1e-7;
relTol 0.01;
tolerance 1e-6;
relTol 0.05;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
@ -48,7 +48,7 @@ solvers
p_rghFinal
{
$p_rgh;
tolerance 1e-7;
tolerance 1e-6;
relTol 0;
};
@ -57,7 +57,7 @@ solvers
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-7;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
};
@ -65,24 +65,24 @@ solvers
"(U|Yi|k|h|omega)Final"
{
$U;
tolerance 1e-7;
tolerance 1e-6;
relTol 0;
};
Ii
{
solver GAMG;
tolerance 1e-4;
relTol 0.1;
smoother symGaussSeidel;
cacheAgglomeration true;
solver GAMG;
tolerance 1e-4;
relTol 0.1;
smoother symGaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 3;
nPreSweeps 0;
nPostSweeps 1;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 3;
nPreSweeps 0;
nPostSweeps 1;
}
G

View File

@ -22,13 +22,13 @@ startTime 0.0;
stopAt endTime;
endTime 0.75;
endTime 4.0;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.5;
writeInterval 0.1;
purgeWrite 0;
@ -48,7 +48,7 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.5;
maxCo 0.6;
maxDeltaT 0.1;

View File

@ -21,14 +21,14 @@ solvers
{
solver PCG;
preconditioner DIC;
tolerance 1e-7;
tolerance 1e-6;
relTol 0;
};
p_rgh
{
solver GAMG;
tolerance 1e-7;
tolerance 1e-6;
relTol 0.1;
smoother GaussSeidel;
cacheAgglomeration true;
@ -40,7 +40,7 @@ solvers
p_rghFinal
{
$p_rgh;
tolerance 1e-8;
tolerance 1e-6;
relTol 0;
};
@ -49,7 +49,7 @@ solvers
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-7;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
};
@ -57,7 +57,7 @@ solvers
"(U|Yi|k|h)Final"
{
$U;
tolerance 1e-8;
tolerance 1e-6;
relTol 0;
};
@ -90,7 +90,7 @@ PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 3;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

View File

@ -9,45 +9,42 @@ FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
4
(
frontAndBack
{
nMoles 1;
molWeight 12;
type wall;
inGroups 1(wall);
nFaces 1050;
startFace 228225;
}
transport
topAndBottom
{
kappa 80;
type wall;
inGroups 1(wall);
nFaces 10500;
startFace 229275;
}
thermodynamics
hot
{
Hf 0;
Cp 450;
type wall;
inGroups 1(wall);
nFaces 2250;
startFace 239775;
}
equationOfState
cold
{
rho 8000;
type wall;
inGroups 1(wall);
nFaces 2250;
startFace 242025;
}
}
)
// ************************************************************************* //

View File

@ -16,12 +16,12 @@ FoamFile
ddtSchemes
{
default steadyState;
default steadyState;
}
gradSchemes
{
default Gauss linear;
default Gauss linear;
}
divSchemes

View File

@ -9,45 +9,42 @@ FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
4
(
frontAndBack
{
nMoles 1;
molWeight 12;
type wall;
inGroups 1(wall);
nFaces 1050;
startFace 228225;
}
transport
topAndBottom
{
kappa 80;
type wall;
inGroups 1(wall);
nFaces 10500;
startFace 229275;
}
thermodynamics
hot
{
Hf 0;
Cp 450;
type wall;
inGroups 1(wall);
nFaces 2250;
startFace 239775;
}
equationOfState
cold
{
rho 8000;
type wall;
inGroups 1(wall);
nFaces 2250;
startFace 242025;
}
}
)
// ************************************************************************* //

View File

@ -15,43 +15,35 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
4
(
maxY
box
{
type wall;
inGroups 1(wall);
nFaces 300;
startFace 8300;
startFace 303675;
}
minX
{
type patch;
nFaces 100;
startFace 8600;
}
maxX
{
type patch;
nFaces 100;
startFace 8700;
}
minY
floor
{
type wall;
nFaces 300;
startFace 8800;
inGroups 1(wall);
nFaces 5125;
startFace 303975;
}
minZ
ceiling
{
type wall;
nFaces 300;
startFace 9100;
inGroups 1(wall);
nFaces 5225;
startFace 309100;
}
maxZ
fixedWalls
{
type wall;
nFaces 300;
startFace 9400;
inGroups 1(wall);
nFaces 6000;
startFace 314325;
}
)

View File

@ -15,6 +15,8 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel P1;
// Number of flow iterations per radiation iteration
@ -26,10 +28,12 @@ constantAbsorptionEmissionCoeffs
{
absorptivity absorptivity [ 0 -1 0 0 0 0 0 ] 0.5;
emissivity emissivity [ 0 -1 0 0 0 0 0 ] 0.5;
E E [ 1 -1 -3 0 0 0 0 ] 0;
E E [ 1 -1 -3 0 0 0 0 ] 0;
}
scatterModel none;
sootModel none;
// ************************************************************************* //

View File

@ -15,43 +15,35 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
4
(
maxY
box
{
type wall;
inGroups 1(wall);
nFaces 300;
startFace 8300;
startFace 303675;
}
minX
{
type patch;
nFaces 100;
startFace 8600;
}
maxX
{
type patch;
nFaces 100;
startFace 8700;
}
minY
floor
{
type wall;
nFaces 300;
startFace 8800;
inGroups 1(wall);
nFaces 5125;
startFace 303975;
}
minZ
ceiling
{
type wall;
nFaces 300;
startFace 9100;
inGroups 1(wall);
nFaces 5225;
startFace 309100;
}
maxZ
fixedWalls
{
type wall;
nFaces 300;
startFace 9400;
inGroups 1(wall);
nFaces 6000;
startFace 314325;
}
)

View File

@ -15,14 +15,17 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel fvDOM;
fvDOMCoeffs
{
nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X)
nTheta 5; // polar angles in PI (from Z to X-Y plane)
nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X)
nTheta 5; // polar angles in PI (from Z to X-Y plane)
convergence 1e-3; // convergence criteria for radiation iteration
maxIter 10; // maximum number of iterations
maxIter 10; // maximum number of iterations
cacheDiv false;
}
// Number of flow iterations per radiation iteration
@ -32,12 +35,13 @@ absorptionEmissionModel constantAbsorptionEmission;
constantAbsorptionEmissionCoeffs
{
absorptivity absorptivity [ 0 -1 0 0 0 0 0 ] 0.01;
emissivity emissivity [ 0 -1 0 0 0 0 0 ] 0.01;
E E [ 1 -1 -3 0 0 0 0 ] 0;
absorptivity absorptivity [ m^-1 ] 0.5;
emissivity emissivity [ m^-1 ] 0.5;
E E [ kg m^-1 s^-3 ] 0;
}
scatterModel none;
sootModel none;
// ************************************************************************* //

View File

@ -33,7 +33,7 @@ divSchemes
div(phi,h) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(Ji,Ii_h) Gauss linearUpwind grad(Ii_h);
div(Ji,Ii_h) bounded Gauss linearUpwind grad(Ii_h);
div((muEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -19,17 +19,28 @@ solvers
{
p_rgh
{
solver GAMG;
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
"(U|h|k|epsilon|Ii)"
Ii
{
solver GAMG;
tolerance 1e-4;
relTol 0;
smoother symGaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 5;
nPreSweeps 0;
nPostSweeps 1;
}
"(U|h|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
@ -53,6 +64,7 @@ SIMPLE
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
"ILambda.*" 1e-3;
}
}
@ -61,14 +73,14 @@ relaxationFactors
fields
{
rho 1.0;
p_rgh 0.3;
p_rgh 0.7;
}
equations
{
U 0.7;
h 0.7;
k 0.7;
epsilon 0.7;
U 0.2;
h 0.2;
k 0.5;
epsilon 0.5;
"ILambda.*" 0.7;
}
}

View File

@ -1,39 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
floor
{
type fixedValue;
value uniform 300;
}
ceiling
{
type fixedValue;
value uniform 300;
}
fixedWalls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,39 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
floor
{
type fixedValue;
value uniform 300;
}
ceiling
{
type fixedValue;
value uniform 300;
}
fixedWalls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,42 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
floor
{
type calculated;
value $internalField;
}
ceiling
{
type calculated;
value $internalField;
}
fixedWalls
{
type calculated;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -1,10 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp 0/T.org 0/T
# ----------------------------------------------------------------- end-of-file

View File

@ -1,13 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application=`getApplication`
runApplication blockMesh
runApplication setFields
runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,25 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
turbulence on;
printCoeffs on;
// ************************************************************************* //

View File

@ -1,21 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 -9.81 0);
// ************************************************************************* //

View File

@ -1,75 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(0 0 0)
(10 0 0)
(10 5 0)
(0 5 0)
(0 0 10)
(10 0 10)
(10 5 10)
(0 5 10)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
floor
{
type wall;
faces
(
(1 5 4 0)
);
}
ceiling
{
type wall;
faces
(
(3 7 6 2)
);
}
fixedWalls
{
type wall;
faces
(
(0 4 7 3)
(2 6 5 1)
(0 3 2 1)
(4 5 6 7)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}
pRef 100000;
mixture
{
specie
{
nMoles 1;
molWeight 28.9;
}
thermodynamics
{
Cp 1000;
Hf 0;
}
transport
{
mu 1.8e-05;
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -1,49 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application buoyantSimpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 1;
writeControl timeStep;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss upwind;
div(phi,h) bounded Gauss upwind;
div(phi,K) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div((muEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p_rgh;
}
// ************************************************************************* //

View File

@ -1,71 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-8;
relTol 0.01;
}
"(U|h|e|k|epsilon|R)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-6;
relTol 0.1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors
{
fields
{
rho 1.0;
p_rgh 0.7;
}
equations
{
U 0.3;
"(h|e)" 0.3;
"(k|epsilon|R)" 0.5;
}
}
// ************************************************************************* //

View File

@ -1,37 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue T 300
);
regions
(
// Set patch values (using ==)
boxToFace
{
box (4.5 -1000 4.5) (5.5 1e-5 5.5);
fieldValues
(
volScalarFieldValue T 600
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,77 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0/bottomWater";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 0 0 1 0 0 0 ];
internalField uniform 300;
boundaryField
{
minX
{
type fixedValue;
value uniform 300;
}
maxX
{
type inletOutlet;
value uniform 300;
inletValue uniform 300;
}
minY
{
type zeroGradient;
value uniform 300;
}
minZ
{
type zeroGradient;
value uniform 300;
}
maxZ
{
type zeroGradient;
value uniform 300;
}
bottomWater_to_rightSolid
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
value uniform 300;
Tnbr T;
kappa fluidThermo;
kappaName none;
}
bottomWater_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
value uniform 300;
Tnbr T;
kappa fluidThermo;
kappaName none;
}
bottomWater_to_heater
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
value uniform 300;
Tnbr T;
kappa fluidThermo;
kappaName none;
}
}
// ************************************************************************* //

View File

@ -10,33 +10,59 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
location "0/bottomWater";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
dimensions [ 0 1 -1 0 0 0 0 ];
internalField uniform (0 0 0);
internalField uniform ( 0.001 0 0 );
boundaryField
{
floor
minX
{
type fixedValue;
value uniform (0 0 0);
value uniform ( 0.001 0 0 );
}
ceiling
maxX
{
type fixedValue;
value uniform (0 0 0);
type inletOutlet;
value uniform ( 0.01 0 0 );
inletValue uniform ( 0 0 0 );
}
fixedWalls
minY
{
type fixedValue;
value uniform (0 0 0);
value uniform ( 0 0 0 );
}
minZ
{
type fixedValue;
value uniform ( 0 0 0 );
}
maxZ
{
type fixedValue;
value uniform ( 0 0 0 );
}
bottomWater_to_rightSolid
{
type fixedValue;
value uniform ( 0 0 0 );
}
bottomWater_to_leftSolid
{
type fixedValue;
value uniform ( 0 0 0 );
}
bottomWater_to_heater
{
type fixedValue;
value uniform ( 0 0 0 );
}
}
// ************************************************************************* //

View File

@ -10,39 +10,50 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object mut;
location "0/bottomWater";
object cellToRegion;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
floor
minX
{
type mutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
type zeroGradient;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
bottomWater_to_rightSolid
{
type calculated;
value uniform 0;
}
ceiling
bottomWater_to_leftSolid
{
type mutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
type calculated;
value uniform 0;
}
fixedWalls
bottomWater_to_heater
{
type mutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
type calculated;
value uniform 0;
}
}

View File

@ -10,39 +10,56 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
location "0/bottomWater";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
dimensions [ 0 2 -3 0 0 0 0 ];
internalField uniform 0.01;
boundaryField
{
floor
minX
{
type compressible::epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
type fixedValue;
value uniform 0.01;
}
ceiling
maxX
{
type inletOutlet;
value uniform 0.01;
inletValue uniform 0.01;
}
minY
{
type compressible::epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.01;
}
fixedWalls
minZ
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
maxZ
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
bottomWater_to_rightSolid
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
bottomWater_to_leftSolid
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
bottomWater_to_heater
{
type compressible::epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.01;
}
}

View File

@ -10,28 +10,54 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
location "0/bottomWater";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 0.1;
boundaryField
{
floor
minX
{
type inletOutlet;
value uniform 0.1;
inletValue uniform 0.1;
}
maxX
{
type zeroGradient;
value uniform 0.1;
}
minY
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
ceiling
minZ
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
fixedWalls
maxZ
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
bottomWater_to_rightSolid
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
bottomWater_to_leftSolid
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
bottomWater_to_heater
{
type compressible::kqRWallFunction;
value uniform 0.1;

View File

@ -10,33 +10,55 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
location "0/bottomWater";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 0;
boundaryField
{
floor
minX
{
type compressible::alphatWallFunction;
Prt 0.85;
type calculated;
value uniform 0;
}
ceiling
maxX
{
type compressible::alphatWallFunction;
Prt 0.85;
type calculated;
value uniform 0;
}
fixedWalls
minY
{
type compressible::alphatWallFunction;
Prt 0.85;
type calculated;
value uniform 0;
}
minZ
{
type calculated;
value uniform 0;
}
maxZ
{
type calculated;
value uniform 0;
}
bottomWater_to_rightSolid
{
type calculated;
value uniform 0;
}
bottomWater_to_leftSolid
{
type calculated;
value uniform 0;
}
bottomWater_to_heater
{
type calculated;
value uniform 0;
}
}

View File

@ -10,33 +10,58 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0/bottomWater";
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 1e5;
internalField uniform 0;
boundaryField
{
floor
minX
{
type fixedFluxPressure;
value uniform 1e5;
type zeroGradient;
value uniform 0;
}
ceiling
maxX
{
type fixedFluxPressure;
value uniform 1e5;
type fixedValue;
value uniform 0;
}
fixedWalls
minY
{
type fixedFluxPressure;
value uniform 1e5;
value uniform 0;
}
minZ
{
type fixedFluxPressure;
value uniform 0;
}
maxZ
{
type fixedFluxPressure;
value uniform 0;
}
bottomWater_to_rightSolid
{
type fixedFluxPressure;
value uniform 0;
}
bottomWater_to_leftSolid
{
type fixedFluxPressure;
value uniform 0;
}
bottomWater_to_heater
{
type fixedFluxPressure;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ rm -rf 0/heater
rm -rf 0/leftSolid
rm -rf 0/rightSolid
rm -f 0/cellToRegion
rm -rf constant/bottomAir/polyMesh
rm -rf constant/bottomWater/polyMesh
rm -rf constant/topAir/polyMesh
rm -rf constant/heater/polyMesh
rm -rf constant/leftSolid/polyMesh

View File

@ -16,7 +16,7 @@ do
done
for i in bottomAir topAir heater leftSolid rightSolid
for i in bottomWater topAir heater leftSolid rightSolid
do
changeDictionary -region $i > log.changeDictionary.$i 2>&1
done

View File

@ -1,49 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant/bottomAir";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 28.9;
}
thermodynamics
{
Cp 1000;
Hf 0;
}
transport
{
mu 1.8e-05;
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -16,6 +16,8 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel opaqueSolid;
absorptionEmissionModel constantAbsorptionEmission;
@ -29,5 +31,6 @@ constantAbsorptionEmissionCoeffs
scatterModel none;
sootModel none;
// ************************************************************************* //

View File

@ -1,33 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiationModel opaqueSolid;
absorptionEmissionModel constantAbsorptionEmission;
constantAbsorptionEmissionCoeffs
{
absorptivity absorptivity [ 0 -1 0 0 0 0 0 ] 0.0; //opaque
emissivity emissivity [ 0 -1 0 0 0 0 0 ] 0.1;
E E [ 1 -1 -3 0 0 0 0 ] 0;
}
scatterModel none;
// ************************************************************************* //

View File

@ -0,0 +1 @@
../heater/radiationProperties

View File

@ -17,7 +17,7 @@ FoamFile
regions
(
fluid (bottomAir topAir)
fluid (bottomWater topAir)
solid (heater leftSolid rightSolid)
);

View File

@ -1,33 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiationModel opaqueSolid;
absorptionEmissionModel constantAbsorptionEmission;
constantAbsorptionEmissionCoeffs
{
absorptivity absorptivity [ 0 -1 0 0 0 0 0 ] 0.0; //opaque
emissivity emissivity [ 0 -1 0 0 0 0 0 ] 0.1;
E E [ 1 -1 -3 0 0 0 0 ] 0;
}
scatterModel none;
// ************************************************************************* //

View File

@ -0,0 +1 @@
../heater/radiationProperties

View File

@ -1,24 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel laminar;
turbulence on;
printCoeffs on;
// ************************************************************************* //

View File

@ -1,20 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 -9.81 0);
// ************************************************************************* //

View File

@ -0,0 +1 @@
../bottomWater/g

View File

@ -1,22 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation off;
radiationModel none;
// ************************************************************************* //

View File

@ -0,0 +1 @@
../bottomWater/radiationProperties

Some files were not shown because too many files have changed in this diff Show More