GIT: Initial commit after latest foundation merge

This commit is contained in:
andy
2016-04-25 11:40:48 +01:00
4003 changed files with 74634 additions and 37783 deletions

View File

@ -3,12 +3,12 @@ cd ${0%/*} || exit 1 # Run from this directory
(
cd throttle || exit
./Allrun
./Allrun $*
)
(
cd throttle3D || exit
./Allrun
./Allrun $*
)
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -34,8 +34,7 @@ boundaryField
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
frontBack

View File

@ -9,4 +9,4 @@ rm -rf 0/polyMesh > /dev/null 2>&1
rm system/topoSetDict > /dev/null 2>&1
cleanCase
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -29,4 +29,4 @@ runApplication blockMesh
refineMeshByCellSet 1 2 3
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -34,14 +34,12 @@ boundaryField
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
frontBack
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
}

View File

@ -10,4 +10,4 @@ rm system/topoSetDict > /dev/null 2>&1
rm -rf processor[0-9] > /dev/null 2>&1
cleanCase
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ refineMeshByCellSet 1 2 3
#runApplication mapFields ../throttle -sourceTime latestTime
runApplication decomposePar
runParallel $application 4
runParallel $application
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -34,8 +34,7 @@ boundaryField
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
frontBack

View File

@ -9,4 +9,4 @@ rm -rf 0/polyMesh > /dev/null 2>&1
rm system/topoSetDict > /dev/null 2>&1
cleanCase
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -28,4 +28,4 @@ runApplication blockMesh
refineMeshByCellSet 1 2 3
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -5,4 +5,4 @@ foamCleanTutorials cases
rm -rf 0/alpha.water 0/alpha.water.gz 0/T.air.gz 0/T.water.gz \
probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -22,8 +22,7 @@ boundaryField
{
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
frontAndBack
{

View File

@ -1,6 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf processor*
rm -rf 0/p_rgh.gz 0/p.gz 0/alpha.water.gz 0/T*.gz
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
\rm -rf 0
#------------------------------------------------------------------------------

View File

@ -4,15 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
cp 0/p_rgh.org 0/p_rgh
cp 0/p.org 0/p
cp 0/T.org 0/T
cp -r 0.org 0
runApplication setFields
runApplication $application
runApplication $(getApplication)
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -22,8 +22,7 @@ boundaryField
{
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
frontAndBack
{

View File

@ -1,8 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf processor*
rm -rf 0/p_rgh 0/p 0/alpha.water 0/T 0/T.air 0/T.water
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# ----------------------------------------------------------------- end-of-file
cleanCase
\rm -rf 0
rm -rf processor*
#------------------------------------------------------------------------------

View File

@ -4,17 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
cp 0/p_rgh.org 0/p_rgh
cp 0/p.org 0/p
cp 0/T.org 0/T
cp -r 0.org 0
runApplication setFields
runApplication decomposePar
runParallel $application 4
runParallel $(getApplication)
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -23,18 +23,15 @@ boundaryField
{
leftWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
rightWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
atmosphere
{

View File

@ -8,4 +8,4 @@ cleanCase
\rm -rf 0
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -14,4 +14,4 @@ runApplication blockMesh
runApplication setFields
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -34,14 +34,12 @@ boundaryField
bottomWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
endWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
top

View File

@ -23,13 +23,11 @@ boundaryField
{
rotor
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
stator
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
front
{

View File

@ -9,4 +9,4 @@ application=`getApplication`
runApplication ./makeMesh
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -64,74 +64,62 @@ boundaryField
WALL8
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL61
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL62
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL63
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL64
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL65
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL66
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL67
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL68
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL69
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL7
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
WALL70
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
OUTL15

View File

@ -6,4 +6,4 @@ cd ${0%/*} || exit 1 # Run from this directory
rm -rf *[1-9]*
rm -f log.* 2>/dev/null
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -8,4 +8,4 @@ application=`getApplication`
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -14,4 +14,4 @@ cleanCase
\rm -rf 0 > /dev/null 2>&1
\rm system/topoSetDict > /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,12 +4,6 @@ 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/
@ -17,17 +11,13 @@ 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)
for i in 1 2 3 4 5 6
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}
runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
done
runApplication snappyHexMesh -overwrite
@ -39,10 +29,10 @@ runApplication setFields
runApplication decomposePar
runParallel renumberMesh 8 -overwrite
runParallel renumberMesh -overwrite
runParallel $(getApplication) 8
runParallel $(getApplication)
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -16,56 +16,65 @@ FoamFile
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
motionSolverLibs ("librigidBodyMeshMotion.so");
solver sixDoFRigidBodyMotion;
solver rigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
rigidBodyMotionCoeffs
{
patches (hull);
innerDistance 0.3;
outerDistance 1;
centreOfMass (2.929541 0 0.2);
mass 412.73;
momentOfInertia (40 921 921);
rhoInf 1;
report on;
value uniform (0 0 0);
accelerationRelaxation 0.4;
solver
{
type Newmark;
}
constraints
{
zAxis
{
sixDoFRigidBodyMotionConstraint line;
direction (0 0 1);
}
yPlane
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
}
accelerationRelaxation 0.4;
restraints
bodies
{
translationDamper
hull
{
sixDoFRigidBodyMotionRestraint linearDamper;
coeff 8596;
}
rotationDamper
{
sixDoFRigidBodyMotionRestraint sphericalAngularDamper;
coeff 11586;
type rigidBody;
parent root;
centreOfMass (0 0 0);
mass 412.73;
inertia (40 0 0 921 0 921);
transform (1 0 0 0 1 0 0 0 1) (2.929541 0 0.2);
joint
{
type composite;
joints
(
{
type Pz;
}
{
type Ry;
}
);
}
restraints
{
translationDamper
{
type linearDamper;
coeff 8596;
}
rotationDamper
{
type sphericalAngularDamper;
coeff 11586;
}
}
patches (hull);
innerDistance 0.3;
outerDistance 1;
}
}
}

View File

@ -0,0 +1,74 @@
/*--------------------------------*- 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;
value uniform (0 0 0);
accelerationRelaxation 0.4;
solver
{
type Newmark;
}
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;
}
}
}
// ************************************************************************* //

View File

@ -9,4 +9,4 @@ rm -rf 0 > /dev/null 2>&1
cleanCase
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -12,4 +12,4 @@ runApplication subsetMesh -overwrite c0 -patch walls
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -21,19 +21,26 @@ dynamicRefineFvMeshCoeffs
{
// How often to refine
refineInterval 1;
// Field to be refinement on
field alpha.water;
// Refine field inbetween lower..upper
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
// If value < unrefineLevel unrefine
unrefineLevel 10;
// Have slower than 2:1 refinement
nBufferLayers 1;
// Refine cells only up to maxRefinement levels
maxRefinement 2;
// Stop refinement if maxCells reached
maxCells 200000;
// 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.
@ -42,8 +49,10 @@ dynamicRefineFvMeshCoeffs
(phi none)
(nHatf none)
(rhoPhi none)
(alphaPhi none)
(ghf none)
);
// Write the refinement level as a volScalarField
dumpLevel true;
}

View File

@ -23,8 +23,7 @@ boundaryField
{
stationaryWalls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
atmosphere
{

View File

@ -8,4 +8,4 @@ rm -rf 0 > /dev/null 2>&1
cleanCase
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -14,4 +14,4 @@ cp -r 0.org 0 > /dev/null 2>&1
runApplication setFields
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -16,75 +16,59 @@ FoamFile
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
motionSolverLibs ("librigidBodyMeshMotion.so");
solver sixDoFRigidBodyMotion;
solver rigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
rigidBodyMotionCoeffs
{
patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
centreOfMass (0.5 0.45 0.35);
// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;
// Density of the solid
rho 500;
// Cuboid mass
mass #calc "$rho*$Lx*$Ly*$Lz";
// Cuboid moment of inertia about the centre of mass
momentOfInertia #codeStream
{
codeInclude
#{
#include "diagTensor.H"
#};
code
#{
scalar sqrLx = sqr($Lx);
scalar sqrLy = sqr($Ly);
scalar sqrLz = sqr($Lz);
os <<
$mass
*diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
#};
};
report on;
accelerationRelaxation 0.7;
solver
{
type Newmark;
}
constraints
accelerationRelaxation 0.7;
bodies
{
// fixedPoint
// {
// sixDoFRigidBodyMotionConstraint point;
// centreOfRotation (0.5 0.45 0.1);
// }
fixedLine
floatingObject
{
sixDoFRigidBodyMotionConstraint line;
centreOfRotation (0.5 0.45 0.1);
direction (0 1 0);
}
type cuboid;
parent root;
fixedAxis
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;
// Density of the cuboid
rho 500;
// Cuboid mass
mass #calc "$rho*$Lx*$Ly*$Lz";
L ($Lx $Ly $Lz);
centreOfMass (0 0 0.25);
transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);
joint
{
type composite;
joints
(
{
type Py;
}
{
type Ry;
}
);
}
patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
}
}
}

View File

@ -0,0 +1,94 @@
/*--------------------------------*- 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 motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
solver sixDoFRigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
{
patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
centreOfMass (0.5 0.45 0.35);
// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;
// Density of the solid
rho 500;
// Cuboid mass
mass #calc "$rho*$Lx*$Ly*$Lz";
// Cuboid moment of inertia about the centre of mass
momentOfInertia #codeStream
{
codeInclude
#{
#include "diagTensor.H"
#};
code
#{
scalar sqrLx = sqr($Lx);
scalar sqrLy = sqr($Ly);
scalar sqrLz = sqr($Lz);
os <<
$mass
*diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
#};
};
report on;
accelerationRelaxation 0.7;
//accelerationDamping 0;
solver
{
type Newmark;
}
constraints
{
// fixedPoint
// {
// sixDoFRigidBodyMotionConstraint point;
// centreOfRotation (0.5 0.45 0.1);
// }
fixedLine
{
sixDoFRigidBodyMotionConstraint line;
centreOfRotation (0.5 0.45 0.1);
direction (0 1 0);
}
fixedAxis
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
}
}
// ************************************************************************* //

View File

@ -10,4 +10,4 @@ cleanCase
\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
\rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -13,9 +13,9 @@ application=`getApplication`
runApplication decomposePar -force
# Run
runParallel $application 6
runParallel $application
# Reconstruct
runApplication reconstructPar -noFunctionObjects
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -25,4 +25,4 @@ runApplication createPatch -overwrite
# Initialize alpha
runApplication setFields
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,4 +4,4 @@ cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,4 +4,4 @@ cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,4 +4,4 @@ cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,4 +4,4 @@ cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,4 +4,4 @@ cd ${0%/*} || exit 1 # Run from this directory
foamCleanTutorials cases
rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
// Frequency of the rotation [rad/s]
const vector rotOmega(0.4, 0.7, 0.5);
List<Tuple2<scalar, Vector2D<vector> > > timeValues(nTimes);
List<Tuple2<scalar, Vector2D<vector>>> timeValues(nTimes);
forAll(timeValues, i)
{

View File

@ -7,4 +7,4 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf 0/alpha.water
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -9,4 +9,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -1,61 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
setDamBreakFine ()
{
blockMeshDict="system/blockMeshDict"
controlDict="system/controlDict"
sed \
-e s/"23 8"/"46 10"/g \
-e s/"19 8"/"40 10"/g \
-e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
-e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
-e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
$blockMeshDict > temp.$$
mv temp.$$ $blockMeshDict
sed \
-e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
-e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
$controlDict > temp.$$
mv temp.$$ $controlDict
}
# Do damBreak
(
cd damBreak || exit
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
)
# Clone case
cloneCase damBreak damBreakFine
(
cd damBreakFine || exit
# Modify case
setDamBreakFine
# And execute
runApplication blockMesh
cp ../damBreak/0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication decomposePar
runParallel `getApplication` 4
runApplication reconstructPar
)
# Do capillaryRise
(cd capillaryRise && foamRunTutorials)
# Do mixerVessel2D
(cd mixerVessel2D && foamRunTutorials)
# ----------------------------------------------------------------- end-of-file

View File

@ -35,8 +35,7 @@ boundaryField
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
defaultFaces

File diff suppressed because it is too large Load Diff

View File

@ -11,4 +11,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,12 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
keepCases="damBreak capillaryRise mixerVessel2D"
keepCases="damBreak"
loseCases="damBreakFine"
for case in $keepCases
do
(cd $case && foamCleanTutorials && rm -rf 0/alpha.water)
(cd $case && foamCleanTutorials)
done
for case in $loseCases
@ -17,4 +17,4 @@ do
removeCase $case
done
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -39,17 +39,8 @@ cloneCase damBreak damBreakFine
runApplication blockMesh
runApplication setFields
runApplication decomposePar
runParallel `getApplication` 4
runParallel `getApplication`
runApplication reconstructPar
)
# Do damBreakPorousBaffle
(cd damBreakPorousBaffle && foamRunTutorials)
# Do weirOverflow
(cd weirOverflow && foamRunTutorials)
# Do waterChannel
(cd waterChannel && foamRunTutorials)
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -23,18 +23,15 @@ boundaryField
{
leftWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
rightWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
atmosphere
{

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp 0/alpha.water.org 0/alpha.water
#------------------------------------------------------------------------------

View File

@ -0,0 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
runApplication blockMesh
runApplication setFields
runApplication $application
#------------------------------------------------------------------------------

View File

@ -23,13 +23,11 @@ boundaryField
{
rotor
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
stator
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
front
{

File diff suppressed because it is too large Load Diff

View File

@ -11,4 +11,4 @@ cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -33,8 +33,7 @@ boundaryField
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
atmosphere

View File

@ -7,4 +7,4 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm system/topoSetDict > /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -7,30 +7,17 @@ cd ${0%/*} || exit 1 # Run from this directory
# Get application name
application=`getApplication`
runRefineMesh ()
{
echo "Running refineMesh on $PWD"
refineMesh -dict system/refineMeshDict > log.refineMesh 2>&1
}
runApplication blockMesh
i=1
if [ -f log.topoSet ] ; then
i=3
fi
while [ "$i" -lt 3 ] ; do
if [ -f log.topoSet ] ; then
mv log.topoSet log.topoSet.1
fi
cp system/topoSetDict.${i} system/topoSetDict
runApplication topoSet
runRefineMesh
cp -r 1e-08/polyMesh/* constant/polyMesh
rm -rf 1e-08
i=`expr $i + 1`
for i in 1 2
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}
runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
done
runApplication $application
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -1,31 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel angledDuct"
loseCases="damBreakFine"
for case in $keepCases
do
(cd $case && foamCleanTutorials)
if [ "$case" = "damBreak" ]
then
cp $case/0/alpha.water.org $case/0/alpha.water
fi
if [ "$case" = "damBreakPorousBaffle" ]
then
cp $case/0/alpha.water.org $case/0/alpha.water
fi
done
for case in $loseCases
do
removeCase $case
done
# ----------------------------------------------------------------- end-of-file

View File

@ -14,4 +14,4 @@ cleanCase
\rm -rf 0 > /dev/null 2>&1
\rm system/topoSetDict > /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,12 +4,6 @@ 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/
@ -17,17 +11,13 @@ 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)
for i in 1 2 3 4 5 6
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}
runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
done
runApplication snappyHexMesh -overwrite
@ -39,10 +29,10 @@ runApplication setFields
runApplication decomposePar
runParallel renumberMesh 8 -overwrite
runParallel renumberMesh -overwrite
runParallel $(getApplication) 8
runParallel $(getApplication)
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -22,18 +22,15 @@ boundaryField
{
front
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
back
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
walls
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
porosityWall
{

View File

@ -0,0 +1,20 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
keepCases="damBreak"
loseCases="damBreakFine"
for case in $keepCases
do
(cd $case && foamCleanTutorials)
done
for case in $loseCases
do
removeCase $case
done
#------------------------------------------------------------------------------

View File

@ -4,11 +4,43 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
setDamBreakFine ()
{
blockMeshDict="system/blockMeshDict"
controlDict="system/controlDict"
sed \
-e s/"23 8"/"46 10"/g \
-e s/"19 8"/"40 10"/g \
-e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
-e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
-e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
$blockMeshDict > temp.$$
mv temp.$$ $blockMeshDict
sed \
-e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
-e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
$controlDict > temp.$$
mv temp.$$ $controlDict
}
runApplication blockMesh
runApplication setFields
runApplication $application
# Do damBreak
(cd damBreak && foamRunTutorials)
# ----------------------------------------------------------------- end-of-file
# Clone case
cloneCase damBreak damBreakFine
(
cd damBreakFine || exit
# Modify case
setDamBreakFine
cp ../damBreak/0/alpha.water.org 0/alpha.water
# And execute
runApplication blockMesh
runApplication setFields
runApplication decomposePar
runParallel `getApplication`
runApplication reconstructPar
)
#------------------------------------------------------------------------------

View File

@ -23,18 +23,15 @@ boundaryField
{
leftWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
rightWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
type noSlip;
}
atmosphere
{

View File

@ -0,0 +1,51 @@
/*--------------------------------*- 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
{
leftWall
{
type zeroGradient;
}
rightWall
{
type zeroGradient;
}
lowerWall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More