mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
bicononic25-55Run35 tutorial: updated for new sampling and cleaned scripts
This commit is contained in:
@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit 1 # Run from this directory
|
||||||
|
|
||||||
# Source tutorial clean functions
|
# Source tutorial clean functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. "$WM_PROJECT_DIR/bin/tools/CleanFunctions"
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
cleanSamples
|
cleanSamples
|
||||||
rm -rf constant/polyMesh/boundary
|
rm -rf constant/polyMesh/boundary 0/pointPriority
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,23 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit 1 # Run from this directory
|
||||||
|
|
||||||
# Source tutorial run functions
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
runApplication datToFoam constant/grid256.dat
|
runApplication datToFoam constant/grid256.dat
|
||||||
|
|
||||||
CONST="constant"
|
points="constant/polyMesh/points"
|
||||||
cat $CONST/pointsHeader $CONST/points.tmp > $CONST/polyMesh/points
|
pointsTmp="constant/points.tmp"
|
||||||
|
sed -i -e 's/binary/ascii/' -ne '1,17p' $points
|
||||||
|
cat $pointsTmp >> $points
|
||||||
|
rm $pointsTmp
|
||||||
|
|
||||||
runApplication collapseEdges -overwrite
|
runApplication collapseEdges -overwrite
|
||||||
|
|
||||||
echo "Changing patch type to wedge type in boundary file"
|
echo "Changing patch type to wedge type in boundary file"
|
||||||
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
|
sed -i '/wedge/,/nFaces/{s/patch/wedge/}' constant/polyMesh/boundary
|
||||||
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
|
|
||||||
rm $CONST/polyMesh/boundary.bak
|
|
||||||
|
|
||||||
runApplication $(getApplication)
|
runApplication "$(getApplication)"
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -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;
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
/wedge1/,/nFaces/{
|
|
||||||
s/patch/wedge/
|
|
||||||
}
|
|
||||||
/wedge2/,/nFaces/{
|
|
||||||
s/patch/wedge/
|
|
||||||
}
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd "${0%/*}" || exit 1 # Run from this directory
|
||||||
|
|
||||||
#
|
#
|
||||||
# FUNCTIONS
|
# FUNCTIONS
|
||||||
@ -41,16 +41,13 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
sampleDir=postProcessing/sample
|
||||||
|
ext="$(find $sampleDir -mindepth 2 | head -1 | xargs basename | cut -d_ -f2-)"
|
||||||
|
|
||||||
sample $timeOpt
|
for d in $sampleDir/*
|
||||||
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/*
|
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -51,5 +51,10 @@ maxCo 0.5;
|
|||||||
|
|
||||||
maxDeltaT 2e-8;
|
maxDeltaT 2e-8;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
#includeFunc wallHeatFlux
|
||||||
|
#includeFunc sample
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,10 +18,12 @@ FoamFile
|
|||||||
type sets;
|
type sets;
|
||||||
libs ("libsampling.so");
|
libs ("libsampling.so");
|
||||||
|
|
||||||
|
writeControl writeTime;
|
||||||
interpolationScheme cellPointFace;
|
interpolationScheme cellPointFace;
|
||||||
|
|
||||||
setFormat raw;
|
setFormat raw;
|
||||||
|
|
||||||
|
fields ( p wallHeatFlux );
|
||||||
|
|
||||||
sets
|
sets
|
||||||
(
|
(
|
||||||
cone25
|
cone25
|
||||||
@ -50,7 +52,4 @@ sets
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
fields ( p wallHeatTransRate );
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user