bicononic25-55Run35 tutorial: updated for new sampling and cleaned scripts

This commit is contained in:
Chris Greenshields
2018-07-06 11:03:29 +01:00
parent 6c6ab41e66
commit 7e80909993
8 changed files with 28 additions and 65585 deletions

View File

@ -1,11 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
cd "${0%/*}" || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
. "$WM_PROJECT_DIR/bin/tools/CleanFunctions"
cleanCase
cleanSamples
rm -rf constant/polyMesh/boundary
rm -rf constant/polyMesh/boundary 0/pointPriority
#------------------------------------------------------------------------------

View File

@ -1,23 +1,25 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
cd "${0%/*}" || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
runApplication blockMesh
runApplication datToFoam constant/grid256.dat
CONST="constant"
cat $CONST/pointsHeader $CONST/points.tmp > $CONST/polyMesh/points
points="constant/polyMesh/points"
pointsTmp="constant/points.tmp"
sed -i -e 's/binary/ascii/' -ne '1,17p' $points
cat $pointsTmp >> $points
rm $pointsTmp
runApplication collapseEdges -overwrite
echo "Changing patch type to wedge type in boundary file"
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
rm $CONST/polyMesh/boundary.bak
sed -i '/wedge/,/nFaces/{s/patch/wedge/}' constant/polyMesh/boundary
runApplication $(getApplication)
runApplication "$(getApplication)"
#------------------------------------------------------------------------------

View File

@ -1,14 +0,0 @@
/*--------------------------------*- 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 vectorField;
object points;
}

View File

@ -1,6 +0,0 @@
/wedge1/,/nFaces/{
s/patch/wedge/
}
/wedge2/,/nFaces/{
s/patch/wedge/
}

View File

@ -1,5 +1,5 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
cd "${0%/*}" || exit 1 # Run from this directory
#
# FUNCTIONS
@ -41,16 +41,13 @@ do
esac
done
sampleDir=postProcessing/sample
ext="$(find $sampleDir -mindepth 2 | head -1 | xargs basename | cut -d_ -f2-)"
sample $timeOpt
SDIR=sets
LSDIR=`ls $SDIR | head -1`
EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
for d in $SDIR/*
for d in $sampleDir/*
do
cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}
cat "${d}/cone25_${ext}" "${d}/cone55_${ext}" "${d}/base_${ext}"\
> "${d}/biconic_${ext}"
done
#------------------------------------------------------------------------------

View File

@ -51,5 +51,10 @@ maxCo 0.5;
maxDeltaT 2e-8;
functions
{
#includeFunc wallHeatFlux
#includeFunc sample
}
// ************************************************************************* //

View File

@ -18,10 +18,12 @@ FoamFile
type sets;
libs ("libsampling.so");
writeControl writeTime;
interpolationScheme cellPointFace;
setFormat raw;
fields ( p wallHeatFlux );
sets
(
cone25
@ -50,7 +52,4 @@ sets
}
);
fields ( p wallHeatTransRate );
// ************************************************************************* //