Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions ADODG3_Wing/preProcessing_cfMesh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

### Install CFMESH at https://develop.openfoam.com/Community/integration-cfmesh

if [ -z "$WM_PROJECT" ]; then
echo "OpenFOAM environment not found, forgot to source the OpenFOAM bashrc?"
exit
fi

# pre-processing

# generate mesh
echo "Generating mesh.."

if [ -f "adodg3_triSurface.tar.gz" ]; then
echo "Geometry already exists."
else
echo "Downloading geometry adodg3_triSurface.tar.gz"
wget https://github.com/dafoam/files/releases/download/v1.0.0/adodg3_triSurface.tar.gz
fi
tar -xvf adodg3_triSurface.tar.gz
mv triSurface constant/triSurface
echo "Running cfMesh mesh.."
cat constant/triSurface/wing_* > constant/triSurface/geom.stl

surfaceGenerateBoundingBox constant/triSurface/geom.stl constant/triSurface/domain.stl 20 10 10 10 0 10 &> logMeshGeneration.txt
cartesianMesh >> logMeshGeneration.txt
#createPatch -overwrite >> logMeshGeneration.txt
#renumberMesh -overwrite >> logMeshGeneration.txt
echo "Generating mesh.. Done!"

# copy initial and boundary condition files
cp -r 0.orig 0
1 change: 1 addition & 0 deletions ADODG3_Wing/runScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"components": ["solver", "function"],
},
},
"checkMeshThreshold": {"maxAspectRatio": 500000.0, "maxNonOrth": 89.9, "maxSkewness": 30.0},
}

# Mesh deformation setup
Expand Down
77 changes: 77 additions & 0 deletions ADODG3_Wing/system/meshDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: [email protected] |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object meshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

surfaceFile "constant/triSurface/domain.stl";

maxCellSize 1.;

localRefinement
{
PART_1_FACE
{
additionalRefinementLevels 5;
}
}

objectRefinements
{
wake
{
additionalRefinementLevels 3;
type box;
centre (0 0 0);
lengthX 6.;
lengthY 0.36;
lengthZ 6.;
}
}

renameBoundary
{
defaultName inout;
defaultType patch;
newPatchNames
{
PART_1_FACE
{
newName wing;
type wall;
}
zMin
{
newName sym;
type symmetry;
}
}
}

boundaryLayers
{
patchBoundaryLayers
{
PART_1_FACE
{
allowDiscontinuity 1;
nLayers 8;
thicknessRatio 1.2;
}
}
}

// ************************************************************************* //