Skip to content
Snippets Groups Projects
Commit 13ef974e authored by sergio's avatar sergio
Browse files

ENH: Adding -overwrite option to mirrorMesh and update tutorial

parent ea1706fe
Branches
Tags
No related merge requests found
......@@ -37,15 +37,24 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
# include "setRootCase.H"
# include "createTime.H"
const bool overwrite = args.optionFound("overwrite");
if (!overwrite)
{
runTime++;
}
mirrorFvMesh mesh
(
IOobject
(
mirrorFvMesh::defaultRegion,
runTime.timeName(),
runTime.constant(),
runTime
)
);
......
......@@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf 0/polyMesh
# ----------------------------------------------------------------- end-of-file
......@@ -10,17 +10,14 @@ application=`getApplication`
runApplication blockMesh
transformPoints -scale '(1.6666 1 1)'
#cp system/changeDictionaryDict.X system/changeDictionaryDict
runApplication changeDictionary -instance system -dict system/changeDictionaryDict.X
runApplication mirrorMesh
runApplication mirrorMesh -overwrite
rm log.mirrorMesh
rm log.changeDictionary
#cp system/changeDictionaryDict.Y system/changeDictionaryDict
runApplication changeDictionary -instance system -dict system/changeDictionaryDict.Y
runApplication mirrorMesh
cp -rf 0/polyMesh constant/
runApplication mirrorMesh -overwrite
runApplication topoSet
runApplication createPatch -overwrite
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "0/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
(
left
{
type symmetryPlane;
nFaces 320;
startFace 99210;
}
outlet
{
type patch;
nFaces 320;
startFace 99530;
}
up
{
type symmetryPlane;
nFaces 380;
startFace 99850;
}
hole
{
type wall;
nFaces 560;
startFace 100230;
}
frontAndBack
{
type empty;
nFaces 100000;
startFace 100790;
}
)
// ************************************************************************* //
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment