mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -60,8 +60,8 @@ doc/[Dd]oxygen/man
|
|||||||
# untracked configuration files
|
# untracked configuration files
|
||||||
/etc/prefs.csh
|
/etc/prefs.csh
|
||||||
/etc/prefs.sh
|
/etc/prefs.sh
|
||||||
/etc/config/*.csh
|
/etc/config/prefs.csh
|
||||||
/etc/config/*.sh
|
/etc/config/prefs.sh
|
||||||
|
|
||||||
# source packages - anywhere
|
# source packages - anywhere
|
||||||
*.tar.bz2
|
*.tar.bz2
|
||||||
|
|||||||
@ -241,9 +241,11 @@
|
|||||||
- works in parallel
|
- works in parallel
|
||||||
+ =snappyHexMesh=:
|
+ =snappyHexMesh=:
|
||||||
+ extrude across multi-processor boundaries
|
+ extrude across multi-processor boundaries
|
||||||
+ preserve faceZones during layering
|
+ preserve faceZones shape during layering
|
||||||
+ combining patch faces after snapping
|
+ combining coincident patch faces is now default after snapping
|
||||||
+ *Warning*:
|
+ *Warning*:
|
||||||
|
- snapControls::tolerance setting fixed w.r.t. 17x. Is the
|
||||||
|
multiplication to calculate the local search distance for nearest.
|
||||||
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
|
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
|
||||||
90 to get same behaviour as 130 in 17x.
|
90 to get same behaviour as 130 in 17x.
|
||||||
- nGrow did not work in 17x. Set to 0
|
- nGrow did not work in 17x. Set to 0
|
||||||
@ -308,6 +310,8 @@
|
|||||||
+ multipleBoxes, hotBoxes, panel, evaporationTest
|
+ multipleBoxes, hotBoxes, panel, evaporationTest
|
||||||
+ =interDyMFoam= tutorials:
|
+ =interDyMFoam= tutorials:
|
||||||
+ testTubeMixer: showcases =solidBodyMotionFunction=
|
+ testTubeMixer: showcases =solidBodyMotionFunction=
|
||||||
|
+ =snappyHexMesh= tutorials:
|
||||||
|
+ flange: demonstration of feature lines in snappyHexMesh
|
||||||
|
|
||||||
* Other
|
* Other
|
||||||
+ compilable with =clang=
|
+ compilable with =clang=
|
||||||
|
|||||||
@ -49,6 +49,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< nl << "Calculating potential flow" << endl;
|
Info<< nl << "Calculating potential flow" << endl;
|
||||||
|
|
||||||
|
// Since solver contains no time loop it would never execute
|
||||||
|
// function objects so do it ourselves.
|
||||||
|
runTime.functionObjects().start();
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
@ -99,6 +103,9 @@ int main(int argc, char *argv[])
|
|||||||
p.write();
|
p.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runTime.functionObjects().end();
|
||||||
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -453,6 +453,7 @@ void Foam::createShellMesh::setRefinement
|
|||||||
label region0 = pointRegions_[eFaces[0]][fp0];
|
label region0 = pointRegions_[eFaces[0]][fp0];
|
||||||
label region1 = pointRegions_[eFaces[0]][fp1];
|
label region1 = pointRegions_[eFaces[0]][fp1];
|
||||||
|
|
||||||
|
// Pick up points with correct normal
|
||||||
if (layerI == 0)
|
if (layerI == 0)
|
||||||
{
|
{
|
||||||
newF[0] = f[fp0];
|
newF[0] = f[fp0];
|
||||||
@ -468,6 +469,22 @@ void Foam::createShellMesh::setRefinement
|
|||||||
newF[3] = addedPoints[nLayers*region0+layerI];
|
newF[3] = addedPoints[nLayers*region0+layerI];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optionally rotate so e[0] is always 0th vertex. Note that
|
||||||
|
// this normally is automatically done by coupled face ordering
|
||||||
|
// but with NOORDERING we have to do it ourselves.
|
||||||
|
if (f[fp0] != e[0])
|
||||||
|
{
|
||||||
|
// rotate one back to get newF[1] (originating from e[0])
|
||||||
|
// into newF[0]
|
||||||
|
label v0 = newF[0];
|
||||||
|
for (label i = 0; i < newF.size()-1; i++)
|
||||||
|
{
|
||||||
|
newF[i] = newF[newF.fcIndex(i)];
|
||||||
|
}
|
||||||
|
newF.last() = v0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
label minCellI = addedCells[nLayers*eFaces[0]+layerI];
|
label minCellI = addedCells[nLayers*eFaces[0]+layerI];
|
||||||
label maxCellI;
|
label maxCellI;
|
||||||
label patchI;
|
label patchI;
|
||||||
@ -569,6 +586,21 @@ void Foam::createShellMesh::setRefinement
|
|||||||
newF[3] = addedPoints[nLayers*region0+layerI];
|
newF[3] = addedPoints[nLayers*region0+layerI];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Optionally rotate so e[0] is always 0th vertex. Note that
|
||||||
|
// this normally is automatically done by coupled face
|
||||||
|
// ordering but with NOORDERING we have to do it ourselves.
|
||||||
|
if (f[fp0] != e[0])
|
||||||
|
{
|
||||||
|
// rotate one back to get newF[1] (originating
|
||||||
|
// from e[0]) into newF[0].
|
||||||
|
label v0 = newF[0];
|
||||||
|
for (label i = 0; i < newF.size()-1; i++)
|
||||||
|
{
|
||||||
|
newF[i] = newF[newF.fcIndex(i)];
|
||||||
|
}
|
||||||
|
newF.last() = v0;
|
||||||
|
}
|
||||||
////if (ePatches.size() == 0)
|
////if (ePatches.size() == 0)
|
||||||
//{
|
//{
|
||||||
// Pout<< "Adding from MULTI face:"
|
// Pout<< "Adding from MULTI face:"
|
||||||
|
|||||||
@ -220,7 +220,7 @@ snapControls
|
|||||||
//- Maximum relative distance for points to be attracted by surface.
|
//- Maximum relative distance for points to be attracted by surface.
|
||||||
// True distance is this factor times local maximum edge length.
|
// True distance is this factor times local maximum edge length.
|
||||||
// Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance)
|
// Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance)
|
||||||
tolerance 2.0;
|
tolerance 1.0;
|
||||||
|
|
||||||
//- Number of mesh displacement relaxation iterations.
|
//- Number of mesh displacement relaxation iterations.
|
||||||
nSolveIter 30;
|
nSolveIter 30;
|
||||||
@ -228,6 +228,10 @@ snapControls
|
|||||||
//- Maximum number of snapping relaxation iterations. Should stop
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nRelaxIter 5;
|
nRelaxIter 5;
|
||||||
|
|
||||||
|
//- Highly experimental and wip: number of feature edge snapping
|
||||||
|
// iterations. Leave out altogether to disable.
|
||||||
|
//nFeatureSnapIter 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -258,6 +262,9 @@ addLayersControls
|
|||||||
|
|
||||||
|
|
||||||
//- Wanted thickness of final added cell layer. If multiple layers
|
//- Wanted thickness of final added cell layer. If multiple layers
|
||||||
|
// is the
|
||||||
|
// thickness of the layer furthest away from the wall.
|
||||||
|
// Relative to undistorted size of cell outside layer.
|
||||||
// is the thickness of the layer furthest away from the wall.
|
// is the thickness of the layer furthest away from the wall.
|
||||||
// See relativeSizes parameter.
|
// See relativeSizes parameter.
|
||||||
finalLayerThickness 0.3;
|
finalLayerThickness 0.3;
|
||||||
@ -410,7 +417,7 @@ debug 0;
|
|||||||
|
|
||||||
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
||||||
// Note: the write tolerance needs to be higher than this.
|
// Note: the write tolerance needs to be higher than this.
|
||||||
mergeTolerance 1E-6;
|
mergeTolerance 1e-6;
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -144,10 +144,30 @@ bool writeZones(const word& name, const fileName& meshDir, Time& runTime)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noConstant",
|
||||||
|
"exclude the 'constant/' dir in the times list"
|
||||||
|
);
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
// enable noConstant by switching
|
||||||
|
if (!args.optionFound("noConstant"))
|
||||||
|
{
|
||||||
|
args.setOption("constant", "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
args.unsetOption("constant");
|
||||||
|
Info<< "Excluding the constant directory." << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|
||||||
// Make sure we do not use the master-only reading since we read
|
// Make sure we do not use the master-only reading since we read
|
||||||
// fields (different per processor) as dictionaries.
|
// fields (different per processor) as dictionaries.
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||||
|
|||||||
@ -98,6 +98,44 @@ autoPtr<fvMesh> createMesh
|
|||||||
xferCopy(labelList()),
|
xferCopy(labelList()),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
// Add some dummy zones so upon reading it does not read them
|
||||||
|
// from the undecomposed case. Should be done as extra argument to
|
||||||
|
// regIOobject::readStream?
|
||||||
|
List<pointZone*> pz
|
||||||
|
(
|
||||||
|
1,
|
||||||
|
new pointZone
|
||||||
|
(
|
||||||
|
"dummyPointZone",
|
||||||
|
labelList(0),
|
||||||
|
0,
|
||||||
|
dummyMesh.pointZones()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
List<faceZone*> fz
|
||||||
|
(
|
||||||
|
1,
|
||||||
|
new faceZone
|
||||||
|
(
|
||||||
|
"dummyFaceZone",
|
||||||
|
labelList(0),
|
||||||
|
boolList(0),
|
||||||
|
0,
|
||||||
|
dummyMesh.faceZones()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
List<cellZone*> cz
|
||||||
|
(
|
||||||
|
1,
|
||||||
|
new cellZone
|
||||||
|
(
|
||||||
|
"dummyCellZone",
|
||||||
|
labelList(0),
|
||||||
|
0,
|
||||||
|
dummyMesh.cellZones()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
dummyMesh.addZones(pz, fz, cz);
|
||||||
//Pout<< "Writing dummy mesh to " << dummyMesh.polyMesh::objectPath()
|
//Pout<< "Writing dummy mesh to " << dummyMesh.polyMesh::objectPath()
|
||||||
// << endl;
|
// << endl;
|
||||||
dummyMesh.write();
|
dummyMesh.write();
|
||||||
@ -239,7 +277,11 @@ autoPtr<fvMesh> createMesh
|
|||||||
|
|
||||||
if (!haveMesh)
|
if (!haveMesh)
|
||||||
{
|
{
|
||||||
// Add the zones
|
// Add the zones. Make sure to remove the old dummy ones first
|
||||||
|
mesh.pointZones().clear();
|
||||||
|
mesh.faceZones().clear();
|
||||||
|
mesh.cellZones().clear();
|
||||||
|
|
||||||
List<pointZone*> pz(pointZoneNames.size());
|
List<pointZone*> pz(pointZoneNames.size());
|
||||||
forAll(pointZoneNames, i)
|
forAll(pointZoneNames, i)
|
||||||
{
|
{
|
||||||
@ -389,6 +431,12 @@ void printMeshData(const polyMesh& mesh)
|
|||||||
|
|
||||||
globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces());
|
globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces());
|
||||||
|
|
||||||
|
label maxProcCells = 0;
|
||||||
|
label totProcFaces = 0;
|
||||||
|
label maxProcPatches = 0;
|
||||||
|
label totProcPatches = 0;
|
||||||
|
label maxProcFaces = 0;
|
||||||
|
|
||||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||||
{
|
{
|
||||||
Info<< endl
|
Info<< endl
|
||||||
@ -413,7 +461,32 @@ void printMeshData(const polyMesh& mesh)
|
|||||||
<< " Number of processor faces = " << nProcFaces << nl
|
<< " Number of processor faces = " << nProcFaces << nl
|
||||||
<< " Number of boundary faces = "
|
<< " Number of boundary faces = "
|
||||||
<< globalBoundaryFaces.localSize(procI) << endl;
|
<< globalBoundaryFaces.localSize(procI) << endl;
|
||||||
|
|
||||||
|
maxProcCells = max(maxProcCells, globalCells.localSize(procI));
|
||||||
|
totProcFaces += nProcFaces;
|
||||||
|
totProcPatches += nei.size();
|
||||||
|
maxProcPatches = max(maxProcPatches, nei.size());
|
||||||
|
maxProcFaces = max(maxProcFaces, nProcFaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stats
|
||||||
|
|
||||||
|
scalar avgProcCells = scalar(globalCells.size())/Pstream::nProcs();
|
||||||
|
scalar avgProcPatches = scalar(totProcPatches)/Pstream::nProcs();
|
||||||
|
scalar avgProcFaces = scalar(totProcFaces)/Pstream::nProcs();
|
||||||
|
|
||||||
|
Info<< nl
|
||||||
|
<< "Number of processor faces = " << totProcFaces/2 << nl
|
||||||
|
<< "Max number of cells = " << maxProcCells
|
||||||
|
<< " (" << 100.0*(maxProcCells-avgProcCells)/avgProcCells
|
||||||
|
<< "% above average " << avgProcCells << ")" << nl
|
||||||
|
<< "Max number of processor patches = " << maxProcPatches
|
||||||
|
<< " (" << 100.0*(maxProcPatches-avgProcPatches)/avgProcPatches
|
||||||
|
<< "% above average " << avgProcPatches << ")" << nl
|
||||||
|
<< "Max number of faces between processors = " << maxProcFaces
|
||||||
|
<< " (" << 100.0*(maxProcFaces-avgProcFaces)/avgProcFaces
|
||||||
|
<< "% above average " << avgProcFaces << ")" << nl
|
||||||
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -641,6 +714,16 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
if (env("FOAM_SIGFPE"))
|
||||||
|
{
|
||||||
|
WarningIn(args.executable())
|
||||||
|
<< "Detected floating point exception trapping (FOAM_SIGFPE)."
|
||||||
|
<< " This might give" << nl
|
||||||
|
<< " problems when mapping fields. Switch it off in case"
|
||||||
|
<< " of problems." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create processor directory if non-existing
|
// Create processor directory if non-existing
|
||||||
if (!Pstream::master() && !isDir(args.path()))
|
if (!Pstream::master() && !isDir(args.path()))
|
||||||
{
|
{
|
||||||
@ -906,7 +989,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Debugging: Create additional volField that will be mapped.
|
// Debugging: Create additional volField that will be mapped.
|
||||||
// Used to test correctness of mapping
|
// Used to test correctness of mapping
|
||||||
volVectorField mapCc("mapCc", 1*mesh.C());
|
//volVectorField mapCc("mapCc", 1*mesh.C());
|
||||||
|
|
||||||
// Global matching tolerance
|
// Global matching tolerance
|
||||||
const scalar tolDim = getMergeDistance
|
const scalar tolDim = getMergeDistance
|
||||||
@ -948,7 +1031,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Debugging: test mapped cellcentre field.
|
// Debugging: test mapped cellcentre field.
|
||||||
compareFields(tolDim, mesh.C(), mapCc);
|
//compareFields(tolDim, mesh.C(), mapCc);
|
||||||
|
|
||||||
// Print nice message
|
// Print nice message
|
||||||
// ~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
113
bin/paraFoam
113
bin/paraFoam
@ -37,7 +37,7 @@ usage() {
|
|||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
Usage: ${0##*/} [OPTION]
|
Usage: ${0##*/} [OPTION] [PARAVIEW_OPTION]
|
||||||
options:
|
options:
|
||||||
-block use blockMesh reader (uses .blockMesh extension)
|
-block use blockMesh reader (uses .blockMesh extension)
|
||||||
-builtin use VTK builtin OpenFOAM reader (uses .foam extension)
|
-builtin use VTK builtin OpenFOAM reader (uses .foam extension)
|
||||||
@ -47,6 +47,9 @@ options:
|
|||||||
-touchAll create .blockMesh, .OpenFOAM files (and for all regions)
|
-touchAll create .blockMesh, .OpenFOAM files (and for all regions)
|
||||||
-help print the usage
|
-help print the usage
|
||||||
|
|
||||||
|
|
||||||
|
paraview options start with a double dashes
|
||||||
|
|
||||||
* start paraview $ParaView_VERSION with the OpenFOAM libraries
|
* start paraview $ParaView_VERSION with the OpenFOAM libraries
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
@ -57,7 +60,7 @@ USAGE
|
|||||||
# to clean up
|
# to clean up
|
||||||
unset FOAM_ABORT
|
unset FOAM_ABORT
|
||||||
|
|
||||||
unset regionName touchOpt
|
unset regionName optTouch
|
||||||
|
|
||||||
# reader extension
|
# reader extension
|
||||||
extension=OpenFOAM
|
extension=OpenFOAM
|
||||||
@ -88,19 +91,48 @@ do
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-touch)
|
-touch)
|
||||||
touchOpt=true
|
optTouch=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-touchAll)
|
-touchAll)
|
||||||
touchOpt=all
|
optTouch=all
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break # stop here, treat balance as paraview options
|
||||||
|
;;
|
||||||
|
--*)
|
||||||
|
break # stop here, treat this and balance as paraview options
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
usage "unknown option/argument: '$*'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# check for --data=... argument
|
||||||
|
#
|
||||||
|
hasDataArg()
|
||||||
|
{
|
||||||
|
hasData=false
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
(--data=*)
|
||||||
|
hasData=true
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
hasDataArg $@
|
||||||
|
|
||||||
|
|
||||||
# get a sensible caseName from the directory name
|
# get a sensible caseName from the directory name
|
||||||
caseName=${PWD##*/}
|
caseName=${PWD##*/}
|
||||||
caseFile="$caseName.$extension"
|
caseFile="$caseName.$extension"
|
||||||
@ -112,7 +144,7 @@ then
|
|||||||
fvControls="$fvControls/$regionName"
|
fvControls="$fvControls/$regionName"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${touchOpt:-false}" in
|
case "${optTouch:-false}" in
|
||||||
all)
|
all)
|
||||||
extension=OpenFOAM
|
extension=OpenFOAM
|
||||||
if [ -f constant/polyMesh/blockMeshDict ]
|
if [ -f constant/polyMesh/blockMeshDict ]
|
||||||
@ -149,33 +181,56 @@ case "$caseName" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
#
|
if [ "${hasData:-false}" = true ]
|
||||||
# check existence of essential files
|
then
|
||||||
#
|
|
||||||
case $extension in
|
|
||||||
blockMesh)
|
|
||||||
for check in system/controlDict constant/polyMesh/blockMeshDict
|
|
||||||
do
|
|
||||||
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
|
|
||||||
builtin | OpenFOAM)
|
# has --data=.., send directly to paraview
|
||||||
for check in system/controlDict $fvControls/fvSchemes $fvControls/fvSolution
|
exec paraview "$@"
|
||||||
do
|
|
||||||
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
# only create/remove caseFile if it didn't already exist
|
# check existence of essential files
|
||||||
[ -e $caseFile ] || {
|
warn="WARN file does not exist:"
|
||||||
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
case $extension in
|
||||||
touch "$caseFile"
|
blockMesh)
|
||||||
echo "created temporary '$caseFile'"
|
for check in \
|
||||||
}
|
system/controlDict \
|
||||||
|
constant/polyMesh/blockMeshDict \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -s "$parentDir/$check" ] || {
|
||||||
|
[ -n "$warn" ] && echo "$warn" 1>&2
|
||||||
|
echo " $parentDir/$check" 1>&2
|
||||||
|
unset warn
|
||||||
|
}
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
builtin | OpenFOAM)
|
||||||
|
for check in \
|
||||||
|
system/controlDict \
|
||||||
|
$fvControls/fvSchemes \
|
||||||
|
$fvControls/fvSolution \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -s "$parentDir/$check" ] || {
|
||||||
|
[ -n "$warn" ] && echo "$warn" 1>&2
|
||||||
|
echo " $parentDir/$check" 1>&2
|
||||||
|
unset warn
|
||||||
|
}
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# only create/remove caseFile if it didn't already exist
|
||||||
|
[ -e $caseFile ] || {
|
||||||
|
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
||||||
|
touch "$caseFile"
|
||||||
|
echo "created temporary '$caseFile'"
|
||||||
|
}
|
||||||
|
|
||||||
|
paraview --data="$caseFile" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
paraview --data="$caseFile"
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -131,7 +131,7 @@ do
|
|||||||
paraviewInstall="$2"
|
paraviewInstall="$2"
|
||||||
# replace ParaView_DIR=...
|
# replace ParaView_DIR=...
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/apps/paraview3/bashrc \
|
etc/config/paraview.sh \
|
||||||
'/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \
|
'/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \
|
||||||
"Replacing ParaView_DIR setting by '$paraviewInstall'"
|
"Replacing ParaView_DIR setting by '$paraviewInstall'"
|
||||||
shift 2
|
shift 2
|
||||||
|
|||||||
17
etc/bashrc
17
etc/bashrc
@ -120,7 +120,12 @@ export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
|||||||
# Location of site-specific templates etc
|
# Location of site-specific templates etc
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# unset is equivalent to $WM_PROJECT_INST_DIR/site
|
# unset is equivalent to $WM_PROJECT_INST_DIR/site
|
||||||
unset WM_PROJECT_SITE
|
if [ -d "$WM_PROJECT_SITE" ]
|
||||||
|
then
|
||||||
|
export WM_PROJECT_SITE
|
||||||
|
else
|
||||||
|
unset WM_PROJECT_SITE
|
||||||
|
fi
|
||||||
|
|
||||||
# Location of user files
|
# Location of user files
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -177,7 +182,7 @@ _foamEval()
|
|||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
||||||
|
|
||||||
# Evaluate command-line parameters and record settings for later
|
# Evaluate command-line parameters and record settings for later
|
||||||
# these can be used to set/unset values, or specify prefs files
|
# these can be used to set/unset values, or specify alternative pref files
|
||||||
export FOAM_SETTINGS="$@"
|
export FOAM_SETTINGS="$@"
|
||||||
_foamEval $@
|
_foamEval $@
|
||||||
|
|
||||||
@ -200,14 +205,14 @@ export PATH LD_LIBRARY_PATH MANPATH
|
|||||||
|
|
||||||
# Source project setup files
|
# Source project setup files
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
_foamSource $WM_PROJECT_DIR/etc/settings.sh
|
_foamSource $WM_PROJECT_DIR/etc/config/settings.sh
|
||||||
_foamSource $WM_PROJECT_DIR/etc/aliases.sh
|
_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh
|
||||||
|
|
||||||
|
|
||||||
# Source user setup files for optional packages
|
# Source user setup files for optional packages
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh`
|
||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/bashrc`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh`
|
||||||
|
|
||||||
|
|
||||||
# Clean environment paths again. Only remove duplicates
|
# Clean environment paths again. Only remove duplicates
|
||||||
|
|||||||
51
etc/config/README
Normal file
51
etc/config/README
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
The main OpenFOAM settings are located in the parent etc/ directory
|
||||||
|
|
||||||
|
* bashrc, cshrc
|
||||||
|
entry point for sourcing
|
||||||
|
|
||||||
|
* prefs.csh, prefs.sh
|
||||||
|
these files are untracked and can be used for some site-defined
|
||||||
|
settings
|
||||||
|
|
||||||
|
|
||||||
|
The etc/config/ directory contains various configuration files in
|
||||||
|
sh/csh variants:
|
||||||
|
|
||||||
|
* settings.csh, settings.sh
|
||||||
|
core settings
|
||||||
|
|
||||||
|
* aliases.csh, aliases.sh
|
||||||
|
aliases for interactive shells
|
||||||
|
|
||||||
|
* unset.csh, unset.sh
|
||||||
|
sourced to clear as many OpenFOAM environment settings as possible
|
||||||
|
|
||||||
|
|
||||||
|
* ensight.csh, ensight.sh
|
||||||
|
application settings for EnSight
|
||||||
|
|
||||||
|
* paraview.csh, paraview.sh
|
||||||
|
application settings for ParaView
|
||||||
|
|
||||||
|
* scotch.sh
|
||||||
|
application settings for compiling against scotch
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
The config/example directory contains various example configuration files
|
||||||
|
in sh/csh variants
|
||||||
|
|
||||||
|
* compiler.csh, compiler.sh
|
||||||
|
an example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||||
|
|
||||||
|
* openmpi.csh, openmpi.sh
|
||||||
|
an example of fine tuning openmpi settings for OpenFOAM
|
||||||
|
|
||||||
|
* paraview.csh, paraview.sh
|
||||||
|
an example of chaining to the standard config/paraview.sh with a
|
||||||
|
different ParaView_VERSION
|
||||||
|
|
||||||
|
* prefs.csh, prefs.sh
|
||||||
|
an example of supplying alternative site-defined settings
|
||||||
|
|
||||||
|
---
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/aliases.csh
|
# etc/config/aliases.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Aliases for working with OpenFOAM
|
# Aliases for working with OpenFOAM
|
||||||
@ -39,7 +39,7 @@ alias wmSP 'wmSET WM_PRECISION_OPTION=SP'
|
|||||||
alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
|
alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
|
||||||
|
|
||||||
# clear env
|
# clear env
|
||||||
alias wmUNSET='source $WM_PROJECT_DIR/etc/unset.csh'
|
alias wmUNSET='source $WM_PROJECT_DIR/etc/config/unset.csh'
|
||||||
|
|
||||||
# Toggle wmakeScheduler on/off
|
# Toggle wmakeScheduler on/off
|
||||||
# - also need to set WM_HOSTS
|
# - also need to set WM_HOSTS
|
||||||
@ -49,7 +49,7 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER'
|
|||||||
|
|
||||||
# Change ParaView version
|
# Change ParaView version
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
alias foamPV 'source `$WM_PROJECT_DIR/etc/apps/paraview3/cshrc` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
|
alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
|
||||||
|
|
||||||
|
|
||||||
# Change directory aliases
|
# Change directory aliases
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/aliases.sh
|
# etc/config/aliases.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Aliases for working with OpenFOAM
|
# Aliases for working with OpenFOAM
|
||||||
@ -39,7 +39,7 @@ alias wmSP='wmSET WM_PRECISION_OPTION=SP'
|
|||||||
alias wmDP='wmSET WM_PRECISION_OPTION=DP'
|
alias wmDP='wmSET WM_PRECISION_OPTION=DP'
|
||||||
|
|
||||||
# clear env
|
# clear env
|
||||||
alias wmUNSET='. $WM_PROJECT_DIR/etc/unset.sh'
|
alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh'
|
||||||
|
|
||||||
# Toggle wmakeScheduler on/off
|
# Toggle wmakeScheduler on/off
|
||||||
# - also need to set WM_HOSTS
|
# - also need to set WM_HOSTS
|
||||||
@ -52,7 +52,7 @@ alias wmSchedOFF='unset WM_SCHEDULER'
|
|||||||
unset foamPV
|
unset foamPV
|
||||||
foamPV()
|
foamPV()
|
||||||
{
|
{
|
||||||
. $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ParaView_VERSION=$1
|
. $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1
|
||||||
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)"
|
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# ensight/cshrc
|
# config/ensight.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for Ensight
|
# Setup file for Ensight
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# ensight/bashrc
|
# config/ensight.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for Ensight
|
# Setup file for Ensight
|
||||||
@ -22,11 +22,11 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# config/compiler.csh
|
# config/example/compiler.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Fine tuning of ThirdParty compiler settings for OpenFOAM
|
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.csh
|
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.csh
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -22,11 +22,11 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# config/compiler.sh
|
# config/example/compiler.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Fine tuning of ThirdParty compiler settings for OpenFOAM
|
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.sh
|
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.sh
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -22,11 +22,11 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# config/openmpi.csh
|
# config/example/openmpi.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Fine tuning of openmpi settings for OpenFOAM
|
# Example of fine tuning openmpi settings for OpenFOAM
|
||||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.csh
|
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.csh
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -22,11 +22,11 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# config/openmpi.sh
|
# config/example/openmpi.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Fine tuning of openmpi settings for OpenFOAM
|
# Example of fine tuning openmpi settings for OpenFOAM
|
||||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.sh
|
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.sh
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -22,10 +22,10 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# paraview3/cshrc-EXAMPLE
|
# config/example/paraview.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Example of chaining to the standard paraview3/cshrc with a
|
# Example of chaining to the standard config/paraview.csh with a
|
||||||
# different ParaView_VERSION
|
# different ParaView_VERSION
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
@ -35,10 +35,10 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Use other (shipped) cshrc with a different ParaView_VERSION
|
# Use other (shipped) paraview.csh with a different ParaView_VERSION
|
||||||
#
|
#
|
||||||
|
|
||||||
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/cshrc`
|
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.csh`
|
||||||
if ( $status == 0 ) source $foamFile ParaView_VERSION=3.9.0
|
if ( $status == 0 ) source $foamFile ParaView_VERSION=3.9.0
|
||||||
|
|
||||||
unset foamFile
|
unset foamFile
|
||||||
@ -22,10 +22,10 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# paraview3/bashrc-EXAMPLE
|
# config/example/paraview.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Example of chaining to the standard paraview3/bashrc with a
|
# Example of chaining to the standard config/paraview.sh with a
|
||||||
# different ParaView_VERSION
|
# different ParaView_VERSION
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
@ -35,10 +35,10 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Use other (shipped) bashrc with a different ParaView_VERSION
|
# Use other (shipped) paraview.sh with a different ParaView_VERSION
|
||||||
#
|
#
|
||||||
|
|
||||||
foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/bashrc 2>/dev/null)
|
foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.sh 2>/dev/null)
|
||||||
[ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.9.0
|
[ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.9.0
|
||||||
|
|
||||||
unset foamFile
|
unset foamFile
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/prefs.csh
|
# config/example/prefs.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Preset variables for the OpenFOAM configuration - C-Shell shell syntax.
|
# Preset variables for the OpenFOAM configuration - C-Shell shell syntax.
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/prefs.sh
|
# config/example/prefs.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Preset variables for the OpenFOAM configuration - POSIX shell syntax.
|
# Preset variables for the OpenFOAM configuration - POSIX shell syntax.
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# paraview3/cshrc
|
# config/paraview.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for paraview-3.x
|
# Setup file for paraview-3.x
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# paraview3/bashrc
|
# config/paraview.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for paraview-3.x
|
# Setup file for paraview-3.x
|
||||||
@ -113,7 +113,6 @@ else
|
|||||||
unset PV_PLUGIN_PATH
|
unset PV_PLUGIN_PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
unset _foamParaviewEval
|
unset _foamParaviewEval
|
||||||
unset cleaned cmake paraviewInstDir paraviewPython
|
unset cleaned cmake paraviewInstDir paraviewPython
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# scotch/bashrc
|
# config/scotch.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for scotch include/libraries.
|
# Setup file for scotch include/libraries.
|
||||||
@ -36,5 +36,4 @@
|
|||||||
export SCOTCH_VERSION=scotch_5.1.11
|
export SCOTCH_VERSION=scotch_5.1.11
|
||||||
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
|
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/settings.csh
|
# etc/config/settings.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
@ -193,7 +193,7 @@ unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
if ( ! $?foamCompiler ) then
|
if ( ! $?foamCompiler ) then
|
||||||
set foamCompiler=system
|
set foamCompiler=system
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
|
||||||
echo " foamCompiler not set, using '$foamCompiler'"
|
echo " foamCompiler not set, using '$foamCompiler'"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ case ThirdParty:
|
|||||||
breaksw
|
breaksw
|
||||||
default:
|
default:
|
||||||
echo
|
echo
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
|
||||||
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
|
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
|
||||||
echo " Please check your settings"
|
echo " Please check your settings"
|
||||||
echo
|
echo
|
||||||
@ -262,7 +262,7 @@ case ThirdParty:
|
|||||||
# Check that the compiler directory can be found
|
# Check that the compiler directory can be found
|
||||||
if ( ! -d "$gccDir" ) then
|
if ( ! -d "$gccDir" ) then
|
||||||
echo
|
echo
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
|
||||||
echo " Cannot find $gccDir installation."
|
echo " Cannot find $gccDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'foamCompiler' setting to 'system'"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
@ -302,7 +302,7 @@ case ThirdParty:
|
|||||||
# Check that the compiler directory can be found
|
# Check that the compiler directory can be found
|
||||||
if ( ! -d "$clangDir" ) then
|
if ( ! -d "$clangDir" ) then
|
||||||
echo
|
echo
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
|
||||||
echo " Cannot find $clangDir installation."
|
echo " Cannot find $clangDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'foamCompiler' setting to 'system'"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/settings.sh
|
# etc/config/settings.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
@ -215,7 +215,7 @@ unset MPFR_ARCH_PATH GMP_ARCH_PATH
|
|||||||
if [ -z "$foamCompiler" ]
|
if [ -z "$foamCompiler" ]
|
||||||
then
|
then
|
||||||
foamCompiler=system
|
foamCompiler=system
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" 1>&2
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
|
||||||
echo " foamCompiler not set, using '$foamCompiler'" 1>&2
|
echo " foamCompiler not set, using '$foamCompiler'" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ OpenFOAM | ThirdParty)
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo
|
echo
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:"
|
||||||
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
|
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
|
||||||
echo " Please check your settings"
|
echo " Please check your settings"
|
||||||
echo
|
echo
|
||||||
@ -278,7 +278,7 @@ OpenFOAM | ThirdParty)
|
|||||||
# Check that the compiler directory can be found
|
# Check that the compiler directory can be found
|
||||||
[ -d "$gccDir" ] || {
|
[ -d "$gccDir" ] || {
|
||||||
echo
|
echo
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:"
|
||||||
echo " Cannot find $gccDir installation."
|
echo " Cannot find $gccDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'foamCompiler' setting to 'system'"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
@ -322,7 +322,7 @@ OpenFOAM | ThirdParty)
|
|||||||
# Check that the compiler directory can be found
|
# Check that the compiler directory can be found
|
||||||
[ -d "$clangDir" ] || {
|
[ -d "$clangDir" ] || {
|
||||||
echo
|
echo
|
||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:"
|
||||||
echo " Cannot find $clangDir installation."
|
echo " Cannot find $clangDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'foamCompiler' setting to 'system'"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/unset.csh
|
# etc/config/unset.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Clear as many OpenFOAM environment settings as possible
|
# Clear as many OpenFOAM environment settings as possible
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/unset.sh
|
# etc/config/unset.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Clear as many OpenFOAM environment settings as possible
|
# Clear as many OpenFOAM environment settings as possible
|
||||||
@ -492,6 +492,7 @@ DebugSwitches
|
|||||||
geomCellLooper 0;
|
geomCellLooper 0;
|
||||||
geometricSurfacePatch 0;
|
geometricSurfacePatch 0;
|
||||||
global 0;
|
global 0;
|
||||||
|
globalIndexAndTransform 0;
|
||||||
globalMeshData 0;
|
globalMeshData 0;
|
||||||
globalPoints 0;
|
globalPoints 0;
|
||||||
gnuplot 0;
|
gnuplot 0;
|
||||||
|
|||||||
20
etc/cshrc
20
etc/cshrc
@ -107,9 +107,6 @@ if ( $?WM_PROJECT_INST_DIR ) then
|
|||||||
set foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
|
set foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if ( $?WM_PROJECT_SITE ) then
|
|
||||||
set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs"
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Location of installation
|
# Location of installation
|
||||||
@ -124,7 +121,12 @@ setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
|||||||
# Location of site-specific templates etc
|
# Location of site-specific templates etc
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# unset is equivalent to $WM_PROJECT_INST_DIR/site
|
# unset is equivalent to $WM_PROJECT_INST_DIR/site
|
||||||
unsetenv WM_PROJECT_SITE
|
if ( $?WM_PROJECT_SITE ) then
|
||||||
|
set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs"
|
||||||
|
if ( ! -d "$WM_PROJECT_SITE" ) unsetenv WM_PROJECT_SITE
|
||||||
|
else
|
||||||
|
unsetenv WM_PROJECT_SITE
|
||||||
|
endif
|
||||||
|
|
||||||
# Location of user files
|
# Location of user files
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -138,7 +140,7 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!*
|
|||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
||||||
|
|
||||||
# Evaluate command-line parameters and record settings for later
|
# Evaluate command-line parameters and record settings for later
|
||||||
# these can be used to set/unset values, or specify prefs files
|
# these can be used to set/unset values, or specify alternative pref files
|
||||||
setenv FOAM_SETTINGS "${*}"
|
setenv FOAM_SETTINGS "${*}"
|
||||||
while ( $#argv > 0 )
|
while ( $#argv > 0 )
|
||||||
switch ($argv[1])
|
switch ($argv[1])
|
||||||
@ -194,13 +196,13 @@ if ( $status == 0 ) setenv MANPATH $cleaned
|
|||||||
|
|
||||||
# Source project setup files
|
# Source project setup files
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
_foamSource $WM_PROJECT_DIR/etc/settings.csh
|
_foamSource $WM_PROJECT_DIR/etc/config/settings.csh
|
||||||
_foamSource $WM_PROJECT_DIR/etc/aliases.csh
|
_foamSource $WM_PROJECT_DIR/etc/config/aliases.csh
|
||||||
|
|
||||||
# Source user setup files for optional packages
|
# Source user setup files for optional packages
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh`
|
||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`
|
||||||
|
|
||||||
|
|
||||||
# Clean environment paths again. Only remove duplicates
|
# Clean environment paths again. Only remove duplicates
|
||||||
|
|||||||
@ -71,6 +71,27 @@ void Foam::dynamicCode::checkSecurity
|
|||||||
<< "using dlopen)"
|
<< "using dlopen)"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!allowSystemOperations)
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
title,
|
||||||
|
dict
|
||||||
|
) << "Loading a shared library using case-supplied code is not"
|
||||||
|
<< " enabled by default" << nl
|
||||||
|
<< "because of security issues. If you trust the code you can"
|
||||||
|
<< " enable this" << nl
|
||||||
|
<< "facility be adding to the InfoSwitches setting in the system"
|
||||||
|
<< " controlDict:" << nl << nl
|
||||||
|
<< " allowSystemOperations 1" << nl << nl
|
||||||
|
<< "The system controlDict is either" << nl << nl
|
||||||
|
<< " ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict" << nl << nl
|
||||||
|
<< "or" << nl << nl
|
||||||
|
<< " $WM_PROJECT_DIR/etc/controlDict" << nl
|
||||||
|
<< endl
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -400,26 +421,6 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
|
|||||||
Info<< "Creating new library in " << this->libRelPath() << endl;
|
Info<< "Creating new library in " << this->libRelPath() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!allowSystemOperations)
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"dynamicCode::copyOrCreateFiles() const"
|
|
||||||
) << "Loading a shared library using case-supplied code is not"
|
|
||||||
<< " enabled by default" << nl
|
|
||||||
<< "because of security issues. If you trust the code you can"
|
|
||||||
<< " enable this" << nl
|
|
||||||
<< "facility be adding to the InfoSwitches setting in the system"
|
|
||||||
<< " controlDict:" << nl << nl
|
|
||||||
<< " allowSystemOperations 1" << nl << nl
|
|
||||||
<< "The system controlDict is either" << nl << nl
|
|
||||||
<< " ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict" << nl << nl
|
|
||||||
<< "or" << nl << nl
|
|
||||||
<< " $WM_PROJECT_DIR/etc/controlDict" << nl
|
|
||||||
<< endl
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
const label nFiles = compileFiles_.size() + copyFiles_.size();
|
const label nFiles = compileFiles_.size() + copyFiles_.size();
|
||||||
|
|
||||||
DynamicList<fileName> resolvedFiles(nFiles);
|
DynamicList<fileName> resolvedFiles(nFiles);
|
||||||
|
|||||||
@ -414,11 +414,11 @@ Foam::argList::argList
|
|||||||
(
|
(
|
||||||
(
|
(
|
||||||
validOptions.found(optionName)
|
validOptions.found(optionName)
|
||||||
&& validOptions[optionName] != ""
|
&& !validOptions[optionName].empty()
|
||||||
)
|
)
|
||||||
|| (
|
|| (
|
||||||
validParOptions.found(optionName)
|
validParOptions.found(optionName)
|
||||||
&& validParOptions[optionName] != ""
|
&& !validParOptions[optionName].empty()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -833,6 +833,116 @@ Foam::argList::~argList()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::argList::setOption(const word& opt, const string& param)
|
||||||
|
{
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
// only allow valid options
|
||||||
|
if (validOptions.found(opt))
|
||||||
|
{
|
||||||
|
// some options are to be protected
|
||||||
|
if
|
||||||
|
(
|
||||||
|
opt == "case"
|
||||||
|
|| opt == "parallel"
|
||||||
|
|| opt == "roots"
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalError
|
||||||
|
<<"used argList::setOption on a protected option: '"
|
||||||
|
<< opt << "'" << endl;
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (validOptions[opt].empty())
|
||||||
|
{
|
||||||
|
// bool option
|
||||||
|
if (!param.empty())
|
||||||
|
{
|
||||||
|
// disallow change of type
|
||||||
|
FatalError
|
||||||
|
<<"used argList::setOption to change bool to non-bool: '"
|
||||||
|
<< opt << "'" << endl;
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// did not previously exist
|
||||||
|
changed = !options_.found(opt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// non-bool option
|
||||||
|
if (param.empty())
|
||||||
|
{
|
||||||
|
// disallow change of type
|
||||||
|
FatalError
|
||||||
|
<<"used argList::setOption to change non-bool to bool: '"
|
||||||
|
<< opt << "'" << endl;
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// existing value needs changing, or did not previously exist
|
||||||
|
changed = options_.found(opt) ? options_[opt] != param : true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalError
|
||||||
|
<<"used argList::setOption on an invalid option: '"
|
||||||
|
<< opt << "'" << nl << "allowed are the following:"
|
||||||
|
<< validOptions << endl;
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// set/change the option as required
|
||||||
|
if (changed)
|
||||||
|
{
|
||||||
|
options_.set(opt, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::argList::unsetOption(const word& opt)
|
||||||
|
{
|
||||||
|
// only allow valid options
|
||||||
|
if (validOptions.found(opt))
|
||||||
|
{
|
||||||
|
// some options are to be protected
|
||||||
|
if
|
||||||
|
(
|
||||||
|
opt == "case"
|
||||||
|
|| opt == "parallel"
|
||||||
|
|| opt == "roots"
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalError
|
||||||
|
<<"used argList::unsetOption on a protected option: '"
|
||||||
|
<< opt << "'" << endl;
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove the option, return true if state changed
|
||||||
|
return options_.erase(opt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalError
|
||||||
|
<<"used argList::unsetOption on an invalid option: '"
|
||||||
|
<< opt << "'" << nl << "allowed are the following:"
|
||||||
|
<< validOptions << endl;
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::argList::printNotes() const
|
void Foam::argList::printNotes() const
|
||||||
{
|
{
|
||||||
// output notes directly - no automatic text wrapping
|
// output notes directly - no automatic text wrapping
|
||||||
|
|||||||
@ -334,6 +334,19 @@ public:
|
|||||||
static void noParallel();
|
static void noParallel();
|
||||||
|
|
||||||
|
|
||||||
|
//- Set option directly (use with caution)
|
||||||
|
// An option with an empty param is a bool option.
|
||||||
|
// Not all valid options can also be set: eg, -case, -roots, ...
|
||||||
|
// Return true if the existing option value needed changing,
|
||||||
|
// or if the option did not previously exist.
|
||||||
|
bool setOption(const word& opt, const string& param = "");
|
||||||
|
|
||||||
|
//- Unset option directly (use with caution)
|
||||||
|
// Not all valid options can also be unset: eg, -case, -roots ...
|
||||||
|
// Return true if the option existed before being unset.
|
||||||
|
bool unsetOption(const word& opt);
|
||||||
|
|
||||||
|
|
||||||
// Print
|
// Print
|
||||||
|
|
||||||
//- Print notes (if any)
|
//- Print notes (if any)
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,7 +124,7 @@ bool Foam::matchPoints
|
|||||||
{
|
{
|
||||||
label faceI = pts1MagSqr.indices()[j];
|
label faceI = pts1MagSqr.indices()[j];
|
||||||
|
|
||||||
Pout<< "Compared coord:" << pts1[faceI]
|
Pout<< " Compared coord:" << pts1[faceI]
|
||||||
<< " with difference to point "
|
<< " with difference to point "
|
||||||
<< mag(pts1[faceI] - pts0[face0I]) << endl;
|
<< mag(pts1[faceI] - pts0[face0I]) << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -613,80 +613,83 @@ void Foam::globalPoints::receivePatchPoints
|
|||||||
label meshPointA = meshPoints[i];
|
label meshPointA = meshPoints[i];
|
||||||
label meshPointB = coupledMeshPoints[i];
|
label meshPointB = coupledMeshPoints[i];
|
||||||
|
|
||||||
//Pout<< "Connection between point " << meshPointA
|
if (meshPointA != meshPointB)
|
||||||
// << " at " << mesh_.points()[meshPointA]
|
|
||||||
// << " and " << meshPointB
|
|
||||||
// << " at " << mesh_.points()[meshPointB] << endl;
|
|
||||||
|
|
||||||
label localA = meshToLocalPoint
|
|
||||||
(
|
|
||||||
meshToPatchPoint,
|
|
||||||
meshPointA
|
|
||||||
);
|
|
||||||
label localB = meshToLocalPoint
|
|
||||||
(
|
|
||||||
meshToPatchPoint,
|
|
||||||
meshPointB
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Do we have information on pointA?
|
|
||||||
Map<label>::iterator procPointA =
|
|
||||||
meshToProcPoint_.find(localA);
|
|
||||||
|
|
||||||
labelPairList infoA;
|
|
||||||
if (procPointA != meshToProcPoint_.end())
|
|
||||||
{
|
{
|
||||||
infoA = addSendTransform
|
//Pout<< "Connection between point " << meshPointA
|
||||||
|
// << " at " << mesh_.points()[meshPointA]
|
||||||
|
// << " and " << meshPointB
|
||||||
|
// << " at " << mesh_.points()[meshPointB] << endl;
|
||||||
|
|
||||||
|
label localA = meshToLocalPoint
|
||||||
(
|
(
|
||||||
cycPatch.index(),
|
meshToPatchPoint,
|
||||||
procPoints_[procPointA()]
|
meshPointA
|
||||||
);
|
);
|
||||||
}
|
label localB = meshToLocalPoint
|
||||||
|
|
||||||
// Same for info on pointB
|
|
||||||
Map<label>::iterator procPointB =
|
|
||||||
meshToProcPoint_.find(localB);
|
|
||||||
|
|
||||||
labelPairList infoB;
|
|
||||||
if (procPointB != meshToProcPoint_.end())
|
|
||||||
{
|
|
||||||
infoB = addSendTransform
|
|
||||||
(
|
(
|
||||||
cycPatch.neighbPatchID(),
|
meshToPatchPoint,
|
||||||
procPoints_[procPointB()]
|
meshPointB
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (infoA.size())
|
// Do we have information on pointA?
|
||||||
{
|
Map<label>::iterator procPointA =
|
||||||
if (mergeInfo(infoA, localB))
|
meshToProcPoint_.find(localA);
|
||||||
|
|
||||||
|
labelPairList infoA;
|
||||||
|
if (procPointA != meshToProcPoint_.end())
|
||||||
{
|
{
|
||||||
//Pout<< " Combined info at point "
|
infoA = addSendTransform
|
||||||
// << mesh_.points()[meshPointB]
|
(
|
||||||
// << " now " << endl;
|
cycPatch.index(),
|
||||||
//printProcPoints
|
procPoints_[procPointA()]
|
||||||
//(
|
);
|
||||||
// patchToMeshPoint,
|
|
||||||
// procPoints_[meshToProcPoint_[localB]]
|
|
||||||
//);
|
|
||||||
changedPoints.insert(localB);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (infoB.size())
|
// Same for info on pointB
|
||||||
{
|
Map<label>::iterator procPointB =
|
||||||
if (mergeInfo(infoB, localA))
|
meshToProcPoint_.find(localB);
|
||||||
|
|
||||||
|
labelPairList infoB;
|
||||||
|
if (procPointB != meshToProcPoint_.end())
|
||||||
{
|
{
|
||||||
//Pout<< " Combined info at point "
|
infoB = addSendTransform
|
||||||
// << mesh_.points()[meshPointA]
|
(
|
||||||
// << " now " << endl;
|
cycPatch.neighbPatchID(),
|
||||||
//printProcPoints
|
procPoints_[procPointB()]
|
||||||
//(
|
);
|
||||||
// patchToMeshPoint,
|
}
|
||||||
// procPoints_[meshToProcPoint_[localA]]
|
|
||||||
//);
|
|
||||||
changedPoints.insert(localA);
|
if (infoA.size())
|
||||||
|
{
|
||||||
|
if (mergeInfo(infoA, localB))
|
||||||
|
{
|
||||||
|
//Pout<< " Combined info at point "
|
||||||
|
// << mesh_.points()[meshPointB]
|
||||||
|
// << " now " << endl;
|
||||||
|
//printProcPoints
|
||||||
|
//(
|
||||||
|
// patchToMeshPoint,
|
||||||
|
// procPoints_[meshToProcPoint_[localB]]
|
||||||
|
//);
|
||||||
|
changedPoints.insert(localB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (infoB.size())
|
||||||
|
{
|
||||||
|
if (mergeInfo(infoB, localA))
|
||||||
|
{
|
||||||
|
//Pout<< " Combined info at point "
|
||||||
|
// << mesh_.points()[meshPointA]
|
||||||
|
// << " now " << endl;
|
||||||
|
//printProcPoints
|
||||||
|
//(
|
||||||
|
// patchToMeshPoint,
|
||||||
|
// procPoints_[meshToProcPoint_[localA]]
|
||||||
|
//);
|
||||||
|
changedPoints.insert(localA);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,11 +24,12 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "globalIndexAndTransform.H"
|
#include "globalIndexAndTransform.H"
|
||||||
#include "coupledPolyPatch.H"
|
|
||||||
#include "cyclicPolyPatch.H"
|
#include "cyclicPolyPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * //
|
// * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(Foam::globalIndexAndTransform, 0);
|
||||||
|
|
||||||
const Foam::label Foam::globalIndexAndTransform::base_ = 32;
|
const Foam::label Foam::globalIndexAndTransform::base_ = 32;
|
||||||
|
|
||||||
|
|
||||||
@ -478,6 +479,63 @@ Foam::globalIndexAndTransform::globalIndexAndTransform
|
|||||||
determineTransformPermutations();
|
determineTransformPermutations();
|
||||||
|
|
||||||
determinePatchTransformSign();
|
determinePatchTransformSign();
|
||||||
|
|
||||||
|
if (debug && transforms_.size() > 0)
|
||||||
|
{
|
||||||
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
|
Info<< "Determined global transforms :" << endl;
|
||||||
|
Info<< "\t\ttranslation\trotation" << endl;
|
||||||
|
forAll(transforms_, i)
|
||||||
|
{
|
||||||
|
Info<< '\t' << i << '\t';
|
||||||
|
const vectorTensorTransform& trafo = transforms_[i];
|
||||||
|
if (trafo.hasR())
|
||||||
|
{
|
||||||
|
Info<< trafo.t() << '\t' << trafo.R();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< trafo.t() << '\t' << "---";
|
||||||
|
}
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
Info<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "\tpatch\ttransform\tsign" << endl;
|
||||||
|
forAll(patchTransformSign_, patchI)
|
||||||
|
{
|
||||||
|
if (patchTransformSign_[patchI].first() != -1)
|
||||||
|
{
|
||||||
|
Info<< '\t' << patches[patchI].name()
|
||||||
|
<< '\t' << patchTransformSign_[patchI].first()
|
||||||
|
<< '\t' << patchTransformSign_[patchI].second()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Info<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Permutations of transformations:" << endl
|
||||||
|
<< "\t\ttranslation\trotation" << endl;
|
||||||
|
forAll(transformPermutations_, i)
|
||||||
|
{
|
||||||
|
Info<< '\t' << i << '\t';
|
||||||
|
const vectorTensorTransform& trafo = transformPermutations_[i];
|
||||||
|
if (trafo.hasR())
|
||||||
|
{
|
||||||
|
Info<< trafo.t() << '\t' << trafo.R();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< trafo.t() << '\t' << "---";
|
||||||
|
}
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
Info<< "nullTransformIndex:" << nullTransformIndex() << endl
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -164,6 +164,10 @@ public:
|
|||||||
friend class globalPoints;
|
friend class globalPoints;
|
||||||
|
|
||||||
|
|
||||||
|
// Declare name of the class and its debug switch
|
||||||
|
ClassName("globalIndexAndTransform");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -40,6 +40,48 @@ Foam::dynamicFvMesh::dynamicFvMesh(const IOobject& io)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::dynamicFvMesh::dynamicFvMesh
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const Xfer<pointField>& points,
|
||||||
|
const Xfer<faceList>& faces,
|
||||||
|
const Xfer<labelList>& allOwner,
|
||||||
|
const Xfer<labelList>& allNeighbour,
|
||||||
|
const bool syncPar
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fvMesh
|
||||||
|
(
|
||||||
|
io,
|
||||||
|
points,
|
||||||
|
faces,
|
||||||
|
allOwner,
|
||||||
|
allNeighbour,
|
||||||
|
syncPar
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::dynamicFvMesh::dynamicFvMesh
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const Xfer<pointField>& points,
|
||||||
|
const Xfer<faceList>& faces,
|
||||||
|
const Xfer<cellList>& cells,
|
||||||
|
const bool syncPar
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fvMesh
|
||||||
|
(
|
||||||
|
io,
|
||||||
|
points,
|
||||||
|
faces,
|
||||||
|
cells,
|
||||||
|
syncPar
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::dynamicFvMesh::~dynamicFvMesh()
|
Foam::dynamicFvMesh::~dynamicFvMesh()
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -85,6 +85,29 @@ public:
|
|||||||
//- Construct from objectRegistry, and read/write options
|
//- Construct from objectRegistry, and read/write options
|
||||||
explicit dynamicFvMesh(const IOobject& io);
|
explicit dynamicFvMesh(const IOobject& io);
|
||||||
|
|
||||||
|
//- Construct from components without boundary.
|
||||||
|
// Boundary is added using addFvPatches() member function
|
||||||
|
dynamicFvMesh
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const Xfer<pointField>& points,
|
||||||
|
const Xfer<faceList>& faces,
|
||||||
|
const Xfer<labelList>& allOwner,
|
||||||
|
const Xfer<labelList>& allNeighbour,
|
||||||
|
const bool syncPar = true
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct without boundary from cells rather than owner/neighbour.
|
||||||
|
// Boundary is added using addPatches() member function
|
||||||
|
dynamicFvMesh
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const Xfer<pointField>& points,
|
||||||
|
const Xfer<faceList>& faces,
|
||||||
|
const Xfer<cellList>& cells,
|
||||||
|
const bool syncPar = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -690,9 +690,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
// Remove unreferenced history.
|
// Remove unreferenced history.
|
||||||
compact();
|
compact();
|
||||||
|
|
||||||
Pout<< nl << "--BEFORE:" << endl;
|
//Pout<< nl << "--BEFORE:" << endl;
|
||||||
writeDebug();
|
//writeDebug();
|
||||||
Pout<< "---------" << nl << endl;
|
//Pout<< "---------" << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
// Distribution is only partially functional.
|
// Distribution is only partially functional.
|
||||||
@ -746,18 +746,18 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Pout<< "refinementHistory::distribute :"
|
//Pout<< "refinementHistory::distribute :"
|
||||||
<< " splitCellProc:" << splitCellProc << endl;
|
// << " splitCellProc:" << splitCellProc << endl;
|
||||||
|
//
|
||||||
Pout<< "refinementHistory::distribute :"
|
//Pout<< "refinementHistory::distribute :"
|
||||||
<< " splitCellNum:" << splitCellNum << endl;
|
// << " splitCellNum:" << splitCellNum << endl;
|
||||||
|
|
||||||
|
|
||||||
// Create subsetted refinement tree consisting of all parents that
|
// Create subsetted refinement tree consisting of all parents that
|
||||||
// move in their whole to other processor.
|
// move in their whole to other processor.
|
||||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||||
{
|
{
|
||||||
Pout<< "-- Subetting for processor " << procI << endl;
|
//Pout<< "-- Subetting for processor " << procI << endl;
|
||||||
|
|
||||||
// From uncompacted to compacted splitCells.
|
// From uncompacted to compacted splitCells.
|
||||||
labelList oldToNew(splitCells_.size(), -1);
|
labelList oldToNew(splitCells_.size(), -1);
|
||||||
@ -781,10 +781,10 @@ Pout<< "refinementHistory::distribute :"
|
|||||||
oldToNew[index] = newSplitCells.size();
|
oldToNew[index] = newSplitCells.size();
|
||||||
newSplitCells.append(splitCells_[index]);
|
newSplitCells.append(splitCells_[index]);
|
||||||
|
|
||||||
Pout<< "Added oldCell " << index
|
//Pout<< "Added oldCell " << index
|
||||||
<< " info " << newSplitCells.last()
|
// << " info " << newSplitCells.last()
|
||||||
<< " at position " << newSplitCells.size()-1
|
// << " at position " << newSplitCells.size()-1
|
||||||
<< endl;
|
// << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -797,9 +797,9 @@ Pout<< "refinementHistory::distribute :"
|
|||||||
{
|
{
|
||||||
label parent = splitCells_[index].parent_;
|
label parent = splitCells_[index].parent_;
|
||||||
|
|
||||||
Pout<< "Adding refined cell " << cellI
|
//Pout<< "Adding refined cell " << cellI
|
||||||
<< " since moves to "
|
// << " since moves to "
|
||||||
<< procI << " old parent:" << parent << endl;
|
// << procI << " old parent:" << parent << endl;
|
||||||
|
|
||||||
// Create new splitCell with parent
|
// Create new splitCell with parent
|
||||||
oldToNew[index] = newSplitCells.size();
|
oldToNew[index] = newSplitCells.size();
|
||||||
@ -891,8 +891,8 @@ Pout<< "refinementHistory::distribute :"
|
|||||||
// renumbering can be done here.
|
// renumbering can be done here.
|
||||||
label offset = splitCells_.size();
|
label offset = splitCells_.size();
|
||||||
|
|
||||||
Pout<< "**Renumbering data from proc " << procI << " with offset "
|
//Pout<< "**Renumbering data from proc " << procI << " with offset "
|
||||||
<< offset << endl;
|
// << offset << endl;
|
||||||
|
|
||||||
forAll(newSplitCells, index)
|
forAll(newSplitCells, index)
|
||||||
{
|
{
|
||||||
@ -929,9 +929,9 @@ Pout<< "refinementHistory::distribute :"
|
|||||||
}
|
}
|
||||||
splitCells_.shrink();
|
splitCells_.shrink();
|
||||||
|
|
||||||
Pout<< nl << "--AFTER:" << endl;
|
//Pout<< nl << "--AFTER:" << endl;
|
||||||
writeDebug();
|
//writeDebug();
|
||||||
Pout<< "---------" << nl << endl;
|
//Pout<< "---------" << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -204,8 +204,8 @@ $(interpolation)/interpolationCellPoint/makeInterpolationCellPoint.C
|
|||||||
$(interpolation)/interpolationCellPointFace/makeInterpolationCellPointFace.C
|
$(interpolation)/interpolationCellPointFace/makeInterpolationCellPointFace.C
|
||||||
$(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C
|
$(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C
|
||||||
$(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C
|
$(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C
|
||||||
$(interpolation)/interpolationPoint/pointMVCWeight.C
|
$(interpolation)/interpolationPointMVC/pointMVCWeight.C
|
||||||
$(interpolation)/interpolationPoint/makeInterpolationPoint.C
|
$(interpolation)/interpolationPointMVC/makeInterpolationPointMVC.C
|
||||||
|
|
||||||
volPointInterpolation = interpolation/volPointInterpolation
|
volPointInterpolation = interpolation/volPointInterpolation
|
||||||
$(volPointInterpolation)/volPointInterpolation.C
|
$(volPointInterpolation)/volPointInterpolation.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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,13 +23,13 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "interpolationPoint.H"
|
#include "interpolationPointMVC.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::interpolationPoint<Type>::interpolationPoint
|
Foam::interpolationPointMVC<Type>::interpolationPointMVC
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
)
|
)
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::interpolationPoint
|
Foam::interpolationPointMVC
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Given cell centre values interpolates to vertices and uses these to
|
Given cell centre values interpolates to vertices and uses these to
|
||||||
@ -30,8 +30,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef interpolationPoint_H
|
#ifndef interpolationPointMVC_H
|
||||||
#define interpolationPoint_H
|
#define interpolationPointMVC_H
|
||||||
|
|
||||||
#include "interpolation.H"
|
#include "interpolation.H"
|
||||||
#include "pointMVCWeight.H"
|
#include "pointMVCWeight.H"
|
||||||
@ -42,11 +42,11 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class interpolationPoint Declaration
|
Class interpolationPointMVC Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class interpolationPoint
|
class interpolationPointMVC
|
||||||
:
|
:
|
||||||
public interpolation<Type>
|
public interpolation<Type>
|
||||||
{
|
{
|
||||||
@ -57,16 +57,17 @@ protected:
|
|||||||
//- Interpolated volfield
|
//- Interpolated volfield
|
||||||
const GeometricField<Type, pointPatchField, pointMesh> psip_;
|
const GeometricField<Type, pointPatchField, pointMesh> psip_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("point");
|
TypeName("pointMVC");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
interpolationPoint
|
interpolationPointMVC
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
);
|
);
|
||||||
@ -93,12 +94,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "interpolationPointI.H"
|
#include "interpolationPointMVCI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "interpolationPoint.C"
|
# include "interpolationPointMVC.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline Type Foam::interpolationPoint<Type>::interpolate
|
inline Type Foam::interpolationPointMVC<Type>::interpolate
|
||||||
(
|
(
|
||||||
const pointMVCWeight& cpw
|
const pointMVCWeight& cpw
|
||||||
) const
|
) const
|
||||||
@ -36,7 +36,7 @@ inline Type Foam::interpolationPoint<Type>::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline Type Foam::interpolationPoint<Type>::interpolate
|
inline Type Foam::interpolationPointMVC<Type>::interpolate
|
||||||
(
|
(
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,13 +23,13 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "interpolationPoint.H"
|
#include "interpolationPointMVC.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
makeInterpolation(interpolationPoint);
|
makeInterpolation(interpolationPointMVC);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,7 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
forAll(f, j)
|
forAll(f, j)
|
||||||
{
|
{
|
||||||
label jPlus1 = f.fcIndex(j);
|
label jPlus1 = f.fcIndex(j);
|
||||||
scalar l = mag(u[j]-u[jPlus1]);
|
scalar l = mag(u[j] - u[jPlus1]);
|
||||||
theta[j] = 2.0*Foam::asin(l/2.0);
|
theta[j] = 2.0*Foam::asin(l/2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
weights[pid] =
|
weights[pid] =
|
||||||
1.0
|
1.0
|
||||||
/ dist[pid]
|
/ dist[pid]
|
||||||
* (Foam::tan(theta[jMin1]/2.0)+Foam::tan(theta[j]/2.0));
|
* (Foam::tan(theta[jMin1]/2.0) + Foam::tan(theta[j]/2.0));
|
||||||
sumWeight += weights[pid];
|
sumWeight += weights[pid];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,11 +132,10 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
//Pout<< " uj:" << u[j] << " ujPlus1:" << u[jPlus1]
|
//Pout<< " uj:" << u[j] << " ujPlus1:" << u[jPlus1]
|
||||||
// << " temp:" << temp << endl;
|
// << " temp:" << temp << endl;
|
||||||
|
|
||||||
scalar l = mag(u[j]-u[jPlus1]);
|
scalar l = min(mag(u[j] - u[jPlus1]), 2.0);
|
||||||
scalar angle = 2.0*Foam::asin(l/2.0);
|
scalar angle = 2.0*Foam::asin(l/2.0);
|
||||||
|
|
||||||
//Pout<< " j:" << j << " l:" << l
|
//Pout<< " j:" << j << " l:" << l << " angle:" << angle << endl;
|
||||||
// << " angle:" << angle << endl;
|
|
||||||
|
|
||||||
v += 0.5*angle*temp;
|
v += 0.5*angle*temp;
|
||||||
}
|
}
|
||||||
@ -145,14 +144,14 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
v /= vNorm;
|
v /= vNorm;
|
||||||
|
|
||||||
// Make sure v points towards the polygon
|
// Make sure v points towards the polygon
|
||||||
//if (((v&u[0]) < 0) != (mesh.faceOwner()[faceI] != cellIndex_))
|
//if (((v&u[0]) < 0) != (mesh.faceOwner()[faceI] != cellIndex_))
|
||||||
//{
|
//{
|
||||||
// FatalErrorIn("pointMVCWeight::calcWeights(..)")
|
// FatalErrorIn("pointMVCWeight::calcWeights(..)")
|
||||||
// << "v:" << v << " u[0]:" << u[0]
|
// << "v:" << v << " u[0]:" << u[0]
|
||||||
// << exit(FatalError);
|
// << exit(FatalError);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if ((v&u[0]) < 0)
|
if ((v & u[0]) < 0)
|
||||||
{
|
{
|
||||||
v = -v;
|
v = -v;
|
||||||
}
|
}
|
||||||
@ -165,22 +164,22 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
label jPlus1 = f.fcIndex(j);
|
label jPlus1 = f.fcIndex(j);
|
||||||
//Pout<< " uj:" << u[j] << " ujPlus1:" << u[jPlus1] << endl;
|
//Pout<< " uj:" << u[j] << " ujPlus1:" << u[jPlus1] << endl;
|
||||||
|
|
||||||
vector n0 = u[j] ^ v;
|
vector n0 = u[j]^v;
|
||||||
n0 /= mag(n0);
|
n0 /= mag(n0);
|
||||||
vector n1 = u[jPlus1] ^ v;
|
vector n1 = u[jPlus1]^v;
|
||||||
n1 /= mag(n1);
|
n1 /= mag(n1);
|
||||||
|
|
||||||
scalar l = mag(n0-n1);
|
scalar l = min(mag(n0 - n1), 2.0);
|
||||||
//Pout<< " l:" << l << endl;
|
//Pout<< " l:" << l << endl;
|
||||||
alpha(j) = 2.0*Foam::asin(l/2.0);
|
alpha(j) = 2.0*Foam::asin(l/2.0);
|
||||||
|
|
||||||
vector temp = n0 ^ n1;
|
vector temp = n0^n1;
|
||||||
if ((temp&v) < 0.0)
|
if ((temp&v) < 0.0)
|
||||||
{
|
{
|
||||||
alpha[j] = -alpha[j];
|
alpha[j] = -alpha[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
l = mag(u[j]-v);
|
l = min(mag(u[j] - v), 2.0);
|
||||||
//Pout<< " l:" << l << endl;
|
//Pout<< " l:" << l << endl;
|
||||||
theta(j) = 2.0*Foam::asin(l/2.0);
|
theta(j) = 2.0*Foam::asin(l/2.0);
|
||||||
}
|
}
|
||||||
@ -211,7 +210,7 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
sum +=
|
sum +=
|
||||||
1.0
|
1.0
|
||||||
/ Foam::tan(theta[j])
|
/ Foam::tan(theta[j])
|
||||||
* (Foam::tan(alpha[j]/2.0)+Foam::tan(alpha[jMin1]/2.0));
|
* (Foam::tan(alpha[j]/2.0) + Foam::tan(alpha[jMin1]/2.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The special case when x lies on the polygon, handle it using 2D mvc.
|
// The special case when x lies on the polygon, handle it using 2D mvc.
|
||||||
@ -234,7 +233,7 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
/ sum
|
/ sum
|
||||||
/ dist[pid]
|
/ dist[pid]
|
||||||
/ Foam::sin(theta[j])
|
/ Foam::sin(theta[j])
|
||||||
* (Foam::tan(alpha[j]/2.0)+Foam::tan(alpha[jMin1]/2.0));
|
* (Foam::tan(alpha[j]/2.0) + Foam::tan(alpha[jMin1]/2.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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -89,12 +89,12 @@ Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
|
Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
|
||||||
(
|
(
|
||||||
const CloudFunctionObjectList& ppm
|
const CloudFunctionObjectList& cfol
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
PtrList<CloudFunctionObject<CloudType> >(ppm),
|
PtrList<CloudFunctionObject<CloudType> >(cfol),
|
||||||
owner_(ppm.owner_),
|
owner_(cfol.owner_),
|
||||||
dict_(ppm.dict_)
|
dict_(cfol.dict_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -66,10 +66,9 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
const label procI = Pstream::myProcNo();
|
const label procI = Pstream::myProcNo();
|
||||||
|
|
||||||
scalarListList allProcMass(Pstream::nProcs());
|
scalarListList allProcMass(Pstream::nProcs());
|
||||||
allProcMass[procI].setSize(massTotal_.size());
|
|
||||||
allProcMass[procI] = massTotal_;
|
allProcMass[procI] = massTotal_;
|
||||||
Pstream::gatherList(allProcMass);
|
Pstream::gatherList(allProcMass);
|
||||||
scalarList allMass
|
scalarField allMass
|
||||||
(
|
(
|
||||||
ListListOps::combine<scalarList>
|
ListListOps::combine<scalarList>
|
||||||
(
|
(
|
||||||
@ -78,10 +77,9 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
);
|
);
|
||||||
|
|
||||||
scalarListList allProcMassFlux(Pstream::nProcs());
|
scalarListList allProcMassFlux(Pstream::nProcs());
|
||||||
allProcMassFlux[procI].setSize(massFlux_.size());
|
|
||||||
allProcMassFlux[procI] = massFlux_;
|
allProcMassFlux[procI] = massFlux_;
|
||||||
Pstream::gatherList(allProcMassFlux);
|
Pstream::gatherList(allProcMassFlux);
|
||||||
scalarList allMassFlux
|
scalarField allMassFlux
|
||||||
(
|
(
|
||||||
ListListOps::combine<scalarList>
|
ListListOps::combine<scalarList>
|
||||||
(
|
(
|
||||||
@ -109,16 +107,8 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
|
|
||||||
pointField uniquePoints(mesh.points(), uniqueMeshPointLabels);
|
pointField uniquePoints(mesh.points(), uniqueMeshPointLabels);
|
||||||
List<pointField> allProcPoints(Pstream::nProcs());
|
List<pointField> allProcPoints(Pstream::nProcs());
|
||||||
allProcPoints[procI].setSize(uniquePoints.size());
|
|
||||||
allProcPoints[procI] = uniquePoints;
|
allProcPoints[procI] = uniquePoints;
|
||||||
Pstream::gatherList(allProcPoints);
|
Pstream::gatherList(allProcPoints);
|
||||||
pointField allPoints
|
|
||||||
(
|
|
||||||
ListListOps::combine<pointField>
|
|
||||||
(
|
|
||||||
allProcPoints, accessOp<pointField>()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
faceList faces(fZone_().localFaces());
|
faceList faces(fZone_().localFaces());
|
||||||
forAll(faces, i)
|
forAll(faces, i)
|
||||||
@ -126,20 +116,27 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
inplaceRenumber(pointToGlobal, faces[i]);
|
inplaceRenumber(pointToGlobal, faces[i]);
|
||||||
}
|
}
|
||||||
List<faceList> allProcFaces(Pstream::nProcs());
|
List<faceList> allProcFaces(Pstream::nProcs());
|
||||||
allProcFaces[procI].setSize(faces.size());
|
|
||||||
allProcFaces[procI] = faces;
|
allProcFaces[procI] = faces;
|
||||||
Pstream::gatherList(allProcFaces);
|
Pstream::gatherList(allProcFaces);
|
||||||
faceList allFaces
|
|
||||||
(
|
|
||||||
ListListOps::combine<faceList>
|
|
||||||
(
|
|
||||||
allProcFaces, accessOp<faceList>()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
pointField allPoints
|
||||||
|
(
|
||||||
|
ListListOps::combine<pointField>
|
||||||
|
(
|
||||||
|
allProcPoints, accessOp<pointField>()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
faceList allFaces
|
||||||
|
(
|
||||||
|
ListListOps::combine<faceList>
|
||||||
|
(
|
||||||
|
allProcFaces, accessOp<faceList>()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
fileName outputDir = mesh.time().path();
|
fileName outputDir = mesh.time().path();
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
@ -165,7 +162,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
allPoints,
|
allPoints,
|
||||||
allFaces,
|
allFaces,
|
||||||
"massTotal",
|
"massTotal",
|
||||||
massTotal_,
|
allMass,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
writer->write
|
writer->write
|
||||||
@ -175,7 +172,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
|||||||
allPoints,
|
allPoints,
|
||||||
allFaces,
|
allFaces,
|
||||||
"massFlux",
|
"massFlux",
|
||||||
massFlux_,
|
allMassFlux,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -307,7 +307,7 @@ getVolumeType
|
|||||||
|
|
||||||
forAll(eFaces, i)
|
forAll(eFaces, i)
|
||||||
{
|
{
|
||||||
edgeNormal += patch_.faceNormal()[eFaces[i]];
|
edgeNormal += patch_.faceNormals()[eFaces[i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,6 +149,7 @@ Foam::octree<Type>::octree
|
|||||||
// - has some guaranteed maximum size (maxShapeRatio)
|
// - has some guaranteed maximum size (maxShapeRatio)
|
||||||
|
|
||||||
label oldNLeaves = -1; // make test below pass first time.
|
label oldNLeaves = -1; // make test below pass first time.
|
||||||
|
label oldNNodes = -1;
|
||||||
deepestLevel_ = 1;
|
deepestLevel_ = 1;
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
@ -169,11 +170,11 @@ Foam::octree<Type>::octree
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldNLeaves == nLeaves())
|
if ((oldNLeaves == nLeaves()) && (oldNNodes == nNodes()))
|
||||||
{
|
{
|
||||||
if (debug & 1)
|
if (debug & 1)
|
||||||
{
|
{
|
||||||
Pout<< "octree : exiting since nLeaves does not change"
|
Pout<< "octree : exiting since nLeaves and nNodes do not change"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -185,6 +186,7 @@ Foam::octree<Type>::octree
|
|||||||
}
|
}
|
||||||
|
|
||||||
oldNLeaves = nLeaves();
|
oldNLeaves = nLeaves();
|
||||||
|
oldNNodes = nNodes();
|
||||||
|
|
||||||
topNode_->redistribute
|
topNode_->redistribute
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,13 +3,13 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
makeType=${1:-libso}
|
makeType=${1:-libso}
|
||||||
|
|
||||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
||||||
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
|
||||||
then
|
then
|
||||||
. $settings
|
. $settings
|
||||||
echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
|
echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "Error: no apps/scotch/bashrc settings"
|
echo "Error: no config/scotch.sh settings"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
partialWrite/partialWrite.C
|
||||||
|
partialWrite/partialWriteFunctionObject.C
|
||||||
|
|
||||||
writeRegisteredObject/writeRegisteredObject.C
|
writeRegisteredObject/writeRegisteredObject.C
|
||||||
writeRegisteredObject/writeRegisteredObjectFunctionObject.C
|
writeRegisteredObject/writeRegisteredObjectFunctionObject.C
|
||||||
|
|
||||||
|
|||||||
88
src/postProcessing/functionObjects/IO/controlDict
Normal file
88
src/postProcessing/functionObjects/IO/controlDict
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.7.1 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application icoFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 0.5;
|
||||||
|
|
||||||
|
deltaT 0.005;
|
||||||
|
|
||||||
|
writeControl timeStep;
|
||||||
|
|
||||||
|
writeInterval 20;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
partialWrite
|
||||||
|
{
|
||||||
|
// Write some registered objects more often than others.
|
||||||
|
// Above writeControl determines most frequent dump.
|
||||||
|
|
||||||
|
type partialWrite;
|
||||||
|
|
||||||
|
// Where to load it from
|
||||||
|
functionObjectLibs ("libIOFunctionObjects.so");
|
||||||
|
|
||||||
|
// Execute upon outputTime
|
||||||
|
outputControl outputTime;
|
||||||
|
|
||||||
|
// Objects to write every outputTime
|
||||||
|
objectNames (p);
|
||||||
|
// Write as normal every writeInterval'th outputTime.
|
||||||
|
writeInterval 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
dumpObjects
|
||||||
|
{
|
||||||
|
// Forcibly write registered objects. E.g. fields that have been
|
||||||
|
// created with NO_READ.
|
||||||
|
|
||||||
|
type writeRegisteredObject;
|
||||||
|
|
||||||
|
// Where to load it from
|
||||||
|
functionObjectLibs ("libIOFunctionObjects.so");
|
||||||
|
|
||||||
|
// Execute upon outputTime
|
||||||
|
outputControl outputTime;
|
||||||
|
|
||||||
|
// Objects to write
|
||||||
|
objectNames ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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/>.
|
||||||
|
|
||||||
|
Typedef
|
||||||
|
Foam::IOpartialWrite
|
||||||
|
|
||||||
|
Description
|
||||||
|
Instance of the generic IOOutputFilter for partialWrite.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef IOpartialWrite_H
|
||||||
|
#define IOpartialWrite_H
|
||||||
|
|
||||||
|
#include "partialWrite.H"
|
||||||
|
#include "IOOutputFilter.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef IOOutputFilter<partialWrite> IOpartialWrite;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "partialWrite.H"
|
||||||
|
#include "dictionary.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "IOobjectList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(partialWrite, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::partialWrite::partialWrite
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const objectRegistry& obr,
|
||||||
|
const dictionary& dict,
|
||||||
|
const bool loadFromFiles
|
||||||
|
)
|
||||||
|
:
|
||||||
|
name_(name),
|
||||||
|
obr_(obr)
|
||||||
|
{
|
||||||
|
read(dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::partialWrite::~partialWrite()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::partialWrite::read(const dictionary& dict)
|
||||||
|
{
|
||||||
|
dict.lookup("objectNames") >> objectNames_;
|
||||||
|
dict.lookup("writeInterval") >> writeInterval_;
|
||||||
|
writeInstance_ = 0;
|
||||||
|
|
||||||
|
Info<< type() << " " << name() << ":" << nl
|
||||||
|
<< " dumping every outputTime :";
|
||||||
|
forAllConstIter(HashSet<word>, objectNames_, iter)
|
||||||
|
{
|
||||||
|
Info<< ' ' << iter.key();
|
||||||
|
}
|
||||||
|
Info<< nl
|
||||||
|
<< " dumping all other fields every "
|
||||||
|
<< writeInterval_ << "th outputTime" << nl
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
if (writeInterval_ < 1)
|
||||||
|
{
|
||||||
|
FatalIOErrorIn("partialWrite::read(const dictionary&)", dict)
|
||||||
|
<< "Illegal value for writeInterval " << writeInterval_
|
||||||
|
<< ". It should be >= 1."
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::partialWrite::execute()
|
||||||
|
{
|
||||||
|
//Pout<< "execute at time " << obr_.time().timeName()
|
||||||
|
// << " index:" << obr_.time().timeIndex() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::partialWrite::end()
|
||||||
|
{
|
||||||
|
//Pout<< "end at time " << obr_.time().timeName() << endl;
|
||||||
|
// Do nothing - only valid on write
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::partialWrite::write()
|
||||||
|
{
|
||||||
|
//Pout<< "write at time " << obr_.time().timeName() << endl;
|
||||||
|
if (obr_.time().outputTime())
|
||||||
|
{
|
||||||
|
// Above check so it can be used both with
|
||||||
|
// outputControl timeStep;
|
||||||
|
// outputInterval 1;
|
||||||
|
// or with
|
||||||
|
// outputControl outputTime;
|
||||||
|
|
||||||
|
writeInstance_++;
|
||||||
|
|
||||||
|
if (writeInstance_ == writeInterval_)
|
||||||
|
{
|
||||||
|
// Normal dump
|
||||||
|
writeInstance_ = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Delete all but marked objects
|
||||||
|
IOobjectList objects(obr_, obr_.time().timeName());
|
||||||
|
|
||||||
|
forAllConstIter(HashPtrTable<IOobject>, objects, iter)
|
||||||
|
{
|
||||||
|
if (!objectNames_.found(iter()->name()))
|
||||||
|
{
|
||||||
|
const fileName f = obr_.time().timePath()/iter()->name();
|
||||||
|
//Pout<< " rm " << f << endl;
|
||||||
|
rm(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,156 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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::partialWrite
|
||||||
|
|
||||||
|
Description
|
||||||
|
Allows some fields/registered objects to be written more often than others.
|
||||||
|
|
||||||
|
Works in the opposite way: deletes at intermediate times all
|
||||||
|
but selected fields.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
partialWrite.C
|
||||||
|
IOpartialWrite.H
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef partialWrite_H
|
||||||
|
#define partialWrite_H
|
||||||
|
|
||||||
|
#include "pointFieldFwd.H"
|
||||||
|
#include "HashSet.H"
|
||||||
|
#include "DynamicList.H"
|
||||||
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward declaration of classes
|
||||||
|
class objectRegistry;
|
||||||
|
class dictionary;
|
||||||
|
class mapPolyMesh;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class partialWrite Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class partialWrite
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Name of this set of partialWrite
|
||||||
|
word name_;
|
||||||
|
|
||||||
|
const objectRegistry& obr_;
|
||||||
|
|
||||||
|
|
||||||
|
// Read from dictionary
|
||||||
|
|
||||||
|
//- Names of objects to dump always
|
||||||
|
HashSet<word> objectNames_;
|
||||||
|
|
||||||
|
//- Write interval for restart dump
|
||||||
|
label writeInterval_;
|
||||||
|
|
||||||
|
|
||||||
|
//- Current dump instance. If reaches writeInterval do a full write.
|
||||||
|
label writeInstance_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
partialWrite(const partialWrite&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const partialWrite&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("partialWrite");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct for given objectRegistry and dictionary.
|
||||||
|
// Allow the possibility to load fields from files
|
||||||
|
partialWrite
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const objectRegistry&,
|
||||||
|
const dictionary&,
|
||||||
|
const bool loadFromFiles = false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~partialWrite();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return name of the partialWrite
|
||||||
|
virtual const word& name() const
|
||||||
|
{
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Read the partialWrite data
|
||||||
|
virtual void read(const dictionary&);
|
||||||
|
|
||||||
|
//- Execute, currently does nothing
|
||||||
|
virtual void execute();
|
||||||
|
|
||||||
|
//- Execute at the final time-loop, currently does nothing
|
||||||
|
virtual void end();
|
||||||
|
|
||||||
|
//- Write the partialWrite
|
||||||
|
virtual void write();
|
||||||
|
|
||||||
|
//- Update for changes of mesh
|
||||||
|
virtual void updateMesh(const mapPolyMesh&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Update for changes of mesh
|
||||||
|
virtual void movePoints(const pointField&)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "partialWriteFunctionObject.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineNamedTemplateTypeNameAndDebug
|
||||||
|
(
|
||||||
|
partialWriteFunctionObject,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
functionObject,
|
||||||
|
partialWriteFunctionObject,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -21,50 +21,34 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Application
|
Typedef
|
||||||
analyticalCylinder
|
Foam::partialWriteFunctionObject
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Generates an analytical solution for potential flow around a cylinder.
|
FunctionObject wrapper around partialWrite to allow them to be
|
||||||
Can be compared with the solution from the potentialFlow/cylinder example.
|
created via the functions list within controlDict.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
partialWriteFunctionObject.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#ifndef partialWriteFunctionObject_H
|
||||||
|
#define partialWriteFunctionObject_H
|
||||||
|
|
||||||
|
#include "partialWrite.H"
|
||||||
|
#include "OutputFilterFunctionObject.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef OutputFilterFunctionObject<partialWrite>
|
||||||
# include "setRootCase.H"
|
partialWriteFunctionObject;
|
||||||
|
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nEvaluating analytical solution" << endl;
|
|
||||||
|
|
||||||
volVectorField centres = UA.mesh().C();
|
|
||||||
volScalarField magCentres = mag(centres);
|
|
||||||
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
|
|
||||||
|
|
||||||
volVectorField cs2theta =
|
|
||||||
cos(2*theta)*vector(1,0,0)
|
|
||||||
+ sin(2*theta)*vector(0,1,0);
|
|
||||||
|
|
||||||
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
|
||||||
- pow((radius/magCentres),2)*cs2theta);
|
|
||||||
|
|
||||||
// Force writing of UA (since time has not changed)
|
|
||||||
UA.write();
|
|
||||||
|
|
||||||
Info<< "end" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -44,7 +44,6 @@ Foam::writeRegisteredObject::writeRegisteredObject
|
|||||||
:
|
:
|
||||||
name_(name),
|
name_(name),
|
||||||
obr_(obr),
|
obr_(obr),
|
||||||
active_(true),
|
|
||||||
objectNames_()
|
objectNames_()
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
@ -61,10 +60,7 @@ Foam::writeRegisteredObject::~writeRegisteredObject()
|
|||||||
|
|
||||||
void Foam::writeRegisteredObject::read(const dictionary& dict)
|
void Foam::writeRegisteredObject::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
if (active_)
|
dict.lookup("objectNames") >> objectNames_;
|
||||||
{
|
|
||||||
dict.lookup("objectNames") >> objectNames_;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -82,32 +78,29 @@ void Foam::writeRegisteredObject::end()
|
|||||||
|
|
||||||
void Foam::writeRegisteredObject::write()
|
void Foam::writeRegisteredObject::write()
|
||||||
{
|
{
|
||||||
if (active_)
|
forAll(objectNames_, i)
|
||||||
{
|
{
|
||||||
forAll(objectNames_, i)
|
if (obr_.foundObject<regIOobject>(objectNames_[i]))
|
||||||
{
|
{
|
||||||
if (obr_.foundObject<regIOobject>(objectNames_[i]))
|
regIOobject& obj =
|
||||||
{
|
const_cast<regIOobject&>
|
||||||
regIOobject& obj =
|
|
||||||
const_cast<regIOobject&>
|
|
||||||
(
|
|
||||||
obr_.lookupObject<regIOobject>(objectNames_[i])
|
|
||||||
);
|
|
||||||
// Switch off automatic writing to prevent double write
|
|
||||||
obj.writeOpt() = IOobject::NO_WRITE;
|
|
||||||
obj.write();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WarningIn
|
|
||||||
(
|
(
|
||||||
"Foam::writeRegisteredObject::read(const dictionary&)"
|
obr_.lookupObject<regIOobject>(objectNames_[i])
|
||||||
) << "Object " << objectNames_[i] << " not found in "
|
);
|
||||||
<< "database. Available objects:" << nl << obr_.sortedToc()
|
// Switch off automatic writing to prevent double write
|
||||||
<< endl;
|
obj.writeOpt() = IOobject::NO_WRITE;
|
||||||
}
|
obj.write();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"Foam::writeRegisteredObject::read(const dictionary&)"
|
||||||
|
) << "Object " << objectNames_[i] << " not found in "
|
||||||
|
<< "database. Available objects:" << nl << obr_.sortedToc()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,10 +65,6 @@ protected:
|
|||||||
|
|
||||||
const objectRegistry& obr_;
|
const objectRegistry& obr_;
|
||||||
|
|
||||||
//- On/off switch
|
|
||||||
bool active_;
|
|
||||||
|
|
||||||
|
|
||||||
// Read from dictionary
|
// Read from dictionary
|
||||||
|
|
||||||
//- Names of objects to control
|
//- Names of objects to control
|
||||||
|
|||||||
@ -10,6 +10,13 @@ thermoSingleLayer/thermoSingleLayer.C
|
|||||||
submodels/subModelBase.C
|
submodels/subModelBase.C
|
||||||
|
|
||||||
KINEMATICMODELS=submodels/kinematic
|
KINEMATICMODELS=submodels/kinematic
|
||||||
|
$(KINEMATICMODELS)/force/force/force.C
|
||||||
|
$(KINEMATICMODELS)/force/force/forceNew.C
|
||||||
|
$(KINEMATICMODELS)/force/forceList/forceList.C
|
||||||
|
$(KINEMATICMODELS)/force/contactAngleForce/contactAngleForce.C
|
||||||
|
$(KINEMATICMODELS)/force/surfaceShearForce/surfaceShearForce.C
|
||||||
|
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
|
||||||
|
|
||||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
||||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModelNew.C
|
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModelNew.C
|
||||||
$(KINEMATICMODELS)/injectionModel/injectionModelList/injectionModelList.C
|
$(KINEMATICMODELS)/injectionModel/injectionModelList/injectionModelList.C
|
||||||
|
|||||||
@ -34,6 +34,10 @@ License
|
|||||||
#include "directMappedWallPolyPatch.H"
|
#include "directMappedWallPolyPatch.H"
|
||||||
#include "mapDistribute.H"
|
#include "mapDistribute.H"
|
||||||
|
|
||||||
|
#include "cachedRandom.H"
|
||||||
|
#include "normal.H"
|
||||||
|
#include "mathematicalConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -61,8 +65,6 @@ bool kinematicSingleLayer::read()
|
|||||||
solution.lookup("nCorr") >> nCorr_;
|
solution.lookup("nCorr") >> nCorr_;
|
||||||
solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
||||||
|
|
||||||
coeffs_.lookup("Cf") >> Cf_;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -76,9 +78,10 @@ void kinematicSingleLayer::correctThermoFields()
|
|||||||
{
|
{
|
||||||
if (thermoModel_ == tmConstant)
|
if (thermoModel_ == tmConstant)
|
||||||
{
|
{
|
||||||
rho_ == dimensionedScalar(coeffs_.lookup("rho0"));
|
const dictionary& constDict(coeffs_.subDict("constantThermoCoeffs"));
|
||||||
mu_ == dimensionedScalar(coeffs_.lookup("mu0"));
|
rho_ == dimensionedScalar(constDict.lookup("rho0"));
|
||||||
sigma_ == dimensionedScalar(coeffs_.lookup("sigma0"));
|
mu_ == dimensionedScalar(constDict.lookup("mu0"));
|
||||||
|
sigma_ == dimensionedScalar(constDict.lookup("sigma0"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -273,25 +276,6 @@ void kinematicSingleLayer::updateSurfaceVelocities()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<fvVectorMatrix> kinematicSingleLayer::tau(volVectorField& U) const
|
|
||||||
{
|
|
||||||
// Calculate shear stress
|
|
||||||
volScalarField Cs("Cs", rho_*Cf_*mag(Us_ - U));
|
|
||||||
volScalarField Cw
|
|
||||||
(
|
|
||||||
"Cw",
|
|
||||||
mu_/(0.3333*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL)))
|
|
||||||
);
|
|
||||||
Cw.min(1.0e+06);
|
|
||||||
|
|
||||||
return
|
|
||||||
(
|
|
||||||
- fvm::Sp(Cs, U) + Cs*Us_ // surface contribution
|
|
||||||
- fvm::Sp(Cw, U) + Cw*Uw_ // wall contribution
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
||||||
(
|
(
|
||||||
const volScalarField& pu,
|
const volScalarField& pu,
|
||||||
@ -312,9 +296,8 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
|||||||
+ fvm::div(phi_, U_)
|
+ fvm::div(phi_, U_)
|
||||||
==
|
==
|
||||||
- USp_
|
- USp_
|
||||||
+ tau(U_)
|
|
||||||
+ fvc::grad(sigma_)
|
|
||||||
- fvm::SuSp(rhoSp_, U_)
|
- fvm::SuSp(rhoSp_, U_)
|
||||||
|
+ forces_.correct(U_)
|
||||||
);
|
);
|
||||||
|
|
||||||
fvVectorMatrix& UEqn = tUEqn();
|
fvVectorMatrix& UEqn = tUEqn();
|
||||||
@ -459,8 +442,6 @@ kinematicSingleLayer::kinematicSingleLayer
|
|||||||
|
|
||||||
cumulativeContErr_(0.0),
|
cumulativeContErr_(0.0),
|
||||||
|
|
||||||
Cf_(readScalar(coeffs().lookup("Cf"))),
|
|
||||||
|
|
||||||
rho_
|
rho_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -773,6 +754,8 @@ kinematicSingleLayer::kinematicSingleLayer
|
|||||||
|
|
||||||
injection_(*this, coeffs_),
|
injection_(*this, coeffs_),
|
||||||
|
|
||||||
|
forces_(*this, coeffs_),
|
||||||
|
|
||||||
addedMassTotal_(0.0)
|
addedMassTotal_(0.0)
|
||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
|
|||||||
@ -42,6 +42,7 @@ SourceFiles
|
|||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
|
|
||||||
#include "injectionModelList.H"
|
#include "injectionModelList.H"
|
||||||
|
#include "forceList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -93,12 +94,6 @@ protected:
|
|||||||
scalar cumulativeContErr_;
|
scalar cumulativeContErr_;
|
||||||
|
|
||||||
|
|
||||||
// Model parameters
|
|
||||||
|
|
||||||
//- Skin frition coefficient for film/primary region interface
|
|
||||||
scalar Cf_;
|
|
||||||
|
|
||||||
|
|
||||||
// Thermo properties
|
// Thermo properties
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
@ -199,6 +194,9 @@ protected:
|
|||||||
//- Cloud injection
|
//- Cloud injection
|
||||||
injectionModelList injection_;
|
injectionModelList injection_;
|
||||||
|
|
||||||
|
//- List of film forces
|
||||||
|
forceList forces_;
|
||||||
|
|
||||||
|
|
||||||
// Checks
|
// Checks
|
||||||
|
|
||||||
@ -238,9 +236,6 @@ protected:
|
|||||||
//- Update film surface velocities
|
//- Update film surface velocities
|
||||||
virtual void updateSurfaceVelocities();
|
virtual void updateSurfaceVelocities();
|
||||||
|
|
||||||
//- Return the stress term for the momentum equation
|
|
||||||
virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const;
|
|
||||||
|
|
||||||
//- Constrain a film region master/slave boundaries of a field to a
|
//- Constrain a film region master/slave boundaries of a field to a
|
||||||
// given value
|
// given value
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -314,12 +309,6 @@ public:
|
|||||||
inline label nNonOrthCorr() const;
|
inline label nNonOrthCorr() const;
|
||||||
|
|
||||||
|
|
||||||
// Model parameters
|
|
||||||
|
|
||||||
//- Return the skin friction coefficient
|
|
||||||
inline scalar Cf() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Thermo properties
|
// Thermo properties
|
||||||
|
|
||||||
//- Return const access to the dynamic viscosity / [Pa.s]
|
//- Return const access to the dynamic viscosity / [Pa.s]
|
||||||
|
|||||||
@ -61,12 +61,6 @@ inline label kinematicSingleLayer::nNonOrthCorr() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline scalar kinematicSingleLayer::Cf() const
|
|
||||||
{
|
|
||||||
return Cf_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline const volScalarField& kinematicSingleLayer::mu() const
|
inline const volScalarField& kinematicSingleLayer::mu() const
|
||||||
{
|
{
|
||||||
return mu_;
|
return mu_;
|
||||||
|
|||||||
@ -0,0 +1,164 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "contactAngleForce.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(contactAngleForce, 0);
|
||||||
|
addToRunTimeSelectionTable(force, contactAngleForce, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
contactAngleForce::contactAngleForce
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
force(typeName, owner, dict),
|
||||||
|
deltaWet_(readScalar(coeffs_.lookup("deltaWet"))),
|
||||||
|
Ccf_(readScalar(coeffs_.lookup("Ccf"))),
|
||||||
|
rndGen_(label(0), -1),
|
||||||
|
distribution_
|
||||||
|
(
|
||||||
|
distributionModels::distributionModel::New
|
||||||
|
(
|
||||||
|
coeffs_.subDict("contactAngleDistribution"),
|
||||||
|
rndGen_
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
contactAngleForce::~contactAngleForce()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
||||||
|
{
|
||||||
|
tmp<volVectorField> tForce
|
||||||
|
(
|
||||||
|
new volVectorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"contactForce",
|
||||||
|
owner_.time().timeName(),
|
||||||
|
owner_.regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
owner_.regionMesh(),
|
||||||
|
dimensionedVector("zero", dimForce/dimArea, vector::zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
vectorField& force = tForce().internalField();
|
||||||
|
|
||||||
|
const labelUList& own = owner_.regionMesh().owner();
|
||||||
|
const labelUList& nbr = owner_.regionMesh().neighbour();
|
||||||
|
|
||||||
|
const scalarField& magSf = owner_.magSf();
|
||||||
|
|
||||||
|
const volScalarField& delta = owner_.delta();
|
||||||
|
const volScalarField& sigma = owner_.sigma();
|
||||||
|
|
||||||
|
volScalarField alpha
|
||||||
|
(
|
||||||
|
"alpha",
|
||||||
|
pos(delta - dimensionedScalar("deltaWet", dimLength, deltaWet_))
|
||||||
|
);
|
||||||
|
volVectorField gradAlpha(fvc::grad(alpha));
|
||||||
|
|
||||||
|
scalarField nHits(force.size(), 0.0);
|
||||||
|
|
||||||
|
forAll(nbr, faceI)
|
||||||
|
{
|
||||||
|
const label cellO = own[faceI];
|
||||||
|
const label cellN = nbr[faceI];
|
||||||
|
|
||||||
|
label cellI = -1;
|
||||||
|
if ((delta[cellO] > deltaWet_) && (delta[cellN] < deltaWet_))
|
||||||
|
{
|
||||||
|
cellI = cellO;
|
||||||
|
}
|
||||||
|
else if ((delta[cellO] < deltaWet_) && (delta[cellN] > deltaWet_))
|
||||||
|
{
|
||||||
|
cellI = cellN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellI != -1)
|
||||||
|
{
|
||||||
|
// const scalar dx = Foam::sqrt(magSf[cellI]);
|
||||||
|
const scalar dx = owner_.regionMesh().deltaCoeffs()[faceI];
|
||||||
|
const vector n =
|
||||||
|
gradAlpha[cellI]/(mag(gradAlpha[cellI]) + ROOTVSMALL);
|
||||||
|
scalar theta = cos(degToRad(distribution_->sample()));
|
||||||
|
force[cellI] += Ccf_*n*sigma[cellI]*(1.0 - theta)/dx;
|
||||||
|
nHits[cellI]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nHits = max(nHits, 1.0);
|
||||||
|
force /= (nHits*magSf);
|
||||||
|
|
||||||
|
if (owner_.regionMesh().time().outputTime())
|
||||||
|
{
|
||||||
|
tForce().write();
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix>
|
||||||
|
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
|
||||||
|
|
||||||
|
tfvm() += tForce;
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,125 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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::contactAngleForce
|
||||||
|
|
||||||
|
Description
|
||||||
|
Film contact angle force
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
contactAngleForce.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef contactAngleForce_H
|
||||||
|
#define contactAngleForce_H
|
||||||
|
|
||||||
|
#include "force.H"
|
||||||
|
#include "distributionModel.H"
|
||||||
|
#include "cachedRandom.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class contactAngleForce Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class contactAngleForce
|
||||||
|
:
|
||||||
|
public force
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Threshold film thickness beyon which the film is 'wet'
|
||||||
|
scalar deltaWet_;
|
||||||
|
|
||||||
|
//- Coefficient applied to the contact angle force
|
||||||
|
scalar Ccf_;
|
||||||
|
|
||||||
|
//- Random number generator
|
||||||
|
cachedRandom rndGen_;
|
||||||
|
|
||||||
|
//- Parcel size PDF model
|
||||||
|
const autoPtr<distributionModels::distributionModel> distribution_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
contactAngleForce(const contactAngleForce&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const contactAngleForce&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("contactAngle");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from surface film model
|
||||||
|
contactAngleForce
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~contactAngleForce();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual tmp<fvVectorMatrix> correct(volVectorField& U);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "force.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(force, 0);
|
||||||
|
defineRunTimeSelectionTable(force, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
force::force(const surfaceFilmModel& owner)
|
||||||
|
:
|
||||||
|
subModelBase(owner)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
force::force
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
subModelBase(type, owner, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
force::~force()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,138 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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::force
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for film (stress-based) force models
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
force.C
|
||||||
|
forceNew.C
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef force_H
|
||||||
|
#define force_H
|
||||||
|
|
||||||
|
#include "subModelBase.H"
|
||||||
|
#include "runTimeSelectionTables.H"
|
||||||
|
#include "fvMatrices.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class force Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class force
|
||||||
|
:
|
||||||
|
public subModelBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
force(const force&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const force&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("force");
|
||||||
|
|
||||||
|
|
||||||
|
// Declare runtime constructor selection table
|
||||||
|
|
||||||
|
declareRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
autoPtr,
|
||||||
|
force,
|
||||||
|
dictionary,
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
),
|
||||||
|
(owner, dict)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
force(const surfaceFilmModel& owner);
|
||||||
|
|
||||||
|
//- Construct from type name, dictionary and surface film model
|
||||||
|
force
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Selectors
|
||||||
|
|
||||||
|
//- Return a reference to the selected force model
|
||||||
|
static autoPtr<force> New
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict,
|
||||||
|
const word& mdoelType
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~force();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual tmp<fvVectorMatrix> correct(volVectorField& U) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "force.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
autoPtr<force> force::New
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& model,
|
||||||
|
const dictionary& dict,
|
||||||
|
const word& modelType
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Info<< " " << modelType << endl;
|
||||||
|
|
||||||
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"force::New"
|
||||||
|
"("
|
||||||
|
"const surfaceFilmModel&, "
|
||||||
|
"const dictionary&, "
|
||||||
|
"const word&"
|
||||||
|
")"
|
||||||
|
) << "Unknown force type " << modelType
|
||||||
|
<< nl << nl << "Valid force types are:" << nl
|
||||||
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoPtr<force>(cstrIter()(model, dict));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "forceList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
forceList::forceList(const surfaceFilmModel& owner)
|
||||||
|
:
|
||||||
|
PtrList<force>()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
forceList::forceList
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PtrList<force>()
|
||||||
|
{
|
||||||
|
const wordList models(dict.lookup("forces"));
|
||||||
|
|
||||||
|
Info<< " Selecting film force models" << endl;
|
||||||
|
if (models.size() > 0)
|
||||||
|
{
|
||||||
|
this->setSize(models.size());
|
||||||
|
|
||||||
|
forAll(models, i)
|
||||||
|
{
|
||||||
|
set(i, force::New(owner, dict, models[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " none" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
forceList::~forceList()
|
||||||
|
{}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> forceList::correct(volVectorField& U)
|
||||||
|
{
|
||||||
|
tmp<fvVectorMatrix> tResult
|
||||||
|
(
|
||||||
|
new fvVectorMatrix(U, dimForce/dimArea*dimVolume)
|
||||||
|
);
|
||||||
|
fvVectorMatrix& result = tResult();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
result += this->operator[](i).correct(U);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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::forceList
|
||||||
|
|
||||||
|
Description
|
||||||
|
List container for film sources
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
forceList.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef forceList_H
|
||||||
|
#define forceList_H
|
||||||
|
|
||||||
|
#include "PtrList.H"
|
||||||
|
#include "force.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class forceList Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class forceList
|
||||||
|
:
|
||||||
|
public PtrList<force>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
forceList(const surfaceFilmModel& owner);
|
||||||
|
|
||||||
|
//- Construct from type name, dictionary and surface film model
|
||||||
|
forceList
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~forceList();
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
//- Return (net) force system
|
||||||
|
tmp<fvVectorMatrix> correct(volVectorField& U);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "surfaceShearForce.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "fvmSup.H"
|
||||||
|
#include "kinematicSingleLayer.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(surfaceShearForce, 0);
|
||||||
|
addToRunTimeSelectionTable(force, surfaceShearForce, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
surfaceShearForce::surfaceShearForce
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
force(typeName, owner, dict),
|
||||||
|
Cf_(readScalar(coeffs_.lookup("Cf")))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
surfaceShearForce::~surfaceShearForce()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> surfaceShearForce::correct(volVectorField& U)
|
||||||
|
{
|
||||||
|
const kinematicSingleLayer& film =
|
||||||
|
static_cast<const kinematicSingleLayer&>(owner_);
|
||||||
|
|
||||||
|
const volScalarField& rho = film.rho();
|
||||||
|
const volScalarField& mu = film.mu();
|
||||||
|
const volVectorField& Us = film.Us();
|
||||||
|
const volVectorField& Uw = film.Uw();
|
||||||
|
const volScalarField& delta = film.delta();
|
||||||
|
|
||||||
|
// Calculate shear stress
|
||||||
|
volScalarField Cs("Cs", rho*Cf_*mag(Us - U));
|
||||||
|
volScalarField Cw
|
||||||
|
(
|
||||||
|
"Cw",
|
||||||
|
mu/(0.3333*(delta + dimensionedScalar("SMALL", dimLength, SMALL)))
|
||||||
|
);
|
||||||
|
Cw.min(1.0e+06);
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
- fvm::Sp(Cs, U) + Cs*Us // surface contribution
|
||||||
|
- fvm::Sp(Cw, U) + Cw*Uw // wall contribution
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,114 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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::surfaceShearForce
|
||||||
|
|
||||||
|
Description
|
||||||
|
Film surface shear force
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
surfaceShearForce.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef surfaceShearForce_H
|
||||||
|
#define surfaceShearForce_H
|
||||||
|
|
||||||
|
#include "force.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class surfaceShearForce Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class surfaceShearForce
|
||||||
|
:
|
||||||
|
public force
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Surface roughness coefficient
|
||||||
|
scalar Cf_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
surfaceShearForce(const surfaceShearForce&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const surfaceShearForce&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("surfaceShear");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from surface film model
|
||||||
|
surfaceShearForce
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~surfaceShearForce();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual tmp<fvVectorMatrix> correct(volVectorField& U);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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 "thermocapillaryForce.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(thermocapillaryForce, 0);
|
||||||
|
addToRunTimeSelectionTable(force, thermocapillaryForce, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermocapillaryForce::thermocapillaryForce
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
force(owner)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermocapillaryForce::~thermocapillaryForce()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U)
|
||||||
|
{
|
||||||
|
const volScalarField& sigma = owner_.sigma();
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix>
|
||||||
|
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
|
||||||
|
|
||||||
|
tfvm() += fvc::grad(sigma);
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 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::thermocapillaryForce
|
||||||
|
|
||||||
|
Description
|
||||||
|
Thermocapillary force
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
thermocapillaryForce.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef thermocapillaryForce_H
|
||||||
|
#define thermocapillaryForce_H
|
||||||
|
|
||||||
|
#include "force.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class thermocapillaryForce Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class thermocapillaryForce
|
||||||
|
:
|
||||||
|
public force
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
thermocapillaryForce(const thermocapillaryForce&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const thermocapillaryForce&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("thermocapillary");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from surface film model
|
||||||
|
thermocapillaryForce
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~thermocapillaryForce();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual tmp<fvVectorMatrix> correct(volVectorField& U);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -97,11 +97,13 @@ void thermoSingleLayer::correctThermoFields()
|
|||||||
{
|
{
|
||||||
case tmConstant:
|
case tmConstant:
|
||||||
{
|
{
|
||||||
rho_ == dimensionedScalar(coeffs_.lookup("rho0"));
|
const dictionary&
|
||||||
mu_ == dimensionedScalar(coeffs_.lookup("mu0"));
|
constDict(coeffs_.subDict("constantThermoCoeffs"));
|
||||||
sigma_ == dimensionedScalar(coeffs_.lookup("sigma0"));
|
rho_ == dimensionedScalar(constDict.lookup("rho0"));
|
||||||
Cp_ == dimensionedScalar(coeffs_.lookup("Cp0"));
|
mu_ == dimensionedScalar(constDict.lookup("mu0"));
|
||||||
kappa_ == dimensionedScalar(coeffs_.lookup("kappa0"));
|
sigma_ == dimensionedScalar(constDict.lookup("sigma0"));
|
||||||
|
Cp_ == dimensionedScalar(constDict.lookup("Cp0"));
|
||||||
|
kappa_ == dimensionedScalar(constDict.lookup("kappa0"));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -399,7 +399,7 @@ void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
|
|||||||
*max
|
*max
|
||||||
(
|
(
|
||||||
dimensionedScalar("zero",dimensionSet(0, 0, -2, 0, 0), 0.0),
|
dimensionedScalar("zero",dimensionSet(0, 0, -2, 0, 0), 0.0),
|
||||||
zetaTilda2_*kappa_*S2*(L/Lvk2(S2))
|
zetaTilda2_*kappa_*S2*sqr(L/Lvk2(S2))
|
||||||
- 2.0/alphaPhi_*k_*grad_omega_k
|
- 2.0/alphaPhi_*k_*grad_omega_k
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -27,22 +27,12 @@ Class
|
|||||||
Description
|
Description
|
||||||
kOmegaSSTSAS LES turbulence model for incompressible flows
|
kOmegaSSTSAS LES turbulence model for incompressible flows
|
||||||
|
|
||||||
References:
|
|
||||||
Evaluation of the SST-SAS model: Channel flow, asymmetric diffuser and axi-
|
|
||||||
symmetric hill
|
|
||||||
European Conference on Computational Fluid Dynamics
|
|
||||||
ECCOMAS CFD 2006
|
|
||||||
Lars Davison
|
|
||||||
|
|
||||||
A Scale-Adaptive Simulation Model using Two-Equation Models
|
|
||||||
AIAA 2005-1095
|
|
||||||
F. R. Menter and Y. Egorov
|
|
||||||
|
|
||||||
DESider A European Effort on Hybrid RANS-LES Modelling:
|
DESider A European Effort on Hybrid RANS-LES Modelling:
|
||||||
Results of the European-Union Funded Project, 2004 - 2007
|
Results of the European-Union Funded Project, 2004 - 2007
|
||||||
(Notes on Numerical Fluid Mechanics and Multidisciplinary Design).
|
(Notes on Numerical Fluid Mechanics and Multidisciplinary Design).
|
||||||
Chapter 8 Formulation of the Scale-Adaptive Simulation (SAS) Model during
|
Chapter 8 Formulation of the Scale-Adaptive Simulation (SAS) Model during
|
||||||
the DESIDER Project.
|
the DESIDER Project. Published in Springer-Verlag Berlin Heidelberg 2009.
|
||||||
F. R. Menter and Y. Egorov.
|
F. R. Menter and Y. Egorov.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
|||||||
@ -1,55 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volVectorField;
|
|
||||||
object U;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 1 -1 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform (0 0 0);
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
down
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
}
|
|
||||||
|
|
||||||
right
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
up
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
}
|
|
||||||
|
|
||||||
left
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (1 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
cylinder
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 2 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
down
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
}
|
|
||||||
|
|
||||||
right
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
up
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
}
|
|
||||||
|
|
||||||
left
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
cylinder
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
11
tutorials/basic/potentialFoam/cylinder/Allclean
Executable file
11
tutorials/basic/potentialFoam/cylinder/Allclean
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
rm -rf 0 > /dev/null 2>&1
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -6,10 +6,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
|
|
||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
|
cp -r 0.org 0 > /dev/null 2>&1
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication $application
|
runApplication $application
|
||||||
compileApplication analyticalCylinder
|
|
||||||
runApplication analyticalCylinder
|
|
||||||
runApplication streamFunction
|
runApplication streamFunction
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
analyticalCylinder.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/analyticalCylinder
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lfiniteVolume
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading inlet velocity uInfX\n" << endl;
|
|
||||||
|
|
||||||
dimensionedScalar uInfX
|
|
||||||
(
|
|
||||||
"uInfx",
|
|
||||||
dimensionSet(0, 1, -1, 0, 0),
|
|
||||||
U.boundaryField()[3][0].x()
|
|
||||||
);
|
|
||||||
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
|
|
||||||
|
|
||||||
dimensionedScalar radius
|
|
||||||
(
|
|
||||||
"radius",
|
|
||||||
dimensionSet(0, 1, 0, 0, 0),
|
|
||||||
mag(U.mesh().boundary()[4].Cf()[0])
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "Cylinder radius = " << radius.value() << " m" << endl;
|
|
||||||
|
|
||||||
volVectorField UA
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"UA",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
U
|
|
||||||
);
|
|
||||||
@ -45,5 +45,74 @@ timePrecision 6;
|
|||||||
|
|
||||||
runTimeModifiable true;
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
difference
|
||||||
|
{
|
||||||
|
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||||
|
type coded;
|
||||||
|
redirectType error;
|
||||||
|
code
|
||||||
|
#{
|
||||||
|
// Lookup U
|
||||||
|
Info<< "Looking up field U\n" << endl;
|
||||||
|
const volVectorField& U = mesh().lookupObject<volVectorField>("U");
|
||||||
|
|
||||||
|
Info<< "Reading inlet velocity uInfX\n" << endl;
|
||||||
|
|
||||||
|
dimensionedScalar uInfX
|
||||||
|
(
|
||||||
|
"uInfx",
|
||||||
|
dimensionSet(0, 1, -1, 0, 0),
|
||||||
|
U.boundaryField()[3][0].x()
|
||||||
|
);
|
||||||
|
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
|
||||||
|
|
||||||
|
dimensionedScalar radius
|
||||||
|
(
|
||||||
|
"radius",
|
||||||
|
dimensionSet(0, 1, 0, 0, 0),
|
||||||
|
mag(U.mesh().boundary()[4].Cf()[0])
|
||||||
|
);
|
||||||
|
|
||||||
|
Info << "Cylinder radius = " << radius.value() << " m" << endl;
|
||||||
|
|
||||||
|
volVectorField UA
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"UA",
|
||||||
|
mesh().time().timeName(),
|
||||||
|
U.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
U
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "\nEvaluating analytical solution" << endl;
|
||||||
|
|
||||||
|
volVectorField centres = UA.mesh().C();
|
||||||
|
volScalarField magCentres = mag(centres);
|
||||||
|
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
|
||||||
|
|
||||||
|
volVectorField cs2theta =
|
||||||
|
cos(2*theta)*vector(1,0,0)
|
||||||
|
+ sin(2*theta)*vector(0,1,0);
|
||||||
|
|
||||||
|
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
||||||
|
- pow((radius/magCentres),2)*cs2theta);
|
||||||
|
|
||||||
|
// Force writing of UA (since time has not changed)
|
||||||
|
UA.write();
|
||||||
|
|
||||||
|
volScalarField error("error", mag(U-UA)/mag(UA));
|
||||||
|
Info<<"Writing relative error in U to " << error.objectPath()
|
||||||
|
<< endl;
|
||||||
|
error.write();
|
||||||
|
#};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -4,6 +4,10 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
# Source tutorial clean functions
|
# Source tutorial clean functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
||||||
|
rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
|
||||||
|
rm -f constant/polyMesh/boundary
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
rm -rf VTK
|
rm -rf VTK
|
||||||
rm -rf constant/cellToRegion constant/polyMesh/sets
|
rm -rf constant/cellToRegion constant/polyMesh/sets
|
||||||
|
|||||||
@ -8,6 +8,11 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
rm -rf constant/polyMesh/sets
|
rm -rf constant/polyMesh/sets
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/bottomAir.stl bottomAir
|
||||||
|
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/heater.stl heater
|
||||||
|
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/leftSolid.stl leftSolid
|
||||||
|
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/rightSolid.stl rightSolid
|
||||||
|
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/topAir.stl topAir
|
||||||
runApplication snappyHexMesh -overwrite
|
runApplication snappyHexMesh -overwrite
|
||||||
runApplication splitMeshRegions -cellZones -overwrite
|
runApplication splitMeshRegions -cellZones -overwrite
|
||||||
|
|
||||||
|
|||||||
@ -109,6 +109,26 @@ castellatedMeshControls
|
|||||||
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
||||||
features
|
features
|
||||||
(
|
(
|
||||||
|
{
|
||||||
|
file "bottomAir.eMesh";
|
||||||
|
level 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
file "heater.eMesh";
|
||||||
|
level 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
file "leftSolid.eMesh";
|
||||||
|
level 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
file "rightSolid.eMesh";
|
||||||
|
level 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
file "topAir.eMesh";
|
||||||
|
level 1;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -231,7 +251,7 @@ snapControls
|
|||||||
//- Relative distance for points to be attracted by surface feature point
|
//- Relative distance for points to be attracted by surface feature point
|
||||||
// or edge. True distance is this factor times local
|
// or edge. True distance is this factor times local
|
||||||
// maximum edge length.
|
// maximum edge length.
|
||||||
tolerance 4.0;
|
tolerance 1.0;
|
||||||
|
|
||||||
//- Number of mesh displacement relaxation iterations.
|
//- Number of mesh displacement relaxation iterations.
|
||||||
nSolveIter 30;
|
nSolveIter 30;
|
||||||
@ -239,6 +259,11 @@ snapControls
|
|||||||
//- Maximum number of snapping relaxation iterations. Should stop
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nRelaxIter 5;
|
nRelaxIter 5;
|
||||||
|
|
||||||
|
//- Highly experimental and wip: number of feature edge snapping
|
||||||
|
// iterations. Leave out altogether to disable.
|
||||||
|
// Of limited use in this case since faceZone faces not handled.
|
||||||
|
nFeatureSnapIter 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -251,28 +276,20 @@ addLayersControls
|
|||||||
// Per final patch (so not geometry!) the layer information
|
// Per final patch (so not geometry!) the layer information
|
||||||
layers
|
layers
|
||||||
{
|
{
|
||||||
//flowAirDuctReagent_flowAirDuctReagent
|
maxY
|
||||||
//{
|
{
|
||||||
// nSurfaceLayers 1;
|
nSurfaceLayers 3;
|
||||||
//}
|
}
|
||||||
//flowAirDuctReagent_inlet1
|
|
||||||
//{
|
|
||||||
// nSurfaceLayers 1;
|
|
||||||
//}
|
|
||||||
//flowAirDuctReagent_inlet2
|
|
||||||
//{
|
|
||||||
// nSurfaceLayers 1;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expansion factor for layer mesh
|
// Expansion factor for layer mesh
|
||||||
expansionRatio 1.0;
|
expansionRatio 1.3;
|
||||||
|
|
||||||
//- Wanted thickness of final added cell layer. If multiple layers
|
//- Wanted thickness of final added cell layer. If multiple layers
|
||||||
// is the
|
// is the
|
||||||
// thickness of the layer furthest away from the wall.
|
// thickness of the layer furthest away from the wall.
|
||||||
// Relative to undistorted size of cell outside layer.
|
// Relative to undistorted size of cell outside layer.
|
||||||
finalLayerThickness 0.3;
|
finalLayerThickness 1;
|
||||||
|
|
||||||
//- Minimum thickness of cell layer. If for any reason layer
|
//- Minimum thickness of cell layer. If for any reason layer
|
||||||
// cannot be above minThickness do not add layer.
|
// cannot be above minThickness do not add layer.
|
||||||
@ -302,14 +319,14 @@ addLayersControls
|
|||||||
nSmoothNormals 3;
|
nSmoothNormals 3;
|
||||||
|
|
||||||
// Smooth layer thickness over surface patches
|
// Smooth layer thickness over surface patches
|
||||||
nSmoothThickness 10;
|
nSmoothThickness 2;
|
||||||
|
|
||||||
// Stop layer growth on highly warped cells
|
// Stop layer growth on highly warped cells
|
||||||
maxFaceThicknessRatio 0.5;
|
maxFaceThicknessRatio 0.5;
|
||||||
|
|
||||||
// Reduce layer growth where ratio thickness to medial
|
// Reduce layer growth where ratio thickness to medial
|
||||||
// distance is large
|
// distance is large
|
||||||
maxThicknessToMedialRatio 0.3;
|
maxThicknessToMedialRatio 1;
|
||||||
|
|
||||||
// Angle used to pick up medial axis points
|
// Angle used to pick up medial axis points
|
||||||
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
|
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
|
||||||
@ -317,6 +334,11 @@ addLayersControls
|
|||||||
|
|
||||||
// Create buffer region for new layer terminations
|
// Create buffer region for new layer terminations
|
||||||
nBufferCellsNoExtrude 0;
|
nBufferCellsNoExtrude 0;
|
||||||
|
|
||||||
|
// Overall max number of layer addition iterations. The mesher will exit
|
||||||
|
// if it reaches this number of iterations; possibly with an illegal
|
||||||
|
// mesh.
|
||||||
|
nLayerIter 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ boundaryField
|
|||||||
lowerWall
|
lowerWall
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform (20 0 0);
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
"motorBike_.*"
|
"motorBike_.*"
|
||||||
|
|||||||
@ -180,6 +180,11 @@ snapControls
|
|||||||
//- Maximum number of snapping relaxation iterations. Should stop
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nRelaxIter 5;
|
nRelaxIter 5;
|
||||||
|
|
||||||
|
//- Highly experimental and wip: number of feature edge snapping
|
||||||
|
// iterations. Leave out altogether to disable.
|
||||||
|
// Do not use here since mesh resolution too low and baffles present
|
||||||
|
//nFeatureSnapIter 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -249,14 +254,17 @@ addLayersControls
|
|||||||
maxThicknessToMedialRatio 0.3;
|
maxThicknessToMedialRatio 0.3;
|
||||||
|
|
||||||
// Angle used to pick up medial axis points
|
// Angle used to pick up medial axis points
|
||||||
// Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
|
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
|
||||||
minMedianAxisAngle 90;
|
minMedianAxisAngle 90;
|
||||||
|
|
||||||
|
|
||||||
// Create buffer region for new layer terminations
|
// Create buffer region for new layer terminations
|
||||||
nBufferCellsNoExtrude 0;
|
nBufferCellsNoExtrude 0;
|
||||||
|
|
||||||
// Overall max number of layer addition iterations
|
|
||||||
|
// Overall max number of layer addition iterations. The mesher will exit
|
||||||
|
// if it reaches this number of iterations; possibly with an illegal
|
||||||
|
// mesh.
|
||||||
nLayerIter 50;
|
nLayerIter 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +293,8 @@ meshQualityControls
|
|||||||
|
|
||||||
//- Minimum quality of the tet formed by the face-centre
|
//- Minimum quality of the tet formed by the face-centre
|
||||||
// and variable base point minimum decomposition triangles and
|
// and variable base point minimum decomposition triangles and
|
||||||
// the cell centre. Set to very negative number (e.g. -1E30) to
|
// the cell centre. This has to be a positive number for tracking
|
||||||
|
// to work. Set to very negative number (e.g. -1E30) to
|
||||||
// disable.
|
// disable.
|
||||||
// <0 = inside out tet,
|
// <0 = inside out tet,
|
||||||
// 0 = flat tet
|
// 0 = flat tet
|
||||||
|
|||||||
@ -15,34 +15,27 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//surfaceFilmModel kinematicSingleLayer;
|
|
||||||
surfaceFilmModel thermoSingleLayer;
|
surfaceFilmModel thermoSingleLayer;
|
||||||
|
|
||||||
regionName wallFilmRegion;
|
regionName wallFilmRegion;
|
||||||
|
|
||||||
active true;
|
active true;
|
||||||
|
|
||||||
kinematicSingleLayerCoeffs
|
|
||||||
{
|
|
||||||
thermoModel constant;
|
|
||||||
rho0 rho0 [1 -3 0 0 0] 1000;
|
|
||||||
mu0 mu0 [1 -1 -1 0 0] 1e-3;
|
|
||||||
sigma0 sigma0 [1 0 -2 0 0] 0.07;
|
|
||||||
|
|
||||||
deltaStable deltaStable [0 1 0 0 0] 0;
|
|
||||||
Cf 0.005;
|
|
||||||
|
|
||||||
injectionModels ();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
thermoSingleLayerCoeffs
|
thermoSingleLayerCoeffs
|
||||||
{
|
{
|
||||||
thermoModel singleComponent;
|
thermoModel singleComponent;
|
||||||
liquid H2O;
|
liquid H2O;
|
||||||
|
|
||||||
deltaStable deltaStable [0 1 0 0 0] 0;
|
forces
|
||||||
Cf 0.005;
|
(
|
||||||
|
surfaceShear
|
||||||
|
thermocapillary
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceShearCoeffs
|
||||||
|
{
|
||||||
|
Cf 0.005;
|
||||||
|
}
|
||||||
|
|
||||||
injectionModels ();
|
injectionModels ();
|
||||||
|
|
||||||
|
|||||||
@ -25,9 +25,8 @@ active true;
|
|||||||
thermoSingleLayerCoeffs
|
thermoSingleLayerCoeffs
|
||||||
{
|
{
|
||||||
thermoModel singleComponent; // constant
|
thermoModel singleComponent; // constant
|
||||||
liquid H2O;
|
|
||||||
|
|
||||||
Cf 0.005;
|
liquid H2O;
|
||||||
|
|
||||||
radiationModel none;
|
radiationModel none;
|
||||||
|
|
||||||
@ -52,6 +51,35 @@ thermoSingleLayerCoeffs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
forces
|
||||||
|
(
|
||||||
|
surfaceShear
|
||||||
|
thermocapillary
|
||||||
|
contactAngle
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceShearCoeffs
|
||||||
|
{
|
||||||
|
Cf 0.005;
|
||||||
|
}
|
||||||
|
|
||||||
|
contactAngleCoeffs
|
||||||
|
{
|
||||||
|
deltaWet 1e-4;
|
||||||
|
Ccf 0.085;
|
||||||
|
contactAngleDistribution
|
||||||
|
{
|
||||||
|
type normal;
|
||||||
|
normalDistribution
|
||||||
|
{
|
||||||
|
minValue 50;
|
||||||
|
maxValue 100;
|
||||||
|
expectation 75;
|
||||||
|
variance 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
injectionModels
|
injectionModels
|
||||||
(
|
(
|
||||||
curvatureSeparation
|
curvatureSeparation
|
||||||
|
|||||||
@ -42,6 +42,7 @@ gradSchemes
|
|||||||
snGradCorr(pp) Gauss linear;
|
snGradCorr(pp) Gauss linear;
|
||||||
snGradCorr(pu) Gauss linear;
|
snGradCorr(pu) Gauss linear;
|
||||||
grad(nHat) Gauss linear;
|
grad(nHat) Gauss linear;
|
||||||
|
grad(alpha) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
|
|||||||
@ -15,32 +15,28 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//surfaceFilmModel kinematicSingleLayer;
|
|
||||||
surfaceFilmModel thermoSingleLayer;
|
surfaceFilmModel thermoSingleLayer;
|
||||||
|
|
||||||
regionName wallFilmRegion;
|
regionName wallFilmRegion;
|
||||||
|
|
||||||
active true;
|
active true;
|
||||||
|
|
||||||
kinematicSingleLayerCoeffs
|
|
||||||
{
|
|
||||||
thermoModel constant;
|
|
||||||
rho0 rho0 [1 -3 0 0 0] 1000;
|
|
||||||
mu0 mu0 [1 -1 -1 0 0] 1e-3;
|
|
||||||
sigma0 sigma0 [1 0 -2 0 0] 0.07;
|
|
||||||
|
|
||||||
Cf 0.005;
|
|
||||||
|
|
||||||
injectionModels ();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
thermoSingleLayerCoeffs
|
thermoSingleLayerCoeffs
|
||||||
{
|
{
|
||||||
thermoModel singleComponent;
|
thermoModel singleComponent;
|
||||||
|
|
||||||
liquid H2O;
|
liquid H2O;
|
||||||
|
|
||||||
Cf 0.005;
|
forces
|
||||||
|
(
|
||||||
|
surfaceShear
|
||||||
|
thermocapillary
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceShearCoeffs
|
||||||
|
{
|
||||||
|
Cf 0.005;
|
||||||
|
}
|
||||||
|
|
||||||
injectionModels
|
injectionModels
|
||||||
();
|
();
|
||||||
|
|||||||
Reference in New Issue
Block a user