mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -25,7 +25,7 @@ Application
|
|||||||
thermoFoam
|
thermoFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Evolves the thermodynamics on a forzen flow field
|
Evolves the thermodynamics on a frozen flow field
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -614,11 +614,6 @@ int main(int argc, char *argv[])
|
|||||||
"boundBox",
|
"boundBox",
|
||||||
"simplify the surface using snappyHexMesh starting from a boundBox"
|
"simplify the surface using snappyHexMesh starting from a boundBox"
|
||||||
);
|
);
|
||||||
Foam::argList::addBoolOption
|
|
||||||
(
|
|
||||||
"writeLevel",
|
|
||||||
"write pointLevel and cellLevel postprocessing files"
|
|
||||||
);
|
|
||||||
Foam::argList::addOption
|
Foam::argList::addOption
|
||||||
(
|
(
|
||||||
"patches",
|
"patches",
|
||||||
@ -640,7 +635,6 @@ int main(int argc, char *argv[])
|
|||||||
const bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
const bool checkGeometry = args.optionFound("checkGeometry");
|
const bool checkGeometry = args.optionFound("checkGeometry");
|
||||||
const bool surfaceSimplify = args.optionFound("surfaceSimplify");
|
const bool surfaceSimplify = args.optionFound("surfaceSimplify");
|
||||||
const bool writeLevel = args.optionFound("writeLevel");
|
|
||||||
|
|
||||||
autoPtr<fvMesh> meshPtr;
|
autoPtr<fvMesh> meshPtr;
|
||||||
|
|
||||||
@ -852,6 +846,8 @@ int main(int argc, char *argv[])
|
|||||||
autoLayerDriver::debug = debug;
|
autoLayerDriver::debug = debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool writeLevel = meshDict.lookupOrDefault<bool>("writeLevel", false);
|
||||||
|
|
||||||
|
|
||||||
// Read geometry
|
// Read geometry
|
||||||
// ~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -213,25 +213,21 @@ void Foam::doxygenXmlParser::skipForward
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// recurse to move forward in 'is' until come across <blockName>
|
// recurse to move forward in 'is' until come across <blockName>
|
||||||
|
string entryName = "";
|
||||||
|
char c;
|
||||||
|
|
||||||
|
while (is.good() && (entryName != blockName))
|
||||||
|
{
|
||||||
|
entryName = "";
|
||||||
|
|
||||||
// fast-forward until we reach a '<'
|
// fast-forward until we reach a '<'
|
||||||
char c;
|
|
||||||
while (is.get(c) && c != '<')
|
while (is.get(c) && c != '<')
|
||||||
{}
|
{}
|
||||||
|
|
||||||
string entryName = "";
|
|
||||||
while (is.get(c) && c != '>')
|
while (is.get(c) && c != '>')
|
||||||
{
|
{
|
||||||
entryName = entryName + c;
|
entryName = entryName + c;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entryName == blockName)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
skipForward(is, blockName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,31 @@ using namespace Foam;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
volField
|
||||||
|
(
|
||||||
|
const fvMeshSubset& meshSubsetter,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (meshSubsetter.hasSubMesh())
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > tfld
|
||||||
|
(
|
||||||
|
meshSubsetter.interpolate(vf)
|
||||||
|
);
|
||||||
|
tfld().checkOut();
|
||||||
|
tfld().rename(vf.name());
|
||||||
|
return tfld;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return vf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Field<Type> map
|
Field<Type> map
|
||||||
(
|
(
|
||||||
@ -680,7 +705,7 @@ void ensightPointField
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void ensightField
|
void ensightField
|
||||||
(
|
(
|
||||||
const IOobject& fieldObject,
|
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||||
const ensightMesh& eMesh,
|
const ensightMesh& eMesh,
|
||||||
const fileName& postProcPath,
|
const fileName& postProcPath,
|
||||||
const word& prepend,
|
const word& prepend,
|
||||||
@ -690,14 +715,11 @@ void ensightField
|
|||||||
Ostream& ensightCaseFile
|
Ostream& ensightCaseFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Read field
|
|
||||||
GeometricField<Type, fvPatchField, volMesh> vf(fieldObject, eMesh.mesh());
|
|
||||||
|
|
||||||
if (nodeValues)
|
if (nodeValues)
|
||||||
{
|
{
|
||||||
tmp<GeometricField<Type, pointPatchField, pointMesh> > pfld
|
tmp<GeometricField<Type, pointPatchField, pointMesh> > pfld
|
||||||
(
|
(
|
||||||
volPointInterpolation::New(eMesh.mesh()).interpolate(vf)
|
volPointInterpolation::New(vf.mesh()).interpolate(vf)
|
||||||
);
|
);
|
||||||
pfld().rename(vf.name());
|
pfld().rename(vf.name());
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,13 +35,24 @@ SourceFiles
|
|||||||
#define ensightField_H
|
#define ensightField_H
|
||||||
|
|
||||||
#include "ensightMesh.H"
|
#include "ensightMesh.H"
|
||||||
|
#include "fvMeshSubset.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Wrapper to get hold of the field or the subsetted field
|
||||||
|
template<class Type>
|
||||||
|
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||||
|
volField
|
||||||
|
(
|
||||||
|
const Foam::fvMeshSubset&,
|
||||||
|
const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>& vf
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void ensightField
|
void ensightField
|
||||||
(
|
(
|
||||||
const Foam::IOobject& fieldObject,
|
const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>& vf,
|
||||||
const Foam::ensightMesh& eMesh,
|
const Foam::ensightMesh& eMesh,
|
||||||
const Foam::fileName& postProcPath,
|
const Foam::fileName& postProcPath,
|
||||||
const Foam::word& prepend,
|
const Foam::word& prepend,
|
||||||
|
|||||||
@ -57,14 +57,6 @@ void Foam::ensightMesh::correct()
|
|||||||
nFaceZonePrims_ = 0;
|
nFaceZonePrims_ = 0;
|
||||||
boundaryFaceToBeIncluded_.clear();
|
boundaryFaceToBeIncluded_.clear();
|
||||||
|
|
||||||
const cellShapeList& cellShapes = mesh_.cellShapes();
|
|
||||||
|
|
||||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
|
||||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
|
||||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
|
||||||
const cellModel& wedge = *(cellModeller::lookup("wedge"));
|
|
||||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
|
||||||
|
|
||||||
if (!noPatches_)
|
if (!noPatches_)
|
||||||
{
|
{
|
||||||
// Patches are output. Check that they're synced.
|
// Patches are output. Check that they're synced.
|
||||||
@ -111,6 +103,16 @@ void Foam::ensightMesh::correct()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const cellShapeList& cellShapes = mesh_.cellShapes();
|
||||||
|
|
||||||
|
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||||
|
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||||
|
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||||
|
const cellModel& wedge = *(cellModeller::lookup("wedge"));
|
||||||
|
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Count the shapes
|
// Count the shapes
|
||||||
labelList& tets = meshCellSets_.tets;
|
labelList& tets = meshCellSets_.tets;
|
||||||
labelList& pyrs = meshCellSets_.pyrs;
|
labelList& pyrs = meshCellSets_.pyrs;
|
||||||
@ -926,8 +928,10 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::ensightMesh::writeAllInternalPoints
|
void Foam::ensightMesh::writeAllPoints
|
||||||
(
|
(
|
||||||
|
const label ensightPartI,
|
||||||
|
const word& ensightPartName,
|
||||||
const pointField& uniquePoints,
|
const pointField& uniquePoints,
|
||||||
const label nPoints,
|
const label nPoints,
|
||||||
ensightStream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
@ -937,49 +941,8 @@ void Foam::ensightMesh::writeAllInternalPoints
|
|||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightGeometryFile.writePartHeader(1);
|
ensightGeometryFile.writePartHeader(ensightPartI);
|
||||||
ensightGeometryFile.write("internalMesh");
|
ensightGeometryFile.write(ensightPartName.c_str());
|
||||||
ensightGeometryFile.write("coordinates");
|
|
||||||
ensightGeometryFile.write(nPoints);
|
|
||||||
|
|
||||||
for (direction d=0; d<vector::nComponents; d++)
|
|
||||||
{
|
|
||||||
ensightGeometryFile.write(uniquePoints.component(d));
|
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
|
||||||
{
|
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
|
||||||
scalarField pointsComponent(fromSlave);
|
|
||||||
ensightGeometryFile.write(pointsComponent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (direction d=0; d<vector::nComponents; d++)
|
|
||||||
{
|
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
|
||||||
toMaster<< uniquePoints.component(d);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::ensightMesh::writeAllPatchPoints
|
|
||||||
(
|
|
||||||
const label ensightPatchI,
|
|
||||||
const word& patchName,
|
|
||||||
const pointField& uniquePoints,
|
|
||||||
const label nPoints,
|
|
||||||
ensightStream& ensightGeometryFile
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
barrier();
|
|
||||||
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
ensightGeometryFile.writePartHeader(ensightPatchI);
|
|
||||||
ensightGeometryFile.write(patchName.c_str());
|
|
||||||
ensightGeometryFile.write("coordinates");
|
ensightGeometryFile.write("coordinates");
|
||||||
ensightGeometryFile.write(nPoints);
|
ensightGeometryFile.write(nPoints);
|
||||||
|
|
||||||
@ -998,11 +961,7 @@ void Foam::ensightMesh::writeAllPatchPoints
|
|||||||
{
|
{
|
||||||
for (direction d=0; d<vector::nComponents; d++)
|
for (direction d=0; d<vector::nComponents; d++)
|
||||||
{
|
{
|
||||||
OPstream toMaster
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
(
|
|
||||||
Pstream::scheduled,
|
|
||||||
Pstream::masterNo()
|
|
||||||
);
|
|
||||||
toMaster<< uniquePoints.component(d);
|
toMaster<< uniquePoints.component(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1076,8 +1035,10 @@ void Foam::ensightMesh::write
|
|||||||
|
|
||||||
const pointField uniquePoints(mesh_.points(), uniquePointMap_);
|
const pointField uniquePoints(mesh_.points(), uniquePointMap_);
|
||||||
|
|
||||||
writeAllInternalPoints
|
writeAllPoints
|
||||||
(
|
(
|
||||||
|
1,
|
||||||
|
"internalMesh",
|
||||||
uniquePoints,
|
uniquePoints,
|
||||||
nPoints,
|
nPoints,
|
||||||
ensightGeometryFile
|
ensightGeometryFile
|
||||||
@ -1166,7 +1127,7 @@ void Foam::ensightMesh::write
|
|||||||
inplaceRenumber(pointToGlobal, patchFaces[i]);
|
inplaceRenumber(pointToGlobal, patchFaces[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeAllPatchPoints
|
writeAllPoints
|
||||||
(
|
(
|
||||||
ensightPatchI++,
|
ensightPatchI++,
|
||||||
patchName,
|
patchName,
|
||||||
@ -1271,7 +1232,7 @@ void Foam::ensightMesh::write
|
|||||||
inplaceRenumber(pointToGlobal, faceZoneMasterFaces[i]);
|
inplaceRenumber(pointToGlobal, faceZoneMasterFaces[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeAllPatchPoints
|
writeAllPoints
|
||||||
(
|
(
|
||||||
ensightPatchI++,
|
ensightPatchI++,
|
||||||
faceZoneName,
|
faceZoneName,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -244,17 +244,10 @@ private:
|
|||||||
ensightStream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllInternalPoints
|
void writeAllPoints
|
||||||
(
|
(
|
||||||
const pointField& uniquePoints,
|
const label ensightPartI,
|
||||||
const label nPoints,
|
const word& ensightPartName,
|
||||||
ensightStream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllPatchPoints
|
|
||||||
(
|
|
||||||
label ensightPatchI,
|
|
||||||
const word& patchName,
|
|
||||||
const pointField& uniquePoints,
|
const pointField& uniquePoints,
|
||||||
const label nPoints,
|
const label nPoints,
|
||||||
ensightStream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
|
|||||||
@ -46,6 +46,9 @@ Usage
|
|||||||
\param -faceZones zoneList \n
|
\param -faceZones zoneList \n
|
||||||
Specify faceZones to write, with wildcards
|
Specify faceZones to write, with wildcards
|
||||||
|
|
||||||
|
\param -cellZone zoneName \n
|
||||||
|
Specify single cellZone to write (not lagrangian)
|
||||||
|
|
||||||
Note
|
Note
|
||||||
Parallel support for cloud data is not supported
|
Parallel support for cloud data is not supported
|
||||||
- writes to \a EnSight directory to avoid collisions with foamToEnsightParts
|
- writes to \a EnSight directory to avoid collisions with foamToEnsightParts
|
||||||
@ -72,6 +75,9 @@ Note
|
|||||||
|
|
||||||
#include "fvc.H"
|
#include "fvc.H"
|
||||||
|
|
||||||
|
#include "cellSet.H"
|
||||||
|
#include "fvMeshSubset.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -128,6 +134,12 @@ int main(int argc, char *argv[])
|
|||||||
"wordReList",
|
"wordReList",
|
||||||
"specify faceZones to write - eg '( slice \"mfp-.*\" )'."
|
"specify faceZones to write - eg '( slice \"mfp-.*\" )'."
|
||||||
);
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"cellZone",
|
||||||
|
"word",
|
||||||
|
"specify cellZone to write"
|
||||||
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
@ -212,9 +224,28 @@ int main(int argc, char *argv[])
|
|||||||
zonePatterns = wordReList(args.optionLookup("faceZones")());
|
zonePatterns = wordReList(args.optionLookup("faceZones")());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
word cellZoneName;
|
||||||
|
const bool doCellZone = args.optionReadIfPresent("cellZone", cellZoneName);
|
||||||
|
|
||||||
|
fvMeshSubset meshSubsetter(mesh);
|
||||||
|
if (doCellZone)
|
||||||
|
{
|
||||||
|
Info<< "Converting cellZone " << cellZoneName
|
||||||
|
<< " only (puts outside faces into patch "
|
||||||
|
<< mesh.boundaryMesh()[0].name()
|
||||||
|
<< ")" << endl;
|
||||||
|
const cellZone& cz = mesh.cellZones()[cellZoneName];
|
||||||
|
cellSet c0(mesh, "c0", labelHashSet(cz));
|
||||||
|
meshSubsetter.setLargeCellSubset(c0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
ensightMesh eMesh
|
ensightMesh eMesh
|
||||||
(
|
(
|
||||||
mesh,
|
(
|
||||||
|
meshSubsetter.hasSubMesh()
|
||||||
|
? meshSubsetter.subMesh()
|
||||||
|
: meshSubsetter.baseMesh()
|
||||||
|
),
|
||||||
args.optionFound("noPatches"),
|
args.optionFound("noPatches"),
|
||||||
selectedPatches,
|
selectedPatches,
|
||||||
patchPatterns,
|
patchPatterns,
|
||||||
@ -349,6 +380,17 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Translating time = " << runTime.timeName() << nl;
|
Info<< "Translating time = " << runTime.timeName() << nl;
|
||||||
|
|
||||||
polyMesh::readUpdateState meshState = mesh.readUpdate();
|
polyMesh::readUpdateState meshState = mesh.readUpdate();
|
||||||
|
if (timeIndex != 0 && meshSubsetter.hasSubMesh())
|
||||||
|
{
|
||||||
|
Info<< "Converting cellZone " << cellZoneName
|
||||||
|
<< " only (puts outside faces into patch "
|
||||||
|
<< mesh.boundaryMesh()[0].name()
|
||||||
|
<< ")" << endl;
|
||||||
|
const cellZone& cz = mesh.cellZones()[cellZoneName];
|
||||||
|
cellSet c0(mesh, "c0", labelHashSet(cz));
|
||||||
|
meshSubsetter.setLargeCellSubset(c0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (meshState != polyMesh::UNCHANGED)
|
if (meshState != polyMesh::UNCHANGED)
|
||||||
{
|
{
|
||||||
@ -406,9 +448,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (volFieldTypes[i] == volScalarField::typeName)
|
if (volFieldTypes[i] == volScalarField::typeName)
|
||||||
{
|
{
|
||||||
|
volScalarField vf(fieldObject, mesh);
|
||||||
ensightField<scalar>
|
ensightField<scalar>
|
||||||
(
|
(
|
||||||
fieldObject,
|
volField(meshSubsetter, vf),
|
||||||
eMesh,
|
eMesh,
|
||||||
ensightDir,
|
ensightDir,
|
||||||
prepend,
|
prepend,
|
||||||
@ -420,9 +463,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (volFieldTypes[i] == volVectorField::typeName)
|
else if (volFieldTypes[i] == volVectorField::typeName)
|
||||||
{
|
{
|
||||||
|
volVectorField vf(fieldObject, mesh);
|
||||||
ensightField<vector>
|
ensightField<vector>
|
||||||
(
|
(
|
||||||
fieldObject,
|
volField(meshSubsetter, vf),
|
||||||
eMesh,
|
eMesh,
|
||||||
ensightDir,
|
ensightDir,
|
||||||
prepend,
|
prepend,
|
||||||
@ -434,9 +478,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (volFieldTypes[i] == volSphericalTensorField::typeName)
|
else if (volFieldTypes[i] == volSphericalTensorField::typeName)
|
||||||
{
|
{
|
||||||
|
volSphericalTensorField vf(fieldObject, mesh);
|
||||||
ensightField<sphericalTensor>
|
ensightField<sphericalTensor>
|
||||||
(
|
(
|
||||||
fieldObject,
|
volField(meshSubsetter, vf),
|
||||||
eMesh,
|
eMesh,
|
||||||
ensightDir,
|
ensightDir,
|
||||||
prepend,
|
prepend,
|
||||||
@ -448,9 +493,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (volFieldTypes[i] == volSymmTensorField::typeName)
|
else if (volFieldTypes[i] == volSymmTensorField::typeName)
|
||||||
{
|
{
|
||||||
|
volSymmTensorField vf(fieldObject, mesh);
|
||||||
ensightField<symmTensor>
|
ensightField<symmTensor>
|
||||||
(
|
(
|
||||||
fieldObject,
|
volField(meshSubsetter, vf),
|
||||||
eMesh,
|
eMesh,
|
||||||
ensightDir,
|
ensightDir,
|
||||||
prepend,
|
prepend,
|
||||||
@ -462,9 +508,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (volFieldTypes[i] == volTensorField::typeName)
|
else if (volFieldTypes[i] == volTensorField::typeName)
|
||||||
{
|
{
|
||||||
|
volTensorField vf(fieldObject, mesh);
|
||||||
ensightField<tensor>
|
ensightField<tensor>
|
||||||
(
|
(
|
||||||
fieldObject,
|
volField(meshSubsetter, vf),
|
||||||
eMesh,
|
eMesh,
|
||||||
ensightDir,
|
ensightDir,
|
||||||
prepend,
|
prepend,
|
||||||
|
|||||||
@ -952,8 +952,20 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
forAllConstIter(dictionary, dict, iter)
|
forAllConstIter(dictionary, dict, iter)
|
||||||
{
|
{
|
||||||
|
if (!iter().isDict())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const dictionary& surfaceDict = iter().dict();
|
const dictionary& surfaceDict = iter().dict();
|
||||||
|
|
||||||
|
if (!surfaceDict.found("extractionMethod"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const word extractionMethod = surfaceDict.lookup("extractionMethod");
|
||||||
|
|
||||||
const fileName surfFileName = iter().keyword();
|
const fileName surfFileName = iter().keyword();
|
||||||
const fileName sFeatFileName = surfFileName.lessExt().name();
|
const fileName sFeatFileName = surfFileName.lessExt().name();
|
||||||
|
|
||||||
@ -971,8 +983,6 @@ int main(int argc, char *argv[])
|
|||||||
const Switch closeness =
|
const Switch closeness =
|
||||||
surfaceDict.lookupOrDefault<Switch>("closeness", "off");
|
surfaceDict.lookupOrDefault<Switch>("closeness", "off");
|
||||||
|
|
||||||
const word extractionMethod = surfaceDict.lookup("extractionMethod");
|
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "Feature line extraction is only valid on closed manifold "
|
Info<< nl << "Feature line extraction is only valid on closed manifold "
|
||||||
<< "surfaces." << endl;
|
<< "surfaces." << endl;
|
||||||
|
|||||||
@ -30,6 +30,9 @@ sh/csh variants:
|
|||||||
* scotch.sh
|
* scotch.sh
|
||||||
application settings for compiling against scotch
|
application settings for compiling against scotch
|
||||||
|
|
||||||
|
* metis.sh
|
||||||
|
application settings for compiling against metis 5
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The config/example directory contains various example configuration files
|
The config/example directory contains various example configuration files
|
||||||
|
|||||||
@ -146,7 +146,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is)
|
|||||||
if (ePtr)
|
if (ePtr)
|
||||||
{
|
{
|
||||||
// Read as primitiveEntry
|
// Read as primitiveEntry
|
||||||
const word newKeyword(ePtr->stream());
|
const keyType newKeyword(ePtr->stream());
|
||||||
|
|
||||||
return parentDict.add
|
return parentDict.add
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,6 +37,14 @@ namespace functionEntries
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(calcEntry, 0);
|
defineTypeNameAndDebug(calcEntry, 0);
|
||||||
|
|
||||||
|
addToMemberFunctionSelectionTable
|
||||||
|
(
|
||||||
|
functionEntry,
|
||||||
|
calcEntry,
|
||||||
|
execute,
|
||||||
|
dictionaryIstream
|
||||||
|
);
|
||||||
|
|
||||||
addToMemberFunctionSelectionTable
|
addToMemberFunctionSelectionTable
|
||||||
(
|
(
|
||||||
functionEntry,
|
functionEntry,
|
||||||
@ -96,4 +104,48 @@ bool Foam::functionEntries::calcEntry::execute
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::functionEntries::calcEntry::execute
|
||||||
|
(
|
||||||
|
dictionary& parentDict,
|
||||||
|
Istream& is
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Info<< "Using #calcEntry at line " << is.lineNumber()
|
||||||
|
<< " in file " << parentDict.name() << endl;
|
||||||
|
|
||||||
|
dynamicCode::checkSecurity
|
||||||
|
(
|
||||||
|
"functionEntries::calcEntry::execute(..)",
|
||||||
|
parentDict
|
||||||
|
);
|
||||||
|
|
||||||
|
// Read string
|
||||||
|
string s(is);
|
||||||
|
// Make sure we stop this entry
|
||||||
|
//is.putBack(token(token::END_STATEMENT, is.lineNumber()));
|
||||||
|
|
||||||
|
// Construct codeDict for codeStream
|
||||||
|
// must reference parent for stringOps::expand to work nicely.
|
||||||
|
dictionary codeSubDict;
|
||||||
|
codeSubDict.add("code", "os << (" + s + ");");
|
||||||
|
dictionary codeDict(parentDict, codeSubDict);
|
||||||
|
|
||||||
|
codeStream::streamingFunctionType function = codeStream::getFunction
|
||||||
|
(
|
||||||
|
parentDict,
|
||||||
|
codeDict
|
||||||
|
);
|
||||||
|
|
||||||
|
// use function to write stream
|
||||||
|
OStringStream os(is.format());
|
||||||
|
(*function)(os, parentDict);
|
||||||
|
|
||||||
|
// get the entry from this stream
|
||||||
|
IStringStream resultStream(os.str());
|
||||||
|
parentDict.read(resultStream);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -89,6 +89,9 @@ public:
|
|||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Execute the functionEntry in a sub-dict context
|
//- Execute the functionEntry in a sub-dict context
|
||||||
|
static bool execute(dictionary& parentDict, Istream&);
|
||||||
|
|
||||||
|
//- Execute the functionEntry in a primitiveEntry context
|
||||||
static bool execute
|
static bool execute
|
||||||
(
|
(
|
||||||
const dictionary& parentDict,
|
const dictionary& parentDict,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,9 +31,9 @@ Description
|
|||||||
This boundary condition provides an oscillating condition in terms of
|
This boundary condition provides an oscillating condition in terms of
|
||||||
amplitude and frequency.
|
amplitude and frequency.
|
||||||
|
|
||||||
/f[
|
\f[
|
||||||
x_p = (1 + a sin(\pi f t))x_{ref} + x_o
|
x_p = (1 + a sin(\pi f t))x_{ref} + x_o
|
||||||
/f]
|
\f]
|
||||||
|
|
||||||
where
|
where
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,49 @@ Foam::fvPatchField<Type>::fvPatchField
|
|||||||
updated_(false),
|
updated_(false),
|
||||||
manipulatedMatrix_(false),
|
manipulatedMatrix_(false),
|
||||||
patchType_(ptf.patchType_)
|
patchType_(ptf.patchType_)
|
||||||
{}
|
{
|
||||||
|
// For unmapped faces set to internal field value (zero-gradient)
|
||||||
|
if (&iF && iF.size())
|
||||||
|
{
|
||||||
|
Field<Type>& f = *this;
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
mapper.direct()
|
||||||
|
&& &mapper.directAddressing()
|
||||||
|
&& mapper.directAddressing().size()
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Field<Type> pif(this->patchInternalField());
|
||||||
|
|
||||||
|
const labelList& mapAddressing = mapper.directAddressing();
|
||||||
|
|
||||||
|
forAll(mapAddressing, i)
|
||||||
|
{
|
||||||
|
if (mapAddressing[i] < 0)
|
||||||
|
{
|
||||||
|
f[i] = pif[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!mapper.direct() && mapper.addressing().size())
|
||||||
|
{
|
||||||
|
Field<Type> pif(this->patchInternalField());
|
||||||
|
|
||||||
|
const labelListList& mapAddressing = mapper.addressing();
|
||||||
|
|
||||||
|
forAll(mapAddressing, i)
|
||||||
|
{
|
||||||
|
const labelList& localAddrs = mapAddressing[i];
|
||||||
|
|
||||||
|
if (!localAddrs.size())
|
||||||
|
{
|
||||||
|
f[i] = pif[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,10 +45,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
|
|||||||
const labelList& faceMap
|
const labelList& faceMap
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Create and map the internal-field values
|
// 1. Create the complete field with dummy patch fields
|
||||||
Field<Type> internalField(vf.internalField(), cellMap);
|
|
||||||
|
|
||||||
// Create and map the patch field values
|
|
||||||
PtrList<fvPatchField<Type> > patchFields(patchMap.size());
|
PtrList<fvPatchField<Type> > patchFields(patchMap.size());
|
||||||
|
|
||||||
forAll(patchFields, patchI)
|
forAll(patchFields, patchI)
|
||||||
@ -69,6 +66,49 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
patchFields.set
|
||||||
|
(
|
||||||
|
patchI,
|
||||||
|
new calculatedFvPatchField<Type>
|
||||||
|
(
|
||||||
|
sMesh.boundary()[patchI],
|
||||||
|
DimensionedField<Type, volMesh>::null()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > tresF
|
||||||
|
(
|
||||||
|
new GeometricField<Type, fvPatchField, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"subset"+vf.name(),
|
||||||
|
sMesh.time().timeName(),
|
||||||
|
sMesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
sMesh,
|
||||||
|
vf.dimensions(),
|
||||||
|
Field<Type>(vf.internalField(), cellMap),
|
||||||
|
patchFields
|
||||||
|
)
|
||||||
|
);
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
|
||||||
|
|
||||||
|
|
||||||
|
// 2. Change the fvPatchFields to the correct type using a mapper
|
||||||
|
// constructor (with reference to the now correct internal field)
|
||||||
|
|
||||||
|
typename GeometricField<Type, fvPatchField, volMesh>::
|
||||||
|
GeometricBoundaryField& bf = resF.boundaryField();
|
||||||
|
|
||||||
|
forAll(bf, patchI)
|
||||||
|
{
|
||||||
|
if (patchMap[patchI] != -1)
|
||||||
{
|
{
|
||||||
// Construct addressing
|
// Construct addressing
|
||||||
const fvPatch& subPatch = sMesh.boundary()[patchI];
|
const fvPatch& subPatch = sMesh.boundary()[patchI];
|
||||||
@ -88,49 +128,26 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Mapped from internal face. Do what? Map from element
|
// Mapped from internal face. Do what? Leave up to
|
||||||
// 0 for now.
|
// fvPatchField
|
||||||
directAddressing[i] = 0;
|
directAddressing[i] = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
patchFields.set
|
bf.set
|
||||||
(
|
(
|
||||||
patchI,
|
patchI,
|
||||||
fvPatchField<Type>::New
|
fvPatchField<Type>::New
|
||||||
(
|
(
|
||||||
vf.boundaryField()[patchMap[patchI]],
|
vf.boundaryField()[patchMap[patchI]],
|
||||||
sMesh.boundary()[patchI],
|
subPatch,
|
||||||
DimensionedField<Type, volMesh>::null(),
|
resF.dimensionedInternalField(),
|
||||||
patchFieldSubset(directAddressing)
|
patchFieldSubset(directAddressing)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// What to do with exposed internal faces if put into this patch?
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create the complete field from the pieces
|
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> > tresF
|
|
||||||
(
|
|
||||||
new GeometricField<Type, fvPatchField, volMesh>
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"subset"+vf.name(),
|
|
||||||
sMesh.time().timeName(),
|
|
||||||
sMesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
sMesh,
|
|
||||||
vf.dimensions(),
|
|
||||||
internalField,
|
|
||||||
patchFields
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
return tresF;
|
return tresF;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,18 +178,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
|
|||||||
const labelList& faceMap
|
const labelList& faceMap
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Create and map the internal-field values
|
// 1. Create the complete field with dummy patch fields
|
||||||
Field<Type> internalField
|
|
||||||
(
|
|
||||||
vf.internalField(),
|
|
||||||
SubList<label>
|
|
||||||
(
|
|
||||||
faceMap,
|
|
||||||
sMesh.nInternalFaces()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Create and map the patch field values
|
|
||||||
PtrList<fvsPatchField<Type> > patchFields(patchMap.size());
|
PtrList<fvsPatchField<Type> > patchFields(patchMap.size());
|
||||||
|
|
||||||
forAll(patchFields, patchI)
|
forAll(patchFields, patchI)
|
||||||
@ -194,64 +200,18 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Construct addressing
|
|
||||||
const fvPatch& subPatch = sMesh.boundary()[patchI];
|
|
||||||
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
|
|
||||||
const label baseStart = basePatch.start();
|
|
||||||
const label baseSize = basePatch.size();
|
|
||||||
|
|
||||||
labelList directAddressing(subPatch.size());
|
|
||||||
|
|
||||||
forAll(directAddressing, i)
|
|
||||||
{
|
|
||||||
label baseFaceI = faceMap[subPatch.start()+i];
|
|
||||||
|
|
||||||
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
|
|
||||||
{
|
|
||||||
directAddressing[i] = baseFaceI-baseStart;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Mapped from internal face. Do what? Map from element
|
|
||||||
// 0 for now.
|
|
||||||
directAddressing[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
patchFields.set
|
patchFields.set
|
||||||
(
|
(
|
||||||
patchI,
|
patchI,
|
||||||
fvsPatchField<Type>::New
|
new calculatedFvsPatchField<Type>
|
||||||
(
|
(
|
||||||
vf.boundaryField()[patchMap[patchI]],
|
|
||||||
sMesh.boundary()[patchI],
|
sMesh.boundary()[patchI],
|
||||||
DimensionedField<Type, surfaceMesh>::null(),
|
DimensionedField<Type, surfaceMesh>::null()
|
||||||
patchFieldSubset(directAddressing)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Map exposed internal faces. Note: Only necessary if exposed faces added
|
|
||||||
// into existing patch but since we don't know that at this point...
|
|
||||||
forAll(patchFields, patchI)
|
|
||||||
{
|
|
||||||
fvsPatchField<Type>& pfld = patchFields[patchI];
|
|
||||||
|
|
||||||
label meshFaceI = pfld.patch().start();
|
|
||||||
|
|
||||||
forAll(pfld, i)
|
|
||||||
{
|
|
||||||
label oldFaceI = faceMap[meshFaceI++];
|
|
||||||
|
|
||||||
if (oldFaceI < vf.internalField().size())
|
|
||||||
{
|
|
||||||
pfld[i] = vf.internalField()[oldFaceI];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the complete field from the pieces
|
// Create the complete field from the pieces
|
||||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tresF
|
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tresF
|
||||||
(
|
(
|
||||||
@ -267,10 +227,96 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
|
|||||||
),
|
),
|
||||||
sMesh,
|
sMesh,
|
||||||
vf.dimensions(),
|
vf.dimensions(),
|
||||||
internalField,
|
Field<Type>
|
||||||
|
(
|
||||||
|
vf.internalField(),
|
||||||
|
SubList<label>
|
||||||
|
(
|
||||||
|
faceMap,
|
||||||
|
sMesh.nInternalFaces()
|
||||||
|
)
|
||||||
|
),
|
||||||
patchFields
|
patchFields
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF();
|
||||||
|
|
||||||
|
|
||||||
|
// 2. Change the fvsPatchFields to the correct type using a mapper
|
||||||
|
// constructor (with reference to the now correct internal field)
|
||||||
|
|
||||||
|
typename GeometricField<Type, fvsPatchField, surfaceMesh>::
|
||||||
|
GeometricBoundaryField& bf = resF.boundaryField();
|
||||||
|
|
||||||
|
forAll(bf, patchI)
|
||||||
|
{
|
||||||
|
if (patchMap[patchI] != -1)
|
||||||
|
{
|
||||||
|
// Construct addressing
|
||||||
|
const fvPatch& subPatch = sMesh.boundary()[patchI];
|
||||||
|
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
|
||||||
|
const label baseStart = basePatch.start();
|
||||||
|
const label baseSize = basePatch.size();
|
||||||
|
|
||||||
|
labelList directAddressing(subPatch.size());
|
||||||
|
|
||||||
|
forAll(directAddressing, i)
|
||||||
|
{
|
||||||
|
label baseFaceI = faceMap[subPatch.start()+i];
|
||||||
|
|
||||||
|
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
|
||||||
|
{
|
||||||
|
directAddressing[i] = baseFaceI-baseStart;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Mapped from internal face. Do what? Leave up to
|
||||||
|
// patchField. This would require also to pass in
|
||||||
|
// original internal field so for now do as postprocessing
|
||||||
|
directAddressing[i] = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bf.set
|
||||||
|
(
|
||||||
|
patchI,
|
||||||
|
fvsPatchField<Type>::New
|
||||||
|
(
|
||||||
|
vf.boundaryField()[patchMap[patchI]],
|
||||||
|
subPatch,
|
||||||
|
resF.dimensionedInternalField(),
|
||||||
|
patchFieldSubset(directAddressing)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Postprocess patch field for exposed faces
|
||||||
|
|
||||||
|
fvsPatchField<Type>& pfld = bf[patchI];
|
||||||
|
|
||||||
|
forAll(pfld, i)
|
||||||
|
{
|
||||||
|
label baseFaceI = faceMap[subPatch.start()+i];
|
||||||
|
if (baseFaceI < vf.internalField().size())
|
||||||
|
{
|
||||||
|
// Exposed internal face
|
||||||
|
pfld[i] = vf.internalField()[baseFaceI];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Exposed face from other patch.
|
||||||
|
// Only possible in case of a coupled boundary
|
||||||
|
label patchI = vf.mesh().boundaryMesh().whichPatch
|
||||||
|
(
|
||||||
|
baseFaceI
|
||||||
|
);
|
||||||
|
const fvPatch& otherPatch = vf.mesh().boundary()[patchI];
|
||||||
|
label patchFaceI = otherPatch.patch().whichFace(baseFaceI);
|
||||||
|
pfld[i] = vf.boundaryField()[patchI][patchFaceI];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return tresF;
|
return tresF;
|
||||||
}
|
}
|
||||||
@ -344,8 +390,8 @@ fvMeshSubset::interpolate
|
|||||||
const pointPatch& subPatch = sMesh.boundary()[patchI];
|
const pointPatch& subPatch = sMesh.boundary()[patchI];
|
||||||
const labelList& subMeshPoints = subPatch.meshPoints();
|
const labelList& subMeshPoints = subPatch.meshPoints();
|
||||||
|
|
||||||
// If mapped from outside patch use point 0 for lack of better.
|
// If mapped from outside patch leave handling up to patchField
|
||||||
labelList directAddressing(subPatch.size(), 0);
|
labelList directAddressing(subPatch.size(), -1);
|
||||||
|
|
||||||
forAll(subMeshPoints, localI)
|
forAll(subMeshPoints, localI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,11 +64,12 @@ Foam::BreakupModel<CloudType>::BreakupModel
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
CloudType& owner,
|
CloudType& owner,
|
||||||
const word& type
|
const word& type,
|
||||||
|
bool solveOscillationEq
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
SubModelBase<CloudType>(owner, dict, typeName, type),
|
SubModelBase<CloudType>(owner, dict, typeName, type),
|
||||||
solveOscillationEq_(this->coeffDict().lookup("solveOscillationEq")),
|
solveOscillationEq_(solveOscillationEq),
|
||||||
y0_(0.0),
|
y0_(0.0),
|
||||||
yDot0_(0.0),
|
yDot0_(0.0),
|
||||||
TABComega_(0.0),
|
TABComega_(0.0),
|
||||||
@ -77,14 +78,12 @@ Foam::BreakupModel<CloudType>::BreakupModel
|
|||||||
{
|
{
|
||||||
if (solveOscillationEq_)
|
if (solveOscillationEq_)
|
||||||
{
|
{
|
||||||
const dictionary TABcoeffsDict(dict.subDict("TABCoeffs"));
|
const dictionary coeffs(dict.subDict("TABCoeffs"));
|
||||||
y0_ = TABcoeffsDict.template lookupOrDefault<scalar>("y0", 0.0);
|
y0_ = coeffs.template lookupOrDefault<scalar>("y0", 0.0);
|
||||||
yDot0_ = TABcoeffsDict.template lookupOrDefault<scalar>("yDot0", 0.0);
|
yDot0_ = coeffs.template lookupOrDefault<scalar>("yDot0", 0.0);
|
||||||
TABComega_ =
|
TABComega_ = coeffs.template lookupOrDefault<scalar>("Comega", 8.0);
|
||||||
TABcoeffsDict.template lookupOrDefault<scalar>("Comega", 8.0);
|
TABCmu_ = coeffs.template lookupOrDefault<scalar>("Cmu", 10.0);
|
||||||
TABCmu_ = TABcoeffsDict.template lookupOrDefault<scalar>("Cmu", 10.0);
|
TABWeCrit_ = coeffs.template lookupOrDefault<scalar>("WeCrit", 12.0);
|
||||||
TABWeCrit_ =
|
|
||||||
TABcoeffsDict.template lookupOrDefault<scalar>("WeCrit", 12.0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,7 +97,8 @@ public:
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
CloudType& owner,
|
CloudType& owner,
|
||||||
const word& type
|
const word& type,
|
||||||
|
bool solveOscillationEq = false
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct copy
|
//- Construct copy
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -34,36 +34,21 @@ Foam::ETAB<CloudType>::ETAB
|
|||||||
CloudType& owner
|
CloudType& owner
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
BreakupModel<CloudType>(dict, owner, typeName),
|
BreakupModel<CloudType>(dict, owner, typeName, true),
|
||||||
Cmu_(10.0),
|
|
||||||
Comega_(8.0),
|
|
||||||
k1_(0.2),
|
k1_(0.2),
|
||||||
k2_(0.2),
|
k2_(0.2),
|
||||||
WeCrit_(12.0),
|
|
||||||
WeTransition_(100.0),
|
WeTransition_(100.0),
|
||||||
AWe_(0.0)
|
AWe_(0.0)
|
||||||
{
|
{
|
||||||
if (!this->defaultCoeffs(true))
|
if (!this->defaultCoeffs(true))
|
||||||
{
|
{
|
||||||
this->coeffDict().lookup("Cmu") >> Cmu_;
|
|
||||||
this->coeffDict().lookup("Comega") >> Comega_;
|
|
||||||
this->coeffDict().lookup("k1") >> k1_;
|
this->coeffDict().lookup("k1") >> k1_;
|
||||||
this->coeffDict().lookup("k2") >> k2_;
|
this->coeffDict().lookup("k2") >> k2_;
|
||||||
this->coeffDict().lookup("WeCrit") >> WeCrit_;
|
|
||||||
this->coeffDict().lookup("WeTransition") >> WeTransition_;
|
this->coeffDict().lookup("WeTransition") >> WeTransition_;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar k21 = k2_/k1_;
|
scalar k21 = k2_/k1_;
|
||||||
AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_);
|
AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_);
|
||||||
|
|
||||||
if (!BreakupModel<CloudType>::solveOscillationEq_)
|
|
||||||
{
|
|
||||||
Info<< "Warning: solveOscillationEq is set to "
|
|
||||||
<< BreakupModel<CloudType>::solveOscillationEq_ << nl
|
|
||||||
<< " Setting it to true in order for the ETAB model to work."
|
|
||||||
<< endl;
|
|
||||||
BreakupModel<CloudType>::solveOscillationEq_ = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -71,11 +56,8 @@ template<class CloudType>
|
|||||||
Foam::ETAB<CloudType>::ETAB(const ETAB<CloudType>& bum)
|
Foam::ETAB<CloudType>::ETAB(const ETAB<CloudType>& bum)
|
||||||
:
|
:
|
||||||
BreakupModel<CloudType>(bum),
|
BreakupModel<CloudType>(bum),
|
||||||
Cmu_(bum.Cmu_),
|
|
||||||
Comega_(bum.Comega_),
|
|
||||||
k1_(bum.k1_),
|
k1_(bum.k1_),
|
||||||
k2_(bum.k2_),
|
k2_(bum.k2_),
|
||||||
WeCrit_(bum.WeCrit_),
|
|
||||||
WeTransition_(bum.WeTransition_),
|
WeTransition_(bum.WeTransition_),
|
||||||
AWe_(bum.AWe_)
|
AWe_(bum.AWe_)
|
||||||
{}
|
{}
|
||||||
@ -123,10 +105,10 @@ bool Foam::ETAB<CloudType>::update
|
|||||||
scalar semiMass = nParticle*pow3(d);
|
scalar semiMass = nParticle*pow3(d);
|
||||||
|
|
||||||
// inverse of characteristic viscous damping time
|
// inverse of characteristic viscous damping time
|
||||||
scalar rtd = 0.5*Cmu_*mu/(rho*r2);
|
scalar rtd = 0.5*this->TABCmu_*mu/(rho*r2);
|
||||||
|
|
||||||
// oscillation frequency (squared)
|
// oscillation frequency (squared)
|
||||||
scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
|
scalar omega2 = this->TABComega_*sigma/(rho*r3) - rtd*rtd;
|
||||||
|
|
||||||
if (omega2 > 0)
|
if (omega2 > 0)
|
||||||
{
|
{
|
||||||
@ -134,7 +116,7 @@ bool Foam::ETAB<CloudType>::update
|
|||||||
scalar romega = 1.0/omega;
|
scalar romega = 1.0/omega;
|
||||||
|
|
||||||
scalar We = rhoc*sqr(Urmag)*r/sigma;
|
scalar We = rhoc*sqr(Urmag)*r/sigma;
|
||||||
scalar Wetmp = We/WeCrit_;
|
scalar Wetmp = We/this->TABWeCrit_;
|
||||||
|
|
||||||
scalar y1 = y - Wetmp;
|
scalar y1 = y - Wetmp;
|
||||||
scalar y2 = yDot*romega;
|
scalar y2 = yDot*romega;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,13 +71,8 @@ private:
|
|||||||
|
|
||||||
// Model constants
|
// Model constants
|
||||||
|
|
||||||
// Cmu_ and Comega_ are the same as in the TAB model
|
|
||||||
scalar Cmu_;
|
|
||||||
scalar Comega_;
|
|
||||||
|
|
||||||
scalar k1_;
|
scalar k1_;
|
||||||
scalar k2_;
|
scalar k2_;
|
||||||
scalar WeCrit_;
|
|
||||||
scalar WeTransition_;
|
scalar WeTransition_;
|
||||||
scalar AWe_;
|
scalar AWe_;
|
||||||
|
|
||||||
|
|||||||
@ -165,8 +165,6 @@ bool Foam::ReitzKHRT<CloudType>::update
|
|||||||
if ((tc > 0) || (lambdaRT < d) )
|
if ((tc > 0) || (lambdaRT < d) )
|
||||||
{
|
{
|
||||||
tc += dt;
|
tc += dt;
|
||||||
scalar multiplier = d/lambdaRT;
|
|
||||||
d = cbrt(d3/multiplier);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// characteristic RT breakup time
|
// characteristic RT breakup time
|
||||||
|
|||||||
@ -34,10 +34,7 @@ Foam::TAB<CloudType>::TAB
|
|||||||
CloudType& owner
|
CloudType& owner
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
BreakupModel<CloudType>(dict, owner, typeName),
|
BreakupModel<CloudType>(dict, owner, typeName, true),
|
||||||
Cmu_(BreakupModel<CloudType>::TABCmu_),
|
|
||||||
Comega_(BreakupModel<CloudType>::TABComega_),
|
|
||||||
WeCrit_(BreakupModel<CloudType>::TABWeCrit_),
|
|
||||||
SMDCalcMethod_(this->coeffDict().lookup("SMDCalculationMethod"))
|
SMDCalcMethod_(this->coeffDict().lookup("SMDCalculationMethod"))
|
||||||
{
|
{
|
||||||
// calculate the inverse function of the Rossin-Rammler Distribution
|
// calculate the inverse function of the Rossin-Rammler Distribution
|
||||||
@ -52,16 +49,6 @@ Foam::TAB<CloudType>::TAB
|
|||||||
(1.0 - exp(-xx)*(1.0 + xx + sqr(xx)/2.0 + pow3(xx)/6.0))*rrd100;
|
(1.0 - exp(-xx)*(1.0 + xx + sqr(xx)/2.0 + pow3(xx)/6.0))*rrd100;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!BreakupModel<CloudType>::solveOscillationEq_)
|
|
||||||
{
|
|
||||||
WarningIn("Foam::TAB<CloudType>::TAB(const dictionary&, CloudType&)")
|
|
||||||
<< "solveOscillationEq is set to "
|
|
||||||
<< BreakupModel<CloudType>::solveOscillationEq_ << nl
|
|
||||||
<< " Setting it to true in order for the TAB model to work."
|
|
||||||
<< endl;
|
|
||||||
BreakupModel<CloudType>::solveOscillationEq_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SMDCalcMethod_ == "method1")
|
if (SMDCalcMethod_ == "method1")
|
||||||
{
|
{
|
||||||
SMDMethod_ = method1;
|
SMDMethod_ = method1;
|
||||||
@ -84,9 +71,6 @@ template<class CloudType>
|
|||||||
Foam::TAB<CloudType>::TAB(const TAB<CloudType>& bum)
|
Foam::TAB<CloudType>::TAB(const TAB<CloudType>& bum)
|
||||||
:
|
:
|
||||||
BreakupModel<CloudType>(bum),
|
BreakupModel<CloudType>(bum),
|
||||||
Cmu_(bum.Cmu_),
|
|
||||||
Comega_(bum.Comega_),
|
|
||||||
WeCrit_(bum.WeCrit_),
|
|
||||||
SMDCalcMethod_(bum.SMDCalcMethod_)
|
SMDCalcMethod_(bum.SMDCalcMethod_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -135,16 +119,16 @@ bool Foam::TAB<CloudType>::update
|
|||||||
scalar semiMass = nParticle*pow3(d);
|
scalar semiMass = nParticle*pow3(d);
|
||||||
|
|
||||||
// inverse of characteristic viscous damping time
|
// inverse of characteristic viscous damping time
|
||||||
scalar rtd = 0.5*Cmu_*mu/(rho*r2);
|
scalar rtd = 0.5*this->TABCmu_*mu/(rho*r2);
|
||||||
|
|
||||||
// oscillation frequency (squared)
|
// oscillation frequency (squared)
|
||||||
scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
|
scalar omega2 = this->TABComega_*sigma/(rho*r3) - rtd*rtd;
|
||||||
|
|
||||||
if (omega2 > 0)
|
if (omega2 > 0)
|
||||||
{
|
{
|
||||||
scalar omega = sqrt(omega2);
|
scalar omega = sqrt(omega2);
|
||||||
scalar We = rhoc*sqr(Urmag)*r/sigma;
|
scalar We = rhoc*sqr(Urmag)*r/sigma;
|
||||||
scalar Wetmp = We/WeCrit_;
|
scalar Wetmp = We/this->TABWeCrit_;
|
||||||
|
|
||||||
scalar y1 = y - Wetmp;
|
scalar y1 = y - Wetmp;
|
||||||
scalar y2 = yDot/omega;
|
scalar y2 = yDot/omega;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -83,9 +83,6 @@ private:
|
|||||||
|
|
||||||
// Model constants
|
// Model constants
|
||||||
|
|
||||||
scalar Cmu_;
|
|
||||||
scalar Comega_;
|
|
||||||
scalar WeCrit_;
|
|
||||||
word SMDCalcMethod_;
|
word SMDCalcMethod_;
|
||||||
SMDMethods SMDMethod_;
|
SMDMethods SMDMethod_;
|
||||||
|
|
||||||
|
|||||||
@ -2450,17 +2450,17 @@ void Foam::autoLayerDriver::mergePatchFacesUndo
|
|||||||
const dictionary& motionDict
|
const dictionary& motionDict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar minCos =
|
// Clip to 45 degrees
|
||||||
Foam::cos(degToRad(layerParams.featureAngle()));
|
scalar planarAngle = min(45.0, layerParams.featureAngle());
|
||||||
|
scalar minCos = Foam::cos(degToRad(planarAngle));
|
||||||
|
|
||||||
scalar concaveCos =
|
scalar concaveCos = Foam::cos(degToRad(layerParams.concaveAngle()));
|
||||||
Foam::cos(degToRad(layerParams.concaveAngle()));
|
|
||||||
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "Merging all faces of a cell" << nl
|
<< "Merging all faces of a cell" << nl
|
||||||
<< "---------------------------" << nl
|
<< "---------------------------" << nl
|
||||||
<< " - which are on the same patch" << nl
|
<< " - which are on the same patch" << nl
|
||||||
<< " - which make an angle < " << layerParams.featureAngle()
|
<< " - which make an angle < " << planarAngle
|
||||||
<< " degrees"
|
<< " degrees"
|
||||||
<< nl
|
<< nl
|
||||||
<< " (cos:" << minCos << ')' << nl
|
<< " (cos:" << minCos << ')' << nl
|
||||||
@ -2478,7 +2478,7 @@ void Foam::autoLayerDriver::mergePatchFacesUndo
|
|||||||
concaveCos,
|
concaveCos,
|
||||||
meshRefiner_.meshedPatches(),
|
meshRefiner_.meshedPatches(),
|
||||||
motionDict,
|
motionDict,
|
||||||
labelList(mesh.nFaces() -1)
|
labelList(mesh.nFaces(), -1)
|
||||||
);
|
);
|
||||||
|
|
||||||
nChanged += meshRefiner_.mergeEdgesUndo(minCos, motionDict);
|
nChanged += meshRefiner_.mergeEdgesUndo(minCos, motionDict);
|
||||||
|
|||||||
@ -1849,7 +1849,8 @@ void Foam::autoSnapDriver::doSnap
|
|||||||
{
|
{
|
||||||
WarningIn("autoSnapDriver::doSnap(..)")
|
WarningIn("autoSnapDriver::doSnap(..)")
|
||||||
<< "Did not succesfully snap mesh."
|
<< "Did not succesfully snap mesh."
|
||||||
<< " Continuing to snap to resolve easy surfaces but the"
|
<< " Continuing to snap to resolve easy" << nl
|
||||||
|
<< " surfaces but the"
|
||||||
<< " resulting mesh will not satisfy your quality"
|
<< " resulting mesh will not satisfy your quality"
|
||||||
<< " constraints" << nl << endl;
|
<< " constraints" << nl << endl;
|
||||||
//Info<< "Did not succesfully snap mesh. Giving up."
|
//Info<< "Did not succesfully snap mesh. Giving up."
|
||||||
|
|||||||
@ -250,6 +250,17 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::ST
|
|||||||
const Foam::radiation::absorptionEmissionModel&
|
const Foam::radiation::absorptionEmissionModel&
|
||||||
Foam::radiation::radiationModel::absorptionEmission() const
|
Foam::radiation::radiationModel::absorptionEmission() const
|
||||||
{
|
{
|
||||||
|
if (!absorptionEmission_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"const Foam::radiation::absorptionEmissionModel&"
|
||||||
|
"Foam::radiation::radiationModel::absorptionEmission() const"
|
||||||
|
)
|
||||||
|
<< "Requested radiation absorptionEmission model, but model is "
|
||||||
|
<< "not activate" << abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
return absorptionEmission_();
|
return absorptionEmission_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -231,7 +231,7 @@ public:
|
|||||||
volScalarField& T
|
volScalarField& T
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Access to absorptionEmissionModel
|
//- Access to absorptionEmission model
|
||||||
const absorptionEmissionModel& absorptionEmission() const;
|
const absorptionEmissionModel& absorptionEmission() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,6 @@ $(v2WallFunctions)/v2WallFunction/v2WallFunctionFvPatchScalarField.C
|
|||||||
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
|
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
|
||||||
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
|
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
|
||||||
derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
|
derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
|
||||||
derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
|
|
||||||
|
|
||||||
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
|
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,7 +62,7 @@ Description
|
|||||||
|
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
z | vertical co-ordinate [m] | yes |
|
z | vertical direction of z-axis | yes |
|
||||||
kappa | Karman's constanat | no | 0.41
|
kappa | Karman's constanat | no | 0.41
|
||||||
Uref | reference velocity [m/s] | yes |
|
Uref | reference velocity [m/s] | yes |
|
||||||
Href | reference height [m] | yes |
|
Href | reference height [m] | yes |
|
||||||
@ -75,7 +75,7 @@ Description
|
|||||||
myPatch
|
myPatch
|
||||||
{
|
{
|
||||||
type atmBoundaryLayerInletEpsilon;
|
type atmBoundaryLayerInletEpsilon;
|
||||||
z 1.0;
|
z (0 1 0);
|
||||||
kappa 0.41;
|
kappa 0.41;
|
||||||
Uref 1.0;
|
Uref 1.0;
|
||||||
Href 0.0;
|
Href 0.0;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
turbulenceModel.C
|
turbulenceModel.C
|
||||||
laminar/laminar.C
|
laminar/laminar.C
|
||||||
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
|
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
|
||||||
|
derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel
|
LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -69,7 +69,7 @@ Description
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
n | flow direction | yes |
|
n | flow direction | yes |
|
||||||
z | vertical co-ordinate [m] | yes |
|
z | vertical direction of z-axis | yes |
|
||||||
kappa | Karman's constanat | no | 0.41
|
kappa | Karman's constanat | no | 0.41
|
||||||
Uref | reference velocity [m/s] | yes |
|
Uref | reference velocity [m/s] | yes |
|
||||||
Href | reference height [m] | yes |
|
Href | reference height [m] | yes |
|
||||||
@ -83,7 +83,7 @@ Description
|
|||||||
{
|
{
|
||||||
type atmBoundaryLayerInletVelocity;
|
type atmBoundaryLayerInletVelocity;
|
||||||
n (0 1 0);
|
n (0 1 0);
|
||||||
z 1.0;
|
z (0 1 0);
|
||||||
kappa 0.41;
|
kappa 0.41;
|
||||||
Uref 1.0;
|
Uref 1.0;
|
||||||
Href 0.0;
|
Href 0.0;
|
||||||
@ -135,7 +135,7 @@ class atmBoundaryLayerInletVelocityFvPatchVectorField
|
|||||||
//- Direction of the z-coordinate
|
//- Direction of the z-coordinate
|
||||||
vector z_;
|
vector z_;
|
||||||
|
|
||||||
//- Surface roughness lenght
|
//- Surface roughness length
|
||||||
scalarField z0_;
|
scalarField z0_;
|
||||||
|
|
||||||
//- Von Karman constant
|
//- Von Karman constant
|
||||||
@ -63,7 +63,6 @@ constantProperties
|
|||||||
|
|
||||||
epsilon0 1;
|
epsilon0 1;
|
||||||
f0 0.5;
|
f0 0.5;
|
||||||
Pr 0.7;
|
|
||||||
|
|
||||||
constantVolume false;
|
constantVolume false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,6 @@ constantProperties
|
|||||||
|
|
||||||
epsilon0 1;
|
epsilon0 1;
|
||||||
f0 0.5;
|
f0 0.5;
|
||||||
Pr 0.7;
|
|
||||||
|
|
||||||
constantVolume false;
|
constantVolume false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,6 @@ constantProperties
|
|||||||
|
|
||||||
epsilon0 1;
|
epsilon0 1;
|
||||||
f0 0.5;
|
f0 0.5;
|
||||||
Pr 0.7;
|
|
||||||
|
|
||||||
constantVolume false;
|
constantVolume false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user