tutorials/.../DTCHull: Simplified and unified mesh setups

This also restores the upstream refinement in the wave case so that the
waves now correctly propagate to the hull
This commit is contained in:
Will Bainbridge
2020-04-11 11:14:01 +01:00
parent 0207f85191
commit ba0fe79c5f
37 changed files with 277 additions and 611 deletions

View File

@ -4,13 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# remove surface
# Remove surface
rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1
cleanCase
rm constant/polyMesh/boundary > /dev/null 2>&1
rm system/topoSetDict > /dev/null 2>&1
#------------------------------------------------------------------------------

View File

@ -13,11 +13,11 @@ runApplication blockMesh
for i in 1 2 3 4 5 6
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}
foamDictionary system/refineMeshDict -entry set -set c${i}
runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
runApplication -a topoSet
runApplication -a refineMesh -dict system/refineMeshDict -overwrite
done
runApplication snappyHexMesh -overwrite

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Mesh if necessary
if ! cloneMesh ../DTCHullMoving . && ! cloneMesh ../DTCHullWave .
if ! cloneMesh ../DTCHullMoving . && ! (isTest $@ && cloneMesh ../DTCHullWave .)
then
./Allmesh
fi

View File

@ -28,10 +28,10 @@ vertices
(16 0 -1)
(-26 0 -1)
(-26 -19 0.185)
(16 -19 0.185)
(16 0 0.185)
(-26 0 0.185)
(-26 -19 0.188)
(16 -19 0.188)
(16 0 0.188)
(-26 0 0.188)
(-26 -19 0.244)
(16 -19 0.244)

View File

@ -31,7 +31,7 @@ patchLocalCoeffs
tan1 (1 0 0);
}
directions ( tan1 tan2 );
directions (tan1 tan2);
useHexTopology no;

View File

@ -0,0 +1,82 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c1;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -6 -3) (10 0 3);
}
}
{
name c2;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-5 -3 -2.5) (9 0 2);
}
}
{
name c3;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-3 -1.5 -1) (8 0 1.5);
}
}
{
name c4;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-2 -1 -0.6) (7 0 1);
}
}
{
name c5;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -0.6 -0.3) (6.5 0 0.8);
}
}
{
name c6;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -6 -3) (10 0 3);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-5 -3 -2.5) (9 0 2);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-3 -1.5 -1) (8 0 1.5);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-2 -1 -0.6) (7 0 1);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -0.6 -0.3) (6.5 0 0.8);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
}
}
);
// ************************************************************************* //

View File

@ -10,6 +10,5 @@ rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1
cleanCase
rm system/topoSetDict > /dev/null 2>&1
#------------------------------------------------------------------------------

View File

@ -13,11 +13,11 @@ runApplication blockMesh
for i in 1 2 3 4 5 6
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}
foamDictionary system/refineMeshDict -entry set -set c${i}
runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
runApplication -a topoSet
runApplication -a refineMesh -dict system/refineMeshDict -overwrite
done
runApplication snappyHexMesh -overwrite

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Mesh if necessary
if ! cloneMesh ../DTCHull . && ! cloneMesh ../DTCHullWave .
if ! cloneMesh ../DTCHull . && ! (isTest $@ && cloneMesh ../DTCHullWave .)
then
./Allmesh
fi

View File

@ -28,10 +28,10 @@ vertices
(16 0 -1)
(-26 0 -1)
(-26 -19 0.185)
(16 -19 0.185)
(16 0 0.185)
(-26 0 0.185)
(-26 -19 0.188)
(16 -19 0.188)
(16 0 0.188)
(-26 0 0.188)
(-26 -19 0.244)
(16 -19 0.244)

View File

@ -0,0 +1,82 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c1;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -6 -3) (10 0 3);
}
}
{
name c2;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-5 -3 -2.5) (9 0 2);
}
}
{
name c3;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-3 -1.5 -1) (8 0 1.5);
}
}
{
name c4;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-2 -1 -0.6) (7 0 1);
}
}
{
name c5;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -0.6 -0.3) (6.5 0 0.8);
}
}
{
name c6;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -6 -3) (10 0 3);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-5 -3 -2.5) (9 0 2);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-3 -1.5 -1) (8 0 1.5);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-2 -1 -0.6) (7 0 1);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -0.6 -0.3) (6.5 0 0.8);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
}
}
);
// ************************************************************************* //

View File

@ -10,6 +10,5 @@ rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1
cleanCase
rm system/topoSetDict > /dev/null 2>&1
#------------------------------------------------------------------------------

View File

@ -13,11 +13,11 @@ runApplication blockMesh
for i in 1 2 3 4 5 6
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}
foamDictionary system/refineMeshDict -entry set -set c${i}
runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
runApplication -a topoSet
runApplication -a refineMesh -dict system/refineMeshDict -overwrite
done
runApplication snappyHexMesh -overwrite

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Mesh if necessary
if ! cloneMesh ../DTCHull . && ! cloneMesh ../DTCHullMoving .
if ! isTest $@ || ! cloneMesh ../DTCHull . && ! cloneMesh ../DTCHullMoving .
then
./Allmesh
fi

View File

@ -28,10 +28,10 @@ vertices
(16 0 -1)
(-26 0 -1)
(-26 -19 0.185)
(16 -19 0.185)
(16 0 0.185)
(-26 0 0.185)
(-26 -19 0.188)
(16 -19 0.188)
(16 0 0.188)
(-26 0 0.188)
(-26 -19 0.244)
(16 -19 0.244)

View File

@ -47,8 +47,8 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 20;
maxAlphaCo 15;
maxCo 10;
maxAlphaCo 5;
maxDeltaT 0.01;
libs ("libwaves.so");

View File

@ -0,0 +1,82 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c1;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -6 -3) (16 0 3);
}
}
{
name c2;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-5 -3 -2.5) (16 0 2);
}
}
{
name c3;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-3 -1.5 -1) (16 0 1.5);
}
}
{
name c4;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-2 -1 -0.6) (16 0 1);
}
}
{
name c5;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -0.6 -0.3) (6.5 0 0.8);
}
}
{
name c6;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -6 -3) (10 0 3);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-5 -3 -2.5) (9 0 2);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-3 -1.5 -1) (8 0 1.5);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-2 -1 -0.6) (7 0 1);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -0.6 -0.3) (6.5 0 0.8);
}
}
);
// ************************************************************************* //

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.5 -0.55 -0.15) (6.25 0 0.65);
}
}
);
// ************************************************************************* //