Replace tabs by 4 spaces in bin, tutorials, src, ... & clean-up by hand
This commit is contained in:
parent
4eb1b1f016
commit
82a0e1e7df
120 changed files with 1279 additions and 1226 deletions
|
@ -75,13 +75,13 @@ runParallel ()
|
|||
echo "$APP_NAME already run on $PWD: remove log file to run"
|
||||
else
|
||||
echo "Running $APP_NAME in parallel on $PWD using $1 processes"
|
||||
if [ -z "$WM_MPIRUN_PROG" ]
|
||||
then
|
||||
mpirunProg=mpirun
|
||||
else
|
||||
# Allow exceentric systems to override the hardcoded mpirun
|
||||
mpirunProg=$WM_MPIRUN_PROG
|
||||
fi
|
||||
if [ -z "$WM_MPIRUN_PROG" ]
|
||||
then
|
||||
mpirunProg=mpirun
|
||||
else
|
||||
# Allow exceentric systems to override the hardcoded mpirun
|
||||
mpirunProg=$WM_MPIRUN_PROG
|
||||
fi
|
||||
( $mpirunProg -np $1 $APP_RUN -parallel < /dev/null > $LOG_NAME 2>&1 )
|
||||
fi
|
||||
}
|
||||
|
|
186
etc/bashrc
186
etc/bashrc
|
@ -258,102 +258,102 @@ Darwin)
|
|||
which -s port >/dev/null
|
||||
if [ $? -eq "0" -a -d '/opt/local/etc/macports' ]
|
||||
then
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using Macports binaries"
|
||||
fi
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using Macports binaries"
|
||||
fi
|
||||
|
||||
export WM_USE_MACPORT=1
|
||||
export WM_BASE_COMPILER=`echo $WM_COMPILER | tr -d "[:digit:]"`
|
||||
export WM_MACPORT_MPI_VERSION=`echo $WM_COMPILER | tr "[:upper:]" "[:lower:]"`
|
||||
export WM_MACPORT_VERSION=`echo $WM_MACPORT_MPI_VERSION | tr -d "[:alpha:]" | sed -e "s/\(.\)\(.\)/\1\.\2/"`
|
||||
export WM_USE_MACPORT=1
|
||||
export WM_BASE_COMPILER=`echo $WM_COMPILER | tr -d "[:digit:]"`
|
||||
export WM_MACPORT_MPI_VERSION=`echo $WM_COMPILER | tr "[:upper:]" "[:lower:]"`
|
||||
export WM_MACPORT_VERSION=`echo $WM_MACPORT_MPI_VERSION | tr -d "[:alpha:]" | sed -e "s/\(.\)\(.\)/\1\.\2/"`
|
||||
|
||||
if [ -z "$WM_CHOSEN_MAC_MPI" ]
|
||||
then
|
||||
if [ -e '/opt/local/bin/mpicc' ]
|
||||
then
|
||||
readlink /opt/local/bin/mpicc | grep openmpi >/dev/null
|
||||
if [ $? -eq "0" ]
|
||||
then
|
||||
export WM_MPLIB=MACPORTOPENMPI
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using OpenMPI from MacPorts"
|
||||
fi
|
||||
else
|
||||
readlink /opt/local/bin/mpicc | grep mpich >/dev/null
|
||||
if [ $? -eq "0" ]
|
||||
then
|
||||
export WM_MPLIB=MACPORTMPICH
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using MPICH from MacPorts"
|
||||
fi
|
||||
else
|
||||
echo "/opt/local/bin/mpicc neither OpenMPI nor MPICH. Confused. Defaulting to OPENMPI"
|
||||
export WM_MPLIB=OPENMPI
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
export WM_MPLIB=$WM_CHOSEN_MAC_MPI
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "User chose WM_CHOSEN_MAC_MPI=$WM_CHOSEN_MAC_MPI"
|
||||
fi
|
||||
fi
|
||||
if [ -z "$WM_CHOSEN_MAC_MPI" ]
|
||||
then
|
||||
if [ -e '/opt/local/bin/mpicc' ]
|
||||
then
|
||||
readlink /opt/local/bin/mpicc | grep openmpi >/dev/null
|
||||
if [ $? -eq "0" ]
|
||||
then
|
||||
export WM_MPLIB=MACPORTOPENMPI
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using OpenMPI from MacPorts"
|
||||
fi
|
||||
else
|
||||
readlink /opt/local/bin/mpicc | grep mpich >/dev/null
|
||||
if [ $? -eq "0" ]
|
||||
then
|
||||
export WM_MPLIB=MACPORTMPICH
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using MPICH from MacPorts"
|
||||
fi
|
||||
else
|
||||
echo "/opt/local/bin/mpicc neither OpenMPI nor MPICH. Confused. Defaulting to OPENMPI"
|
||||
export WM_MPLIB=OPENMPI
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
export WM_MPLIB=$WM_CHOSEN_MAC_MPI
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "User chose WM_CHOSEN_MAC_MPI=$WM_CHOSEN_MAC_MPI"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WM_MPLIB" == "MACPORTOPENMPI" ]
|
||||
then
|
||||
if [ ! -e "/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION" ]
|
||||
then
|
||||
export WM_MACPORT_MPI_VERSION=mp
|
||||
if [ ! -e "/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION" ]
|
||||
then
|
||||
echo "Proper OpenMPI not installed. Either do 'port install openmpi-$WM_MACPORT_MPI_VERSION' or 'port install openmpi-default'"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ "$WM_MPLIB" == "MACPORTMPICH" ]
|
||||
then
|
||||
if [ ! -e "/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION" ]
|
||||
then
|
||||
echo "MPICH wants the same version as the used compiler. Do 'port install mpich-$WM_MACPORT_MPI_VERSION'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$WM_MPLIB" == "MACPORTOPENMPI" ]
|
||||
then
|
||||
if [ ! -e "/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION" ]
|
||||
then
|
||||
export WM_MACPORT_MPI_VERSION=mp
|
||||
if [ ! -e "/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION" ]
|
||||
then
|
||||
echo "Proper OpenMPI not installed. Either do 'port install openmpi-$WM_MACPORT_MPI_VERSION' or 'port install openmpi-default'"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ "$WM_MPLIB" == "MACPORTMPICH" ]
|
||||
then
|
||||
if [ ! -e "/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION" ]
|
||||
then
|
||||
echo "MPICH wants the same version as the used compiler. Do 'port install mpich-$WM_MACPORT_MPI_VERSION'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WM_COMPILER" != "Gcc" ]
|
||||
then
|
||||
if [ "$WM_BASE_COMPILER" == "Gcc" ]
|
||||
then
|
||||
export WM_CC="gcc-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
|
||||
export WM_FC="gfortran-mp-$WM_MACPORT_VERSION"
|
||||
elif [ "$WM_BASE_COMPILER" == "Clang" ]
|
||||
then
|
||||
export WM_CC="clang-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="clang++-mp-$WM_MACPORT_VERSION"
|
||||
# Seems like there is no Fortran-frontend for LLVM at thistime
|
||||
elif [ "$WM_BASE_COMPILER" == "Dragonegg" ]
|
||||
then
|
||||
export WM_CC="dragonegg-$WM_MACPORT_VERSION-gcc"
|
||||
export WM_CXX="dragonegg-$WM_MACPORT_VERSION-g++"
|
||||
export WM_CXX="dragonegg-$WM_MACPORT_VERSION-gfortran"
|
||||
else
|
||||
echo "Unknown base compiler $WM_BASE_COMPILER"
|
||||
fi
|
||||
if [ "$WM_COMPILER" != "Gcc" ]
|
||||
then
|
||||
if [ "$WM_BASE_COMPILER" == "Gcc" ]
|
||||
then
|
||||
export WM_CC="gcc-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
|
||||
export WM_FC="gfortran-mp-$WM_MACPORT_VERSION"
|
||||
elif [ "$WM_BASE_COMPILER" == "Clang" ]
|
||||
then
|
||||
export WM_CC="clang-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="clang++-mp-$WM_MACPORT_VERSION"
|
||||
# Seems like there is no Fortran-frontend for LLVM at thistime
|
||||
elif [ "$WM_BASE_COMPILER" == "Dragonegg" ]
|
||||
then
|
||||
export WM_CC="dragonegg-$WM_MACPORT_VERSION-gcc"
|
||||
export WM_CXX="dragonegg-$WM_MACPORT_VERSION-g++"
|
||||
export WM_CXX="dragonegg-$WM_MACPORT_VERSION-gfortran"
|
||||
else
|
||||
echo "Unknown base compiler $WM_BASE_COMPILER"
|
||||
fi
|
||||
|
||||
ruleDirBase=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH
|
||||
ruleDirTarget=$ruleDirBase$WM_BASE_COMPILER
|
||||
ruleDir=$ruleDirBase$WM_COMPILER
|
||||
if [ ! -e $ruleDir ]
|
||||
then
|
||||
echo "Rule directory $ruleDir not existing. Linking to $ruleDirTarget"
|
||||
ln -s $ruleDirTarget $ruleDir
|
||||
fi
|
||||
unset ruleDir ruleDirBase
|
||||
fi
|
||||
ruleDirBase=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH
|
||||
ruleDirTarget=$ruleDirBase$WM_BASE_COMPILER
|
||||
ruleDir=$ruleDirBase$WM_COMPILER
|
||||
if [ ! -e $ruleDir ]
|
||||
then
|
||||
echo "Rule directory $ruleDir not existing. Linking to $ruleDirTarget"
|
||||
ln -s $ruleDirTarget $ruleDir
|
||||
fi
|
||||
unset ruleDir ruleDirBase
|
||||
fi
|
||||
else
|
||||
export WM_COMPILER=Gcc
|
||||
export WM_MPLIB=OPENMPI
|
||||
|
@ -446,8 +446,8 @@ fi
|
|||
# then
|
||||
# if [[ `ulimit -n` == "unlimited" || `ulimit -n` < 8192 ]]
|
||||
# then
|
||||
# # higher limit needed for wmkdeps
|
||||
# ulimit -n 8192
|
||||
# # higher limit needed for wmkdeps
|
||||
# ulimit -n 8192
|
||||
# fi
|
||||
# fi
|
||||
|
||||
|
|
|
@ -194,14 +194,14 @@ unset compilerBin compilerLib compilerInstall
|
|||
if [ -z "$WM_CC" ]
|
||||
then
|
||||
case "$WM_COMPILER" in
|
||||
Gcc*)
|
||||
export WM_CC='gcc'
|
||||
export WM_CXX='g++'
|
||||
;;
|
||||
Icc)
|
||||
export WM_CC='icc'
|
||||
export WM_CXX='icpc'
|
||||
;;
|
||||
Gcc*)
|
||||
export WM_CC='gcc'
|
||||
export WM_CXX='g++'
|
||||
;;
|
||||
Icc)
|
||||
export WM_CC='icc'
|
||||
export WM_CXX='icpc'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
@ -245,24 +245,24 @@ OPENMPI)
|
|||
;;
|
||||
|
||||
MACPORTOPENMPI)
|
||||
unset OPAL_PREFIX
|
||||
unset OPAL_PREFIX
|
||||
|
||||
export FOAM_MPI=openmpi-macport-$WM_MACPORT_MPI_VERSION
|
||||
export FOAM_MPI=openmpi-macport-$WM_MACPORT_MPI_VERSION
|
||||
|
||||
# Currently not correctly working on MacPorts
|
||||
# libDir=`mpicc-openmpi-$WM_MACPORT_MPI_VERSION --showme:libdirs`
|
||||
libDir=/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION
|
||||
# Currently not correctly working on MacPorts
|
||||
# libDir=`mpicc-openmpi-$WM_MACPORT_MPI_VERSION --showme:libdirs`
|
||||
libDir=/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
|
||||
_foamAddLib $libDir
|
||||
unset libDir
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
|
||||
_foamAddLib $libDir
|
||||
unset libDir
|
||||
|
||||
which mpirun >/dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
export WM_MPIRUN_PROG=mpirun-openmpi-$WM_MACPORT_MPI_VERSION
|
||||
fi
|
||||
;;
|
||||
which mpirun >/dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
export WM_MPIRUN_PROG=mpirun-openmpi-$WM_MACPORT_MPI_VERSION
|
||||
fi
|
||||
;;
|
||||
|
||||
MACPORTMPICH)
|
||||
export FOAM_MPI=mpich-macports-$WM_MACPORT_MPI_VERSION
|
||||
|
@ -277,7 +277,7 @@ MACPORTMPICH)
|
|||
which mpirun >/dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
export WM_MPIRUN_PROG=mpirun-mpich-$WM_MACPORT_MPI_VERSION
|
||||
export WM_MPIRUN_PROG=mpirun-mpich-$WM_MACPORT_MPI_VERSION
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -49,10 +49,10 @@ else
|
|||
# regular sourcing
|
||||
set sourced=($_)
|
||||
if ( $#sourced == 0 ) then
|
||||
echo "Seems you sourced this script (etc/tcshrc from your foam-extend-installation) from .tcshrc."
|
||||
echo "In that case tcsh has no way of telling where this script is located and is not able to set up the environment correctly"
|
||||
echo "So before sourcing it set the location with 'setenv FOAM_SOURCED_FROM_ALIAS <path to the script>'"
|
||||
echo "Or consider using a different shell"
|
||||
echo "Seems you sourced this script (etc/tcshrc from your foam-extend-installation) from .tcshrc."
|
||||
echo "In that case tcsh has no way of telling where this script is located and is not able to set up the environment correctly"
|
||||
echo "So before sourcing it set the location with 'setenv FOAM_SOURCED_FROM_ALIAS <path to the script>'"
|
||||
echo "Or consider using a different shell"
|
||||
endif
|
||||
set thisScript=($sourced[2])
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ setDestination()
|
|||
{
|
||||
pkg=$1
|
||||
if [ ! -z "$EXTEND_BAZAAR_TO_SITE" ]; then
|
||||
dst="SITE"
|
||||
wrong="USER"
|
||||
dst="SITE"
|
||||
wrong="USER"
|
||||
else
|
||||
dst="USER"
|
||||
wrong="SITE"
|
||||
dst="USER"
|
||||
wrong="SITE"
|
||||
fi
|
||||
|
||||
# remove installation to general binaries
|
||||
|
|
|
@ -136,7 +136,7 @@ coupledSolverPerformance coupledFvMatrix<scalar>::solve
|
|||
//HR 17.2.2013: Clear references to internal field without deleting the objects
|
||||
forAll (matrices, rowI)
|
||||
{
|
||||
psi.set(rowI, NULL).ptr();
|
||||
psi.set(rowI, NULL).ptr();
|
||||
}
|
||||
|
||||
return solverPerf;
|
||||
|
|
|
@ -147,7 +147,7 @@ extern "C" void bicgAinv
|
|||
|
||||
while
|
||||
(
|
||||
normR > (solverPerf->tol)
|
||||
normR > (solverPerf->tol)
|
||||
&& count < (solverPerf->maxIter)
|
||||
&& normR/normR0 >= (solverPerf->relTol)
|
||||
|| count < solverPerf->minIter
|
||||
|
|
|
@ -136,7 +136,7 @@ extern "C" void bicgDiag
|
|||
|
||||
while
|
||||
(
|
||||
normR > (solverPerf->tol)
|
||||
normR > (solverPerf->tol)
|
||||
&& count < (solverPerf->maxIter)
|
||||
&& normR/normR0 >= (solverPerf->relTol)
|
||||
|| count < solverPerf->minIter
|
||||
|
|
|
@ -147,7 +147,7 @@ Foam::lduSolverPerformance Foam::cudaBiCGStab::solve
|
|||
}
|
||||
|
||||
// copy the x vector back to Openfoam
|
||||
thrust::copy(ces.X.begin(), ces.X.end(), x.begin());
|
||||
thrust::copy(ces.X.begin(), ces.X.end(), x.begin());
|
||||
|
||||
// Return solver output
|
||||
return lduSolverPerformance
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cudaBiCGStab Declaration
|
||||
Class cudaBiCGStab Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class cudaBiCGStab
|
||||
|
@ -57,11 +57,11 @@ class cudaBiCGStab
|
|||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
cudaBiCGStab(const cudaBiCGStab&);
|
||||
//- Disallow default bitwise copy construct
|
||||
cudaBiCGStab(const cudaBiCGStab&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const cudaBiCGStab&);
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const cudaBiCGStab&);
|
||||
|
||||
|
||||
public:
|
||||
|
@ -72,33 +72,33 @@ public:
|
|||
|
||||
// Constructors
|
||||
|
||||
//- Construct from matrix components and solver data stream
|
||||
cudaBiCGStab
|
||||
(
|
||||
const word& fieldName,
|
||||
const lduMatrix& matrix,
|
||||
const FieldField<Field, scalar>& coupleBouCoeffs,
|
||||
const FieldField<Field, scalar>& coupleIntCoeffs,
|
||||
const lduInterfaceFieldPtrsList& interfaces,
|
||||
const dictionary& dict
|
||||
);
|
||||
//- Construct from matrix components and solver data stream
|
||||
cudaBiCGStab
|
||||
(
|
||||
const word& fieldName,
|
||||
const lduMatrix& matrix,
|
||||
const FieldField<Field, scalar>& coupleBouCoeffs,
|
||||
const FieldField<Field, scalar>& coupleIntCoeffs,
|
||||
const lduInterfaceFieldPtrsList& interfaces,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~cudaBiCGStab()
|
||||
{}
|
||||
virtual ~cudaBiCGStab()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Solve the matrix with this solver
|
||||
virtual lduSolverPerformance solve
|
||||
(
|
||||
scalarField& x,
|
||||
const scalarField& b,
|
||||
const direction cmpt = 0
|
||||
) const;
|
||||
//- Solve the matrix with this solver
|
||||
virtual lduSolverPerformance solve
|
||||
(
|
||||
scalarField& x,
|
||||
const scalarField& b,
|
||||
const direction cmpt = 0
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cudaCG Declaration
|
||||
Class cudaCG Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class cudaCG
|
||||
|
@ -57,11 +57,11 @@ class cudaCG
|
|||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
cudaCG(const cudaCG&);
|
||||
//- Disallow default bitwise copy construct
|
||||
cudaCG(const cudaCG&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const cudaCG&);
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const cudaCG&);
|
||||
|
||||
|
||||
public:
|
||||
|
@ -72,33 +72,33 @@ public:
|
|||
|
||||
// Constructors
|
||||
|
||||
//- Construct from matrix components and solver data stream
|
||||
cudaCG
|
||||
(
|
||||
const word& fieldName,
|
||||
const lduMatrix& matrix,
|
||||
const FieldField<Field, scalar>& coupleBouCoeffs,
|
||||
const FieldField<Field, scalar>& coupleIntCoeffs,
|
||||
const lduInterfaceFieldPtrsList& interfaces,
|
||||
const dictionary& dict
|
||||
);
|
||||
//- Construct from matrix components and solver data stream
|
||||
cudaCG
|
||||
(
|
||||
const word& fieldName,
|
||||
const lduMatrix& matrix,
|
||||
const FieldField<Field, scalar>& coupleBouCoeffs,
|
||||
const FieldField<Field, scalar>& coupleIntCoeffs,
|
||||
const lduInterfaceFieldPtrsList& interfaces,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~cudaCG()
|
||||
{}
|
||||
virtual ~cudaCG()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Solve the matrix with this solver
|
||||
virtual lduSolverPerformance solve
|
||||
(
|
||||
scalarField& x,
|
||||
const scalarField& b,
|
||||
const direction cmpt = 0
|
||||
) const;
|
||||
//- Solve the matrix with this solver
|
||||
virtual lduSolverPerformance solve
|
||||
(
|
||||
scalarField& x,
|
||||
const scalarField& b,
|
||||
const direction cmpt = 0
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ thrust::sequence
|
|||
thrust::copy
|
||||
(
|
||||
A.values.begin() + ces->nCells,
|
||||
A.values.begin() + ces->nCells + ces->nFaces,
|
||||
A.values.begin() + ces->nCells + ces->nFaces
|
||||
A.values.begin() + ces->nCells + ces->nFaces,
|
||||
A.values.begin() + ces->nCells + ces->nFaces
|
||||
);
|
||||
|
||||
// Copy row indices of lower to columns of upper into A COO matrix
|
||||
|
|
|
@ -638,7 +638,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
|||
if
|
||||
(
|
||||
cutOnMaster > edgeEndCutoffTol_()
|
||||
&& cutOnMaster < 1.0 - edgeEndCutoffTol_()
|
||||
&& cutOnMaster < 1.0 - edgeEndCutoffTol_()
|
||||
)
|
||||
{
|
||||
// Master is cut, check the slave
|
||||
|
@ -678,7 +678,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
|||
if
|
||||
(
|
||||
cutOnSlave > edgeEndCutoffTol_()
|
||||
&& cutOnSlave < 1.0 - edgeEndCutoffTol_()
|
||||
&& cutOnSlave < 1.0 - edgeEndCutoffTol_()
|
||||
&& slaveCut.distance() < mergeTol
|
||||
)
|
||||
{
|
||||
|
|
|
@ -632,7 +632,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
|
|||
if
|
||||
(
|
||||
cutOnMaster > edgeEndCutoffTol_()
|
||||
&& cutOnMaster < 1.0 - edgeEndCutoffTol_()
|
||||
&& cutOnMaster < 1.0 - edgeEndCutoffTol_()
|
||||
)
|
||||
{
|
||||
// Master is cut, check the slave
|
||||
|
@ -663,7 +663,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
|
|||
if
|
||||
(
|
||||
cutOnSlave > edgeEndCutoffTol_()
|
||||
&& cutOnSlave < 1.0 - edgeEndCutoffTol_()
|
||||
&& cutOnSlave < 1.0 - edgeEndCutoffTol_()
|
||||
&& slaveCut.distance() < mergeTol
|
||||
)
|
||||
{
|
||||
|
|
|
@ -116,11 +116,11 @@ bool Foam::slidingInterface::projectPoints() const
|
|||
<< name() << " : "
|
||||
<< "Projecting slave points onto master surface using ";
|
||||
|
||||
const Foam::debug::optimisationSwitch nSquaredProjection
|
||||
(
|
||||
"nSquaredProjection",
|
||||
0
|
||||
);
|
||||
const Foam::debug::optimisationSwitch nSquaredProjection
|
||||
(
|
||||
"nSquaredProjection",
|
||||
0
|
||||
);
|
||||
|
||||
if (nSquaredProjection() > 0)
|
||||
{
|
||||
|
@ -1165,8 +1165,8 @@ bool Foam::slidingInterface::projectPoints() const
|
|||
if
|
||||
(
|
||||
cutOnSlave > edgeEndCutoffTol_()
|
||||
&& cutOnSlave < 1.0 - edgeEndCutoffTol_() // check edge cut
|
||||
&& distInEdgePlane < edgeMergeTol_()*edgeMag // merge plane
|
||||
&& cutOnSlave < 1.0 - edgeEndCutoffTol_() // check edge cut
|
||||
&& distInEdgePlane < edgeMergeTol_()*edgeMag // merge plane
|
||||
&& edgeLineHit.distance()
|
||||
< min
|
||||
(
|
||||
|
|
|
@ -140,16 +140,22 @@ void engineTimeVaryingUniformFixedValueFvPatchField<symmTensor>::updateCoeffs()
|
|||
template<>
|
||||
void engineTimeVaryingUniformFixedValueFvPatchField<symmTensor4thOrder>::updateCoeffs()
|
||||
{
|
||||
notImplemented("engineTimeVaryingUniformFixedValueFvPatchField"
|
||||
"<symmTensor4thOrder>::updateCoeffs()");
|
||||
notImplemented
|
||||
(
|
||||
"engineTimeVaryingUniformFixedValueFvPatchField"
|
||||
"<symmTensor4thOrder>::updateCoeffs()"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
void engineTimeVaryingUniformFixedValueFvPatchField<diagTensor>::updateCoeffs()
|
||||
{
|
||||
notImplemented("engineTimeVaryingUniformFixedValueFvPatchField"
|
||||
"<diagTensor>::updateCoeffs()");
|
||||
notImplemented
|
||||
(
|
||||
"engineTimeVaryingUniformFixedValueFvPatchField"
|
||||
"<diagTensor>::updateCoeffs()"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -84,11 +84,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||
half0Normals[edgei] = point(1, 0, 0);
|
||||
half1Normals[edgei] = half0Normals[edgei];
|
||||
}
|
||||
else if
|
||||
(
|
||||
mag(magLe - nbrMagLe)/avLe
|
||||
> matchTol_()
|
||||
)
|
||||
else if(mag(magLe - nbrMagLe)/avLe > matchTol_())
|
||||
{
|
||||
// Error in area matching. Find largest error
|
||||
maxMatchError =
|
||||
|
@ -176,7 +172,7 @@ void cyclicFaPatch::makeWeights(scalarField& w) const
|
|||
if
|
||||
(
|
||||
mag(magL[edgei] - magL[edgei + sizeby2])/avL
|
||||
> matchTol_()
|
||||
> matchTol_()
|
||||
)
|
||||
{
|
||||
// Found error. Look for largest matching error
|
||||
|
|
|
@ -40,7 +40,7 @@ Foam::debug::debugSwitch \
|
|||
faPatchTypeField::disallowDefaultFaPatchField \
|
||||
( \
|
||||
"disallowDefaultFaPatchField", \
|
||||
0 \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable(faPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(faPatchTypeField, patchMapper); \
|
||||
|
|
|
@ -40,10 +40,10 @@ namespace Foam
|
|||
defineNamedTemplateTypeNameAndDebug(faePatchTypeField, 0); \
|
||||
template<> \
|
||||
Foam::debug::debugSwitch \
|
||||
faePatchTypeField::disallowDefaultFaePatchField \
|
||||
faePatchTypeField::disallowDefaultFaePatchField \
|
||||
( \
|
||||
"disallowDefaultFaePatchField", \
|
||||
0 \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable(faePatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(faePatchTypeField, patchMapper); \
|
||||
|
|
|
@ -513,34 +513,34 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
|||
}
|
||||
|
||||
for
|
||||
(
|
||||
HashPtrTable<symmTensor4thOrderField>::const_iterator iter =
|
||||
ptf.symmTensor4thOrderFields_.begin();
|
||||
iter != ptf.symmTensor4thOrderFields_.end();
|
||||
(
|
||||
HashPtrTable<symmTensor4thOrderField>::const_iterator iter =
|
||||
ptf.symmTensor4thOrderFields_.begin();
|
||||
iter != ptf.symmTensor4thOrderFields_.end();
|
||||
++iter
|
||||
)
|
||||
{
|
||||
)
|
||||
{
|
||||
symmTensor4thOrderFields_.insert
|
||||
(
|
||||
iter.key(),
|
||||
new symmTensor4thOrderField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
(
|
||||
iter.key(),
|
||||
new symmTensor4thOrderField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
|
||||
for
|
||||
(
|
||||
HashPtrTable<diagTensorField>::const_iterator iter =
|
||||
ptf.diagTensorFields_.begin();
|
||||
iter != ptf.diagTensorFields_.end();
|
||||
(
|
||||
HashPtrTable<diagTensorField>::const_iterator iter =
|
||||
ptf.diagTensorFields_.begin();
|
||||
iter != ptf.diagTensorFields_.end();
|
||||
++iter
|
||||
)
|
||||
{
|
||||
)
|
||||
{
|
||||
diagTensorFields_.insert
|
||||
(
|
||||
iter.key(),
|
||||
new diagTensorField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
(
|
||||
iter.key(),
|
||||
new diagTensorField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
|
||||
for
|
||||
(
|
||||
|
|
|
@ -40,7 +40,7 @@ Foam::debug::debugSwitch \
|
|||
fvPatchTypeField::disallowGenericFvPatchField \
|
||||
( \
|
||||
"disallowGenericFvPatchField", \
|
||||
0 \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper); \
|
||||
|
|
|
@ -40,7 +40,7 @@ debug::debugSwitch \
|
|||
fvPatchTypeField::disallowGenericFvPatchField \
|
||||
( \
|
||||
"disallowGenericFvPatchField", \
|
||||
0 \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper); \
|
||||
|
|
|
@ -40,7 +40,7 @@ Foam::debug::debugSwitch \
|
|||
fvsPatchTypeField::disallowDefaultFvsPatchField \
|
||||
( \
|
||||
"disallowDefaultFvsPatchField", \
|
||||
0 \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \
|
||||
|
|
|
@ -40,7 +40,7 @@ Foam::debug::debugSwitch \
|
|||
fvsPatchTypeField::disallowDefaultFvsPatchField \
|
||||
( \
|
||||
"disallowDefaultFvsPatchField", \
|
||||
0 \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \
|
||||
|
|
|
@ -268,10 +268,10 @@ backwardD2dt2Scheme<Type>::fvmD2dt2
|
|||
(
|
||||
coefft0
|
||||
*backwardDdtScheme<Type>(mesh()).fvcDdt(vf.oldTime())
|
||||
().internalField()
|
||||
().internalField()
|
||||
- coefft00
|
||||
*backwardDdtScheme<Type>(mesh()).fvcDdt(vf.oldTime().oldTime())
|
||||
().internalField()
|
||||
().internalField()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ makeFvDdtTypeScheme(SS, sphericalTensor) \
|
|||
makeFvDdtTypeScheme(SS, symmTensor) \
|
||||
makeFvDdtTypeScheme(SS, symmTensor4thOrder) \
|
||||
makeFvDdtTypeScheme(SS, diagTensor) \
|
||||
makeFvDdtTypeScheme(SS, tensor) \
|
||||
makeFvDdtTypeScheme(SS, tensor) \
|
||||
\
|
||||
template<> \
|
||||
tmp<surfaceScalarField> SS<scalar>::fvcDdtPhiCorr \
|
||||
|
|
|
@ -234,17 +234,17 @@ skewCorrectedSnGrad<Type>::correction
|
|||
(
|
||||
min
|
||||
(
|
||||
limitCoeff_
|
||||
*mag
|
||||
limitCoeff_*
|
||||
mag
|
||||
(
|
||||
uncorrectedSnGrad<Type>::snGrad
|
||||
(
|
||||
vf,
|
||||
this->deltaCoeffs(vf),
|
||||
"orthSnGrad"
|
||||
)
|
||||
+ ssf
|
||||
)
|
||||
uncorrectedSnGrad<Type>::snGrad
|
||||
(
|
||||
vf,
|
||||
this->deltaCoeffs(vf),
|
||||
"orthSnGrad"
|
||||
)
|
||||
+ ssf
|
||||
)
|
||||
/(
|
||||
(1 - limitCoeff_)*mag(ssf)
|
||||
+ dimensionedScalar("small", ssf.dimensions(), SMALL)
|
||||
|
|
|
@ -37,8 +37,11 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
|
|||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void leastSquaresVolPointInterpolation::calcA(List<scalarSquareMatrix>& A) const
|
||||
{
|
||||
void leastSquaresVolPointInterpolation::calcA
|
||||
(
|
||||
List<scalarSquareMatrix>& A
|
||||
) const
|
||||
{
|
||||
//Info << "leastSquaresVolPointInterpolation calcA" << endl;
|
||||
|
||||
const fvMesh& mesh = mesh_;
|
||||
|
@ -49,262 +52,293 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
|
|||
|
||||
//- populate A matrix
|
||||
forAll(points, pointi)
|
||||
{
|
||||
const labelList& pointCells = mesh.pointCells()[pointi];
|
||||
{
|
||||
const labelList& pointCells = mesh.pointCells()[pointi];
|
||||
|
||||
//- this component of matrix does not depend on coordinates
|
||||
A[pointi][3][3] = pointCells.size();
|
||||
//- this component of matrix does not depend on coordinates
|
||||
A[pointi][3][3] = pointCells.size();
|
||||
|
||||
//- fill the A matrices
|
||||
forAll(pointCells, pointCelli)
|
||||
{
|
||||
const label& celli = pointCells[pointCelli];
|
||||
//- fill the A matrices
|
||||
forAll(pointCells, pointCelli)
|
||||
{
|
||||
const label& celli = pointCells[pointCelli];
|
||||
|
||||
const scalar& x = mesh.C()[celli].component(vector::X);
|
||||
const scalar& y = mesh.C()[celli].component(vector::Y);
|
||||
const scalar& z = mesh.C()[celli].component(vector::Z);
|
||||
const scalar& x = mesh.C()[celli].component(vector::X);
|
||||
const scalar& y = mesh.C()[celli].component(vector::Y);
|
||||
const scalar& z = mesh.C()[celli].component(vector::Z);
|
||||
|
||||
A[pointi][0][0] += x*x;
|
||||
A[pointi][0][1] += x*y;
|
||||
A[pointi][0][2] += x*z;
|
||||
A[pointi][0][3] += x;
|
||||
A[pointi][0][0] += x*x;
|
||||
A[pointi][0][1] += x*y;
|
||||
A[pointi][0][2] += x*z;
|
||||
A[pointi][0][3] += x;
|
||||
|
||||
A[pointi][1][0] += x*y;
|
||||
A[pointi][1][1] += y*y;
|
||||
A[pointi][1][2] += y*z;
|
||||
A[pointi][1][3] += y;
|
||||
A[pointi][1][0] += x*y;
|
||||
A[pointi][1][1] += y*y;
|
||||
A[pointi][1][2] += y*z;
|
||||
A[pointi][1][3] += y;
|
||||
|
||||
A[pointi][2][0] += x*z;
|
||||
A[pointi][2][1] += y*z;
|
||||
A[pointi][2][2] += z*z;
|
||||
A[pointi][2][3] += z;
|
||||
A[pointi][2][0] += x*z;
|
||||
A[pointi][2][1] += y*z;
|
||||
A[pointi][2][2] += z*z;
|
||||
A[pointi][2][3] += z;
|
||||
|
||||
A[pointi][3][0] += x;
|
||||
A[pointi][3][1] += y;
|
||||
A[pointi][3][2] += z;
|
||||
//A[pointi][3][3] = pointCells.size(); // set above
|
||||
}
|
||||
}
|
||||
A[pointi][3][0] += x;
|
||||
A[pointi][3][1] += y;
|
||||
A[pointi][3][2] += z;
|
||||
//A[pointi][3][3] = pointCells.size(); // set above
|
||||
}
|
||||
}
|
||||
|
||||
//- for boundary points we will include the surrounding face centres
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
const vectorField& faceCentres = mesh.boundaryMesh()[patchi].faceCentres();
|
||||
const labelListList& pointFaces = mesh.boundaryMesh()[patchi].pointFaces();
|
||||
{
|
||||
const vectorField& faceCentres =
|
||||
mesh.boundaryMesh()[patchi].faceCentres();
|
||||
const labelListList& pointFaces =
|
||||
mesh.boundaryMesh()[patchi].pointFaces();
|
||||
|
||||
if(mesh.boundary()[patchi].coupled()) //- for proc boundaries
|
||||
{
|
||||
//- for coupled patches we will use the values at the neighbourField cell centres and we will
|
||||
//- not use the boundary face values
|
||||
//- neighbour cell centre are equal to the faceCell centres plus the delta vector
|
||||
vectorField pDelta = mesh.boundary()[patchi].delta();
|
||||
vectorField faceCellC(faceCentres.size(), vector::zero);
|
||||
forAll(faceCentres, facei)
|
||||
{
|
||||
label celli = mesh.boundaryMesh()[patchi].faceCells()[facei];
|
||||
faceCellC[facei] = mesh.C()[celli];
|
||||
}
|
||||
vectorField neiCellC = faceCellC + pDelta;
|
||||
if(mesh.boundary()[patchi].coupled()) //- for proc boundaries
|
||||
{
|
||||
//- for coupled patches we will use the values at the
|
||||
//- neighbourField cell centres and we will not use the boundary
|
||||
//- face values neighbour cell centre are equal to the faceCell
|
||||
//- centres plus the delta vector
|
||||
vectorField pDelta = mesh.boundary()[patchi].delta();
|
||||
vectorField faceCellC(faceCentres.size(), vector::zero);
|
||||
forAll(faceCentres, facei)
|
||||
{
|
||||
label celli = mesh.boundaryMesh()[patchi].faceCells()[facei];
|
||||
faceCellC[facei] = mesh.C()[celli];
|
||||
}
|
||||
vectorField neiCellC = faceCellC + pDelta;
|
||||
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
label neiCelli = pointFaces[pointi][pointFacei];
|
||||
const scalar& x = neiCellC[neiCelli].component(vector::X);
|
||||
const scalar& y = neiCellC[neiCelli].component(vector::Y);
|
||||
const scalar& z = neiCellC[neiCelli].component(vector::Z);
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
label neiCelli = pointFaces[pointi][pointFacei];
|
||||
const scalar& x = neiCellC[neiCelli].component(vector::X);
|
||||
const scalar& y = neiCellC[neiCelli].component(vector::Y);
|
||||
const scalar& z = neiCellC[neiCelli].component(vector::Z);
|
||||
|
||||
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
label globalPointi =
|
||||
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
|
||||
A[globalPointi][0][0] += x*x;
|
||||
A[globalPointi][0][1] += x*y;
|
||||
A[globalPointi][0][2] += x*z;
|
||||
A[globalPointi][0][3] += x;
|
||||
A[globalPointi][0][0] += x*x;
|
||||
A[globalPointi][0][1] += x*y;
|
||||
A[globalPointi][0][2] += x*z;
|
||||
A[globalPointi][0][3] += x;
|
||||
|
||||
A[globalPointi][1][0] += x*y;
|
||||
A[globalPointi][1][1] += y*y;
|
||||
A[globalPointi][1][2] += y*z;
|
||||
A[globalPointi][1][3] += y;
|
||||
A[globalPointi][1][0] += x*y;
|
||||
A[globalPointi][1][1] += y*y;
|
||||
A[globalPointi][1][2] += y*z;
|
||||
A[globalPointi][1][3] += y;
|
||||
|
||||
A[globalPointi][2][0] += x*z;
|
||||
A[globalPointi][2][1] += y*z;
|
||||
A[globalPointi][2][2] += z*z;
|
||||
A[globalPointi][2][3] += z;
|
||||
A[globalPointi][2][0] += x*z;
|
||||
A[globalPointi][2][1] += y*z;
|
||||
A[globalPointi][2][2] += z*z;
|
||||
A[globalPointi][2][3] += z;
|
||||
|
||||
A[globalPointi][3][0] += x;
|
||||
A[globalPointi][3][1] += y;
|
||||
A[globalPointi][3][2] += z;
|
||||
A[globalPointi][3][3] += 1; // = pointCells.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//- each point must use at least 4 neighbouring locations otherwise A is singular
|
||||
//- and simpleMatrix will cannot invert it
|
||||
//- therefore empty patches values are included to make sure A is not singular
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
A[globalPointi][3][0] += x;
|
||||
A[globalPointi][3][1] += y;
|
||||
A[globalPointi][3][2] += z;
|
||||
A[globalPointi][3][3] += 1; // = pointCells.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//- each point must use at least 4 neighbouring locations otherwise
|
||||
//- A is singular and simpleMatrix will cannot invert it therefore
|
||||
//- empty patches values are included to make sure A is not
|
||||
//- singular
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
label globalPointi =
|
||||
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
//- fix: use pointFace not face philipc
|
||||
label facei = pointFaces[pointi][pointFacei];
|
||||
const scalar& x = faceCentres[facei].component(vector::X);
|
||||
const scalar& y = faceCentres[facei].component(vector::Y);
|
||||
const scalar& z = faceCentres[facei].component(vector::Z);
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
//- fix: use pointFace not face philipc
|
||||
label facei = pointFaces[pointi][pointFacei];
|
||||
const scalar& x = faceCentres[facei].component(vector::X);
|
||||
const scalar& y = faceCentres[facei].component(vector::Y);
|
||||
const scalar& z = faceCentres[facei].component(vector::Z);
|
||||
|
||||
A[globalPointi][0][0] += x*x;
|
||||
A[globalPointi][0][1] += x*y;
|
||||
A[globalPointi][0][2] += x*z;
|
||||
A[globalPointi][0][3] += x;
|
||||
A[globalPointi][0][0] += x*x;
|
||||
A[globalPointi][0][1] += x*y;
|
||||
A[globalPointi][0][2] += x*z;
|
||||
A[globalPointi][0][3] += x;
|
||||
|
||||
A[globalPointi][1][0] += x*y;
|
||||
A[globalPointi][1][1] += y*y;
|
||||
A[globalPointi][1][2] += y*z;
|
||||
A[globalPointi][1][3] += y;
|
||||
A[globalPointi][1][0] += x*y;
|
||||
A[globalPointi][1][1] += y*y;
|
||||
A[globalPointi][1][2] += y*z;
|
||||
A[globalPointi][1][3] += y;
|
||||
|
||||
A[globalPointi][2][0] += x*z;
|
||||
A[globalPointi][2][1] += y*z;
|
||||
A[globalPointi][2][2] += z*z;
|
||||
A[globalPointi][2][3] += z;
|
||||
A[globalPointi][2][0] += x*z;
|
||||
A[globalPointi][2][1] += y*z;
|
||||
A[globalPointi][2][2] += z*z;
|
||||
A[globalPointi][2][3] += z;
|
||||
|
||||
A[globalPointi][3][0] += x;
|
||||
A[globalPointi][3][1] += y;
|
||||
A[globalPointi][3][2] += z;
|
||||
A[globalPointi][3][3] += 1; // = pointCells.size();
|
||||
}
|
||||
}
|
||||
} //- end of else
|
||||
} //- end of forAll boundary
|
||||
}
|
||||
A[globalPointi][3][0] += x;
|
||||
A[globalPointi][3][1] += y;
|
||||
A[globalPointi][3][2] += z;
|
||||
A[globalPointi][3][3] += 1; // = pointCells.size();
|
||||
}
|
||||
}
|
||||
} //- end of else
|
||||
} //- end of forAll boundary
|
||||
}
|
||||
|
||||
|
||||
void leastSquaresVolPointInterpolation::calcB(List<Field<vector> >& B, const GeometricField<vector, fvPatchField, volMesh>& vf) const
|
||||
{
|
||||
void leastSquaresVolPointInterpolation::calcB
|
||||
(
|
||||
List<Field<vector> >& B,
|
||||
const GeometricField<vector, fvPatchField, volMesh>& vf
|
||||
) const
|
||||
{
|
||||
//Info << "leastSquaresVolPointInterpolation calcB" << endl;
|
||||
|
||||
const fvMesh& mesh = mesh_;
|
||||
const pointField& points = mesh.points();
|
||||
|
||||
for (direction compi = 0; compi < 3; compi++)
|
||||
{
|
||||
forAll(points, pointi)
|
||||
{
|
||||
const labelList& pointCells = mesh.pointCells()[pointi];
|
||||
//Info << "\npointCells " << pointCells << endl;
|
||||
forAll(pointCells, pointCelli)
|
||||
{
|
||||
const label& celli = pointCells[pointCelli];
|
||||
//Info << "celli " << celli << ", C is " << mesh.C()[celli] << ", mesh.C().size() " << mesh.C().size() << endl;
|
||||
//Info << "mesh.C() is " << mesh.C().internalField() << endl;
|
||||
const scalar& x = mesh.C()[celli].component(vector::X);
|
||||
const scalar& y = mesh.C()[celli].component(vector::Y);
|
||||
const scalar& z = mesh.C()[celli].component(vector::Z);
|
||||
{
|
||||
forAll(points, pointi)
|
||||
{
|
||||
const labelList& pointCells = mesh.pointCells()[pointi];
|
||||
//Info << "\npointCells " << pointCells << endl;
|
||||
forAll(pointCells, pointCelli)
|
||||
{
|
||||
const label& celli = pointCells[pointCelli];
|
||||
//Info << "celli " << celli << ", C is " << mesh.C()[celli] << ", mesh.C().size() " << mesh.C().size() << endl;
|
||||
//Info << "mesh.C() is " << mesh.C().internalField() << endl;
|
||||
const scalar& x = mesh.C()[celli].component(vector::X);
|
||||
const scalar& y = mesh.C()[celli].component(vector::Y);
|
||||
const scalar& z = mesh.C()[celli].component(vector::Z);
|
||||
|
||||
const scalar& phiCompi = vf.internalField()[celli].component(compi);
|
||||
const scalar& phiCompi =
|
||||
vf.internalField()[celli].component(compi);
|
||||
|
||||
B[pointi][0].component(compi) += phiCompi*x;
|
||||
B[pointi][1].component(compi) += phiCompi*y;
|
||||
B[pointi][2].component(compi) += phiCompi*z;
|
||||
B[pointi][3].component(compi) += phiCompi;
|
||||
}
|
||||
}
|
||||
B[pointi][0].component(compi) += phiCompi*x;
|
||||
B[pointi][1].component(compi) += phiCompi*y;
|
||||
B[pointi][2].component(compi) += phiCompi*z;
|
||||
B[pointi][3].component(compi) += phiCompi;
|
||||
}
|
||||
}
|
||||
|
||||
//- for boundary points we will include the surrounding face centres
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
const vectorField& faceCentres = mesh.boundaryMesh()[patchi].faceCentres();
|
||||
const labelListList& pointFaces = mesh.boundaryMesh()[patchi].pointFaces();
|
||||
const labelList& faceCells = mesh.boundaryMesh()[patchi].faceCells();
|
||||
//- for boundary points we will include the surrounding face centres
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
const vectorField& faceCentres =
|
||||
mesh.boundaryMesh()[patchi].faceCentres();
|
||||
const labelListList& pointFaces =
|
||||
mesh.boundaryMesh()[patchi].pointFaces();
|
||||
const labelList& faceCells =
|
||||
mesh.boundaryMesh()[patchi].faceCells();
|
||||
|
||||
//- fix: do not calculate B for empty patches - philipc
|
||||
if(mesh.boundary()[patchi].coupled())
|
||||
{
|
||||
//- for coupled patches we will use the values at the neighbourField cell centres and we will
|
||||
//- not use the boundary face values
|
||||
//- neighbour cell centre are equal to the faceCell centres plus the delta vector
|
||||
vectorField pDelta = mesh.boundary()[patchi].delta();
|
||||
vectorField faceCellC(faceCentres.size(), vector::zero);
|
||||
forAll(faceCentres, facei)
|
||||
{
|
||||
label celli = mesh.boundaryMesh()[patchi].faceCells()[facei];
|
||||
faceCellC[facei] = mesh.C()[celli];
|
||||
}
|
||||
vectorField neiCellC = faceCellC + pDelta;
|
||||
//- fix: do not calculate B for empty patches - philipc
|
||||
if(mesh.boundary()[patchi].coupled())
|
||||
{
|
||||
//- for coupled patches we will use the values at the
|
||||
//- neighbourField cell centres and we will not use the
|
||||
//- boundary face values neighbour cell centre are equal to
|
||||
//- the faceCell centres plus the delta vector
|
||||
vectorField pDelta = mesh.boundary()[patchi].delta();
|
||||
vectorField faceCellC(faceCentres.size(), vector::zero);
|
||||
forAll(faceCentres, facei)
|
||||
{
|
||||
label celli =
|
||||
mesh.boundaryMesh()[patchi].faceCells()[facei];
|
||||
faceCellC[facei] = mesh.C()[celli];
|
||||
}
|
||||
vectorField neiCellC = faceCellC + pDelta;
|
||||
|
||||
vectorField phiNeiField = vf.boundaryField()[patchi].patchNeighbourField();
|
||||
vectorField phiNeiField =
|
||||
vf.boundaryField()[patchi].patchNeighbourField();
|
||||
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
label neiCelli = pointFaces[pointi][pointFacei];
|
||||
const scalar& x = neiCellC[neiCelli].component(vector::X);
|
||||
const scalar& y = neiCellC[neiCelli].component(vector::Y);
|
||||
const scalar& z = neiCellC[neiCelli].component(vector::Z);
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
label neiCelli = pointFaces[pointi][pointFacei];
|
||||
const scalar& x =
|
||||
neiCellC[neiCelli].component(vector::X);
|
||||
const scalar& y =
|
||||
neiCellC[neiCelli].component(vector::Y);
|
||||
const scalar& z =
|
||||
neiCellC[neiCelli].component(vector::Z);
|
||||
|
||||
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
label globalPointi =
|
||||
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
|
||||
//- this is the value of phi at the cell centre in the neighbour (i.e. across the interface)
|
||||
scalar phiCompi = phiNeiField[neiCelli].component(compi);
|
||||
//- this is the value of phi at the cell centre in the
|
||||
//- neighbour (i.e. across the interface)
|
||||
scalar phiCompi =
|
||||
phiNeiField[neiCelli].component(compi);
|
||||
|
||||
B[globalPointi][0].component(compi) += phiCompi*x;
|
||||
B[globalPointi][1].component(compi) += phiCompi*y;
|
||||
B[globalPointi][2].component(compi) += phiCompi*z;
|
||||
B[globalPointi][3].component(compi) += phiCompi;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//- each point must use at least 4 neighbouring locations otherwise A is singular
|
||||
//- and simpleMatrix will cannot invert it
|
||||
//- therefore empty patches values are included to make sure A is not singular
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
//- fix: use pointFace not face philipc
|
||||
label facei = pointFaces[pointi][pointFacei];
|
||||
const scalar& x = faceCentres[facei].component(vector::X);
|
||||
const scalar& y = faceCentres[facei].component(vector::Y);
|
||||
const scalar& z = faceCentres[facei].component(vector::Z);
|
||||
B[globalPointi][0].component(compi) += phiCompi*x;
|
||||
B[globalPointi][1].component(compi) += phiCompi*y;
|
||||
B[globalPointi][2].component(compi) += phiCompi*z;
|
||||
B[globalPointi][3].component(compi) += phiCompi;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//- each point must use at least 4 neighbouring locations
|
||||
//- otherwise A is singular and simpleMatrix will cannot
|
||||
//- make sure A is not singular invert it therefore empty
|
||||
//- patches values are included to
|
||||
forAll(pointFaces, pointi)
|
||||
{
|
||||
forAll(pointFaces[pointi], pointFacei)
|
||||
{
|
||||
//- fix: use pointFace not face philipc
|
||||
label facei = pointFaces[pointi][pointFacei];
|
||||
const scalar& x =
|
||||
faceCentres[facei].component(vector::X);
|
||||
const scalar& y =
|
||||
faceCentres[facei].component(vector::Y);
|
||||
const scalar& z =
|
||||
faceCentres[facei].component(vector::Z);
|
||||
|
||||
label globalPointi = mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
label globalPointi =
|
||||
mesh.boundaryMesh()[patchi].meshPoints()[pointi];
|
||||
|
||||
scalar phiCompi = 0.0;
|
||||
if(mesh.boundary()[patchi].type() == "empty")
|
||||
{
|
||||
//- use faceCell value for empty because empty patches do not store any values
|
||||
const label& ci = faceCells[facei];
|
||||
phiCompi = vf.internalField()[ci].component(compi);
|
||||
}
|
||||
else
|
||||
{
|
||||
phiCompi = vf.boundaryField()[patchi][facei].component(compi);
|
||||
}
|
||||
scalar phiCompi = 0.0;
|
||||
if(mesh.boundary()[patchi].type() == "empty")
|
||||
{
|
||||
//- use faceCell value for empty because empty
|
||||
//- patches do not store any values
|
||||
const label& ci = faceCells[facei];
|
||||
phiCompi =
|
||||
vf.internalField()[ci].component(compi);
|
||||
}
|
||||
else
|
||||
{
|
||||
phiCompi =
|
||||
vf.boundaryField()[patchi][facei].component(compi);
|
||||
}
|
||||
|
||||
B[globalPointi][0].component(compi) += phiCompi*x;
|
||||
B[globalPointi][1].component(compi) += phiCompi*y;
|
||||
B[globalPointi][2].component(compi) += phiCompi*z;
|
||||
B[globalPointi][3].component(compi) += phiCompi;
|
||||
}
|
||||
}
|
||||
}
|
||||
} //- end of forAll boundary
|
||||
} //- end of for all components
|
||||
}
|
||||
B[globalPointi][0].component(compi) += phiCompi*x;
|
||||
B[globalPointi][1].component(compi) += phiCompi*y;
|
||||
B[globalPointi][2].component(compi) += phiCompi*z;
|
||||
B[globalPointi][3].component(compi) += phiCompi;
|
||||
}
|
||||
}
|
||||
}
|
||||
} //- end of forAll boundary
|
||||
} //- end of for all components
|
||||
}
|
||||
|
||||
|
||||
void leastSquaresVolPointInterpolation::interpolate
|
||||
(
|
||||
const GeometricField<vector, fvPatchField, volMesh>& vf,
|
||||
GeometricField<vector, pointPatchField, pointMesh>& pf //Field<vector>& pf
|
||||
) const
|
||||
{
|
||||
void leastSquaresVolPointInterpolation::interpolate
|
||||
(
|
||||
const GeometricField<vector, fvPatchField, volMesh>& vf,
|
||||
GeometricField<vector, pointPatchField, pointMesh>& pf //Field<vector>& pf
|
||||
) const
|
||||
{
|
||||
//Info << "Interpolating cell to point using leastSquaresVolPointInterpolation" << endl;
|
||||
|
||||
const fvMesh& mesh = mesh_;
|
||||
|
@ -312,10 +346,10 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
|
|||
|
||||
//- first check that point field is the correct size
|
||||
if(pf.size() != points.size())
|
||||
{
|
||||
FatalError << "pointfield should be equal to the number of points in the fvMesh"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
{
|
||||
FatalError << "pointfield should be equal to the number of points in the fvMesh"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
//- calculate A and B vector
|
||||
List<scalarSquareMatrix> A(mesh.points().size(), scalarSquareMatrix(4, 0.0));
|
||||
|
@ -326,52 +360,55 @@ defineTypeNameAndDebug(leastSquaresVolPointInterpolation, 0);
|
|||
|
||||
//- solve equations for each component of each point
|
||||
forAll(points, pointi)
|
||||
{
|
||||
Field<vector>& source = B[pointi];
|
||||
simpleMatrix<vector> leastSquaresMatrix(A[pointi], source);
|
||||
//Info << "solving equation for point " << pointi << endl;
|
||||
//Info << "A[pointi] is " << A[pointi] << ", source is " << source << endl;
|
||||
//- solve using Gauss elimination or LU decomposition with pivoting
|
||||
//Field<vector> leastSquaresSol = leastSquaresMatrix.solve();
|
||||
Field<vector> leastSquaresSol = leastSquaresMatrix.LUsolve();
|
||||
{
|
||||
Field<vector>& source = B[pointi];
|
||||
simpleMatrix<vector> leastSquaresMatrix(A[pointi], source);
|
||||
//Info << "solving equation for point " << pointi << endl;
|
||||
//Info << "A[pointi] is " << A[pointi] << ", source is " << source << endl;
|
||||
//- solve using Gauss elimination or LU decomposition with pivoting
|
||||
//Field<vector> leastSquaresSol = leastSquaresMatrix.solve();
|
||||
Field<vector> leastSquaresSol = leastSquaresMatrix.LUsolve();
|
||||
|
||||
const scalar& x = mesh.points()[pointi].component(vector::X);
|
||||
const scalar& y = mesh.points()[pointi].component(vector::Y);
|
||||
const scalar& z = mesh.points()[pointi].component(vector::Z);
|
||||
const scalar& x = mesh.points()[pointi].component(vector::X);
|
||||
const scalar& y = mesh.points()[pointi].component(vector::Y);
|
||||
const scalar& z = mesh.points()[pointi].component(vector::Z);
|
||||
|
||||
//- calculate phi at vertex
|
||||
for (direction compi = 0; compi < 3; compi++)
|
||||
{
|
||||
const scalar& a = leastSquaresSol[0].component(compi);
|
||||
const scalar& b = leastSquaresSol[1].component(compi);
|
||||
const scalar& c = leastSquaresSol[2].component(compi);
|
||||
const scalar& d = leastSquaresSol[3].component(compi);
|
||||
//- calculate phi at vertex
|
||||
for (direction compi = 0; compi < 3; compi++)
|
||||
{
|
||||
const scalar& a = leastSquaresSol[0].component(compi);
|
||||
const scalar& b = leastSquaresSol[1].component(compi);
|
||||
const scalar& c = leastSquaresSol[2].component(compi);
|
||||
const scalar& d = leastSquaresSol[3].component(compi);
|
||||
|
||||
pf[pointi].component(compi) = a*x + b*y + c*z + d;
|
||||
}
|
||||
}
|
||||
pf[pointi].component(compi) = a*x + b*y + c*z + d;
|
||||
}
|
||||
}
|
||||
|
||||
//- proc patches are synchronised
|
||||
pf.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
leastSquaresVolPointInterpolation::leastSquaresVolPointInterpolation(const fvMesh& vm)
|
||||
:
|
||||
leastSquaresVolPointInterpolation::leastSquaresVolPointInterpolation
|
||||
(
|
||||
const fvMesh& vm
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, leastSquaresVolPointInterpolation>(vm),
|
||||
mesh_(vm) //,
|
||||
//A_(vm.points().size(), scalarSquareMatrix(4, 0.0)),
|
||||
//B_(vm.points().size(), Field<vector>(4, vector::zero))
|
||||
{
|
||||
{
|
||||
//calcA();
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
leastSquaresVolPointInterpolation::~leastSquaresVolPointInterpolation()
|
||||
{}
|
||||
leastSquaresVolPointInterpolation::~leastSquaresVolPointInterpolation()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
|
|
@ -86,10 +86,17 @@ class leastSquaresVolPointInterpolation
|
|||
void calcA(List<scalarSquareMatrix>& A) const;
|
||||
|
||||
//- calc B source for each point
|
||||
void calcB(List<Field<vector> >& B, const GeometricField<vector, fvPatchField, volMesh>&) const;
|
||||
void calcB
|
||||
(
|
||||
List<Field<vector> >& B,
|
||||
const GeometricField<vector, fvPatchField, volMesh>&
|
||||
) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
leastSquaresVolPointInterpolation(const leastSquaresVolPointInterpolation&);
|
||||
leastSquaresVolPointInterpolation
|
||||
(
|
||||
const leastSquaresVolPointInterpolation&
|
||||
);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const leastSquaresVolPointInterpolation&);
|
||||
|
@ -121,13 +128,13 @@ public:
|
|||
|
||||
virtual bool movePoints() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool updateMesh(const mapPolyMesh&) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Interpolation functions
|
||||
|
@ -137,7 +144,7 @@ public:
|
|||
void interpolate
|
||||
(
|
||||
const GeometricField<vector, fvPatchField, volMesh>& vf,
|
||||
GeometricField<vector, pointPatchField, pointMesh>& pf
|
||||
GeometricField<vector, pointPatchField, pointMesh>& pf
|
||||
) const;
|
||||
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ License
|
|||
void Foam::Time::readDict()
|
||||
{
|
||||
if (debug)
|
||||
Info << "Time::readDict(): reading " << controlDict_.name() << endl;
|
||||
Info << "Time::readDict(): reading " << controlDict_.name() << endl;
|
||||
|
||||
if (!deltaTchanged_)
|
||||
{
|
||||
|
|
|
@ -340,87 +340,87 @@ GenericPointPatchField
|
|||
tensorFields_.insert(iter().keyword(), fPtr);
|
||||
}
|
||||
else if
|
||||
(
|
||||
fieldToken.compoundToken().type()
|
||||
== token::Compound<List<symmTensor4thOrder> >::typeName
|
||||
)
|
||||
{
|
||||
(
|
||||
fieldToken.compoundToken().type()
|
||||
== token::Compound<List<symmTensor4thOrder> >::typeName
|
||||
)
|
||||
{
|
||||
symmTensor4thOrderField* fPtr = new symmTensor4thOrderField;
|
||||
fPtr->transfer
|
||||
(
|
||||
(
|
||||
dynamicCast
|
||||
<
|
||||
token::Compound<List<symmTensor4thOrder> >
|
||||
token::Compound<List<symmTensor4thOrder> >
|
||||
>
|
||||
(
|
||||
fieldToken.transferCompoundToken()
|
||||
)
|
||||
);
|
||||
(
|
||||
fieldToken.transferCompoundToken()
|
||||
)
|
||||
);
|
||||
|
||||
if (fPtr->size() != this->size())
|
||||
{
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
(
|
||||
"GenericPointPatchField<Type>::"
|
||||
"GenericPointPatchField"
|
||||
"(const pointPatch&, const Field<Type>&, "
|
||||
"const dictionary&)",
|
||||
dict
|
||||
) << "\n size of field " << iter().keyword()
|
||||
<< " (" << fPtr->size() << ')'
|
||||
<< " is not the same size as the patch ("
|
||||
<< this->size() << ')'
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field "
|
||||
<< this->dimensionedInternalField().name()
|
||||
<< " in file "
|
||||
<< this->dimensionedInternalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
) << "\n size of field " << iter().keyword()
|
||||
<< " (" << fPtr->size() << ')'
|
||||
<< " is not the same size as the patch ("
|
||||
<< this->size() << ')'
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field "
|
||||
<< this->dimensionedInternalField().name()
|
||||
<< " in file "
|
||||
<< this->dimensionedInternalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
symmTensor4thOrderFields_.insert(iter().keyword(), fPtr);
|
||||
}
|
||||
}
|
||||
else if
|
||||
(
|
||||
fieldToken.compoundToken().type()
|
||||
== token::Compound<List<diagTensor> >::typeName
|
||||
)
|
||||
{
|
||||
(
|
||||
fieldToken.compoundToken().type()
|
||||
== token::Compound<List<diagTensor> >::typeName
|
||||
)
|
||||
{
|
||||
diagTensorField* fPtr = new diagTensorField;
|
||||
fPtr->transfer
|
||||
(
|
||||
(
|
||||
dynamicCast
|
||||
<
|
||||
token::Compound<List<diagTensor> >
|
||||
token::Compound<List<diagTensor> >
|
||||
>
|
||||
(
|
||||
fieldToken.transferCompoundToken()
|
||||
)
|
||||
);
|
||||
(
|
||||
fieldToken.transferCompoundToken()
|
||||
)
|
||||
);
|
||||
|
||||
if (fPtr->size() != this->size())
|
||||
{
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
(
|
||||
"GenericPointPatchField<Type>::"
|
||||
"GenericPointPatchField"
|
||||
"(const pointPatch&, const Field<Type>&, "
|
||||
"const dictionary&)",
|
||||
dict
|
||||
) << "\n size of field " << iter().keyword()
|
||||
<< " (" << fPtr->size() << ')'
|
||||
<< " is not the same size as the patch ("
|
||||
<< this->size() << ')'
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field "
|
||||
<< this->dimensionedInternalField().name()
|
||||
<< " in file "
|
||||
<< this->dimensionedInternalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
) << "\n size of field " << iter().keyword()
|
||||
<< " (" << fPtr->size() << ')'
|
||||
<< " is not the same size as the patch ("
|
||||
<< this->size() << ')'
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field "
|
||||
<< this->dimensionedInternalField().name()
|
||||
<< " in file "
|
||||
<< this->dimensionedInternalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
diagTensorFields_.insert(iter().keyword(), fPtr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn
|
||||
|
@ -531,34 +531,34 @@ GenericPointPatchField
|
|||
}
|
||||
|
||||
for
|
||||
(
|
||||
(
|
||||
HashPtrTable<symmTensor4thOrderField>::const_iterator iter =
|
||||
ptf.symmTensor4thOrderFields_.begin();
|
||||
ptf.symmTensor4thOrderFields_.begin();
|
||||
iter != ptf.symmTensor4thOrderFields_.end();
|
||||
++iter
|
||||
)
|
||||
{
|
||||
++iter
|
||||
)
|
||||
{
|
||||
symmTensor4thOrderFields_.insert
|
||||
(
|
||||
iter.key(),
|
||||
new symmTensor4thOrderField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
(
|
||||
iter.key(),
|
||||
new symmTensor4thOrderField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
|
||||
for
|
||||
(
|
||||
(
|
||||
HashPtrTable<diagTensorField>::const_iterator iter =
|
||||
ptf.diagTensorFields_.begin();
|
||||
ptf.diagTensorFields_.begin();
|
||||
iter != ptf.diagTensorFields_.end();
|
||||
++iter
|
||||
)
|
||||
{
|
||||
++iter
|
||||
)
|
||||
{
|
||||
diagTensorFields_.insert
|
||||
(
|
||||
iter.key(),
|
||||
new diagTensorField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
(
|
||||
iter.key(),
|
||||
new diagTensorField(*iter(), mapper)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ public:
|
|||
// cellSet -appDict cellSetDict.rotorOnly
|
||||
//
|
||||
#define AppSpecificDictionary(DefaultAppDict) \
|
||||
argList::appDictName_ = (DefaultAppDict); \
|
||||
argList::appDictName_ = (DefaultAppDict); \
|
||||
argList::validOptions.insert("appDict", argList::appDictName_);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -185,7 +185,7 @@ GGIInterpolation<MasterPatch, SlavePatch>::polygonIntersection
|
|||
if
|
||||
(
|
||||
mag(intersectionArea/clippingArea) < areaErrorTol_()
|
||||
|| mag(intersectionArea/subjectArea) < areaErrorTol_()
|
||||
|| mag(intersectionArea/subjectArea) < areaErrorTol_()
|
||||
)
|
||||
{
|
||||
WarningIn
|
||||
|
|
|
@ -59,9 +59,9 @@ void Foam::pointMesh::mapFields(const mapPolyMesh& mpm) const
|
|||
MapGeometricFields
|
||||
<
|
||||
symmTensor4thOrder,
|
||||
pointPatchField,
|
||||
pointMeshMapper,
|
||||
pointMesh
|
||||
pointPatchField,
|
||||
pointMeshMapper,
|
||||
pointMesh
|
||||
>(m);
|
||||
|
||||
MapGeometricFields<diagTensor, pointPatchField, pointMeshMapper, pointMesh>
|
||||
|
|
|
@ -45,9 +45,9 @@ namespace Foam
|
|||
{
|
||||
defineTypeNameAndDebugWithDescription
|
||||
(
|
||||
ggiPolyPatch,
|
||||
0,
|
||||
"If value > 1, write uncovered GGI patch facets to VTK file"
|
||||
ggiPolyPatch,
|
||||
0,
|
||||
"If value > 1, write uncovered GGI patch facets to VTK file"
|
||||
);
|
||||
|
||||
addToRunTimeSelectionTable(polyPatch, ggiPolyPatch, word);
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Foam
|
|||
polyPatch::disallowGenericPolyPatch
|
||||
(
|
||||
"disallowGenericPolyPatch",
|
||||
0
|
||||
0
|
||||
);
|
||||
|
||||
defineRunTimeSelectionTable(polyPatch, word);
|
||||
|
|
|
@ -132,11 +132,11 @@ public:
|
|||
inline SymmTensor4thOrder
|
||||
(
|
||||
const Cmpt txxxx, const Cmpt txxyy, const Cmpt txxzz,
|
||||
const Cmpt tyyyy, const Cmpt tyyzz,
|
||||
const Cmpt tzzzz,
|
||||
const Cmpt tyyyy, const Cmpt tyyzz,
|
||||
const Cmpt tzzzz,
|
||||
const Cmpt txyxy,
|
||||
const Cmpt tyzyz,
|
||||
const Cmpt tzxzx
|
||||
const Cmpt tzxzx
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
|
|
|
@ -56,7 +56,7 @@ inline SymmTensor4thOrder<Cmpt>::SymmTensor4thOrder
|
|||
(
|
||||
const Cmpt txxxx, const Cmpt txxyy, const Cmpt txxzz,
|
||||
const Cmpt tyyyy, const Cmpt tyyzz,
|
||||
const Cmpt tzzzz,
|
||||
const Cmpt tzzzz,
|
||||
const Cmpt txyxy,
|
||||
const Cmpt tyzyz,
|
||||
const Cmpt tzxzx
|
||||
|
|
|
@ -302,20 +302,23 @@ inline SymmTensor4thOrder<Cmpt> transform
|
|||
template<class Cmpt>
|
||||
inline DiagTensor<Cmpt> transform
|
||||
(
|
||||
const tensor& tt,
|
||||
const DiagTensor<Cmpt>& st
|
||||
)
|
||||
const tensor& tt,
|
||||
const DiagTensor<Cmpt>& st
|
||||
)
|
||||
{
|
||||
notImplemented("transform.H\n"
|
||||
"template<>\n"
|
||||
"inline DiagTensor<Cmpt> transform\n"
|
||||
"(\n"
|
||||
"const tensor& tt,\n"
|
||||
"const DiagTensor<Cmpt>& st\n"
|
||||
")\n"
|
||||
"not implemented");
|
||||
notImplemented
|
||||
(
|
||||
"transform.H\n"
|
||||
"template<>\n"
|
||||
"inline DiagTensor<Cmpt> transform\n"
|
||||
"(\n"
|
||||
"const tensor& tt,\n"
|
||||
"const DiagTensor<Cmpt>& st\n"
|
||||
")\n"
|
||||
"not implemented"
|
||||
);
|
||||
|
||||
return st;
|
||||
return st;
|
||||
}
|
||||
|
||||
|
||||
|
@ -376,9 +379,9 @@ template<>
|
|||
inline symmTensor4thOrder transformMask<symmTensor4thOrder>(const tensor& t)
|
||||
{
|
||||
notImplemented("transform.H\n"
|
||||
"template<>\n"
|
||||
"inline symmTensor4thOrder transformMask<symmTensor4thOrder>(const tensor& t)\n"
|
||||
"not implemented");
|
||||
"template<>\n"
|
||||
"inline symmTensor4thOrder transformMask<symmTensor4thOrder>(const tensor& t)\n"
|
||||
"not implemented");
|
||||
|
||||
return symmTensor4thOrder::zero;
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ void immersedBoundaryOmegaWallFunctionFvPatchScalarField::updateCoeffs()
|
|||
{
|
||||
// Calculate tauW from log-law using k and U at sampling point
|
||||
|
||||
tauW = UtanOld[ibCellI]*Cmu25*sqrt(k[ibCellI])*kappa_
|
||||
tauW = UtanOld[ibCellI]*Cmu25*sqrt(k[ibCellI])*kappa_
|
||||
/log(E_*yPlusSample);
|
||||
}
|
||||
else
|
||||
|
@ -288,11 +288,11 @@ void immersedBoundaryOmegaWallFunctionFvPatchScalarField::updateCoeffs()
|
|||
sqr((nutw + nuLam)*magGradUw[ibCellI])/
|
||||
(Cmu25*sqrt(k[ibCellI])*kappa_*y[ibCellI]);
|
||||
|
||||
// Compute k at the IB cell
|
||||
// Compute k at the IB cell
|
||||
kNew[ibCellI] = tauW/Cmu50; // equilibrium boundary layer
|
||||
// kNew[ibCellI] = k[ibCellI]; // zero-Gradient (less stable)
|
||||
// kNew[ibCellI] = k[ibCellI]; // zero-Gradient (less stable)
|
||||
|
||||
// Compute omega at the IB cell
|
||||
// Compute omega at the IB cell
|
||||
omegaNew[ibCellI] = sqrt(kNew[ibCellI])/(Cmu25*kappa_*y[ibCellI]);
|
||||
|
||||
// Log-Law for tangential velocity - uTau = Cmu25*sqrt(kNew)
|
||||
|
@ -312,7 +312,7 @@ void immersedBoundaryOmegaWallFunctionFvPatchScalarField::updateCoeffs()
|
|||
// quadratic fit
|
||||
kNew[ibCellI] = k[ibCellI]*sqr(yPlusIB/yPlusLam);
|
||||
|
||||
// Compute omega at the IB cell
|
||||
// Compute omega at the IB cell
|
||||
omegaNew[ibCellI] = 6.0*nu[ibCellI]/(beta1_*sqr(y[ibCellI]));
|
||||
|
||||
// Laminar sub-layer for tangential velocity: uPlus = yPlus
|
||||
|
|
|
@ -549,7 +549,7 @@ public:
|
|||
template<> \
|
||||
const Foam::word KinematicParcel<Type>::typeName(#Type); \
|
||||
template<> \
|
||||
Foam::debug::debugSwitch \
|
||||
Foam::debug::debugSwitch \
|
||||
KinematicParcel<Type>::debug \
|
||||
( \
|
||||
std::string(#Type), DebugSwitch \
|
||||
|
|
|
@ -299,7 +299,7 @@ Foam::iterativePenaltyFriction::iterativePenaltyFriction
|
|||
|
||||
// traction to cause slipping
|
||||
//scalar slipTrac =
|
||||
//frictionLawPtr_->slipTraction(magSlavePressure[faceI]);
|
||||
// frictionLawPtr_->slipTraction(magSlavePressure[faceI]);
|
||||
vector& slaveTrac = slaveTraction_[faceI];
|
||||
|
||||
// if mag(slaveTrac) is greater than slipTrac and
|
||||
|
|
|
@ -18,51 +18,53 @@ internalField uniform 100;
|
|||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 500;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 100;
|
||||
}
|
||||
wallProlongation
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
wallDiffuser
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
statSwirlWallB_C
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rotSwirlWallA_BB
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
B_UPSTREAM
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
B_DOWNSTREAM
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
sideWallA_BB_cyclic1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
sideWallA_BB_cyclic2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
} // ************************************************************************* //
|
||||
}
|
||||
wallProlongation
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
wallDiffuser
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
statSwirlWallB_C
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rotSwirlWallA_BB
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
B_UPSTREAM
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
B_DOWNSTREAM
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
sideWallA_BB_cyclic1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
sideWallA_BB_cyclic2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
|
|
@ -383,9 +383,9 @@ boundary
|
|||
zone B_UPSTREAMZone;
|
||||
ribbonPatch
|
||||
{
|
||||
discretisation bothPatches;
|
||||
stackAxis R;
|
||||
sweepAxis Theta;
|
||||
discretisation bothPatches;
|
||||
stackAxis R;
|
||||
sweepAxis Theta;
|
||||
}
|
||||
|
||||
coordinateSystem
|
||||
|
|
|
@ -64,15 +64,15 @@ boundary
|
|||
|
||||
frontBack
|
||||
{
|
||||
type cyclic;
|
||||
faces
|
||||
(
|
||||
(0 6 7 1)
|
||||
(1 7 8 2)
|
||||
type cyclic;
|
||||
faces
|
||||
(
|
||||
(0 6 7 1)
|
||||
(1 7 8 2)
|
||||
|
||||
(9 3 4 10)
|
||||
(10 4 5 11)
|
||||
);
|
||||
(9 3 4 10)
|
||||
(10 4 5 11)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -64,9 +64,9 @@ boundary
|
|||
|
||||
flow
|
||||
{
|
||||
type cyclic;
|
||||
faces
|
||||
(
|
||||
type cyclic;
|
||||
faces
|
||||
(
|
||||
|
||||
(0 6 7 1)
|
||||
(1 7 8 2)
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii; ;
|
||||
class dictionary; ;
|
||||
object decomposeParDict; ;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method metis; //metis; //simple;
|
||||
method metis; //metis; //simple;
|
||||
|
||||
globalFaceZones
|
||||
(
|
||||
|
@ -38,6 +38,6 @@ simpleCoeffs
|
|||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
(
|
||||
);
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii; ;
|
||||
class dictionary; ;
|
||||
object decomposeParDict; ;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method manual; //metis; //simple;
|
||||
method manual; //metis; //simple;
|
||||
|
||||
globalFaceZones (
|
||||
ggi1DomAZone
|
||||
|
@ -35,6 +35,6 @@ simpleCoeffs
|
|||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
(
|
||||
);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ divSchemes
|
|||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linearUpwind Gauss; //upwind;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ laplacianSchemes
|
|||
laplacian((1|A(U)),p) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(1,p) Gauss linear corrected;
|
||||
laplacian(1,p) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
|
|
|
@ -16,21 +16,21 @@ FoamFile
|
|||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
application ;
|
||||
deltaT 1;
|
||||
endTime 50;
|
||||
graphFormat raw;
|
||||
purgeWrite 0;
|
||||
runTimeModifiable yes;
|
||||
startFrom startTime;
|
||||
startTime 0;
|
||||
stopAt endTime;
|
||||
timeFormat general;
|
||||
timePrecision 6;
|
||||
writeCompression uncompressed;
|
||||
writeControl timeStep;
|
||||
writeFormat ascii;
|
||||
writeInterval 20;
|
||||
writePrecision 6;
|
||||
application ;
|
||||
deltaT 1;
|
||||
endTime 50;
|
||||
graphFormat raw;
|
||||
purgeWrite 0;
|
||||
runTimeModifiable yes;
|
||||
startFrom startTime;
|
||||
startTime 0;
|
||||
stopAt endTime;
|
||||
timeFormat general;
|
||||
timePrecision 6;
|
||||
writeCompression uncompressed;
|
||||
writeControl timeStep;
|
||||
writeFormat ascii;
|
||||
writeInterval 20;
|
||||
writePrecision 6;
|
||||
|
||||
// ************************************************************************* //
|
|
@ -8,18 +8,18 @@
|
|||
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object meshDict;
|
||||
version 2;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object meshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
maxCellSize 0.01;
|
||||
maxCellSize 0.01;
|
||||
|
||||
surfaceFile "geom.fms";
|
||||
surfaceFile "geom.fms";
|
||||
|
||||
boundaryLayers
|
||||
{
|
||||
|
|
|
@ -48,8 +48,8 @@ boundaryLayers
|
|||
|
||||
renameBoundary
|
||||
{
|
||||
defaultName fixedWalls;
|
||||
defaultType wall;
|
||||
defaultName fixedWalls;
|
||||
defaultType wall;
|
||||
|
||||
newPatchNames
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ boundaryLayers
|
|||
allowDiscontinuity 0;
|
||||
}
|
||||
|
||||
"fixedWalls.*"
|
||||
"fixedWalls.*"
|
||||
{
|
||||
nLayers 4;
|
||||
|
||||
|
@ -75,7 +75,7 @@ boundaryLayers
|
|||
allowDiscontinuity 0;
|
||||
}
|
||||
|
||||
"tubes.*"
|
||||
"tubes.*"
|
||||
{
|
||||
nLayers 4;
|
||||
|
||||
|
@ -90,8 +90,8 @@ boundaryLayers
|
|||
|
||||
renameBoundary
|
||||
{
|
||||
defaultName fixedWalls;
|
||||
defaultType wall;
|
||||
defaultName fixedWalls;
|
||||
defaultType wall;
|
||||
|
||||
newPatchNames
|
||||
{
|
||||
|
|
|
@ -16,21 +16,21 @@ FoamFile
|
|||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
application ;
|
||||
deltaT 0.001;
|
||||
endTime 2;
|
||||
graphFormat raw;
|
||||
purgeWrite 0;
|
||||
runTimeModifiable yes;
|
||||
startFrom latestTime;
|
||||
startTime 0;
|
||||
stopAt endTime;
|
||||
timeFormat general;
|
||||
timePrecision 6;
|
||||
writeCompression compressed;
|
||||
writeControl timeStep;
|
||||
writeFormat binary;
|
||||
writeInterval 100;
|
||||
writePrecision 6;
|
||||
application ;
|
||||
deltaT 0.001;
|
||||
endTime 2;
|
||||
graphFormat raw;
|
||||
purgeWrite 0;
|
||||
runTimeModifiable yes;
|
||||
startFrom latestTime;
|
||||
startTime 0;
|
||||
stopAt endTime;
|
||||
timeFormat general;
|
||||
timePrecision 6;
|
||||
writeCompression compressed;
|
||||
writeControl timeStep;
|
||||
writeFormat binary;
|
||||
writeInterval 100;
|
||||
writePrecision 6;
|
||||
|
||||
// ************************************************************************* //
|
|
@ -17,21 +17,21 @@ FoamFile
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
maxCellSize 0.1;
|
||||
maxCellSize 0.1;
|
||||
|
||||
surfaceFile "sBend.fms";
|
||||
surfaceFile "sBend.fms";
|
||||
|
||||
boundaryLayers
|
||||
{
|
||||
nLayers 1;
|
||||
nLayers 1;
|
||||
|
||||
patchBoundaryLayers
|
||||
{
|
||||
|
||||
walls
|
||||
{
|
||||
nLayers 3;
|
||||
thicknessRatio 1.2;
|
||||
nLayers 3;
|
||||
thicknessRatio 1.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,12 +41,12 @@ localRefinement
|
|||
|
||||
refFine
|
||||
{
|
||||
cellSize 0.025;
|
||||
cellSize 0.025;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
cellSize 0.05;
|
||||
cellSize 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,36 +17,36 @@ FoamFile
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application ;
|
||||
application ;
|
||||
|
||||
deltaT 0.05;
|
||||
deltaT 0.05;
|
||||
|
||||
endTime 10;
|
||||
endTime 10;
|
||||
|
||||
graphFormat raw;
|
||||
graphFormat raw;
|
||||
|
||||
purgeWrite 0;
|
||||
purgeWrite 0;
|
||||
|
||||
runTimeModifiable yes;
|
||||
runTimeModifiable yes;
|
||||
|
||||
startFrom latestTime;
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
stopAt endTime;
|
||||
|
||||
timeFormat general;
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
timePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
writeCompression uncompressed;
|
||||
|
||||
writeControl timeStep;
|
||||
writeControl timeStep;
|
||||
|
||||
writeFormat ascii;
|
||||
writeFormat ascii;
|
||||
|
||||
writeInterval 20;
|
||||
writeInterval 20;
|
||||
|
||||
writePrecision 6;
|
||||
writePrecision 6;
|
||||
|
||||
// ************************************************************************* //
|
|
@ -54,7 +54,7 @@ boundaryLayers
|
|||
allowDiscontinuity 0;
|
||||
}
|
||||
|
||||
"fixedWalls.*"
|
||||
"fixedWalls.*"
|
||||
{
|
||||
nLayers 4;
|
||||
|
||||
|
@ -69,15 +69,15 @@ boundaryLayers
|
|||
|
||||
renameBoundary
|
||||
{
|
||||
defaultName fixedWalls;
|
||||
defaultType wall;
|
||||
defaultName fixedWalls;
|
||||
defaultType wall;
|
||||
|
||||
newPatchNames
|
||||
{
|
||||
"orificeRegion.*"
|
||||
{
|
||||
newName orificeRegion;
|
||||
newType wall;
|
||||
newName orificeRegion;
|
||||
newType wall;
|
||||
}
|
||||
|
||||
"inlet.*"
|
||||
|
|
|
@ -17,28 +17,28 @@ FoamFile
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
boundaryCellSize 1.5;
|
||||
keepCellsIntersectingBoundary 1;
|
||||
maxCellSize 3;
|
||||
minCellSize 0.375;
|
||||
removeGluedMesh 0;
|
||||
surfaceFile "socket.fms";
|
||||
boundaryCellSize 1.5;
|
||||
keepCellsIntersectingBoundary 1;
|
||||
maxCellSize 3;
|
||||
minCellSize 0.375;
|
||||
removeGluedMesh 0;
|
||||
surfaceFile "socket.fms";
|
||||
|
||||
boundaryLayers
|
||||
{
|
||||
maxFirstLayerThickness 0.5;
|
||||
nLayers 3;
|
||||
thicknessRatio 1.2;
|
||||
maxFirstLayerThickness 0.5;
|
||||
nLayers 3;
|
||||
thicknessRatio 1.2;
|
||||
|
||||
patchBoundaryLayers
|
||||
{
|
||||
|
||||
patch7
|
||||
{
|
||||
allowDiscontinuity 0;
|
||||
maxFirstLayerThickness 0.5;
|
||||
nLayers 4;
|
||||
thicknessRatio 1.1;
|
||||
allowDiscontinuity 0;
|
||||
maxFirstLayerThickness 0.5;
|
||||
nLayers 4;
|
||||
thicknessRatio 1.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,17 +48,17 @@ localRefinement
|
|||
|
||||
patch15
|
||||
{
|
||||
additionalRefinementLevels 1;
|
||||
additionalRefinementLevels 1;
|
||||
}
|
||||
|
||||
subset1
|
||||
{
|
||||
cellSize 1.5;
|
||||
cellSize 1.5;
|
||||
}
|
||||
|
||||
subset2
|
||||
{
|
||||
cellSize 1.5;
|
||||
cellSize 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,16 +24,16 @@ boundaryField
|
|||
bottomLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,16 +24,16 @@ boundaryField
|
|||
bottomLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 -1e-4 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 -1e-4 0) )
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 1e-4 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 1e-4 0) )
|
||||
)
|
|
@ -40,8 +40,8 @@ solidMechanics
|
|||
infoFrequency 100;
|
||||
aitkenRelaxation yes;
|
||||
crackLimitingBoxes 1(
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
crackPropagationFromSpecifiedPatches no;
|
||||
crackPropagationPatches 1(crack);
|
||||
dynamicTimeStep no;
|
||||
|
|
|
@ -24,7 +24,7 @@ regions
|
|||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
box (0 0 0) (1 1 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
@ -33,7 +33,7 @@ regions
|
|||
}
|
||||
boxToCell
|
||||
{
|
||||
box (0.03 -1 -1) (0.06 1 1);
|
||||
box (0.03 -1 -1) (0.06 1 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
|
|
@ -24,16 +24,16 @@ boundaryField
|
|||
bottomLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,16 +24,16 @@ boundaryField
|
|||
bottomLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 -1e-4 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 -1e-4 0) )
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 1e-4 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 1e-4 0) )
|
||||
)
|
|
@ -40,8 +40,8 @@ solidMechanics
|
|||
infoFrequency 100;
|
||||
aitkenRelaxation yes;
|
||||
crackLimitingBoxes 1(
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
crackPropagationFromSpecifiedPatches no;
|
||||
crackPropagationPatches 1(crack);
|
||||
dynamicTimeStep no;
|
||||
|
|
|
@ -24,7 +24,7 @@ regions
|
|||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
box (0 0 0) (1 1 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
@ -33,7 +33,7 @@ regions
|
|||
}
|
||||
boxToCell
|
||||
{
|
||||
box (0.03 -1 -1) (0.06 1 1);
|
||||
box (0.03 -1 -1) (0.06 1 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
|
|
@ -30,8 +30,8 @@ boundaryField
|
|||
top
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ boundaryField
|
|||
top
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 0 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (0 0 0) )
|
||||
)
|
|
@ -1,5 +1,5 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 10 (0 -1e-5 0) )
|
||||
( 100 (1e-4 -1e-5 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 10 (0 -1e-5 0) )
|
||||
( 100 (1e-4 -1e-5 0) )
|
||||
)
|
|
@ -40,8 +40,8 @@ solidMechanics
|
|||
infoFrequency 100;
|
||||
aitkenRelaxation yes;
|
||||
crackLimitingBoxes 1(
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
crackPropagationFromSpecifiedPatches no;
|
||||
crackPropagationPatches 1(crack);
|
||||
dynamicTimeStep no;
|
||||
|
|
|
@ -24,7 +24,7 @@ regions
|
|||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
box (0 0 0) (1 1 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
|
|
@ -24,16 +24,16 @@ boundaryField
|
|||
bottomLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,16 +24,16 @@ boundaryField
|
|||
bottomLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsBottomDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topLoading
|
||||
{
|
||||
type timeVaryingFixedDisplacement;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
fileName "$FOAM_CASE/constant/timeVsTopDisp";
|
||||
outOfBounds clamp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (-1e-4 -1e-4 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (-1e-4 -1e-4 0) )
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 100 (1e-4 1e-4 0) )
|
||||
( 0 (0 0 0) )
|
||||
( 100 (1e-4 1e-4 0) )
|
||||
)
|
|
@ -40,8 +40,8 @@ solidMechanics
|
|||
infoFrequency 100;
|
||||
aitkenRelaxation yes;
|
||||
crackLimitingBoxes 1(
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
(0 -1e-5 0)(0.06 1e-5 1)
|
||||
);
|
||||
crackPropagationFromSpecifiedPatches no;
|
||||
crackPropagationPatches 1(crack);
|
||||
dynamicTimeStep no;
|
||||
|
|
|
@ -25,7 +25,7 @@ regions
|
|||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
box (0 0 0) (1 1 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
@ -34,7 +34,7 @@ regions
|
|||
}
|
||||
boxToCell
|
||||
{
|
||||
box (0 -0.002 -1) (1 0.002 1);
|
||||
box (0 -0.002 -1) (1 0.002 1);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
|
|
|
@ -32,53 +32,54 @@ boundaryField
|
|||
bottomBrickUp
|
||||
{
|
||||
type solidContact;
|
||||
master yes;
|
||||
contactActive yes;
|
||||
rigidMaster no;
|
||||
shadowPatch topBrickDown;
|
||||
interpolationMethod ggi;
|
||||
//interpolationMethod patchToPatch;
|
||||
projectionAlgo visible;
|
||||
projectionDir contactSphere;
|
||||
correctionFrequency 10;
|
||||
normalContactModel standardPenalty;;
|
||||
standardPenaltyNormalModelDict
|
||||
{
|
||||
penaltyScale 1;
|
||||
relaxationFactor 0.01;
|
||||
infoFrequency 10;
|
||||
limitPenetration no;
|
||||
penetrationLimit -0.03;
|
||||
limitPressure no;
|
||||
pressureLimit 1e9;
|
||||
correctMissedVertices yes;
|
||||
distanceMethod point;
|
||||
oscillationCorrection yes;
|
||||
smoothingSteps 1;
|
||||
}
|
||||
frictionContactModel standardPenalty;
|
||||
standardPenaltyFrictionModelDict
|
||||
{
|
||||
penaltyScale 0.5;
|
||||
relaxationFactor 0.1;
|
||||
infoFrequency 10;
|
||||
oscillationCorrection yes;
|
||||
smoothingSteps 1;
|
||||
frictionLaw coulomb;
|
||||
frictionLawDict
|
||||
{
|
||||
frictionCoeff 0.3;
|
||||
}
|
||||
}
|
||||
value uniform (0 0 0);
|
||||
master yes;
|
||||
contactActive yes;
|
||||
rigidMaster no;
|
||||
shadowPatch topBrickDown;
|
||||
interpolationMethod ggi;
|
||||
//interpolationMethod patchToPatch;
|
||||
projectionAlgo visible;
|
||||
projectionDir contactSphere;
|
||||
correctionFrequency 10;
|
||||
normalContactModel standardPenalty;;
|
||||
standardPenaltyNormalModelDict
|
||||
{
|
||||
penaltyScale 1;
|
||||
relaxationFactor 0.01;
|
||||
infoFrequency 10;
|
||||
limitPenetration no;
|
||||
penetrationLimit -0.03;
|
||||
limitPressure no;
|
||||
pressureLimit 1e9;
|
||||
correctMissedVertices yes;
|
||||
distanceMethod point;
|
||||
oscillationCorrection yes;
|
||||
smoothingSteps 1;
|
||||
}
|
||||
frictionContactModel standardPenalty;
|
||||
standardPenaltyFrictionModelDict
|
||||
{
|
||||
penaltyScale 0.5;
|
||||
relaxationFactor 0.1;
|
||||
infoFrequency 10;
|
||||
oscillationCorrection yes;
|
||||
smoothingSteps 1;
|
||||
frictionLaw coulomb;
|
||||
frictionLawDict
|
||||
{
|
||||
frictionCoeff 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topBrickDown
|
||||
{
|
||||
type solidContact;
|
||||
master no;
|
||||
contactActive yes;
|
||||
shadowPatch bottomBrickUp;
|
||||
master no;
|
||||
contactActive yes;
|
||||
shadowPatch bottomBrickUp;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
@ -113,7 +114,7 @@ boundaryField
|
|||
topBrickRight
|
||||
{
|
||||
type solidTraction;
|
||||
traction uniform ( 0 0 0 );
|
||||
traction uniform ( 0 0 0 );
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
(0 (0 -1e-4 0))
|
||||
(100 (4e-2 -1e-4 0))
|
||||
(0 (0 -1e-4 0))
|
||||
(100 (4e-2 -1e-4 0))
|
||||
)
|
|
@ -22,42 +22,42 @@ internalField uniform (0 0 0);
|
|||
boundaryField
|
||||
{
|
||||
left
|
||||
{
|
||||
type fixedDisplacement;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
{
|
||||
type fixedDisplacement;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type solidTraction;
|
||||
nonLinear totalLagrangian;
|
||||
traction uniform (0 -1e8 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
{
|
||||
type solidTraction;
|
||||
nonLinear totalLagrangian;
|
||||
traction uniform (0 -1e8 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type solidTraction;
|
||||
nonLinear totalLagrangian;
|
||||
traction uniform (0 0 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
{
|
||||
type solidTraction;
|
||||
nonLinear totalLagrangian;
|
||||
traction uniform (0 0 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type solidTraction;
|
||||
nonLinear totalLagrangian;
|
||||
traction uniform (0 0 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
{
|
||||
type solidTraction;
|
||||
nonLinear totalLagrangian;
|
||||
traction uniform (0 0 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 64 (0 0.4 0))
|
||||
( 0 (0 0 0) )
|
||||
( 64 (0 0.4 0))
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 (0 0 0) )
|
||||
( 64 (0 0.4 0))
|
||||
( 0 (0 0 0) )
|
||||
( 64 (0 0.4 0))
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 0 )
|
||||
( 90 90 )
|
||||
( 0 0 )
|
||||
( 90 90 )
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
( 0 0 )
|
||||
( 90 90 )
|
||||
( 0 0 )
|
||||
( 90 90 )
|
||||
)
|
|
@ -18,14 +18,14 @@ FoamFile
|
|||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
// internalField uniform ( 0.7071 0.7071 0
|
||||
// -0.7071 0.7071 0
|
||||
// 0 0 1 );
|
||||
// -0.7071 0.7071 0
|
||||
// 0 0 1 );
|
||||
// internalField uniform ( 0 1 0
|
||||
// -1 0 0
|
||||
// 0 0 1 );
|
||||
// -1 0 0
|
||||
// 0 0 1 );
|
||||
internalField uniform ( 1 0 0
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(
|
||||
(0 0)
|
||||
(9.9 0)
|
||||
(9.99 1)
|
||||
(360 1)
|
||||
(0 0)
|
||||
(9.9 0)
|
||||
(9.99 1)
|
||||
(360 1)
|
||||
)
|
|
@ -18,8 +18,8 @@ FoamFile
|
|||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform ( 1 0 0
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
|
|
@ -18,8 +18,8 @@ FoamFile
|
|||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform ( 1 0 0
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
|
|
@ -18,23 +18,23 @@ convertToMeters 1;
|
|||
|
||||
vertices
|
||||
(
|
||||
(0 0 0) //0
|
||||
(1 0 0) //1
|
||||
(0 0.5 0) //2
|
||||
(1 0.5 0) //3
|
||||
(0 0.51 0) //4
|
||||
(1 0.51 0) //5
|
||||
(0 1 0) //6
|
||||
(1 1 0) //7
|
||||
(0 0 0) //0
|
||||
(1 0 0) //1
|
||||
(0 0.5 0) //2
|
||||
(1 0.5 0) //3
|
||||
(0 0.51 0) //4
|
||||
(1 0.51 0) //5
|
||||
(0 1 0) //6
|
||||
(1 1 0) //7
|
||||
|
||||
(0 0 0.1) //8
|
||||
(1 0 0.1) //9
|
||||
(0 0.5 0.1) //10
|
||||
(1 0.5 0.1) //11
|
||||
(0 0.51 0.1) //12
|
||||
(1 0.51 0.1) //13
|
||||
(0 1 0.1) //14
|
||||
(1 1 0.1) //15
|
||||
(0 0 0.1) //8
|
||||
(1 0 0.1) //9
|
||||
(0 0.5 0.1) //10
|
||||
(1 0.5 0.1) //11
|
||||
(0 0.51 0.1) //12
|
||||
(1 0.51 0.1) //13
|
||||
(0 1 0.1) //14
|
||||
(1 1 0.1) //15
|
||||
|
||||
);
|
||||
|
||||
|
@ -55,38 +55,38 @@ patches
|
|||
(
|
||||
( 0 1 3 2)
|
||||
( 2 3 5 4)
|
||||
( 4 5 7 6)
|
||||
( 4 5 7 6)
|
||||
)
|
||||
|
||||
empty back
|
||||
(
|
||||
( 8 9 11 10)
|
||||
(10 11 13 12)
|
||||
(12 13 15 14)
|
||||
(12 13 15 14)
|
||||
)
|
||||
|
||||
patch left
|
||||
(
|
||||
( 0 2 10 8)
|
||||
( 2 4 12 10)
|
||||
( 4 6 14 12)
|
||||
( 2 4 12 10)
|
||||
( 4 6 14 12)
|
||||
)
|
||||
|
||||
patch bottom
|
||||
(
|
||||
( 0 1 9 8)
|
||||
( 0 1 9 8)
|
||||
)
|
||||
|
||||
patch right
|
||||
(
|
||||
( 1 3 11 9)
|
||||
( 3 5 13 11)
|
||||
( 5 7 15 13)
|
||||
( 1 3 11 9)
|
||||
( 3 5 13 11)
|
||||
( 5 7 15 13)
|
||||
)
|
||||
|
||||
patch top
|
||||
(
|
||||
( 6 7 15 14)
|
||||
( 6 7 15 14)
|
||||
)
|
||||
|
||||
);
|
||||
|
|
|
@ -33,18 +33,18 @@ rheology
|
|||
|
||||
composite
|
||||
{
|
||||
type orthotropicLinearElastic;
|
||||
rho rho [1 -3 0 0 0 0 0] 7854;
|
||||
Ex Ex [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ey Ey [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ez Ez [1 -1 -2 0 0 0 0] 200e+9;
|
||||
nuxy nuxy [0 0 0 0 0 0 0] 0.3;
|
||||
nuyz nuyz [0 0 0 0 0 0 0] 0.3;
|
||||
nuzx nuzx [0 0 0 0 0 0 0] 0.3;
|
||||
Gxy Gxy [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gyz Gyz [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gzx Gzx [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
}
|
||||
type orthotropicLinearElastic;
|
||||
rho rho [1 -3 0 0 0 0 0] 7854;
|
||||
Ex Ex [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ey Ey [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ez Ez [1 -1 -2 0 0 0 0] 200e+9;
|
||||
nuxy nuxy [0 0 0 0 0 0 0] 0.3;
|
||||
nuyz nuyz [0 0 0 0 0 0 0] 0.3;
|
||||
nuzx nuzx [0 0 0 0 0 0 0] 0.3;
|
||||
Gxy Gxy [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gyz Gyz [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gzx Gzx [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
(0 (0 0 0))
|
||||
(10 (0 0.01 0))
|
||||
(0 (0 0 0))
|
||||
(10 (0 0.01 0))
|
||||
)
|
|
@ -18,8 +18,8 @@ FoamFile
|
|||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform ( 1 0 0
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
|
|
@ -18,8 +18,8 @@ FoamFile
|
|||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform ( 1 0 0
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
0 1 0
|
||||
0 0 1 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
|
|
@ -33,18 +33,18 @@ rheology
|
|||
|
||||
composite
|
||||
{
|
||||
type orthotropicLinearElastic;
|
||||
rho rho [1 -3 0 0 0 0 0] 7854;
|
||||
Ex Ex [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ey Ey [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ez Ez [1 -1 -2 0 0 0 0] 200e+9;
|
||||
nuxy nuxy [0 0 0 0 0 0 0] 0.3;
|
||||
nuyz nuyz [0 0 0 0 0 0 0] 0.3;
|
||||
nuzx nuzx [0 0 0 0 0 0 0] 0.3;
|
||||
Gxy Gxy [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gyz Gyz [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gzx Gzx [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
}
|
||||
type orthotropicLinearElastic;
|
||||
rho rho [1 -3 0 0 0 0 0] 7854;
|
||||
Ex Ex [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ey Ey [1 -1 -2 0 0 0 0] 200e+9;
|
||||
Ez Ez [1 -1 -2 0 0 0 0] 200e+9;
|
||||
nuxy nuxy [0 0 0 0 0 0 0] 0.3;
|
||||
nuyz nuyz [0 0 0 0 0 0 0] 0.3;
|
||||
nuzx nuzx [0 0 0 0 0 0 0] 0.3;
|
||||
Gxy Gxy [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gyz Gyz [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
Gzx Gzx [1 -1 -2 0 0 0 0] 76.923076923e9;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(
|
||||
(0 (0 0 0))
|
||||
(10 (0 0.01 0))
|
||||
(0 (0 0 0))
|
||||
(10 (0 0.01 0))
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue