TUT: skewnessCavity: new skewness test case

This commit is contained in:
Kutalmis Bercin 2021-10-12 11:20:33 +01:00 committed by Andrew Heather
parent adf6869bba
commit cac0bf856b
199 changed files with 2186 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0
rm -rf dynamicCode
rm -rf 0.orig
rm -rf system
rm -rf constant
rm -rf results
rm -rf plots
#------------------------------------------------------------------------------

View File

@ -0,0 +1,139 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
# settings
# operand setups
setups="
Gauss-linear
leastSquares
Gauss-pointLinear
iterativeGauss-linear-1
cellLimited-Gauss-linear-1
cellLimited-leastSquares-1
cellLimited-Gauss-pointLinear-1
cellLimited-iterativeGauss-linear-5-1
faceLimited-Gauss-linear-1
faceLimited-leastSquares-1
faceLimited-Gauss-pointLinear-1
faceLimited-iterativeGauss-linear-5-1
cellMDLimited-Gauss-linear-1
cellMDLimited-leastSquares-1
cellMDLimited-Gauss-pointLinear-1
cellMDLimited-iterativeGauss-linear-5-1
faceMDLimited-Gauss-linear-1
faceMDLimited-leastSquares-1
faceMDLimited-Gauss-pointLinear-1
faceMDLimited-iterativeGauss-linear-5-1
iterativeGauss-linear-2
iterativeGauss-linear-3
iterativeGauss-linear-4
iterativeGauss-linear-5
iterativeGauss-linear-10
iterativeGauss-linear-20
"
# flag to enable computations in parallel mode
parallel=false
#------------------------------------------------------------------------------
#######################################
# Collect results into a given path
# and clean the case for the next run
# Arguments:
# $1 = Path to move results
# Outputs:
# Writes info to stdout
#######################################
collect() {
[ $# -eq 0 ] && { echo "Usage: $0 dir-model"; exit 1; }
collection="$1"
dirResult=results/"$collection"
if [ ! -d "$dirResult" ]
then
echo " # Collecting results and settings into $dirResult"
mkdir -p "$dirResult"
[ -d postProcessing ] && mv -f postProcessing "$dirResult"
[ -d processor0 ] && mv -f processor* "$dirResult"
mv -f log.* "$dirResult"
mv -f constant "$dirResult"/
mv -f system "$dirResult"/
mv -f 0 "$dirResult"/
echo " # Cleaning up the case"
cleanTimeDirectories
cleanPostProcessing
else
echo " # Directory $dirResult already exists"
echo " # Skipping the computation"
fi
}
#------------------------------------------------------------------------------
for setup in $setups
do
echo ""
echo "# Computations for the setup: $setup"
echo ""
dirSetup="setups.orig/$setup"
if [ ! -d "$dirSetup" ]
then
echo "Setup directory: $dirSetup" \
"could not be found - skipping execution" 1>&2
exit 1
fi
cp -rfL "$dirSetup/constant" .
cp -rfL "$dirSetup/system" .
[ -d 0 ] && rm -rf 0
mkdir 0
runApplication checkMesh \
-allTopology -allGeometry -constant \
-writeAllFields -writeAllSurfaceFields
if [ "$parallel" = true ]
then
runApplication decomposePar
runParallel postProcess -constant
runApplication reconstructPar
else
runApplication postProcess -constant
fi
collect "$setup"
done
#------------------------------------------------------------------------------

View File

@ -0,0 +1,239 @@
#!/bin/bash
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# settings
# operand setups
groups="
group1
group2
group3
group4
group5
group6
group7
"
group1="
Gauss-linear
leastSquares
Gauss-pointLinear
iterativeGauss-linear-1
"
group2="
iterativeGauss-linear-1
iterativeGauss-linear-2
iterativeGauss-linear-3
iterativeGauss-linear-4
iterativeGauss-linear-5
iterativeGauss-linear-10
iterativeGauss-linear-20
"
group3="
iterativeGauss-linear-5
cellLimited-iterativeGauss-linear-5-1
cellMDLimited-iterativeGauss-linear-5-1
faceLimited-iterativeGauss-linear-5-1
faceMDLimited-iterativeGauss-linear-5-1
"
group4="
cellLimited-Gauss-linear-1
cellLimited-leastSquares-1
cellLimited-Gauss-pointLinear-1
cellLimited-iterativeGauss-linear-5-1
"
group5="
cellMDLimited-Gauss-linear-1
cellMDLimited-leastSquares-1
cellMDLimited-Gauss-pointLinear-1
cellMDLimited-iterativeGauss-linear-5-1
"
group6="
faceLimited-Gauss-linear-1
faceLimited-leastSquares-1
faceLimited-Gauss-pointLinear-1
faceLimited-iterativeGauss-linear-5-1
"
group7="
faceMDLimited-Gauss-linear-1
faceMDLimited-leastSquares-1
faceMDLimited-Gauss-pointLinear-1
faceMDLimited-iterativeGauss-linear-5-1
"
#------------------------------------------------------------------------------
collect_data(){
groupName="$1"
shift 1
group=$@
echo $groupName
local members
local meanErrors
local meanMagErrors
local covErrors
local covMagErrors
n=0
for member in $group
do
meanSample="results/$member/postProcessing/volFieldAverage/0/volFieldValue.dat"
covSample="results/$member/postProcessing/volFieldCoV/0/volFieldValue.dat"
meanError=$(tail -n 1 $meanSample | awk '{ print $2 }' )
meanMagError=$(tail -n 1 $meanSample | awk '{ print $3 }' )
covError=$(tail -n 1 $covSample | awk '{ print $2/10.0 }' )
covMagError=$(tail -n 1 $covSample | awk '{ print $3/10.0 }' )
meanErrors[$n]="$meanError"
meanMagErrors[$n]="$meanMagError"
covErrors[$n]="$covError"
covMagErrors[$n]="$covMagError"
members[$n]="$member"
n=$(($n+1))
done
file="results/$groupName-error-stats.dat"
[ ! -f $file ] && \
echo "# Scheme Mean CoV/10" >> $file && \
for ((j = 0; j < "${#members[@]}"; j++)) \
do printf "%s %.16f %.16f\n" "${members[$j]}" "${meanErrors[$j]}" "${covErrors[$j]}" \
>> $file; done
file="results/$groupName-mag-error-stats.dat"
[ ! -f $file ] && \
echo "# Scheme Mean CoV/10" >> $file && \
for ((j = 0; j < "${#members[@]}"; j++)) \
do printf "%s %.16f %.16f\n" "${members[$j]}" "${meanMagErrors[$j]}" "${covMagErrors[$j]}" \
>> $file; done
}
plot_error_stats() {
groupName="$1"
echo " Plotting the error statistics for the group: $groupName"
samples="results/$groupName-error-stats.dat"
image="plots/$groupName-error-stats.png"
gnuplot<<PLT_ERROR_STATS
set terminal pngcairo font "helvetica,20" size 1000, 1000
set grid
set auto x
set yrange [0:2]
set style data histograms
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.9
set xtic rotate by -45 scale 0
set key right top
set key opaque
set key samplen 2
set key spacing 0.75
set ylabel "Error [\%]"
set offset .2, .05
set output "$image"
set title "Error vs Schemes: $groupName"
samples="$samples"
plot samples \
u 2:xtic(1) t "Mean", \
'' u 3 t "Coefficient of variation/10"
PLT_ERROR_STATS
}
plot_mag_error_stats() {
groupName="$1"
echo " Plotting the mag error statistics for the group: $groupName"
samples="results/$groupName-mag-error-stats.dat"
image="plots/$groupName-mag-error-stats.png"
gnuplot<<PLT_MAG_ERROR_STATS
set terminal pngcairo font "helvetica,20" size 1000, 1000
set grid
set auto x
set yrange [0:2]
set style data histograms
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.9
set xtic rotate by -45 scale 0
set key right top
set key opaque
set key samplen 2
set key spacing 0.75
set ylabel "Magnitude error [\%]"
set offset .2, .05
set output "$image"
set title "Magnitude error vs Schemes: $groupName"
samples="$samples"
plot samples \
u 2:xtic(1) t "Mean", \
'' u 3 t "Coefficient of variation/10"
PLT_MAG_ERROR_STATS
}
#------------------------------------------------------------------------------
# Requires gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
# Requires awk
command -v awk >/dev/null || {
echo "awk not found - skipping graph creation" 1>&2
exit 1
}
# Check "results" directory
[ -d "results" ] || {
echo "No results directory found - skipping graph creation" 1>&2
exit 1
}
#------------------------------------------------------------------------------
dirPlots="plots"
[ -d "$dirPlots" ] || mkdir -p "$dirPlots"
rm -f results/*.dat
for group in $groups
do
groupName="$group"
collect_data "$groupName" ${!group}
plot_error_stats "$groupName"
plot_mag_error_stats "$groupName"
done
#------------------------------------------------------------------------------

View File

@ -0,0 +1 @@
../common/constant

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1 @@
../common/constant

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default Gauss pointLinear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited Gauss linear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited Gauss pointLinear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited iterativeGauss linear 5 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited leastSquares 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited Gauss linear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited Gauss pointLinear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited iterativeGauss linear 5 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited leastSquares 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DT 0;
// ************************************************************************* //

View File

@ -0,0 +1,172 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application scalarTransportFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 0.005;
writeControl timeStep;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
coded1
{
name calcGrad;
type coded;
libs (utilityFunctionObjects);
writeControl timeStep;
codeInclude
#{
#include "emptyFvPatchField.H"
#};
codeExecute
#{
const volVectorField& Cc = mesh().C();
volVectorField Cc2
(
IOobject
(
"Cc",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ
),
mesh(),
dimensionedVector(dimless/dimLength, Zero),
calculatedFvPatchField<vector>::typeName
);
Cc2.primitiveFieldRef() = Cc.primitiveField();
auto& bf = Cc2.boundaryFieldRef();
forAll(bf, patchi)
{
fvPatchVectorField& pf = bf[patchi];
if (!isA<emptyFvPatchField<vector>>(pf))
{
pf == Cc.boundaryField()[patchi];
}
}
tmp<volTensorField> gradC = fvc::grad(Cc2);
const word gradCName(gradC.cref().name());
gradC->write();
volScalarField error
(
IOobject
(
"error",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ
),
mesh(),
dimensionedScalar(dimless, Zero),
calculatedFvPatchField<scalar>::typeName
);
volScalarField magError
(
IOobject
(
"magError",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ
),
mesh(),
dimensionedScalar(dimless, Zero),
calculatedFvPatchField<scalar>::typeName
);
const dimensionedScalar root2(dimless/sqr(dimLength), Foam::sqrt(2.0));
error = scalar(100)*(mag(gradC) - root2)/root2;
error.write();
magError = mag(error);
magError.write();
#};
}
readFields1
{
type readFields;
libs (fieldFunctionObjects);
fields ( error magError );
}
minMax1
{
type fieldMinMax;
libs (fieldFunctionObjects);
fields ( error magError );
}
volFieldAverage
{
type volFieldValue;
libs (fieldFunctionObjects);
fields ( error magError );
operation average;
regionType all;
writeFields false;
}
volFieldCoV
{
type volFieldValue;
libs (fieldFunctionObjects);
fields ( error magError );
operation CoV;
regionType all;
writeFields false;
}
#include "cuttingPlane"
// #include "runtimePostProcessing"
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
cuttingPlaneError
{
type surfaces;
libs (sampling);
surfaceFormat vtk;
fields ( error );
interpolationScheme cell;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0.05 -0.05);
normal (0 0 1);
}
interpolate no;
}
);
}
cuttingPlaneMagError
{
type surfaces;
libs (sampling);
surfaceFormat vtk;
fields ( magError );
interpolationScheme cell;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0.05 -0.05);
normal (0 0 1);
}
interpolate no;
}
);
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 2;
method scotch;
// ************************************************************************* //

View File

@ -0,0 +1,34 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
T
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,82 @@
// -*- C++ -*-
postPro1
{
type runTimePostProcessing;
functionObjectLibs (runTimePostProcessing);
outputControl outputTime;
output
{
name image;
width 1000;
height 1000;
}
camera
{
// If camera is moving, optionally provide start and end times
// startPosition 0.2;
// endPosition 0.75;
// Total number of frames to generate
nFrameTotal 1;
// Parallel projection flag
parallelProjection yes;
// Camera mode:
// - flightPath: define flight path
// - static: fixed position
mode static;
staticCoeffs
{
clipBox (0.1 0.1 0)(0.9 0.9 0.1); // optional
focalPoint (0 0.05 0);
up (0 1 0);
lookDir (0 0 -1);
}
}
// Default colours
// - If select to colourBy colour, these values are used unless
// they are locally overriden
colours
{
background (1 1 1);
text (0 0 0);
edge (0 0 0);
surface (0.5 0.5 0.5);
line (1 0 0);
}
// Line data
lines
{}
// Surface data
surfaces
{
plane1
{
type functionObject;
functionObject cuttingPlane;
colourMap blueWhiteRed;
representation surfaceWithEdges;
maxGlyphLength 0.1;
visible yes;
featureEdges yes;
colourBy field;
fieldName error-grad(Cc);
range (-10 10);
opacity 1;
scalarBar
{
visible no;
}
}
}
// Text data
text
{}
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default faceLimited Gauss linear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default faceLimited Gauss pointLinear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

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