Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

This commit is contained in:
Andrew Heather
2016-06-29 21:37:10 +01:00
109 changed files with 276 additions and 1573 deletions

View File

@ -180,9 +180,21 @@ cloneCase()
fi
}
# Overwrite 0/ with the contents of 0.org/ if it exists
# Overwrite 0/ with the contents of 0.org/ if it exists.
# The -processor option to do the processor directories instead
#
restore0Dir()
{
if [ "$1" = "-processor" ]
then
echo "Restore 0/ from 0.org/ for processor directories"
[ -d 0.org ] || echo " Warning: no 0.org/ found"
# do nonetheless
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 > /dev/null 2>&1
else
echo "Restore 0/ from 0.org/"
if [ -d 0.org ]
then
@ -191,6 +203,7 @@ restore0Dir()
else
echo " Warning: no 0.org/ found"
fi
fi
}
#------------------------------------------------------------------------------

View File

@ -71,9 +71,6 @@ case ThirdParty:
set gcc_version=gcc-6.1.0
breaksw
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
set clang_version=llvm-3.7.0
# set clang_version=llvm-3.8.0
breaksw
@ -87,4 +84,13 @@ case ThirdParty:
endsw
endsw
# common settings (system or ThirdParty)
switch ("$WM_COMPILER")
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
breaksw
endsw
#------------------------------------------------------------------------------

View File

@ -253,26 +253,21 @@ case ThirdParty:
# Add ThirdParty gmp/mpfr/mpc libraries to run-time environment
if ( "${gmpDir:t}" != "gmp-system" ) then
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
setenv GMP_ARCH_PATH $gmpDir # For ThirdParty CGAL
endif
if ( "${mpfrDir:t}" != "mpfr-system" ) then
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
setenv MPFR_ARCH_PATH $mpfrDir # For ThirdParty CGAL
endif
if ( "${mpcDir:t}" != "mpc-system" ) then
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
endif
# Used by boost/CGAL:
setenv GMP_ARCH_PATH $gmpDir
setenv MPFR_ARCH_PATH $mpfrDir
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using ThirdParty compiler"
echo " ${gccDir:t} (${gmpDir:t} ${mpfrDir:t} ${mpcDir:t})"
endif
endif
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
if ( $?clang_version ) then
set clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version
@ -295,6 +290,9 @@ case ThirdParty:
echo " ${clangDir:t}"
endif
endif
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir
breaksw
@ -308,6 +306,5 @@ endsw
# Cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
#- keep _foamAddPath _foamAddLib _foamAddMan
unsetenv WM_COMPILER_TYPE
#------------------------------------------------------------------------------

View File

@ -64,6 +64,7 @@ unsetenv WM_ARCH_OPTION
unsetenv WM_CC
unsetenv WM_CFLAGS
unsetenv WM_COMPILER
unsetenv WM_COMPILER_ARCH
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILE_OPTION
unsetenv WM_CXX
@ -128,6 +129,16 @@ unsetenv ParaView_DIR
unsetenv ParaView_INCLUDE_DIR
unsetenv PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unsetenv BOOST_ARCH_PATH
unsetenv CCMIO_ARCH_PATH
unsetenv CGAL_ARCH_PATH
unsetenv FFTW_ARCH_PATH
unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# cleanup environment

View File

@ -69,9 +69,6 @@ OpenFOAM | ThirdParty)
gcc_version=gcc-6.1.0
;;
Clang)
# Using clang - not gcc
export WM_CC='clang'
export WM_CXX='clang++'
clang_version=llvm-3.7.0
# clang_version=llvm-3.8.0
;;
@ -84,7 +81,15 @@ OpenFOAM | ThirdParty)
;;
esac
;;
esac
# common settings (system or ThirdParty)
case "$WM_COMPILER" in
Clang)
# Using clang - not gcc
export WM_CC='clang'
export WM_CXX='clang++'
;;
esac
#------------------------------------------------------------------------------

View File

@ -246,28 +246,24 @@ OpenFOAM | ThirdParty)
if [ "${gmpDir##*-}" != system ]
then
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
export GMP_ARCH_PATH=$gmpDir # For ThirdParty CGAL
fi
if [ "${mpfrDir##*-}" != system ]
then
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
export MPFR_ARCH_PATH=$mpfrDir # For ThirdParty CGAL
fi
if [ "${mpcDir##*-}" != system ]
then
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
fi
# Used by boost/CGAL:
export GMP_ARCH_PATH=$gmpDir
export MPFR_ARCH_PATH=$mpfrDir
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using ThirdParty compiler"
echo " ${gccDir##*/} (${gmpDir##*/} $${mpfrDir##*/} ${mpcDir##*/})"
fi
fi
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
if [ -n "$clang_version" ]
then
@ -293,6 +289,9 @@ OpenFOAM | ThirdParty)
echo " ${clangDir##*/}"
fi
fi
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir
;;
*)

View File

@ -51,6 +51,7 @@ unset WM_ARCH_OPTION
unset WM_CC
unset WM_CFLAGS
unset WM_COMPILER
unset WM_COMPILER_ARCH
unset WM_COMPILER_LIB_ARCH
unset WM_COMPILE_OPTION
unset WM_CXX
@ -115,6 +116,16 @@ unset ParaView_DIR
unset ParaView_INCLUDE_DIR
unset PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unset BOOST_ARCH_PATH
unset CCMIO_ARCH_PATH
unset CGAL_ARCH_PATH
unset FFTW_ARCH_PATH
unset GMP_ARCH_PATH
unset MPFR_ARCH_PATH
unset SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# cleanup environment

View File

@ -182,7 +182,6 @@ Foam::Ostream& Foam::ensightFile::write(const char* value)
}
return *this;
}

View File

@ -144,7 +144,7 @@ public:
using Ostream::write;
//- Binary write
virtual Ostream& write(const char* buf, std::streamsize count);
virtual Ostream& write(const char*, std::streamsize count);
//- Write element keyword with trailing newline, optionally with undef
virtual Ostream& writeKeyword(const keyType&);
@ -156,19 +156,19 @@ public:
Ostream& writeUndef();
//- Write C-string as "%79s" or as binary (max 80 chars)
Ostream& write(const char* value);
Ostream& write(const char*);
//- Write string as "%79s" or as binary (max 80 chars)
Ostream& write(const string& value);
Ostream& write(const string&);
//- Write integer as "%10d" or as binary
Ostream& write(const label value);
Ostream& write(const label);
//- Write integer with specified width or as binary
Ostream& write(const label value, const label fieldWidth);
Ostream& write(const label, const label fieldWidth);
//- Write float as "%12.5e" or as binary
Ostream& write(const scalar value);
Ostream& write(const scalar);
//- Add carriage return to ascii stream
void newline();

View File

@ -25,6 +25,8 @@ License
#include "ensightGeoFile.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::ensightGeoFile::initialize()
@ -74,7 +76,10 @@ Foam::ensightGeoFile::~ensightGeoFile()
Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const keyType& key)
{
write(key); newline();
// Note: make sure to hit ensightFile::write(const string&)
write(string(key));
newline();
return *this;
}

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0 > /dev/null 2>&1
\rm -rf 0 > /dev/null 2>&1
cleanCase

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 1;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -4,8 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove 0.org/ copy
\rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples

View File

@ -4,6 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
restore0Dir
runApplication blockMesh
runApplication setFields
runApplication $(getApplication)

View File

@ -46,8 +46,8 @@ boundaryField
outlet
{
type inletOutlet;
value $internalField;
inletValue $internalField;
value $internalField;
}
}

View File

@ -35,19 +35,19 @@ boundaryField
porosityWall
{
type slip;
value uniform (0 0 0);
value $internalField;
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value uniform (0 0 0);
value $internalField;
}
outlet
{
type inletOutlet;
value uniform (0 0 0);
inletValue uniform (0 0 0);
inletValue $internalField;
value $internalField;
}
}

View File

@ -24,32 +24,32 @@ boundaryField
front
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
back
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
walls
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
porosityWall
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
inlet
{
type calculated;
value uniform 0;
value $internalField;
}
outlet
{
type calculated;
value uniform 0;
value $internalField;
}
}

View File

@ -24,39 +24,39 @@ boundaryField
front
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
back
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
walls
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
porosityWall
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.005;
value uniform 200;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue uniform 200;
value uniform 200;
inletValue $internalField;
value $internalField;
}
}

View File

@ -24,39 +24,39 @@ boundaryField
front
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
back
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
walls
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
porosityWall
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 1;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
inletValue $internalField;
value $internalField;
}
}

View File

@ -24,37 +24,37 @@ boundaryField
front
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
back
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
walls
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
porosityWall
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
inlet
{
type calculated;
value uniform 0;
value $internalField;
}
outlet
{
type calculated;
value uniform 0;
value $internalField;
}
}

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove copies of common files
\rm -rf 0 constant
cleanCase
#------------------------------------------------------------------------------

View File

@ -1,14 +1,17 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application=$(getApplication)
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
\cp -r ../common/0.org 0
\cp -r ../common/constant constant
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
runApplication $application
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -0,0 +1 @@
../../common/blockMeshDict.m4

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove copies of common files
\rm -rf 0 constant
cleanCase
#------------------------------------------------------------------------------

View File

@ -1,11 +1,17 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
m4 system/blockMeshDict.m4 > system/blockMeshDict
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
\cp -r ../common/0.org 0
\cp -r ../common/constant constant
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -0,0 +1 @@
../../common/blockMeshDict.m4

View File

@ -1 +0,0 @@
../angledDuctImplicit/0

View File

@ -1 +0,0 @@
../angledDuctImplicit/Allrun

View File

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

View File

@ -1 +0,0 @@
../../angledDuctImplicit/system/blockMeshDict.m4

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 1;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volScalarField;
object magU;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type calculated;
value uniform 0;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- 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 volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -4,9 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
# Remove 0.org/ copy
\rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples
#------------------------------------------------------------------------------

View File

@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=$(getApplication)
restore0Dir
runApplication blockMesh
runApplication setFields
runApplication $application

View File

@ -7,10 +7,10 @@
\cp ../lesFiles/fvS* ../lesFiles/controlDict system/
\cp ../lesFiles/turbulenceProperties constant/
# $1 for special test cases?
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0 $1
\ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform $1
# restart from iteration 500
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0
\ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform
runParallel pisoFoam

View File

@ -20,9 +20,7 @@ runParallel snappyHexMesh -decomposeParDict system/decomposeParDict.ptscotch -pr
find . -type f -iname "*level*" -exec rm {} \;
#- set the initial fields
# $1 for special test cases?
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 $1
restore0Dir -processor
runParallel renumberMesh -overwrite
runParallel potentialFoam -initialiseUBCs

View File

@ -46,8 +46,8 @@ boundaryField
outlet
{
type inletOutlet;
value $internalField;
inletValue $internalField;
value $internalField;
}
}

View File

@ -35,7 +35,7 @@ boundaryField
porosityWall
{
type slip;
value uniform (0 0 0);
value $internalField;
}
inlet
{
@ -45,8 +45,8 @@ boundaryField
outlet
{
type inletOutlet;
value uniform (0 0 0);
inletValue uniform (0 0 0);
inletValue $internalField;
value $internalField;
}
}

View File

@ -24,39 +24,39 @@ boundaryField
front
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
back
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
walls
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
porosityWall
{
type epsilonWallFunction;
value uniform 200;
value $internalField;
}
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.005;
value uniform 200;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue uniform 200;
value uniform 200;
inletValue $internalField;
value $internalField;
}
}

View File

@ -24,39 +24,39 @@ boundaryField
front
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
back
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
walls
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
porosityWall
{
type kqRWallFunction;
value uniform 1;
value $internalField;
}
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 1;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
value $internalField;
}
}

View File

@ -24,37 +24,37 @@ boundaryField
front
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
back
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
walls
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
porosityWall
{
type nutkWallFunction;
value uniform 0;
value $internalField;
}
inlet
{
type calculated;
value uniform 0;
value $internalField;
}
outlet
{
type calculated;
value uniform 0;
value $internalField;
}
}

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove copies of common files
\rm -rf 0 constant
cleanCase
#------------------------------------------------------------------------------

View File

@ -0,0 +1,17 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
\cp -r ../common/0.org 0
\cp -r ../common/constant constant
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -0,0 +1 @@
../../common/blockMeshDict.m4

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove copies of common files
\rm -rf 0 constant
cleanCase
#------------------------------------------------------------------------------

View File

@ -0,0 +1,17 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
\cp -r ../common/0.org 0
\cp -r ../common/constant constant
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -0,0 +1 @@
../../common/blockMeshDict.m4

View File

@ -1 +0,0 @@
../angledDuctImplicit/0

View File

@ -1 +0,0 @@
../angledDuctImplicit/Allrun

View File

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

View File

@ -1 +0,0 @@
../../angledDuctImplicit/system/blockMeshDict.m4

View File

@ -17,8 +17,7 @@ runParallel snappyHexMesh -overwrite
# restore0Dir
#- For parallel running: set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
restore0Dir -processor
runParallel patchSummary
runParallel potentialFoam

View File

@ -8,17 +8,16 @@ cd ${0%/*} || exit 1 # Run from this directory
mkdir 0
runApplication blockMesh
cp system/decomposeParDict.hierarchical system/decomposeParDict
\cp system/decomposeParDict.hierarchical system/decomposeParDict
runApplication decomposePar
cp system/decomposeParDict.ptscotch system/decomposeParDict
\cp system/decomposeParDict.ptscotch system/decomposeParDict
runParallel snappyHexMesh -overwrite
find . -type f -iname "*level*" -exec rm {} \;
# - set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
restore0Dir -processor
runParallel topoSet
runParallel $(getApplication)

View File

@ -1,73 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object G;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 0 -3 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type MarshakRadiation;
T T;
emissivityMode lookup;
emissivity uniform 1;
value uniform 0;
refValue uniform 0;
refGradient uniform 0;
valueFraction uniform 0;
}
inlet
{
type MarshakRadiation;
T T;
emissivityMode lookup;
emissivity uniform 1;
value uniform 0;
refValue uniform 0;
refGradient uniform 0;
valueFraction uniform 0;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object H2O;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object N2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.79;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 0.79;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object O2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.21;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 0.21;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 350;
boundaryField
{
walls
{
type fixedValue;
value uniform 400;
}
inlet
{
type fixedValue;
value uniform 350;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- 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 volVectorField;
location "1";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type noSlip;
}
inlet
{
type fixedValue;
value uniform (5 0 0);
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type compressible::alphatWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.0449;
boundaryField
{
walls
{
type epsilonWallFunction;
value uniform 0.0449;
}
inlet
{
type fixedValue;
value uniform 0.0449;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.0938;
boundaryField
{
walls
{
type kqRWallFunction;
value uniform 0.0938;
}
inlet
{
type fixedValue;
value uniform 0.0938;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type nutkWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "1";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 100000;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -4,12 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
# remove 0 directory and post-processing directories
# Remove 0.org/ copy and post-processing directories
\rm -rf 0 postProcessing
# restore 0/ directory from 0.org/
\cp -r 0.org 0
cleanCase
#------------------------------------------------------------------------------

View File

@ -4,9 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application=$(getApplication)
# create mesh
restore0Dir
runApplication blockMesh
# create sets
@ -15,6 +13,6 @@ runApplication topoSet
# create baffles and fields
runApplication createBaffles -overwrite
runApplication $application
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -1,54 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object H2O;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
type inletOutlet;
inletValue uniform 0.0;
}
inletSides
{
type fixedValue;
value uniform 0.01;
}
inletCentral
{
type fixedValue;
value uniform 0.01;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 473.0;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
type inletOutlet;
inletValue uniform 473.0;
}
inletSides
{
type fixedValue;
value uniform 473.0;
}
inletCentral
{
type fixedValue;
value uniform 573.0;
}
}
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- 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 volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type flowRateInletVelocity;
rhoInlet 1.2;
massFlowRate constant 0.00379;
value uniform (0 14.68 0);
}
inletSides
{
type flowRateInletVelocity;
rhoInlet 1.2;
massFlowRate constant 0.00832;
value uniform (0 17.79 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
}
walls
{
type noSlip;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.99;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
type inletOutlet;
inletValue uniform 1.0;
}
inletSides
{
type fixedValue;
value uniform 0.99;
}
inletCentral
{
type fixedValue;
value uniform 0.99;
}
}
// ************************************************************************* //

View File

@ -1,56 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type calculated;
value uniform 0;
}
inletSides
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 3.75e-9;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.15;
value uniform 3.75e-9;
}
inletSides
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.16;
value uniform 3.75e-9;
}
outlet
{
type inletOutlet;
inletValue uniform 3.75e-9;
}
walls
{
type kqRWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type calculated;
value uniform 0;
}
inletSides
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
}
// ************************************************************************* //

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