mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: motorBike: tutorial with dynamic refinement across snappyHexMesh mesh
This commit is contained in:
40
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/U
Normal file
40
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/U
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*--------------------------------*- 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 volVectorField;
|
||||||
|
location "0";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
wall
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue (0 0 0);
|
||||||
|
}
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object alpha.water;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
wall
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
41
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/k
Normal file
41
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/k
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.00015;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
wall
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
44
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/nut
Normal file
44
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/nut
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0";
|
||||||
|
object nut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 5e-07;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
wall
|
||||||
|
{
|
||||||
|
type nutkRoughWallFunction;
|
||||||
|
Ks uniform 100e-6;
|
||||||
|
Cs uniform 0.5;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
43
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/omega
Normal file
43
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/omega
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0";
|
||||||
|
object omega;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 2;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
wall
|
||||||
|
{
|
||||||
|
type omegaWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
46
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/p_rgh
Normal file
46
tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/p_rgh
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
wall
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
phi phiAbs;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
p0 uniform 0;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 1;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
17
tutorials/multiphase/interDyMFoam/ras/motorBike/Allclean
Executable file
17
tutorials/multiphase/interDyMFoam/ras/motorBike/Allclean
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
# remove surface and features
|
||||||
|
\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
|
||||||
|
\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
||||||
|
\rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
|
||||||
|
|
||||||
|
rm -rf 0 > /dev/null 2>&1
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
\rm -f constant/polyMesh/boundary
|
||||||
|
|
||||||
|
\cp system/controlDict_run system/controlDict
|
||||||
21
tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun
Executable file
21
tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
./Allrun.pre
|
||||||
|
|
||||||
|
#runApplication `getApplication`
|
||||||
|
runParallel `getApplication` 5
|
||||||
|
|
||||||
|
unset FOAM_SIGFPE
|
||||||
|
runParallel -log log.reconstruct redistributePar 5 -reconstruct
|
||||||
|
|
||||||
|
# A bit more testing of decomposing
|
||||||
|
\cp system/controlDict_nextWrite system/controlDict
|
||||||
|
runParallel -log log.decompose redistributePar 5 -decompose -latestTime
|
||||||
|
runParallel -log log.interDyMFoam_restart `getApplication` 5
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
27
tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun.pre
Executable file
27
tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun.pre
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# copy motorbike surface from resources directory
|
||||||
|
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
|
||||||
|
|
||||||
|
runApplication surfaceFeatureExtract
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
#runApplication snappyHexMesh -overwrite
|
||||||
|
#\rm -f constant/polyMesh/refinementHistory*
|
||||||
|
# - set the initial fields
|
||||||
|
#cp -rf 0.org 0
|
||||||
|
#runApplication setFields
|
||||||
|
|
||||||
|
runApplication decomposePar -force
|
||||||
|
runParallel snappyHexMesh 5 -overwrite
|
||||||
|
ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
|
||||||
|
|
||||||
|
# - set the initial fields
|
||||||
|
ls -d processor* | xargs -I {} rm -rf ./{}/0
|
||||||
|
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
|
||||||
|
runParallel setFields 5
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "constant";
|
||||||
|
object dynamicMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dynamicFvMesh dynamicRefineFvMesh;
|
||||||
|
|
||||||
|
dynamicRefineFvMeshCoeffs
|
||||||
|
{
|
||||||
|
// How often to refine
|
||||||
|
refineInterval 1;
|
||||||
|
// Field to base refinement on
|
||||||
|
field alpha.water;
|
||||||
|
// Refine field inbetween lower..upper
|
||||||
|
lowerRefineLevel 0.001;
|
||||||
|
upperRefineLevel 0.999;
|
||||||
|
// Have slower than 2:1 refinement
|
||||||
|
nBufferLayers 1;
|
||||||
|
// Refine cells only up to maxRefinement levels
|
||||||
|
maxRefinement 3;
|
||||||
|
// Stop refinement if maxCells reached
|
||||||
|
maxCells 2000000;
|
||||||
|
// Flux field and corresponding velocity field. Fluxes on changed
|
||||||
|
// faces get recalculated by interpolating the velocity. Use 'none'
|
||||||
|
// on surfaceScalarFields that do not need to be reinterpolated.
|
||||||
|
correctFluxes
|
||||||
|
(
|
||||||
|
(phi none)
|
||||||
|
(nHatf none)
|
||||||
|
(rhoPhi none)
|
||||||
|
(ghf none)
|
||||||
|
);
|
||||||
|
// Write the refinement level as a volScalarField
|
||||||
|
dumpLevel true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
22
tutorials/multiphase/interDyMFoam/ras/motorBike/constant/g
Normal file
22
tutorials/multiphase/interDyMFoam/ras/motorBike/constant/g
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- 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 uniformDimensionedVectorField;
|
||||||
|
location "constant";
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value ( 0 0 -9.81 );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "constant";
|
||||||
|
object transportProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
phases (water air);
|
||||||
|
|
||||||
|
water
|
||||||
|
{
|
||||||
|
transportModel Newtonian;
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
|
||||||
|
CrossPowerLawCoeffs
|
||||||
|
{
|
||||||
|
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
m m [ 0 0 1 0 0 0 0 ] 1;
|
||||||
|
n n [ 0 0 0 0 0 0 0 ] 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BirdCarreauCoeffs
|
||||||
|
{
|
||||||
|
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
|
||||||
|
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
k k [ 0 0 1 0 0 0 0 ] 99.6;
|
||||||
|
n n [ 0 0 0 0 0 0 0 ] 0.1003;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
air
|
||||||
|
{
|
||||||
|
transportModel Newtonian;
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
|
||||||
|
rho rho [ 1 -3 0 0 0 0 0 ] 1;
|
||||||
|
CrossPowerLawCoeffs
|
||||||
|
{
|
||||||
|
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
m m [ 0 0 1 0 0 0 0 ] 1;
|
||||||
|
n n [ 0 0 0 0 0 0 0 ] 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BirdCarreauCoeffs
|
||||||
|
{
|
||||||
|
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
|
||||||
|
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
k k [ 0 0 1 0 0 0 0 ] 99.6;
|
||||||
|
n n [ 0 0 0 0 0 0 0 ] 0.1003;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
Directory to house tri-surfaces
|
||||||
|
|
||||||
|
The Allrun script copies the surface from the $FOAM_TUTORIALS/resources/geometry
|
||||||
|
directory
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType RAS;
|
||||||
|
|
||||||
|
RAS
|
||||||
|
{
|
||||||
|
RASModel kOmegaSST;
|
||||||
|
|
||||||
|
turbulence on;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(-1 -0.5 0)
|
||||||
|
( 3 -0.5 0)
|
||||||
|
( 3 0.5 0)
|
||||||
|
(-1 0.5 0)
|
||||||
|
(-1 -0.5 2)
|
||||||
|
( 3 -0.5 2)
|
||||||
|
( 3 0.5 2)
|
||||||
|
(-1 0.5 2)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (8 2 4) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
(1 5 4 0)
|
||||||
|
(0 4 7 3)
|
||||||
|
(2 6 5 1)
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// inlet
|
||||||
|
// {
|
||||||
|
// type patch;
|
||||||
|
// faces
|
||||||
|
// (
|
||||||
|
// (0 4 7 3)
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// outlet
|
||||||
|
// {
|
||||||
|
// type patch;
|
||||||
|
// faces
|
||||||
|
// (
|
||||||
|
// (2 6 5 1)
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// lowerWall
|
||||||
|
// {
|
||||||
|
// type wall;
|
||||||
|
// faces
|
||||||
|
// (
|
||||||
|
// (0 3 2 1)
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
upperWall
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//DebugSwitches
|
||||||
|
//{
|
||||||
|
// dynamicRefineFvMesh 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
application interDyMFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 2;
|
||||||
|
|
||||||
|
deltaT 0.001;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
writeInterval 0.02;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
|
||||||
|
writeFormat binary;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 0.5;
|
||||||
|
maxAlphaCo 0.5;
|
||||||
|
maxDeltaT 1;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
// Print stats
|
||||||
|
#include "minMax"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//DebugSwitches
|
||||||
|
//{
|
||||||
|
// dynamicRefineFvMesh 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
application interDyMFoam;
|
||||||
|
|
||||||
|
startFrom latestTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt nextWrite;
|
||||||
|
|
||||||
|
endTime 2;
|
||||||
|
|
||||||
|
deltaT 0.001;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
writeInterval 0.02;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
|
||||||
|
writeFormat binary;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 0.5;
|
||||||
|
maxAlphaCo 0.5;
|
||||||
|
maxDeltaT 1;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//DebugSwitches
|
||||||
|
//{
|
||||||
|
// dynamicRefineFvMesh 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
application interDyMFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 2;
|
||||||
|
|
||||||
|
deltaT 0.001;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
writeInterval 0.02;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
|
||||||
|
writeFormat binary;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 0.5;
|
||||||
|
maxAlphaCo 0.5;
|
||||||
|
maxDeltaT 1;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
// Print stats
|
||||||
|
#include "minMax"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 5;
|
||||||
|
|
||||||
|
method hierarchical;
|
||||||
|
// method ptscotch;
|
||||||
|
|
||||||
|
|
||||||
|
// Optional decomposition constraints
|
||||||
|
constraints
|
||||||
|
{
|
||||||
|
refinementHistory
|
||||||
|
{
|
||||||
|
//- Decompose cells such that all cell originating from single cell
|
||||||
|
// end up on same processor
|
||||||
|
type refinementHistory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
simpleCoeffs
|
||||||
|
{
|
||||||
|
n (4 1 1);
|
||||||
|
delta 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
|
hierarchicalCoeffs
|
||||||
|
{
|
||||||
|
n (5 1 1);
|
||||||
|
delta 0.001;
|
||||||
|
order xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
manualCoeffs
|
||||||
|
{
|
||||||
|
dataFile "cellDecomposition";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
div(rhoPhi,U) Gauss upwind;
|
||||||
|
div(phi,alpha) Gauss vanLeer;
|
||||||
|
div(phi,omega) Gauss upwind;
|
||||||
|
div(phi,k) Gauss upwind;
|
||||||
|
div(phirb,alpha) Gauss linear;
|
||||||
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p_rgh;
|
||||||
|
pcorr;
|
||||||
|
}
|
||||||
|
|
||||||
|
wallDist
|
||||||
|
{
|
||||||
|
method meshWave;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
"alpha.water.*"
|
||||||
|
{
|
||||||
|
nAlphaCorr 1;
|
||||||
|
nAlphaSubCycles 3;
|
||||||
|
cAlpha 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.01;
|
||||||
|
smoother DIC;
|
||||||
|
nPreSweeps 0;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nFinestSweeps 2;
|
||||||
|
cacheAgglomeration false;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rghFinal
|
||||||
|
{
|
||||||
|
$p_rgh;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
"pcorr.*"
|
||||||
|
{
|
||||||
|
$p_rghFinal;
|
||||||
|
tolerance 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
|
"U.*"
|
||||||
|
{
|
||||||
|
solver smoothSolver;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
nSweeps 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(k|omega|nuTilda).*"
|
||||||
|
{
|
||||||
|
solver smoothSolver;
|
||||||
|
smoother symGaussSeidel;
|
||||||
|
tolerance 1e-08;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
momentumPredictor yes;
|
||||||
|
nCorrectors 3;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
|
pRefPoint (0.51 0.51 0.51);
|
||||||
|
pRefValue 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
fields
|
||||||
|
{
|
||||||
|
}
|
||||||
|
equations
|
||||||
|
{
|
||||||
|
".*" 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
object meshQualityDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Include defaults parameters from master dictionary
|
||||||
|
#include "$WM_PROJECT_DIR/etc/caseDicts/meshQualityDict"
|
||||||
|
|
||||||
|
////- minFaceWeight (0 -> 0.5)
|
||||||
|
//minFaceWeight 0.02;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
minMax
|
||||||
|
{
|
||||||
|
// Type of functionObject
|
||||||
|
type fieldMinMax;
|
||||||
|
|
||||||
|
// Where to load it from (if not already in solver)
|
||||||
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
|
|
||||||
|
// Log to output (default: false)
|
||||||
|
log true;
|
||||||
|
|
||||||
|
// Fields to be monitored - runTime modifiable
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
U
|
||||||
|
p
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
location "system";
|
||||||
|
object setFieldsDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defaultFieldValues
|
||||||
|
(
|
||||||
|
volScalarFieldValue alpha.water 0
|
||||||
|
volVectorFieldValue U ( 0 0 0 )
|
||||||
|
);
|
||||||
|
|
||||||
|
regions
|
||||||
|
(
|
||||||
|
boxToCell
|
||||||
|
{
|
||||||
|
//box ( -1 -0.5 0 ) ( -0.5 0.5 2 );
|
||||||
|
//box ( -0.5 -0.5 1.5 ) ( 1.5 0.5 2 );
|
||||||
|
box ( 0 -0.5 1.5 ) ( 2 0.5 1.75 );
|
||||||
|
fieldValues
|
||||||
|
(
|
||||||
|
volScalarFieldValue alpha.water 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,314 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
object snappyHexMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Which of the steps to run
|
||||||
|
castellatedMesh true;
|
||||||
|
snap true;
|
||||||
|
addLayers true;
|
||||||
|
|
||||||
|
|
||||||
|
// Geometry. Definition of all surfaces. All surfaces are of class
|
||||||
|
// searchableSurface.
|
||||||
|
// Surfaces are used
|
||||||
|
// - to specify refinement for any mesh cell intersecting it
|
||||||
|
// - to specify refinement for any mesh cell inside/outside/near
|
||||||
|
// - to 'snap' the mesh boundary to the surface
|
||||||
|
geometry
|
||||||
|
{
|
||||||
|
motorBike.obj
|
||||||
|
{
|
||||||
|
type triSurfaceMesh;
|
||||||
|
name motorBike;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//// Optional: avoid patch-face merging. Allows mesh to be used for
|
||||||
|
//// refinement/unrefinement
|
||||||
|
//mergePatchFaces off; // default on
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Settings for the castellatedMesh generation.
|
||||||
|
castellatedMeshControls
|
||||||
|
{
|
||||||
|
|
||||||
|
// Refinement parameters
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// If local number of cells is >= maxLocalCells on any processor
|
||||||
|
// switches from from refinement followed by balancing
|
||||||
|
// (current method) to (weighted) balancing before refinement.
|
||||||
|
maxLocalCells 100000;
|
||||||
|
|
||||||
|
// Overall cell limit (approximately). Refinement will stop immediately
|
||||||
|
// upon reaching this number so a refinement level might not complete.
|
||||||
|
// Note that this is the number of cells before removing the part which
|
||||||
|
// is not 'visible' from the keepPoint. The final number of cells might
|
||||||
|
// actually be a lot less.
|
||||||
|
maxGlobalCells 2000000;
|
||||||
|
|
||||||
|
// The surface refinement loop might spend lots of iterations refining just a
|
||||||
|
// few cells. This setting will cause refinement to stop if <= minimumRefine
|
||||||
|
// are selected for refinement. Note: it will at least do one iteration
|
||||||
|
// (unless the number of cells to refine is 0)
|
||||||
|
minRefinementCells 10;
|
||||||
|
|
||||||
|
// Allow a certain level of imbalance during refining
|
||||||
|
// (since balancing is quite expensive)
|
||||||
|
// Expressed as fraction of perfect balance (= overall number of cells /
|
||||||
|
// nProcs). 0=balance always.
|
||||||
|
maxLoadUnbalance 0.10;
|
||||||
|
|
||||||
|
|
||||||
|
// Number of buffer layers between different levels.
|
||||||
|
// 1 means normal 2:1 refinement restriction, larger means slower
|
||||||
|
// refinement.
|
||||||
|
nCellsBetweenLevels 3;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Explicit feature edge refinement
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// Specifies a level for any cell intersected by its edges.
|
||||||
|
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
||||||
|
features
|
||||||
|
();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Surface based refinement
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// Specifies two levels for every surface. The first is the minimum level,
|
||||||
|
// every cell intersecting a surface gets refined up to the minimum level.
|
||||||
|
// The second level is the maximum level. Cells that 'see' multiple
|
||||||
|
// intersections where the intersections make an
|
||||||
|
// angle > resolveFeatureAngle get refined up to the maximum level.
|
||||||
|
|
||||||
|
refinementSurfaces
|
||||||
|
{
|
||||||
|
motorBike
|
||||||
|
{
|
||||||
|
// Surface-wise min and max refinement level
|
||||||
|
level (3 3);
|
||||||
|
|
||||||
|
// Optional specification of patch type (default is wall). No
|
||||||
|
// constraint types (cyclic, symmetry) etc. are allowed.
|
||||||
|
patchInfo
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups (motorBikeGroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolve sharp angles
|
||||||
|
resolveFeatureAngle 30;
|
||||||
|
|
||||||
|
|
||||||
|
// Region-wise refinement
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// Specifies refinement level for cells in relation to a surface. One of
|
||||||
|
// three modes
|
||||||
|
// - distance. 'levels' specifies per distance to the surface the
|
||||||
|
// wanted refinement level. The distances need to be specified in
|
||||||
|
// descending order.
|
||||||
|
// - inside. 'levels' is only one entry and only the level is used. All
|
||||||
|
// cells inside the surface get refined up to the level. The surface
|
||||||
|
// needs to be closed for this to be possible.
|
||||||
|
// - outside. Same but cells outside.
|
||||||
|
|
||||||
|
refinementRegions
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mesh selection
|
||||||
|
// ~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// After refinement patches get added for all refinementSurfaces and
|
||||||
|
// all cells intersecting the surfaces get put into these patches. The
|
||||||
|
// section reachable from the locationInMesh is kept.
|
||||||
|
// NOTE: This point should never be on a face, always inside a cell, even
|
||||||
|
// after refinement.
|
||||||
|
locationInMesh (2.991 0.4991 1.991);
|
||||||
|
|
||||||
|
|
||||||
|
// Whether any faceZones (as specified in the refinementSurfaces)
|
||||||
|
// are only on the boundary of corresponding cellZones or also allow
|
||||||
|
// free-standing zone faces. Not used if there are no faceZones.
|
||||||
|
allowFreeStandingZoneFaces true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Settings for the snapping.
|
||||||
|
snapControls
|
||||||
|
{
|
||||||
|
//- Number of patch smoothing iterations before finding correspondence
|
||||||
|
// to surface
|
||||||
|
nSmoothPatch 3;
|
||||||
|
|
||||||
|
//- Relative distance for points to be attracted by surface feature point
|
||||||
|
// or edge. True distance is this factor times local
|
||||||
|
// maximum edge length.
|
||||||
|
tolerance 2.0;
|
||||||
|
|
||||||
|
//- Number of mesh displacement relaxation iterations.
|
||||||
|
nSolveIter 30;
|
||||||
|
|
||||||
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
|
// before upon reaching a correct mesh.
|
||||||
|
nRelaxIter 5;
|
||||||
|
|
||||||
|
// Feature snapping
|
||||||
|
|
||||||
|
// //- Number of feature edge snapping iterations.
|
||||||
|
// // Leave out altogether to disable.
|
||||||
|
// nFeatureSnapIter 10;
|
||||||
|
//
|
||||||
|
// //- Detect (geometric only) features by sampling the surface
|
||||||
|
// // (default=false).
|
||||||
|
// implicitFeatureSnap false;
|
||||||
|
//
|
||||||
|
// //- Use castellatedMeshControls::features (default = true)
|
||||||
|
// explicitFeatureSnap true;
|
||||||
|
//
|
||||||
|
// //- Detect points on multiple surfaces (only for explicitFeatureSnap)
|
||||||
|
// multiRegionFeatureSnap false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Settings for the layer addition.
|
||||||
|
addLayersControls
|
||||||
|
{
|
||||||
|
// Are the thickness parameters below relative to the undistorted
|
||||||
|
// size of the refined cell outside layer (true) or absolute sizes (false).
|
||||||
|
relativeSizes true;
|
||||||
|
|
||||||
|
// Per final patch (so not geometry!) the layer information
|
||||||
|
layers
|
||||||
|
{
|
||||||
|
"motorBike.*"
|
||||||
|
{
|
||||||
|
nSurfaceLayers 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Expansion factor for layer mesh
|
||||||
|
expansionRatio 1.0;
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
// See relativeSizes parameter.
|
||||||
|
finalLayerThickness 0.3;
|
||||||
|
|
||||||
|
// Minimum thickness of cell layer. If for any reason layer
|
||||||
|
// cannot be above minThickness do not add layer.
|
||||||
|
// Relative to undistorted size of cell outside layer.
|
||||||
|
minThickness 0.1;
|
||||||
|
|
||||||
|
// If points get not extruded do nGrow layers of connected faces that are
|
||||||
|
// also not grown. This helps convergence of the layer addition process
|
||||||
|
// close to features.
|
||||||
|
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||||
|
nGrow 0;
|
||||||
|
|
||||||
|
// Advanced settings
|
||||||
|
|
||||||
|
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||||
|
// are perpendicular
|
||||||
|
featureAngle 60;
|
||||||
|
|
||||||
|
// At non-patched sides allow mesh to slip if extrusion direction makes
|
||||||
|
// angle larger than slipFeatureAngle.
|
||||||
|
slipFeatureAngle 30;
|
||||||
|
|
||||||
|
// Maximum number of snapping relaxation iterations. Should stop
|
||||||
|
// before upon reaching a correct mesh.
|
||||||
|
nRelaxIter 3;
|
||||||
|
|
||||||
|
// Number of smoothing iterations of surface normals
|
||||||
|
nSmoothSurfaceNormals 1;
|
||||||
|
|
||||||
|
// Number of smoothing iterations of interior mesh movement direction
|
||||||
|
nSmoothNormals 3;
|
||||||
|
|
||||||
|
// Smooth layer thickness over surface patches
|
||||||
|
nSmoothThickness 10;
|
||||||
|
|
||||||
|
// Stop layer growth on highly warped cells
|
||||||
|
maxFaceThicknessRatio 0.5;
|
||||||
|
|
||||||
|
// Reduce layer growth where ratio thickness to medial
|
||||||
|
// distance is large
|
||||||
|
maxThicknessToMedialRatio 0.3;
|
||||||
|
|
||||||
|
// Angle used to pick up medial axis points
|
||||||
|
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
|
||||||
|
minMedianAxisAngle 90;
|
||||||
|
|
||||||
|
|
||||||
|
// Create buffer region for new layer terminations
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Generic mesh quality settings. At any undoable phase these determine
|
||||||
|
// where to undo.
|
||||||
|
meshQualityControls
|
||||||
|
{
|
||||||
|
#include "meshQualityDict"
|
||||||
|
|
||||||
|
|
||||||
|
// Advanced
|
||||||
|
|
||||||
|
//- Number of error distribution iterations
|
||||||
|
nSmoothScale 4;
|
||||||
|
//- amount to scale back displacement at error points
|
||||||
|
errorReduction 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Advanced
|
||||||
|
|
||||||
|
// Write flags
|
||||||
|
writeFlags
|
||||||
|
(
|
||||||
|
layerFields // write volScalarField for layer coverage
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
||||||
|
// Note: the write tolerance needs to be higher than this.
|
||||||
|
mergeTolerance 1e-6;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- 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 dictionary;
|
||||||
|
object surfaceFeatureExtractDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
motorBike.obj
|
||||||
|
{
|
||||||
|
// How to obtain raw features (extractFromFile || extractFromSurface)
|
||||||
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
|
extractFromSurfaceCoeffs
|
||||||
|
{
|
||||||
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
|
// than includedAngle as features
|
||||||
|
// - 0 : selects no edges
|
||||||
|
// - 180: selects all edges
|
||||||
|
includedAngle 150;
|
||||||
|
}
|
||||||
|
|
||||||
|
subsetFeatures
|
||||||
|
{
|
||||||
|
// Keep nonManifold edges (edges with >2 connected faces)
|
||||||
|
nonManifoldEdges no;
|
||||||
|
|
||||||
|
// Keep open edges (edges with 1 connected face)
|
||||||
|
openEdges yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Write options
|
||||||
|
|
||||||
|
// Write features to obj format for postprocessing
|
||||||
|
writeObj yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user