mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
OpenFOAM-v1612+
|
OpenFOAM-1706
|
||||||
==================
|
==================
|
||||||
Known Build Issues
|
Known Build Issues
|
||||||
==================
|
==================
|
||||||
@ -22,16 +22,15 @@ VTK
|
|||||||
---
|
---
|
||||||
|
|
||||||
If using the runTimePostProcessing to create on-the-fly images, you
|
If using the runTimePostProcessing to create on-the-fly images, you
|
||||||
can simply just compile ParaView-5.0.1 and these libraries will
|
can simply just compile ParaView and these libraries will be used.
|
||||||
be used.
|
|
||||||
|
|
||||||
If you elect to use a separate VTK compilation (for example for
|
If you elect to use a separate VTK compilation (for example for
|
||||||
off-screen rendering), it is advisable to reuse the VTK libraries that
|
off-screen rendering), it is advisable to reuse the VTK libraries that
|
||||||
are provided with ParaView-5.0.1, by making an appropriate symlink
|
are provided with ParaView by making an appropriate symlink
|
||||||
prior to using makeVTK. This doesn't just reduce disk-space, but works
|
prior to using makeVTK. This doesn't just reduce disk-space, but works
|
||||||
much better than using the VTK-7.1.0.tar file.
|
much better than using the VTK tar file.
|
||||||
|
|
||||||
Using runTimePostProcessing with the 'plain' VTK-7.1.0 libraries does
|
Using runTimePostProcessing with the 'plain' VTK libraries does
|
||||||
generally work, but does not exit cleanly:
|
generally work, but does not exit cleanly:
|
||||||
|
|
||||||
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1:
|
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1:
|
||||||
@ -60,4 +59,21 @@ there are also minimum gcc/g++ requirements there:
|
|||||||
If your system compiler is too old to build the minimum required gcc or
|
If your system compiler is too old to build the minimum required gcc or
|
||||||
clang/llvm, it is just simply too old.
|
clang/llvm, it is just simply too old.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
Building with spack
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
If you are building with spack, note that the depends_on for paraview
|
||||||
|
resolves poorly. The +qt dependency (for building the reader module)
|
||||||
|
may need to be specified as a preference by including the following in
|
||||||
|
your `~/.spack/packages.yaml` file:
|
||||||
|
|
||||||
|
packages:
|
||||||
|
paraview:
|
||||||
|
variants: +qt
|
||||||
|
|
||||||
|
It appears that spack will otherwise ignore any paraview+qt version
|
||||||
|
and attempt to install a paraview~qt version instead.
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@ -110,6 +110,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mixture.correct();
|
mixture.correct();
|
||||||
|
|
||||||
|
if (pimple.frozenFlow())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
|
|||||||
@ -1,10 +1,2 @@
|
|||||||
// Defining isoAdvection
|
// Defining isoAdvection
|
||||||
isoAdvection advector(alpha1, phi, U);
|
isoAdvection advector(alpha1, phi, U);
|
||||||
|
|
||||||
bool frozenFlow = pimple.dict().lookupOrDefault<bool>("frozenFlow", false);
|
|
||||||
if (frozenFlow)
|
|
||||||
{
|
|
||||||
Info<< "Employing frozen-flow assumption: "
|
|
||||||
<< "pressure-velocity system will not be updated"
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mixture.correct();
|
mixture.correct();
|
||||||
|
|
||||||
if (frozenFlow)
|
if (pimple.frozenFlow())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev-OpenCFD.overlap |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.5 |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -651,7 +651,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
// corrector for mesh motion
|
// corrector for mesh motion
|
||||||
twoDPointCorrector* correct2DPtr = NULL;
|
twoDPointCorrector* correct2DPtr = nullptr;
|
||||||
|
|
||||||
if (motionObj.typeHeaderOk<IOdictionary>(true))
|
if (motionObj.typeHeaderOk<IOdictionary>(true))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,7 +28,7 @@ int USERD_set_filenames
|
|||||||
// remove the last '/' from rootDir
|
// remove the last '/' from rootDir
|
||||||
if (the_path[lRoot-1] == '/')
|
if (the_path[lRoot-1] == '/')
|
||||||
{
|
{
|
||||||
the_path[lRoot-1] = char(NULL);
|
the_path[lRoot-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -97,6 +97,7 @@ done
|
|||||||
cat << HEADER > $outFile
|
cat << HEADER > $outFile
|
||||||
#----------------------------------*-sh-*--------------------------------------
|
#----------------------------------*-sh-*--------------------------------------
|
||||||
# Bash completions for OpenFOAM applications
|
# Bash completions for OpenFOAM applications
|
||||||
|
# Formatted as "complete ... -F _of_APPNAME APPNAME
|
||||||
|
|
||||||
unset -f _of_filter_opts 2>/dev/null
|
unset -f _of_filter_opts 2>/dev/null
|
||||||
_of_filter_opts()
|
_of_filter_opts()
|
||||||
|
|||||||
@ -62,6 +62,14 @@ die()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Automatically upgrade copyrights in files.
|
||||||
|
# Disabled by default since some changes (eg, spelling) do not automatically
|
||||||
|
# imply an update copyright.
|
||||||
|
optCopyright=false
|
||||||
|
|
||||||
|
# Run all tests (do not exit on first failure)
|
||||||
|
optAll=false
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Check content that will be added by this commit.
|
# Check content that will be added by this commit.
|
||||||
|
|
||||||
@ -76,11 +84,27 @@ fi
|
|||||||
# called manually with arguments for the files/directories to be tested?
|
# called manually with arguments for the files/directories to be tested?
|
||||||
if [ "$#" -gt 0 ]
|
if [ "$#" -gt 0 ]
|
||||||
then
|
then
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
-h | -help)
|
||||||
die "interactive usage: supply list of files/directories to check"
|
die "interactive usage: supply list of files/directories to check"
|
||||||
;;
|
;;
|
||||||
|
-copy)
|
||||||
|
echo "$hookName: adjust copyright enabled" 1>&2
|
||||||
|
optCopyright=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-all)
|
||||||
|
echo "$hookName: do all tests (no premature exit)" 1>&2
|
||||||
|
optAll=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# obtain list of all specified files/directories
|
# obtain list of all specified files/directories
|
||||||
fileList=$(git ls-files -- $@ 2>/dev/null)
|
fileList=$(git ls-files -- $@ 2>/dev/null)
|
||||||
@ -100,6 +124,8 @@ unset badFiles
|
|||||||
# join list of files with this amount of space
|
# join list of files with this amount of space
|
||||||
Indent=" "
|
Indent=" "
|
||||||
|
|
||||||
|
exitCode=0
|
||||||
|
|
||||||
#
|
#
|
||||||
# report bad files and die if there are any
|
# report bad files and die if there are any
|
||||||
#
|
#
|
||||||
@ -114,7 +140,14 @@ dieOnBadFiles()
|
|||||||
echo "File(s):" 1>&2
|
echo "File(s):" 1>&2
|
||||||
echo "$badFiles" 1>&2
|
echo "$badFiles" 1>&2
|
||||||
echo '' 1>&2
|
echo '' 1>&2
|
||||||
exit 1
|
|
||||||
|
exitCode=1
|
||||||
|
if [ "$optAll" = true ]
|
||||||
|
then
|
||||||
|
return 0 # Continue to the next test
|
||||||
|
else
|
||||||
|
exit $exitCode
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +347,7 @@ MESSAGE
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# check that OpenFOAM Foundation copyright is current
|
# check that copyright date is current
|
||||||
#
|
#
|
||||||
checkCopyright()
|
checkCopyright()
|
||||||
{
|
{
|
||||||
@ -327,9 +360,9 @@ checkCopyright()
|
|||||||
startYear=`grep "Copyright.*OpenCFD" $f | sed 's/[^0-9]*\([0-9]*\).*/\1/g'`
|
startYear=`grep "Copyright.*OpenCFD" $f | sed 's/[^0-9]*\([0-9]*\).*/\1/g'`
|
||||||
endYear=`grep "Copyright.*-.*OpenCFD" $f | sed 's/[^-]*-\([0-9]*\).*/\1/g'`
|
endYear=`grep "Copyright.*-.*OpenCFD" $f | sed 's/[^-]*-\([0-9]*\).*/\1/g'`
|
||||||
#echo "startYear=$startYear endYear=$endYear"
|
#echo "startYear=$startYear endYear=$endYear"
|
||||||
if [ "$startYear" != "" ]
|
if [ -n "$startYear" ]
|
||||||
then
|
then
|
||||||
if [ "$endYear" != "" ]
|
if [ -n "$endYear" ]
|
||||||
then
|
then
|
||||||
# Date is of type 2011-2012 OpenCFD Ltd.
|
# Date is of type 2011-2012 OpenCFD Ltd.
|
||||||
if [ "$year" != "$endYear" ]
|
if [ "$year" != "$endYear" ]
|
||||||
@ -371,7 +404,11 @@ checkLineLengthNonDirective
|
|||||||
# check for non-standard code patterns
|
# check for non-standard code patterns
|
||||||
checkNonStandardCodePatterns
|
checkNonStandardCodePatterns
|
||||||
|
|
||||||
checkCopyright
|
# Stop now if there were any errors
|
||||||
|
[ "$exitCode" = 0 ] || exit $exitCode
|
||||||
|
|
||||||
|
# check copyright date (normally disabled)
|
||||||
|
[ "$optCopyright" = true ] && checkCopyright
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -66,3 +66,23 @@
|
|||||||
content: "C++ Source Code Guide";
|
content: "C++ Source Code Guide";
|
||||||
font-size: 180%;
|
font-size: 180%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.OFTable {
|
||||||
|
width: 100%;
|
||||||
|
border: 0px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background-color: rgb(245,245,245);
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.OFTable th {
|
||||||
|
text-align: left;
|
||||||
|
padding: 5px;
|
||||||
|
border-bottom: 2px solid rgb(175,175,175);
|
||||||
|
}
|
||||||
|
|
||||||
|
.OFTable td {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#----------------------------------*-sh-*--------------------------------------
|
#----------------------------------*-sh-*--------------------------------------
|
||||||
# Bash completions for OpenFOAM applications
|
# Bash completions for OpenFOAM applications
|
||||||
|
# Formatted as "complete ... -F _of_APPNAME APPNAME
|
||||||
|
|
||||||
unset -f _of_filter_opts 2>/dev/null
|
unset -f _of_filter_opts 2>/dev/null
|
||||||
_of_filter_opts()
|
_of_filter_opts()
|
||||||
|
|||||||
@ -181,6 +181,17 @@ unset -f wmRefresh 2>/dev/null
|
|||||||
unset -f foamVersion 2>/dev/null
|
unset -f foamVersion 2>/dev/null
|
||||||
unset -f foamPV 2>/dev/null
|
unset -f foamPV 2>/dev/null
|
||||||
|
|
||||||
|
# Cleanup bash completions, which look like this:
|
||||||
|
# "complete ... -F _of_APPNAME APPNAME
|
||||||
|
# For economy, obtain list first but also add in 'filter_opts' helper
|
||||||
|
foamClean="$(complete 2>/dev/null | sed -n -e 's/complete.*-F _of_.* \(..*\)$/\1/p')"
|
||||||
|
for cleaned in $foamClean filter_opts
|
||||||
|
do
|
||||||
|
unset -f _of_$cleaned 2>/dev/null
|
||||||
|
complete -r $cleaned 2>/dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Intermediate variables (do as last for a clean exit code)
|
# Intermediate variables (do as last for a clean exit code)
|
||||||
|
|
||||||
|
|||||||
@ -1284,7 +1284,7 @@ int Foam::system(const Foam::UList<Foam::string>& command)
|
|||||||
{
|
{
|
||||||
// in child:
|
// in child:
|
||||||
// Need command and arguments separately.
|
// Need command and arguments separately.
|
||||||
// args is a NULL-terminated list of c-strings
|
// args is a nullptr-terminated list of c-strings
|
||||||
|
|
||||||
CStringList args(SubList<string>(command, 0));
|
CStringList args(SubList<string>(command, 0));
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
|
|||||||
@ -97,10 +97,11 @@ inline uint64_t Foam::endian::swap64(uint64_t u)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// alternative formulation
|
// alternative formulation
|
||||||
//
|
/*
|
||||||
// u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull);
|
u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull);
|
||||||
// u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull);
|
u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull);
|
||||||
// return (u >> 32) | (u << 32);
|
return (u >> 32) | (u << 32);
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,14 @@ namespace Foam
|
|||||||
bool Foam::functionObject::postProcess(false);
|
bool Foam::functionObject::postProcess(false);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::word Foam::functionObject::scopedName(const word& name) const
|
||||||
|
{
|
||||||
|
return name_ + ":" + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::functionObject::functionObject(const word& name)
|
Foam::functionObject::functionObject(const word& name)
|
||||||
|
|||||||
@ -154,6 +154,14 @@ class functionObject
|
|||||||
void operator=(const functionObject&) = delete;
|
void operator=(const functionObject&) = delete;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected Member Functions
|
||||||
|
|
||||||
|
//- Return a scoped name, e.g. used to construct local field names
|
||||||
|
word scopedName(const word& name) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
|
|||||||
@ -158,7 +158,7 @@ Foam::functionObjects::regionFunctionObject::~regionFunctionObject()
|
|||||||
|
|
||||||
bool Foam::functionObjects::regionFunctionObject::read(const dictionary& dict)
|
bool Foam::functionObjects::regionFunctionObject::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
return functionObject::read(dict);
|
return stateFunctionObject::read(dict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -248,7 +248,7 @@ bool Foam::timeControl::execute()
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Undefined output control: "
|
<< "Undefined time control: "
|
||||||
<< timeControlNames_[timeControl_] << nl
|
<< timeControlNames_[timeControl_] << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class CStringList
|
|||||||
// Does not include the final nul-character
|
// Does not include the final nul-character
|
||||||
size_t len_;
|
size_t len_;
|
||||||
|
|
||||||
//- List of strings, including trailing NULL pointer
|
//- List of strings, including trailing nullptr
|
||||||
char** argv_;
|
char** argv_;
|
||||||
|
|
||||||
//- Flattened content with interspersed nul-characters
|
//- Flattened content with interspersed nul-characters
|
||||||
@ -109,8 +109,8 @@ public:
|
|||||||
|
|
||||||
// Public Members
|
// Public Members
|
||||||
|
|
||||||
//- Count the number of parameters until the first NULL pointer.
|
//- Count the number of parameters until the first nullptr
|
||||||
// Return 0 if argv is NULL.
|
// Return 0 if argv is nullptr.
|
||||||
static inline int count(const char * const argv[]);
|
static inline int count(const char * const argv[]);
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ public:
|
|||||||
inline int size() const;
|
inline int size() const;
|
||||||
|
|
||||||
//- Return the list of C-strings (ie, argv)
|
//- Return the list of C-strings (ie, argv)
|
||||||
// The position at argc is a NULL pointer
|
// The position at argc is a nullptr
|
||||||
inline char** strings() const;
|
inline char** strings() const;
|
||||||
|
|
||||||
|
|
||||||
@ -148,8 +148,8 @@ public:
|
|||||||
template<class StringType>
|
template<class StringType>
|
||||||
static List<StringType> asList(int argc, const char * const argv[]);
|
static List<StringType> asList(int argc, const char * const argv[]);
|
||||||
|
|
||||||
//- Create a list from a NULL-terminated list of argv parameters.
|
//- Create a list from a nullptr-terminated list of argv parameters.
|
||||||
// A null pointer for argv is permissible.
|
// Using a nullptr for argv is permissible.
|
||||||
template<class StringType>
|
template<class StringType>
|
||||||
static inline List<StringType> asList(const char * const argv[]);
|
static inline List<StringType> asList(const char * const argv[]);
|
||||||
|
|
||||||
|
|||||||
@ -85,10 +85,10 @@ bool Foam::ccm::base::close()
|
|||||||
{
|
{
|
||||||
if (CCMIOIsValidEntity(globalState_->root))
|
if (CCMIOIsValidEntity(globalState_->root))
|
||||||
{
|
{
|
||||||
CCMIOCloseFile(NULL, globalState_->root);
|
CCMIOCloseFile(nullptr, globalState_->root);
|
||||||
}
|
}
|
||||||
delete globalState_;
|
delete globalState_;
|
||||||
globalState_ = 0;
|
globalState_ = nullptr;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,7 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldSetNode,
|
fieldSetNode,
|
||||||
kCCMIOFieldPhase,
|
kCCMIOFieldPhase,
|
||||||
&phaseI,
|
&phaseI,
|
||||||
@ -74,7 +74,7 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
phaseNode,
|
phaseNode,
|
||||||
kCCMIOField,
|
kCCMIOField,
|
||||||
&fieldI,
|
&fieldI,
|
||||||
@ -84,12 +84,12 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
|
|
||||||
&& CCMIOReadField
|
&& CCMIOReadField
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldNode,
|
fieldNode,
|
||||||
fullName,
|
fullName,
|
||||||
shortName,
|
shortName,
|
||||||
&dims,
|
&dims,
|
||||||
NULL
|
nullptr
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
@ -139,7 +139,7 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldNode,
|
fieldNode,
|
||||||
kCCMIOFieldData,
|
kCCMIOFieldData,
|
||||||
&dataI,
|
&dataI,
|
||||||
@ -149,20 +149,20 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
|
|
||||||
&& CCMIOEntitySize
|
&& CCMIOEntitySize
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
NULL,
|
nullptr,
|
||||||
&maxId
|
&maxId
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
|
|
||||||
&& CCMIOReadFieldDatad
|
&& CCMIOReadFieldDatad
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
NULL,
|
nullptr,
|
||||||
&dataLocation,
|
&dataLocation,
|
||||||
NULL,
|
nullptr,
|
||||||
kCCMIOStart,
|
kCCMIOStart,
|
||||||
kCCMIOEnd
|
kCCMIOEnd
|
||||||
)
|
)
|
||||||
@ -212,7 +212,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
(globalState_->root),
|
(globalState_->root),
|
||||||
kCCMIOState,
|
kCCMIOState,
|
||||||
&stateI,
|
&stateI,
|
||||||
@ -230,7 +230,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
stateNode,
|
stateNode,
|
||||||
kCCMIOProcessor,
|
kCCMIOProcessor,
|
||||||
&procI,
|
&procI,
|
||||||
@ -240,11 +240,11 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOReadProcessor
|
&& CCMIOReadProcessor
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
processorNode,
|
processorNode,
|
||||||
NULL, // Ignore verticesNode
|
nullptr, // Ignore verticesNode
|
||||||
NULL, // Ignore topologyNode
|
nullptr, // Ignore topologyNode
|
||||||
NULL, // Ignore initialField
|
nullptr, // Ignore initialField
|
||||||
&solutionNode
|
&solutionNode
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
@ -263,7 +263,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
solutionNode,
|
solutionNode,
|
||||||
kCCMIORestart,
|
kCCMIORestart,
|
||||||
&restartI,
|
&restartI,
|
||||||
@ -273,7 +273,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOEntityName
|
&& CCMIOEntityName
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
stateNode,
|
stateNode,
|
||||||
solutionName
|
solutionName
|
||||||
)
|
)
|
||||||
@ -281,13 +281,13 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOReadRestartInfo
|
&& CCMIOReadRestartInfo
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
restartNode,
|
restartNode,
|
||||||
NULL, // Ignore solverName
|
nullptr, // Ignore solverName
|
||||||
&iteration,
|
&iteration,
|
||||||
&timeValue,
|
&timeValue,
|
||||||
NULL, // Ignore timeUnits
|
nullptr, // Ignore timeUnits
|
||||||
NULL // Ignore startAngle
|
nullptr // Ignore startAngle
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
@ -310,7 +310,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
processorNode,
|
processorNode,
|
||||||
kCCMIOLagrangianData,
|
kCCMIOLagrangianData,
|
||||||
&lagrangianI,
|
&lagrangianI,
|
||||||
@ -320,9 +320,9 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOReadLagrangianData
|
&& CCMIOReadLagrangianData
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
lagrangianNode,
|
lagrangianNode,
|
||||||
NULL,
|
nullptr,
|
||||||
&lagrangianSolutions
|
&lagrangianSolutions
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
@ -366,10 +366,10 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOGetState
|
CCMIOGetState
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
(globalState_->root),
|
(globalState_->root),
|
||||||
solutionName.c_str(),
|
solutionName.c_str(),
|
||||||
NULL,
|
nullptr,
|
||||||
&stateNode
|
&stateNode
|
||||||
)
|
)
|
||||||
!= kCCMIONoErr
|
!= kCCMIONoErr
|
||||||
@ -420,7 +420,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
stateNode,
|
stateNode,
|
||||||
kCCMIOProcessor,
|
kCCMIOProcessor,
|
||||||
&procI,
|
&procI,
|
||||||
@ -430,11 +430,11 @@ Foam::ccm::reader::readField
|
|||||||
|
|
||||||
&& CCMIOReadProcessor
|
&& CCMIOReadProcessor
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
processorNode,
|
processorNode,
|
||||||
NULL, // Ignore verticesNode
|
nullptr, // Ignore verticesNode
|
||||||
NULL, // Ignore topologyNode
|
nullptr, // Ignore topologyNode
|
||||||
NULL, // Ignore initialField
|
nullptr, // Ignore initialField
|
||||||
&solutionNode
|
&solutionNode
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
@ -448,7 +448,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
solutionNode,
|
solutionNode,
|
||||||
kCCMIOFieldPhase,
|
kCCMIOFieldPhase,
|
||||||
&phaseI,
|
&phaseI,
|
||||||
@ -465,7 +465,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
phaseNode,
|
phaseNode,
|
||||||
kCCMIOField,
|
kCCMIOField,
|
||||||
&fieldI,
|
&fieldI,
|
||||||
@ -480,10 +480,10 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
&(globalState_->error),
|
&(globalState_->error),
|
||||||
fieldNode,
|
fieldNode,
|
||||||
NULL,
|
nullptr,
|
||||||
shortName,
|
shortName,
|
||||||
&dims,
|
&dims,
|
||||||
NULL
|
nullptr
|
||||||
);
|
);
|
||||||
assertNoError
|
assertNoError
|
||||||
(
|
(
|
||||||
@ -501,7 +501,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldNode,
|
fieldNode,
|
||||||
kCCMIOFieldData,
|
kCCMIOFieldData,
|
||||||
&dataI,
|
&dataI,
|
||||||
@ -518,20 +518,20 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOEntitySize
|
CCMIOEntitySize
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&n,
|
&n,
|
||||||
NULL
|
nullptr
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
|
|
||||||
&& CCMIOReadFieldDatad
|
&& CCMIOReadFieldDatad
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&mapId,
|
&mapId,
|
||||||
&dataLocation,
|
&dataLocation,
|
||||||
NULL,
|
nullptr,
|
||||||
kCCMIOStart,
|
kCCMIOStart,
|
||||||
kCCMIOEnd
|
kCCMIOEnd
|
||||||
)
|
)
|
||||||
@ -549,10 +549,10 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOEntityDescription
|
CCMIOEntityDescription
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&len,
|
&len,
|
||||||
NULL
|
nullptr
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
@ -563,7 +563,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOEntityDescription
|
CCMIOEntityDescription
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&len,
|
&len,
|
||||||
dataLabel
|
dataLabel
|
||||||
@ -577,7 +577,7 @@ Foam::ccm::reader::readField
|
|||||||
strstr(fieldName.c_str(), "SIG")
|
strstr(fieldName.c_str(), "SIG")
|
||||||
|| strstr(fieldName.c_str(), "EPS")
|
|| strstr(fieldName.c_str(), "EPS")
|
||||||
)
|
)
|
||||||
&& strstr(dataLabel, "So") == NULL
|
&& strstr(dataLabel, "So") == nullptr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
okayCombination = false;
|
okayCombination = false;
|
||||||
@ -607,8 +607,8 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
&(globalState_->error),
|
&(globalState_->error),
|
||||||
dataNode,
|
dataNode,
|
||||||
NULL,
|
nullptr,
|
||||||
NULL,
|
nullptr,
|
||||||
rawData.begin(),
|
rawData.begin(),
|
||||||
kCCMIOStart,
|
kCCMIOStart,
|
||||||
kCCMIOEnd
|
kCCMIOEnd
|
||||||
|
|||||||
@ -46,6 +46,7 @@ void Foam::solutionControl::read(const bool absTolOnly)
|
|||||||
solutionDict.lookupOrDefault("momentumPredictor", true);
|
solutionDict.lookupOrDefault("momentumPredictor", true);
|
||||||
transonic_ = solutionDict.lookupOrDefault("transonic", false);
|
transonic_ = solutionDict.lookupOrDefault("transonic", false);
|
||||||
consistent_ = solutionDict.lookupOrDefault("consistent", false);
|
consistent_ = solutionDict.lookupOrDefault("consistent", false);
|
||||||
|
frozenFlow_ = solutionDict.lookupOrDefault("frozenFlow", false);
|
||||||
|
|
||||||
// Read residual information
|
// Read residual information
|
||||||
const dictionary residualDict
|
const dictionary residualDict
|
||||||
@ -228,6 +229,7 @@ Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName)
|
|||||||
momentumPredictor_(true),
|
momentumPredictor_(true),
|
||||||
transonic_(false),
|
transonic_(false),
|
||||||
consistent_(false),
|
consistent_(false),
|
||||||
|
frozenFlow_(false),
|
||||||
corr_(0),
|
corr_(0),
|
||||||
corrNonOrtho_(0)
|
corrNonOrtho_(0)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -87,6 +87,10 @@ protected:
|
|||||||
// "consistent" approach of SIMPLEC
|
// "consistent" approach of SIMPLEC
|
||||||
bool consistent_;
|
bool consistent_;
|
||||||
|
|
||||||
|
//- Flag to indicate that the flow system of equations should not
|
||||||
|
// be evolved
|
||||||
|
bool frozenFlow_;
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
@ -199,6 +203,10 @@ public:
|
|||||||
// "consistent" approach of SIMPLEC
|
// "consistent" approach of SIMPLEC
|
||||||
inline bool consistent() const;
|
inline bool consistent() const;
|
||||||
|
|
||||||
|
//- Flag to indicate that the flow system of equations should not
|
||||||
|
// be evolved
|
||||||
|
inline bool frozenFlow() const;
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,12 @@ inline bool Foam::solutionControl::consistent() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Foam::solutionControl::frozenFlow() const
|
||||||
|
{
|
||||||
|
return frozenFlow_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::solutionControl::correctNonOrthogonal()
|
inline bool Foam::solutionControl::correctNonOrthogonal()
|
||||||
{
|
{
|
||||||
corrNonOrtho_++;
|
corrNonOrtho_++;
|
||||||
|
|||||||
@ -592,7 +592,7 @@ Foam::vector Foam::turbulentDFSEMInletFvPatchVectorField::uDashEddy
|
|||||||
|
|
||||||
void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
|
void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
|
||||||
(
|
(
|
||||||
List<List<eddy> >& overlappingEddies
|
List<List<eddy>>& overlappingEddies
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
int oldTag = UPstream::msgType();
|
int oldTag = UPstream::msgType();
|
||||||
@ -604,7 +604,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
|
|||||||
Pstream::scatterList(patchBBs);
|
Pstream::scatterList(patchBBs);
|
||||||
|
|
||||||
// Per processor indices into all segments to send
|
// Per processor indices into all segments to send
|
||||||
List<DynamicList<label> > dynSendMap(Pstream::nProcs());
|
List<DynamicList<label>> dynSendMap(Pstream::nProcs());
|
||||||
|
|
||||||
forAll(eddies_, i)
|
forAll(eddies_, i)
|
||||||
{
|
{
|
||||||
@ -1050,7 +1050,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add contributions from overlapping eddies
|
// Add contributions from overlapping eddies
|
||||||
List<List<eddy> > overlappingEddies(Pstream::nProcs());
|
List<List<eddy>> overlappingEddies(Pstream::nProcs());
|
||||||
calcOverlappingProcEddies(overlappingEddies);
|
calcOverlappingProcEddies(overlappingEddies);
|
||||||
|
|
||||||
forAll(overlappingEddies, procI)
|
forAll(overlappingEddies, procI)
|
||||||
|
|||||||
@ -231,7 +231,7 @@ class turbulentDFSEMInletFvPatchVectorField
|
|||||||
//- Helper function to interpolate values from the boundary data or
|
//- Helper function to interpolate values from the boundary data or
|
||||||
// read from dictionary
|
// read from dictionary
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > interpolateOrRead
|
tmp<Field<Type>> interpolateOrRead
|
||||||
(
|
(
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -240,7 +240,7 @@ class turbulentDFSEMInletFvPatchVectorField
|
|||||||
|
|
||||||
//- Helper function to interpolate values from the boundary data
|
//- Helper function to interpolate values from the boundary data
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > interpolateBoundaryData
|
tmp<Field<Type>> interpolateBoundaryData
|
||||||
(
|
(
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
) const;
|
) const;
|
||||||
@ -258,7 +258,7 @@ class turbulentDFSEMInletFvPatchVectorField
|
|||||||
// processor
|
// processor
|
||||||
void calcOverlappingProcEddies
|
void calcOverlappingProcEddies
|
||||||
(
|
(
|
||||||
List<List<eddy> >& overlappingEddies
|
List<List<eddy>>& overlappingEddies
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> >
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
||||||
(
|
(
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
@ -40,7 +40,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
|||||||
{
|
{
|
||||||
if (dict.found(fieldName))
|
if (dict.found(fieldName))
|
||||||
{
|
{
|
||||||
tmp<Field<Type> > tFld
|
tmp<Field<Type>> tFld
|
||||||
(
|
(
|
||||||
new Field<Type>
|
new Field<Type>
|
||||||
(
|
(
|
||||||
@ -62,7 +62,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> >
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData
|
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData
|
||||||
(
|
(
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
|
|||||||
186
src/functionObjects/field/Curle/Curle.C
Normal file
186
src/functionObjects/field/Curle/Curle.C
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "Curle.H"
|
||||||
|
#include "fvcDdt.H"
|
||||||
|
#include "mathematicalConstants.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace functionObjects
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(Curle, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
functionObject,
|
||||||
|
Curle,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::functionObjects::Curle::calc()
|
||||||
|
{
|
||||||
|
if (foundObject<volScalarField>(fieldName_))
|
||||||
|
{
|
||||||
|
// Evaluate pressure force time derivative
|
||||||
|
|
||||||
|
const volScalarField& p = lookupObject<volScalarField>(fieldName_);
|
||||||
|
const volScalarField dpdt(scopedName("dpdt"), fvc::ddt(p));
|
||||||
|
const volScalarField::Boundary& dpdtBf = dpdt.boundaryField();
|
||||||
|
const surfaceVectorField::Boundary& SfBf = mesh_.Sf().boundaryField();
|
||||||
|
|
||||||
|
dimensionedVector dfdt
|
||||||
|
(
|
||||||
|
"0",
|
||||||
|
p.dimensions()*dimArea/dimTime,
|
||||||
|
vector::zero
|
||||||
|
);
|
||||||
|
|
||||||
|
for (auto patchi : patchSet_)
|
||||||
|
{
|
||||||
|
dfdt.value() += sum(dpdtBf[patchi]*SfBf[patchi]);
|
||||||
|
}
|
||||||
|
|
||||||
|
reduce(dfdt.value(), sumOp<vector>());
|
||||||
|
|
||||||
|
|
||||||
|
// Construct and store Curle acoustic pressure
|
||||||
|
|
||||||
|
const volVectorField& C = mesh_.C();
|
||||||
|
|
||||||
|
tmp<volScalarField> tpDash
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
resultName_,
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("0", p.dimensions(), 0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& pDash = tpDash.ref();
|
||||||
|
const volVectorField d(scopedName("d"), C - x0_);
|
||||||
|
pDash = 4*mathematical::pi/c0_*(d/magSqr(d) & dfdt);
|
||||||
|
|
||||||
|
return store(resultName_, tpDash);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::functionObjects::Curle::Curle
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const Time& runTime,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fieldExpression(name, runTime, dict, "p"),
|
||||||
|
patchSet_(),
|
||||||
|
x0_("x0", dimLength, vector::zero),
|
||||||
|
c0_("c0", dimVelocity, 0)
|
||||||
|
{
|
||||||
|
read(dict);
|
||||||
|
|
||||||
|
setResultName(typeName, fieldName_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::functionObjects::Curle::~Curle()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::functionObjects::Curle::read(const dictionary& dict)
|
||||||
|
{
|
||||||
|
if (fieldExpression::read(dict))
|
||||||
|
{
|
||||||
|
patchSet_ =
|
||||||
|
mesh_.boundaryMesh().patchSet(wordReList(dict.lookup("patches")));
|
||||||
|
|
||||||
|
if (patchSet_.empty())
|
||||||
|
{
|
||||||
|
WarningInFunction
|
||||||
|
<< "No patches defined"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read the reference speed of sound
|
||||||
|
dict.lookup("c0") >> c0_;
|
||||||
|
|
||||||
|
|
||||||
|
// Set the location of the effective point source to the area-average
|
||||||
|
// of the patch face centres
|
||||||
|
const volVectorField::Boundary& Cbf = mesh_.C().boundaryField();
|
||||||
|
const surfaceScalarField::Boundary& magSfBf =
|
||||||
|
mesh_.magSf().boundaryField();
|
||||||
|
|
||||||
|
x0_.value() = vector::zero;
|
||||||
|
scalar sumMagSf = 0;
|
||||||
|
for (auto patchi : patchSet_)
|
||||||
|
{
|
||||||
|
x0_.value() += sum(Cbf[patchi]*magSfBf[patchi]);
|
||||||
|
sumMagSf += sum(magSfBf[patchi]);
|
||||||
|
}
|
||||||
|
|
||||||
|
reduce(x0_.value(), sumOp<vector>());
|
||||||
|
reduce(sumMagSf, sumOp<scalar>());
|
||||||
|
|
||||||
|
x0_.value() /= sumMagSf + ROOTVSMALL;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
173
src/functionObjects/field/Curle/Curle.H
Normal file
173
src/functionObjects/field/Curle/Curle.H
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::functionObjects::Curle
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpFieldFunctionObjects
|
||||||
|
|
||||||
|
Description
|
||||||
|
Calculates the acoustic pressure based on Curle's analogy.
|
||||||
|
|
||||||
|
Curle's analogy is implemented as:
|
||||||
|
|
||||||
|
\f[
|
||||||
|
p' = 4 \frac{\pi}{c_0}\frac{\vec d}{|\vec d|^2}\frac{d(F)}{d(t)}
|
||||||
|
\f]
|
||||||
|
|
||||||
|
|
||||||
|
where
|
||||||
|
\vartable
|
||||||
|
p' | Curle's acoustic pressure [Pa] or [Pa (m3/rho)]
|
||||||
|
c_0 | Reference speed of sound [m/s]
|
||||||
|
\vec d | Distance vector to observer locations [m]
|
||||||
|
F | Force [N] or [N (m3/rho)]
|
||||||
|
\endvartable
|
||||||
|
|
||||||
|
Note
|
||||||
|
Only the normal-pressure force is included in the force calculation
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
Example of function object specification:
|
||||||
|
\verbatim
|
||||||
|
Curle1
|
||||||
|
{
|
||||||
|
type Curle;
|
||||||
|
libs ("libfieldFunctionObjects.so");
|
||||||
|
...
|
||||||
|
patches (surface1 surface2);
|
||||||
|
c0 330;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Where the entries comprise:
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
type | Type name: Curle | yes |
|
||||||
|
field | Pressure field name | no | p
|
||||||
|
result | Acoustic pressure field name | no | Curle
|
||||||
|
patches | Sound generation patch names | yes |
|
||||||
|
c0 | Reference speed of sound | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
|
||||||
|
See also
|
||||||
|
- Foam::functionObjects::fieldExpression
|
||||||
|
- Foam::functionObjects::fvMeshFunctionObject
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
Curle.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef functionObjects_Curle_H
|
||||||
|
#define functionObjects_Curle_H
|
||||||
|
|
||||||
|
#include "fieldExpression.H"
|
||||||
|
#include "dimensionedScalar.H"
|
||||||
|
#include "dimensionedVector.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace functionObjects
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class Curle Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class Curle
|
||||||
|
:
|
||||||
|
public fieldExpression
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
// Read from dictionary
|
||||||
|
|
||||||
|
//- Patches to integrate forces over
|
||||||
|
labelHashSet patchSet_;
|
||||||
|
|
||||||
|
//- Area-averaged centre of patch faces
|
||||||
|
dimensionedVector x0_;
|
||||||
|
|
||||||
|
//- Reference speed of souund
|
||||||
|
dimensionedScalar c0_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
Curle(const Curle&) = delete;
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const Curle&) = delete;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//- Calculate the acoustic pressure field and return true if successful
|
||||||
|
virtual bool calc();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("Curle");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from Time and dictionary
|
||||||
|
Curle
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const Time& runTime,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~Curle();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Read the Curle data
|
||||||
|
virtual bool read(const dictionary&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace functionObjects
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -52,6 +52,7 @@ PecletNo/PecletNo.C
|
|||||||
blendingFactor/blendingFactor.C
|
blendingFactor/blendingFactor.C
|
||||||
pressure/pressure.C
|
pressure/pressure.C
|
||||||
MachNo/MachNo.C
|
MachNo/MachNo.C
|
||||||
|
Curle/Curle.C
|
||||||
|
|
||||||
fieldsExpression/fieldsExpression.C
|
fieldsExpression/fieldsExpression.C
|
||||||
add/add.C
|
add/add.C
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -114,7 +114,10 @@ bool Foam::functionObjects::valueAverage::read(const dictionary& dict)
|
|||||||
|
|
||||||
dict.lookup("functionObject") >> functionObjectName_;
|
dict.lookup("functionObject") >> functionObjectName_;
|
||||||
dict.lookup("fields") >> fieldNames_;
|
dict.lookup("fields") >> fieldNames_;
|
||||||
window_ = dict.lookupOrDefault<scalar>("window", -1);
|
if (dict.readIfPresent("window", window_))
|
||||||
|
{
|
||||||
|
window_ = obr().time().userTimeToTime(window_);
|
||||||
|
}
|
||||||
|
|
||||||
totalTime_.setSize(fieldNames_.size());
|
totalTime_.setSize(fieldNames_.size());
|
||||||
forAll(totalTime_, i)
|
forAll(totalTime_, i)
|
||||||
|
|||||||
@ -72,6 +72,11 @@ Description
|
|||||||
patches and suppress writing the internalMesh.
|
patches and suppress writing the internalMesh.
|
||||||
Consecutive output numbering can be used in conjunction with \c overwrite.
|
Consecutive output numbering can be used in conjunction with \c overwrite.
|
||||||
|
|
||||||
|
See also
|
||||||
|
Foam::functionObjects::vtkWrite
|
||||||
|
Foam::functionObjects::fvMeshFunctionObject
|
||||||
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ensightWrite.C
|
ensightWrite.C
|
||||||
ensightWriteTemplates.C
|
ensightWriteTemplates.C
|
||||||
|
|||||||
@ -62,6 +62,7 @@ Usage
|
|||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
See also
|
See also
|
||||||
|
Foam::functionObjects::ensightWrite
|
||||||
Foam::functionObjects::fvMeshFunctionObject
|
Foam::functionObjects::fvMeshFunctionObject
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
|
|||||||
@ -123,7 +123,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights
|
|||||||
const label nCoarseI = max(fineToCoarse) + 1;
|
const label nCoarseI = max(fineToCoarse) + 1;
|
||||||
labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse));
|
labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse));
|
||||||
|
|
||||||
HashSet<edge, Hash<edge> > fineFeaturedFaces(coarsePatch.nEdges()/10);
|
HashSet<edge, Hash<edge>> fineFeaturedFaces(coarsePatch.nEdges()/10);
|
||||||
|
|
||||||
// Map fine faces with featured edge into coarse faces
|
// Map fine faces with featured edge into coarse faces
|
||||||
forAllConstIter(EdgeMap<scalar>, facePairWeight_, iter)
|
forAllConstIter(EdgeMap<scalar>, facePairWeight_, iter)
|
||||||
|
|||||||
@ -180,9 +180,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual autoPtr<InjectionModel<CloudType> > clone() const
|
virtual autoPtr<InjectionModel<CloudType>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<InjectionModel<CloudType> >
|
return autoPtr<InjectionModel<CloudType>>
|
||||||
(
|
(
|
||||||
new InjectedParticleDistributionInjection<CloudType>(*this)
|
new InjectedParticleDistributionInjection<CloudType>(*this)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -145,9 +145,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual autoPtr<InjectionModel<CloudType> > clone() const
|
virtual autoPtr<InjectionModel<CloudType>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<InjectionModel<CloudType> >
|
return autoPtr<InjectionModel<CloudType>>
|
||||||
(
|
(
|
||||||
new InjectedParticleInjection<CloudType>(*this)
|
new InjectedParticleInjection<CloudType>(*this)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -274,7 +274,7 @@ public:
|
|||||||
return R_();
|
return R_();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Update and return the co-ordinate roation for a list of cells
|
//- Update and return the co-ordinate rotation for a list of cells
|
||||||
const coordinateRotation& R
|
const coordinateRotation& R
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
|
|||||||
@ -358,8 +358,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation
|
|||||||
const bool nearestOnly,
|
const bool nearestOnly,
|
||||||
const coordinateSystem& referenceCS,
|
const coordinateSystem& referenceCS,
|
||||||
const label sourceSize,
|
const label sourceSize,
|
||||||
const List<FixedList<label, 3> >& nearestVertex,
|
const List<FixedList<label, 3>>& nearestVertex,
|
||||||
const List<FixedList<scalar, 3> >& nearestVertexWeight
|
const List<FixedList<scalar, 3>>& nearestVertexWeight
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
perturb_(perturb),
|
perturb_(perturb),
|
||||||
|
|||||||
@ -123,8 +123,8 @@ public:
|
|||||||
const bool nearestOnly,
|
const bool nearestOnly,
|
||||||
const coordinateSystem& referenceCS,
|
const coordinateSystem& referenceCS,
|
||||||
const label sourceSize,
|
const label sourceSize,
|
||||||
const List<FixedList<label, 3> >& nearestVertex,
|
const List<FixedList<label, 3>>& nearestVertex,
|
||||||
const List<FixedList<scalar, 3> >& nearestVertexWeight
|
const List<FixedList<scalar, 3>>& nearestVertexWeight
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
|
|||||||
@ -1047,7 +1047,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update()
|
|||||||
interpolationCells_.transfer(interpolationCells);
|
interpolationCells_.transfer(interpolationCells);
|
||||||
|
|
||||||
|
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
|
|
||||||
|
|||||||
@ -488,7 +488,7 @@ void Foam::cellCellStencils::inverseDistance::markDonors
|
|||||||
|
|
||||||
|
|
||||||
// Indices of tgtcells to send over to each processor
|
// Indices of tgtcells to send over to each processor
|
||||||
List<DynamicList<label> > tgtSendCells(Pstream::nProcs());
|
List<DynamicList<label>> tgtSendCells(Pstream::nProcs());
|
||||||
forAll(srcOverlapProcs, i)
|
forAll(srcOverlapProcs, i)
|
||||||
{
|
{
|
||||||
label procI = srcOverlapProcs[i];
|
label procI = srcOverlapProcs[i];
|
||||||
@ -1548,7 +1548,7 @@ void Foam::cellCellStencils::inverseDistance::createStencil
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Re-do the mapDistribute
|
// Re-do the mapDistribute
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
}
|
}
|
||||||
@ -1902,7 +1902,7 @@ bool Foam::cellCellStencils::inverseDistance::update()
|
|||||||
}
|
}
|
||||||
interpolationCells_.transfer(interpolationCells);
|
interpolationCells_.transfer(interpolationCells);
|
||||||
|
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
|
|
||||||
|
|||||||
@ -317,7 +317,7 @@ void Foam::cellCellStencils::trackingInverseDistance::markDonors
|
|||||||
|
|
||||||
|
|
||||||
// Indices of tgtcells to send over to each processor
|
// Indices of tgtcells to send over to each processor
|
||||||
List<DynamicList<label> > tgtSendCells(Pstream::nProcs());
|
List<DynamicList<label>> tgtSendCells(Pstream::nProcs());
|
||||||
forAll(srcOverlapProcs, i)
|
forAll(srcOverlapProcs, i)
|
||||||
{
|
{
|
||||||
label procI = srcOverlapProcs[i];
|
label procI = srcOverlapProcs[i];
|
||||||
@ -768,7 +768,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update()
|
|||||||
}
|
}
|
||||||
interpolationCells_.transfer(interpolationCells);
|
interpolationCells_.transfer(interpolationCells);
|
||||||
|
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
|
|
||||||
|
|||||||
@ -80,16 +80,8 @@ Foam::oversetFvPatchField<Type>::oversetFvPatchField
|
|||||||
{
|
{
|
||||||
if (!isA<oversetFvPatch>(p))
|
if (!isA<oversetFvPatch>(p))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< " patch type '" << p.type()
|
||||||
"oversetFvPatchField<Type>::oversetFvPatchField"
|
|
||||||
"("
|
|
||||||
"const fvPatch&, "
|
|
||||||
"const DimensionedField<Type, volMesh>&, "
|
|
||||||
"const dictionary&"
|
|
||||||
")",
|
|
||||||
dict
|
|
||||||
) << " patch type '" << p.type()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->internalField().name()
|
<< " of field " << this->internalField().name()
|
||||||
|
|||||||
@ -103,9 +103,9 @@ public:
|
|||||||
oversetFvPatchField(const oversetFvPatchField<Type>&);
|
oversetFvPatchField(const oversetFvPatchField<Type>&);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<fvPatchField<Type> > clone() const
|
virtual tmp<fvPatchField<Type>> clone() const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchField<Type> >
|
return tmp<fvPatchField<Type>>
|
||||||
(
|
(
|
||||||
new oversetFvPatchField<Type>(*this)
|
new oversetFvPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -119,12 +119,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- Construct and return a clone setting internal field reference
|
||||||
virtual tmp<fvPatchField<Type> > clone
|
virtual tmp<fvPatchField<Type>> clone
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchField<Type> >
|
return tmp<fvPatchField<Type>>
|
||||||
(
|
(
|
||||||
new oversetFvPatchField<Type>(*this, iF)
|
new oversetFvPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -108,19 +108,8 @@ void Foam::setRefCells
|
|||||||
|
|
||||||
if (refCells.size() != regionNeedReference.size())
|
if (refCells.size() != regionNeedReference.size())
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "Number of refCells " << refCells.size()
|
||||||
"setRefCell\n"
|
|
||||||
"(\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const dictionary&,\n"
|
|
||||||
" labelList&,\n"
|
|
||||||
" scalarField&,\n"
|
|
||||||
" const bool\n"
|
|
||||||
")\n",
|
|
||||||
dict
|
|
||||||
) << "Number of refCells " << refCells.size()
|
|
||||||
<< " does not correspond to number of regions "
|
<< " does not correspond to number of regions "
|
||||||
<< regionNeedReference.size()
|
<< regionNeedReference.size()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
@ -146,19 +135,8 @@ void Foam::setRefCells
|
|||||||
&& regionRefCells[regionI] == -1
|
&& regionRefCells[regionI] == -1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "Have no reference cell for region " << regionI
|
||||||
"setRefCell\n"
|
|
||||||
"(\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const dictionary&,\n"
|
|
||||||
" labelList&,\n"
|
|
||||||
" scalarField&,\n"
|
|
||||||
" const bool\n"
|
|
||||||
")\n",
|
|
||||||
dict
|
|
||||||
) << "Have no reference cell for region " << regionI
|
|
||||||
<< nl
|
<< nl
|
||||||
<< "Overall per-region reference cells "
|
<< "Overall per-region reference cells "
|
||||||
<< regionRefCells
|
<< regionRefCells
|
||||||
@ -173,19 +151,8 @@ void Foam::setRefCells
|
|||||||
|
|
||||||
if (refPoints.size() != regionNeedReference.size())
|
if (refPoints.size() != regionNeedReference.size())
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "Number of refPoints " << refPoints.size()
|
||||||
"setRefCell\n"
|
|
||||||
"(\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const dictionary&,\n"
|
|
||||||
" labelList&,\n"
|
|
||||||
" scalarField&,\n"
|
|
||||||
" const bool\n"
|
|
||||||
")\n",
|
|
||||||
dict
|
|
||||||
) << "Number of refPoints " << refPoints.size()
|
|
||||||
<< " does not correspond to number of regions "
|
<< " does not correspond to number of regions "
|
||||||
<< regionNeedReference.size()
|
<< regionNeedReference.size()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
@ -226,19 +193,8 @@ void Foam::setRefCells
|
|||||||
{
|
{
|
||||||
if (hasRef[regionI] != 1)
|
if (hasRef[regionI] != 1)
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "Unable to set reference cell for field " << field.name()
|
||||||
"setRefCell\n"
|
|
||||||
"(\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const dictionary&,\n"
|
|
||||||
" labelList&,\n"
|
|
||||||
" scalarField&,\n"
|
|
||||||
" const bool\n"
|
|
||||||
")\n",
|
|
||||||
dict
|
|
||||||
) << "Unable to set reference cell for field " << field.name()
|
|
||||||
<< nl
|
<< nl
|
||||||
<< " Reference points " << refPointName
|
<< " Reference points " << refPointName
|
||||||
<< " " << refPoints
|
<< " " << refPoints
|
||||||
@ -251,19 +207,8 @@ void Foam::setRefCells
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "Unable to set reference cell for field " << field.name()
|
||||||
"setRefCell\n"
|
|
||||||
"(\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const volScalarField&,\n"
|
|
||||||
" const dictionary&,\n"
|
|
||||||
" labelList&,\n"
|
|
||||||
" scalarField&,\n"
|
|
||||||
" const bool\n"
|
|
||||||
")\n",
|
|
||||||
dict
|
|
||||||
) << "Unable to set reference cell for field " << field.name()
|
|
||||||
<< nl
|
<< nl
|
||||||
<< " Please supply either " << refCellName
|
<< " Please supply either " << refCellName
|
||||||
<< " or " << refPointName << nl << exit(FatalIOError);
|
<< " or " << refPointName << nl << exit(FatalIOError);
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public:
|
|||||||
|
|
||||||
//- Return the windowed data
|
//- Return the windowed data
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > apply
|
tmp<Field<Type>> apply
|
||||||
(
|
(
|
||||||
const Field<Type>& fld,
|
const Field<Type>& fld,
|
||||||
const label windowI
|
const label windowI
|
||||||
|
|||||||
@ -42,10 +42,8 @@ Foam::autoPtr<Foam::windowModel> Foam::windowModel::New
|
|||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Unknown windowModel type "
|
||||||
"windowModel::New(const dictionary&, const label)"
|
|
||||||
) << "Unknown windowModel type "
|
|
||||||
<< modelType << nl << nl
|
<< modelType << nl << nl
|
||||||
<< "Valid windowModel types are:" << nl
|
<< "Valid windowModel types are:" << nl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::windowModel::apply
|
Foam::tmp<Foam::Field<Type>> Foam::windowModel::apply
|
||||||
(
|
(
|
||||||
const Field<Type>& fld,
|
const Field<Type>& fld,
|
||||||
const label windowI
|
const label windowI
|
||||||
@ -44,7 +44,7 @@ Foam::tmp<Foam::Field<Type> > Foam::windowModel::apply
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<Field<Type> > tresult(new Field<Type>(nSamples, pTraits<Type>::zero));
|
tmp<Field<Type>> tresult(new Field<Type>(nSamples, pTraits<Type>::zero));
|
||||||
Field<Type>& result = tresult.ref();
|
Field<Type>& result = tresult.ref();
|
||||||
|
|
||||||
label nWindow = nWindowsTotal(fld.size());
|
label nWindow = nWindowsTotal(fld.size());
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public:
|
|||||||
virtual wordList fieldNames(const label timeIndex) const = 0;
|
virtual wordList fieldNames(const label timeIndex) const = 0;
|
||||||
|
|
||||||
//- Return a scalar field at a given time
|
//- Return a scalar field at a given time
|
||||||
virtual tmp<Field<scalar> > field
|
virtual tmp<Field<scalar>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -116,7 +116,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a vector field at a given time
|
//- Return a vector field at a given time
|
||||||
virtual tmp<Field<vector> > field
|
virtual tmp<Field<vector>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a sphericalTensor field at a given time
|
//- Return a sphericalTensor field at a given time
|
||||||
virtual tmp<Field<sphericalTensor> > field
|
virtual tmp<Field<sphericalTensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -132,7 +132,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a symmTensor field at a given time
|
//- Return a symmTensor field at a given time
|
||||||
virtual tmp<Field<symmTensor> > field
|
virtual tmp<Field<symmTensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -140,7 +140,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a tensor field at a given time
|
//- Return a tensor field at a given time
|
||||||
virtual tmp<Field<tensor> > field
|
virtual tmp<Field<tensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
|
|||||||
@ -159,11 +159,7 @@ void Foam::fileFormats::FLMAsurfaceFormat<Face>::write
|
|||||||
{
|
{
|
||||||
if (!os.good())
|
if (!os.good())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
|
||||||
"fileFormats::FLMAsurfaceFormat::write"
|
|
||||||
"(OSstream&, const MeshedSurfaceProxy<Face>&)"
|
|
||||||
)
|
|
||||||
<< "bad output state "
|
<< "bad output state "
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
@ -352,11 +348,7 @@ void Foam::fileFormats::FLMAsurfaceFormat<Face>::write
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
|
||||||
"fileFormats::FLMAsurfaceFormat::write"
|
|
||||||
"(const fileName&, const MeshedSurfaceProxy<Face>&)"
|
|
||||||
)
|
|
||||||
<< "Cannot open file for writing " << filename
|
<< "Cannot open file for writing " << filename
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class boundaryRadiationProperties
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Ptr list of boundaryRadiationProperties
|
//- Ptr list of boundaryRadiationProperties
|
||||||
List<autoPtr<boundaryRadiationPropertiesPatch> >
|
List<autoPtr<boundaryRadiationPropertiesPatch>>
|
||||||
radBoundaryPropertiesPtrList_;
|
radBoundaryPropertiesPtrList_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return net solid sensible enthalpy [J/Kg]
|
//- Return net solid sensible enthalpy [J/Kg]
|
||||||
virtual tmp<DimensionedField<scalar, volMesh> > RRsHs() const = 0;
|
virtual tmp<DimensionedField<scalar, volMesh>> RRsHs() const = 0;
|
||||||
|
|
||||||
//- Return specie Table for gases
|
//- Return specie Table for gases
|
||||||
virtual const speciesTable& gasTable() const = 0;
|
virtual const speciesTable& gasTable() const = 0;
|
||||||
|
|||||||
@ -188,7 +188,7 @@ public:
|
|||||||
inline tmp<volScalarField::Internal> RRs() const;
|
inline tmp<volScalarField::Internal> RRs() const;
|
||||||
|
|
||||||
//- Return net solid sensible enthalpy
|
//- Return net solid sensible enthalpy
|
||||||
inline tmp<DimensionedField<scalar, volMesh> > RRsHs() const;
|
inline tmp<DimensionedField<scalar, volMesh>> RRsHs() const;
|
||||||
|
|
||||||
//- Solve the reaction system for the given time step
|
//- Solve the reaction system for the given time step
|
||||||
// and return the characteristic time
|
// and return the characteristic time
|
||||||
|
|||||||
@ -97,10 +97,10 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CompType, class SolidThermo>
|
template<class CompType, class SolidThermo>
|
||||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||||
Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const
|
Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const
|
||||||
{
|
{
|
||||||
tmp<DimensionedField<scalar, volMesh> > tRRsHs
|
tmp<DimensionedField<scalar, volMesh>> tRRsHs
|
||||||
(
|
(
|
||||||
new DimensionedField<scalar, volMesh>
|
new DimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -72,7 +72,8 @@ Foam::scalar Foam::waveModels::Grimshaw::eta
|
|||||||
const scalar eps2 = eps*eps;
|
const scalar eps2 = eps*eps;
|
||||||
const scalar eps3 = eps*eps2;
|
const scalar eps3 = eps*eps2;
|
||||||
|
|
||||||
const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
const scalar C =
|
||||||
|
sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
||||||
|
|
||||||
const scalar ts = 3.5*h/sqrt(H/h);
|
const scalar ts = 3.5*h/sqrt(H/h);
|
||||||
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||||
@ -109,7 +110,8 @@ Foam::vector Foam::waveModels::Grimshaw::Uf
|
|||||||
const scalar eps2 = eps*eps;
|
const scalar eps2 = eps*eps;
|
||||||
const scalar eps3 = eps*eps2;
|
const scalar eps3 = eps*eps2;
|
||||||
|
|
||||||
const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
const scalar C =
|
||||||
|
sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
||||||
|
|
||||||
const scalar ts = 3.5*h/sqrt(eps);
|
const scalar ts = 3.5*h/sqrt(eps);
|
||||||
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||||
|
|||||||
@ -615,7 +615,11 @@ void Foam::waveModels::StokesV::initialise
|
|||||||
|
|
||||||
f1 = pi*H/d - 2*pi/(k*d)*(lambda + l3*b33 + l5*(b35 + b55));
|
f1 = pi*H/d - 2*pi/(k*d)*(lambda + l3*b33 + l5*(b35 + b55));
|
||||||
|
|
||||||
f2 = (2*pi*d)/(mag(g_)*sqr(T)) - k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2);
|
f2 =
|
||||||
|
(
|
||||||
|
(2*pi*d)/(mag(g_)*sqr(T))
|
||||||
|
- k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2)
|
||||||
|
);
|
||||||
|
|
||||||
const scalar lambdaPr =
|
const scalar lambdaPr =
|
||||||
(f1*Bmat21 - f2*Bmat11)/(Bmat11*Bmat22 - Bmat12*Bmat21);
|
(f1*Bmat21 - f2*Bmat11)/(Bmat11*Bmat22 - Bmat12*Bmat21);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 3.0.x |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v1612+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v1612+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v1612+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v1612+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v3.0+ |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: plus |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user