Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
34bc9cad
Commit
34bc9cad
authored
Feb 01, 2014
by
Henry
Browse files
DTCHull: new interDyMFoam tutorial
parent
bf0a90d5
Changes
31
Hide whitespace changes
Inline
Side-by-side
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/U
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Umean 1.668;
mUmean -1.668;
dimensions [0 1 -1 0 0 0 0];
internalField uniform ($mUmean 0 0);
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type outletPhaseMeanVelocity;
alpha alpha.water;
Umean $Umean;
value $internalField;
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
hull
{
type movingWallVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/alpha.water
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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 alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type variableHeightFlowRate;
lowerBound 0;
upperBound 1;
value $internalField;
}
atmosphere
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
hull
{
type zeroGradient;
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/k
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
atmosphere
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
hull
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/nut
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type zeroGradient;
}
hull
{
type nutkRoughWallFunction;
Ks uniform 100e-6;
Cs uniform 0.5;
value $internalField;
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/omega
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
atmosphere
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
hull
{
type omegaWallFunction;
value $internalField;
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/p_rgh
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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 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"
inlet
{
type fixedFluxPressure;
value $internalField;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value $internalField;
}
hull
{
type fixedFluxPressure;
value $internalField;
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/0.org/pointDisplacement
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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 pointVectorField;
location "0";
object pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type fixedValue;
value uniform (0 0 0);
}
hull
{
type calculated;
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/Allclean
0 → 100755
View file @
34bc9cad
#!/bin/sh
cd
${
0
%/*
}
||
exit
1
# run from this directory
# Source tutorial clean functions
.
$WM_PROJECT_DIR
/bin/tools/CleanFunctions
# remove surface
\r
m
-f
constant/triSurface/DTC-scaled.stl.gz
>
/dev/null 2>&1
\r
m
-rf
constant/extendedFeatureEdgeMesh
>
/dev/null 2>&1
\r
m
-f
constant/triSurface/DTC-scaled.eMesh
>
/dev/null 2>&1
cleanCase
\r
m constant/polyMesh/boundary
>
/dev/null 2>&1
\r
m
-rf
0
>
/dev/null 2>&1
\r
m system/topoSetDict
>
/dev/null 2>&1
# ----------------------------------------------------------------- end-of-file
tutorials/multiphase/interDyMFoam/ras/DTCHull/Allrun
0 → 100755
View file @
34bc9cad
#!/bin/sh
cd
${
0
%/*
}
||
exit
1
# run from this directory
# Source tutorial run functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
runRefineMesh
()
{
echo
"Running refineMesh on
$PWD
"
refineMesh
-dict
system/refineMeshDict
-overwrite
>
log.refineMesh 2>&1
}
# copy DTC hull surface from resources folder
cp
$FOAM_TUTORIALS
/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
i
=
1
if
[
-f
log.topoSet.6
]
;
then
i
=
7
fi
while
[
"
$i
"
-lt
7
]
;
do
cp
system/topoSetDict.
${
i
}
system/topoSetDict
runApplication topoSet
runRefineMesh
mv
log.topoSet log.topoSet.
$i
mv
log.refineMesh log.refineMesh.
$i
i
=
$(
expr
$i
+ 1
)
done
runApplication snappyHexMesh
-overwrite
\r
m
-rf
0
\c
p
-r
0.org 0
runApplication setFields
runApplication decomposePar
runParallel renumberMesh 8
-overwrite
runParallel
$(
getApplication
)
8
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file
tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/RASProperties
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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 RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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 dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
solver sixDoFRigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
{
patches (hull);
innerDistance 0.3;
outerDistance 1;
centreOfMass (2.929541 0 0.2);
mass 412.73;
momentOfInertia (40 921 921);
rhoInf 1;
report on;
accelerationRelaxation 0.3;
value uniform (0 0 0);
constraints
{
zAxis
{
sixDoFRigidBodyMotionConstraint line;
direction (0 0 1);
}
yPlane
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
}
restraints
{
translationDamper
{
sixDoFRigidBodyMotionRestraint linearDamper;
coeff 8596;
}
rotationDamper
{
sixDoFRigidBodyMotionRestraint sphericalAngularDamper;
coeff 11586;
}
}
}
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/g
0 → 100644
View file @
34bc9cad
/*--------------------------------*- 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);
// ************************************************************************* //
tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/polyMesh/blockMeshDict
0 → 100644
View file @
34bc9cad
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-26 -19 -16)
(16 -19 -16)
(16 0 -16)
(-26 0 -16)
(-26 -19 -1)
(16 -19 -1)
(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.244)
(16 -19 0.244)
(16 0 0.244)
(-26 0 0.244)
(-26 -19 0.3)
(16 -19 0.3)