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

This commit is contained in:
sergio
2019-06-17 07:44:28 -07:00
committed by Andrew Heather
42 changed files with 403 additions and 235 deletions

View File

@ -1,6 +1,19 @@
{ {
// Temporarily making U relative to mesh motion
if (mesh.moving())
{
U -= fvc::reconstruct(mesh.phi());
}
// Updating alpha1 // Updating alpha1
advector.advect(); advector.advect();
// Making U absolute again after advection step
if (mesh.moving())
{
U += fvc::reconstruct(mesh.phi());
}
#include "rhofs.H" #include "rhofs.H"
rhoPhi = advector.getRhoPhi(rho1f, rho2f); rhoPhi = advector.getRhoPhi(rho1f, rho2f);

View File

@ -4,6 +4,16 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
case "$WM_COMPILER" in
Mingw*)
echo "Skipping $WM_COMPILER compilation of $PWD"
echo "... needs further resolution of cyclic dependencies"
exit 0
;;
esac
#------------------------------------------------------------------------------
reactingTwoPhaseEulerFoam/Allwmake $targetType $* reactingTwoPhaseEulerFoam/Allwmake $targetType $*
reactingMultiphaseEulerFoam/Allwmake $targetType $* reactingMultiphaseEulerFoam/Allwmake $targetType $*
wmake $targetType functionObjects wmake $targetType functionObjects

View File

@ -7,5 +7,5 @@ EXE_INC = \
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/phaseSystems/lnInclude -I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/phaseSystems/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfieldFunctionObjects \ -lfiniteVolume \
-lfiniteVolume -lfieldFunctionObjects

View File

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
wmake $targetType wmake $targetType
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -74,12 +74,6 @@ export WM_COMPILER_TYPE=system
# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi # Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi
export WM_COMPILER=Gcc export WM_COMPILER=Gcc
# [WM_ARCH_OPTION] - Memory addressing:
# = 32 | 64
# * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS, it is always 32-bit and this option is ignored
export WM_ARCH_OPTION=64
# [WM_PRECISION_OPTION] - Floating-point precision: # [WM_PRECISION_OPTION] - Floating-point precision:
# = DP | SP | SPDP # = DP | SP | SPDP
export WM_PRECISION_OPTION=DP export WM_PRECISION_OPTION=DP
@ -103,7 +97,7 @@ export WM_MPLIB=SYSTEMOPENMPI
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# (advanced / legacy) # (advanced / legacy)
#
# [FOAM_SIGFPE] - Trap floating-point exceptions. # [FOAM_SIGFPE] - Trap floating-point exceptions.
# - overrides the 'trapFpe' controlDict entry # - overrides the 'trapFpe' controlDict entry
# = true | false # = true | false
@ -126,6 +120,12 @@ export WM_MPLIB=SYSTEMOPENMPI
# = POSIX # = POSIX
#export WM_OSTYPE=POSIX #export WM_OSTYPE=POSIX
# [WM_ARCH_OPTION] - compiling with -m32 option on 64-bit system
# = 32 | 64
# * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS this option is ignored (always 32-bit)
export WM_ARCH_OPTION=64
################################################################################ ################################################################################
# Capture values of old directories to be cleaned from PATH, LD_LIBRARY_PATH # Capture values of old directories to be cleaned from PATH, LD_LIBRARY_PATH

View File

@ -22,6 +22,12 @@
setenv WM_ARCH `uname -s` # System name setenv WM_ARCH `uname -s` # System name
## if (! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX # System type (POSIX is default) ## if (! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX # System type (POSIX is default)
set archOption=64
if ($?WM_ARCH_OPTION) then
set archOption="$WM_ARCH_OPTION"
endif
unsetenv WM_ARCH_OPTION # Compiling 32-bit on 64-bit system
setenv WM_COMPILER_ARCH # Host compiler type (when different than target) setenv WM_COMPILER_ARCH # Host compiler type (when different than target)
setenv WM_COMPILER_LIB_ARCH # Additional ending for lib directories setenv WM_COMPILER_LIB_ARCH # Additional ending for lib directories
@ -32,23 +38,22 @@ case Linux:
switch (`uname -m`) switch (`uname -m`)
case i686: case i686:
setenv WM_ARCH_OPTION 32
breaksw breaksw
case x86_64: case x86_64:
if (! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64 # Default to 64-bit switch ("$archOption")
switch ($WM_ARCH_OPTION)
case 32: case 32:
setenv WM_ARCH_OPTION 32 # Need to propagate the value
setenv WM_COMPILER_ARCH 64 # 64-bit compiler, 32-bit target setenv WM_COMPILER_ARCH 64 # 64-bit compiler, 32-bit target
breaksw breaksw
case 64: case 64:
setenv WM_ARCH linux64 setenv WM_ARCH linux64
setenv WM_COMPILER_LIB_ARCH 64 # target with lib64 setenv WM_COMPILER_LIB_ARCH 64 # Target with lib64
breaksw breaksw
default: default:
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32|64" echo "Unknown WM_ARCH_OPTION '$archOption', should be 32|64"
breaksw breaksw
endsw endsw
@ -60,13 +65,11 @@ case Linux:
case armv7l: case armv7l:
setenv WM_ARCH linuxARM7 setenv WM_ARCH linuxARM7
setenv WM_ARCH_OPTION 32
setenv WM_COMPILER_LIB_ARCH 32 setenv WM_COMPILER_LIB_ARCH 32
breaksw breaksw
case aarch64: case aarch64:
setenv WM_ARCH linuxARM64 setenv WM_ARCH linuxARM64
setenv WM_ARCH_OPTION 64
setenv WM_COMPILER_LIB_ARCH 64 setenv WM_COMPILER_LIB_ARCH 64
breaksw breaksw
@ -88,14 +91,8 @@ case Linux:
breaksw breaksw
case Darwin: # Presumably x86_64 case Darwin: # Presumably x86_64
if (! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64 # Default to 64-bit
setenv WM_ARCH darwin64 setenv WM_ARCH darwin64
/bin/cat << INCOMPLETE echo "Darwin support is clang/llvm only"
===============================================================================
Darwin support (clang only) is incomplete or untested in this OpenFOAM release.
For further assistance, please contact www.OpenFOAM.com
===============================================================================
INCOMPLETE
breaksw breaksw
case SunOS*: case SunOS*:
@ -320,7 +317,7 @@ endsw
# Cleanup # Cleanup
# ~~~~~~~ # ~~~~~~~
unset archDir siteDir foundDir unset archDir siteDir foundDir archOption
unset gcc_version gccDir unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir unset clang_version clangDir

View File

@ -38,6 +38,7 @@ _of_complete_cache_[chemFoam]="-case -fileHandler | -listFunctionObjects -listRe
_of_complete_cache_[chemkinToFoam]="-case -fileHandler | -newFormat -doc -doc-source -help" _of_complete_cache_[chemkinToFoam]="-case -fileHandler | -newFormat -doc -doc-source -help"
_of_complete_cache_[chtMultiRegionFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[chtMultiRegionFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[chtMultiRegionSimpleFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[chtMultiRegionSimpleFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[chtMultiRegionTwoPhaseEulerFoam]="-case -decomposeParDict -fileHandler | -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[coalChemistryFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[coalChemistryFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[coldEngineFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[coldEngineFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[collapseEdges]="-case -collapseFaceSet -decomposeParDict -dict -fileHandler -time | -collapseFaces -constant -latestTime -noZero -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[collapseEdges]="-case -collapseFaceSet -decomposeParDict -dict -fileHandler -time | -collapseFaces -constant -latestTime -noZero -overwrite -parallel -doc -doc-source -help"
@ -69,7 +70,7 @@ _of_complete_cache_[equilibriumCO]="-case -fileHandler | -doc -doc-source -help"
_of_complete_cache_[equilibriumFlameT]="-case -fileHandler | -doc -doc-source -help" _of_complete_cache_[equilibriumFlameT]="-case -fileHandler | -doc -doc-source -help"
_of_complete_cache_[extrude2DMesh]="-case -decomposeParDict -fileHandler | -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[extrude2DMesh]="-case -decomposeParDict -fileHandler | -overwrite -parallel -doc -doc-source -help"
_of_complete_cache_[extrudeEdgesInto2DSurface]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[extrudeEdgesInto2DSurface]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[extrudeMesh]="-case -decomposeParDict -fileHandler -region | -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[extrudeMesh]="-case -decomposeParDict -dict -fileHandler -region | -noFunctionObjects -parallel -doc -doc-source -help"
_of_complete_cache_[extrudeToRegionMesh]="-case -decomposeParDict -dict -fileHandler -region | -noFunctionObjects -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[extrudeToRegionMesh]="-case -decomposeParDict -dict -fileHandler -region | -noFunctionObjects -overwrite -parallel -doc -doc-source -help"
_of_complete_cache_[faceAgglomerate]="-case -decomposeParDict -dict -fileHandler -region | -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[faceAgglomerate]="-case -decomposeParDict -dict -fileHandler -region | -noFunctionObjects -parallel -doc -doc-source -help"
_of_complete_cache_[faSavageHutterFoam]="-case -decomposeParDict -fileHandler | -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[faSavageHutterFoam]="-case -decomposeParDict -fileHandler | -noFunctionObjects -parallel -doc -doc-source -help"
@ -154,6 +155,7 @@ _of_complete_cache_[noise]="-case -decomposeParDict -dict -fileHandler | -noFunc
_of_complete_cache_[nonNewtonianIcoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[nonNewtonianIcoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[objToVTK]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[objToVTK]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[orientFaceZone]="-case -decomposeParDict -fileHandler -region | -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[orientFaceZone]="-case -decomposeParDict -fileHandler -region | -noFunctionObjects -parallel -doc -doc-source -help"
_of_complete_cache_[overBuoyantPimpleDyMFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[overInterDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[overInterDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[overLaplacianDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[overLaplacianDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help"
_of_complete_cache_[overPimpleDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[overPimpleDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
@ -168,6 +170,7 @@ _of_complete_cache_[pdfPlot]="-case -decomposeParDict -fileHandler | -noFunction
_of_complete_cache_[PDRblockMesh]="-case -dict -fileHandler -time | -noClean -doc -doc-source -help" _of_complete_cache_[PDRblockMesh]="-case -dict -fileHandler -time | -noClean -doc -doc-source -help"
_of_complete_cache_[PDRFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[PDRFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[PDRMesh]="-case -decomposeParDict -fileHandler | -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[PDRMesh]="-case -decomposeParDict -fileHandler | -overwrite -parallel -doc -doc-source -help"
_of_complete_cache_[PDRsetFields]="-case -dict -fileHandler -time | -dry-run -legacy -doc -doc-source -help"
_of_complete_cache_[pimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[pimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[pisoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[pisoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[plot3dToFoam]="-2D -case -fileHandler -scale | -noBlank -noFunctionObjects -singleBlock -doc -doc-source -help" _of_complete_cache_[plot3dToFoam]="-2D -case -fileHandler -scale | -noBlank -noFunctionObjects -singleBlock -doc -doc-source -help"
@ -182,7 +185,8 @@ _of_complete_cache_[potentialFreeSurfaceFoam]="-case -decomposeParDict -fileHand
_of_complete_cache_[preparePar]="-case -decomposeParDict -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[preparePar]="-case -decomposeParDict -fileHandler | -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[profilingSummary]="-case -fileHandler -time | -constant -latestTime -noZero -withZero -doc -doc-source -help" _of_complete_cache_[profilingSummary]="-case -fileHandler -time | -constant -latestTime -noZero -withZero -doc -doc-source -help"
_of_complete_cache_[reactingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[reactingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[reactingMultiphaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[reactingHeterogenousParcelFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[reactingMultiphaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[reactingParcelFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[reactingParcelFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[reactingTwoPhaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[reactingTwoPhaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[reconstructPar]="-case -fields -fileHandler -lagrangianFields -region -time | -allRegions -constant -latestTime -newTimes -noFields -noFunctionObjects -noLagrangian -noSets -noZero -withZero -doc -doc-source -help" _of_complete_cache_[reconstructPar]="-case -fields -fileHandler -lagrangianFields -region -time | -allRegions -constant -latestTime -newTimes -noFields -noFunctionObjects -noLagrangian -noSets -noZero -withZero -doc -doc-source -help"
@ -258,7 +262,7 @@ _of_complete_cache_[surfaceInflate]="-case -featureAngle -fileHandler -nSmooth |
_of_complete_cache_[surfaceLambdaMuSmooth]="-featureFile | -doc -doc-source -help" _of_complete_cache_[surfaceLambdaMuSmooth]="-featureFile | -doc -doc-source -help"
_of_complete_cache_[surfaceMeshConvert]="-case -dict -fileHandler -from -scaleIn -scaleOut -to | -clean -noFunctionObjects -tri -doc -doc-source -help" _of_complete_cache_[surfaceMeshConvert]="-case -dict -fileHandler -from -scaleIn -scaleOut -to | -clean -noFunctionObjects -tri -doc -doc-source -help"
_of_complete_cache_[surfaceMeshExport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceMeshExport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[surfaceMeshExtract]="-case -decomposeParDict -faceZones -fileHandler -patches -region -time | -constant -excludeProcPatches -latestTime -noFunctionObjects -noZero -parallel -doc -doc-source -help" _of_complete_cache_[surfaceMeshExtract]="-case -decomposeParDict -excludePatches -faceZones -fileHandler -patches -region -time | -constant -excludeProcPatches -latestTime -noFunctionObjects -noZero -parallel -doc -doc-source -help"
_of_complete_cache_[surfaceMeshImport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceMeshImport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[surfaceMeshInfo]="-case -fileHandler -scale | -areas -noFunctionObjects -xml -doc -doc-source -help" _of_complete_cache_[surfaceMeshInfo]="-case -fileHandler -scale | -areas -noFunctionObjects -xml -doc -doc-source -help"
_of_complete_cache_[surfaceOrient]="-case -fileHandler -scale | -inside -noFunctionObjects -usePierceTest -doc -doc-source -help" _of_complete_cache_[surfaceOrient]="-case -fileHandler -scale | -inside -noFunctionObjects -usePierceTest -doc -doc-source -help"

View File

@ -22,6 +22,8 @@
export WM_ARCH="$(uname -s)" # System name export WM_ARCH="$(uname -s)" # System name
## : ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # System type (POSIX is default) ## : ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # System type (POSIX is default)
archOption="${WM_ARCH_OPTION:-64}"
unset WM_ARCH_OPTION # Compiling 32-bit on 64-bit system
unset WM_COMPILER_ARCH # Host compiler type (when different than target) unset WM_COMPILER_ARCH # Host compiler type (when different than target)
unset WM_COMPILER_LIB_ARCH # Additional ending for lib directories unset WM_COMPILER_LIB_ARCH # Additional ending for lib directories
@ -33,21 +35,20 @@ Linux)
case "$(uname -m)" in case "$(uname -m)" in
i686) i686)
export WM_ARCH_OPTION=32
;; ;;
x86_64) x86_64)
: "${WM_ARCH_OPTION:=64}"; export WM_ARCH_OPTION # Default to 64-bit case "$archOption" in
case "$WM_ARCH_OPTION" in
32) 32)
export WM_ARCH_OPTION=32 # Need to propagate the value
export WM_COMPILER_ARCH=64 # 64-bit compiler, 32-bit target export WM_COMPILER_ARCH=64 # 64-bit compiler, 32-bit target
;; ;;
64) 64)
WM_ARCH=linux64 WM_ARCH=linux64
export WM_COMPILER_LIB_ARCH=64 export WM_COMPILER_LIB_ARCH=64 # Target with lib64
;; ;;
*) *)
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32|64" 1>&2 echo "Unknown WM_ARCH_OPTION '$archOption', should be 32|64" 1>&2
;; ;;
esac esac
;; ;;
@ -58,13 +59,11 @@ Linux)
armv7l) armv7l)
WM_ARCH=linuxARM7 WM_ARCH=linuxARM7
export WM_ARCH_OPTION=32
export WM_COMPILER_LIB_ARCH=32 export WM_COMPILER_LIB_ARCH=32
;; ;;
aarch64) aarch64)
WM_ARCH=linuxARM64 WM_ARCH=linuxARM64
export WM_ARCH_OPTION=64
export WM_COMPILER_LIB_ARCH=64 export WM_COMPILER_LIB_ARCH=64
;; ;;
@ -85,14 +84,8 @@ Linux)
;; ;;
Darwin) # Presumably x86_64 Darwin) # Presumably x86_64
: ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION # Default to 64-bit
WM_ARCH=darwin64 WM_ARCH=darwin64
/bin/cat << INCOMPLETE 1>&2 echo "Darwin support is clang/llvm only" 1>&2
===============================================================================
Darwin support (clang only) is incomplete or untested in this OpenFOAM release.
For further assistance, please contact www.OpenFOAM.com
===============================================================================
INCOMPLETE
;; ;;
SunOS*) SunOS*)
@ -314,7 +307,7 @@ esac
# Cleanup # Cleanup
# ~~~~~~~ # ~~~~~~~
unset archDir siteDir foundDir unset archDir siteDir foundDir archOption
unset gcc_version gccDir unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir unset clang_version clangDir

View File

@ -76,12 +76,6 @@ setenv WM_COMPILER_TYPE system
# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi # Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi
setenv WM_COMPILER Gcc setenv WM_COMPILER Gcc
# [WM_ARCH_OPTION] - Memory addressing:
# = 32 | 64
# * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS, it is always 32-bit and this option is ignored
setenv WM_ARCH_OPTION 64
# [WM_PRECISION_OPTION] - Floating-point precision: # [WM_PRECISION_OPTION] - Floating-point precision:
# = DP | SP | SPDP # = DP | SP | SPDP
setenv WM_PRECISION_OPTION DP setenv WM_PRECISION_OPTION DP
@ -105,7 +99,7 @@ setenv WM_MPLIB SYSTEMOPENMPI
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# (advanced / legacy) # (advanced / legacy)
#
# [FOAM_SIGFPE] - Trap floating-point exceptions. # [FOAM_SIGFPE] - Trap floating-point exceptions.
# - overrides the 'trapFpe' controlDict entry # - overrides the 'trapFpe' controlDict entry
# = true | false # = true | false
@ -128,6 +122,12 @@ setenv WM_MPLIB SYSTEMOPENMPI
# = POSIX # = POSIX
#setenv WM_OSTYPE POSIX #setenv WM_OSTYPE POSIX
# [WM_ARCH_OPTION] - compiling with -m32 option on 64-bit system
# = 32 | 64
# * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS this option is ignored (always 32-bit)
setenv WM_ARCH_OPTION 64
################################################################################ ################################################################################
# Old directories to be cleaned from PATH, LD_LIBRARY_PATH # Old directories to be cleaned from PATH, LD_LIBRARY_PATH

View File

@ -1281,7 +1281,7 @@ public:
//- Deprecated(2018-10) //- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version // \deprecated(2018-10) - use keyType::option version
entry* entry*
FOAM_DEPRECATED_FOR(2018-10, "lookupEntryPtr(keyType::option)") FOAM_DEPRECATED_FOR(2018-10, "findEntry(keyType::option)")
lookupEntryPtr lookupEntryPtr
( (
const word& keyword, const word& keyword,
@ -1295,7 +1295,7 @@ public:
//- Deprecated(2018-10) //- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version // \deprecated(2018-10) - use keyType::option version
const entry* const entry*
FOAM_DEPRECATED_FOR(2018-10, "lookupEntryPtr(keyType::option)") FOAM_DEPRECATED_FOR(2018-10, "findEntry(keyType::option)")
lookupEntryPtr lookupEntryPtr
( (
const word& keyword, const word& keyword,
@ -1309,7 +1309,7 @@ public:
//- Deprecated(2018-10) //- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version // \deprecated(2018-10) - use keyType::option version
const entry* const entry*
FOAM_DEPRECATED_FOR(2018-10, "lookupScopedEntryPtr(keyType::option)") FOAM_DEPRECATED_FOR(2018-10, "findScoped(keyType::option)")
lookupScopedEntryPtr lookupScopedEntryPtr
( (
const word& keyword, const word& keyword,

View File

@ -83,13 +83,8 @@ Foam::token Foam::functionEntries::ifeqEntry::expand
{ {
const word varName(keyword.substr(1, keyword.size()-1)); const word varName(keyword.substr(1, keyword.size()-1));
// lookup the variable name in the given dictionary // Lookup the variable name in the given dictionary
const entry* ePtr = dict.lookupScopedEntryPtr const entry* ePtr = dict.findScoped(varName, keyType::REGEX_RECURSIVE);
(
varName,
true,
true
);
if (ePtr) if (ePtr)
{ {
return token(ePtr->stream()); return token(ePtr->stream());

View File

@ -27,6 +27,8 @@ License
#include "GAMGSolver.H" #include "GAMGSolver.H"
#include "GAMGInterface.H" #include "GAMGInterface.H"
#include "PCG.H"
#include "PBiCGStab.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -248,12 +250,12 @@ Foam::GAMGSolver::GAMGSolver
if (matrixLevels_.size()) if (matrixLevels_.size())
{
if (directSolveCoarsest_)
{ {
const label coarsestLevel = matrixLevels_.size() - 1; const label coarsestLevel = matrixLevels_.size() - 1;
if (matrixLevels_.set(coarsestLevel)) if (matrixLevels_.set(coarsestLevel))
{
if (directSolveCoarsest_)
{ {
coarsestLUMatrixPtr_.reset coarsestLUMatrixPtr_.reset
( (
@ -265,6 +267,56 @@ Foam::GAMGSolver::GAMGSolver
) )
); );
} }
else
{
entry* coarseEntry = controlDict_.findEntry
(
"coarsestLevelCorr",
keyType::LITERAL_RECURSIVE
);
if (coarseEntry && coarseEntry->isDict())
{
coarsestSolverPtr_ = lduMatrix::solver::New
(
"coarsestLevelCorr",
matrixLevels_[coarsestLevel],
interfaceLevelsBouCoeffs_[coarsestLevel],
interfaceLevelsIntCoeffs_[coarsestLevel],
interfaceLevels_[coarsestLevel],
coarseEntry->dict()
);
}
else if (matrixLevels_[coarsestLevel].asymmetric())
{
coarsestSolverPtr_.set
(
new PBiCGStab
(
"coarsestLevelCorr",
matrixLevels_[coarsestLevel],
interfaceLevelsBouCoeffs_[coarsestLevel],
interfaceLevelsIntCoeffs_[coarsestLevel],
interfaceLevels_[coarsestLevel],
PBiCGStabSolverDict(tolerance_, relTol_)
)
);
}
else
{
coarsestSolverPtr_.set
(
new PCG
(
"coarsestLevelCorr",
matrixLevels_[coarsestLevel],
interfaceLevelsBouCoeffs_[coarsestLevel],
interfaceLevelsIntCoeffs_[coarsestLevel],
interfaceLevels_[coarsestLevel],
PCGsolverDict(tolerance_, relTol_)
)
);
}
}
} }
} }
else else

View File

@ -135,6 +135,9 @@ class GAMGSolver
//- LU decomposed coarsest matrix //- LU decomposed coarsest matrix
autoPtr<LUscalarMatrix> coarsestLUMatrixPtr_; autoPtr<LUscalarMatrix> coarsestLUMatrixPtr_;
//- Sparse coarsest matrix solver
autoPtr<lduMatrix::solver> coarsestSolverPtr_;
// Private Member Functions // Private Member Functions

View File

@ -26,8 +26,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "GAMGSolver.H" #include "GAMGSolver.H"
#include "PCG.H"
#include "PBiCGStab.H"
#include "SubField.H" #include "SubField.H"
#include "PrecisionAdaptor.H" #include "PrecisionAdaptor.H"
@ -695,42 +693,16 @@ void Foam::GAMGSolver::solveCoarsestLevel
else else
{ {
coarsestCorrField = 0; coarsestCorrField = 0;
solverPerformance coarseSolverPerf; const solverPerformance coarseSolverPerf
if (matrixLevels_[coarsestLevel].asymmetric())
{
coarseSolverPerf = PBiCGStab
( (
"coarsestLevelCorr", coarsestSolverPtr_->solve
matrixLevels_[coarsestLevel],
interfaceLevelsBouCoeffs_[coarsestLevel],
interfaceLevelsIntCoeffs_[coarsestLevel],
interfaceLevels_[coarsestLevel],
PBiCGStabSolverDict(tolerance_, relTol_)
).scalarSolve
( (
coarsestCorrField, coarsestCorrField,
coarsestSource coarsestSource
)
); );
}
else
{
coarseSolverPerf = PCG
(
"coarsestLevelCorr",
matrixLevels_[coarsestLevel],
interfaceLevelsBouCoeffs_[coarsestLevel],
interfaceLevelsIntCoeffs_[coarsestLevel],
interfaceLevels_[coarsestLevel],
PCGsolverDict(tolerance_, relTol_)
).scalarSolve
(
coarsestCorrField,
coarsestSource
);
}
if (debug >= 2) if (debug)
{ {
coarseSolverPerf.print(Info.masterStream(coarseComm)); coarseSolverPerf.print(Info.masterStream(coarseComm));
} }

View File

@ -2,7 +2,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) 2016-2017 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2014-2016 OpenFOAM Foundation | Copyright (C) 2014-2016 OpenFOAM Foundation
@ -46,6 +46,7 @@ SourceFiles
#include "pTraits.H" #include "pTraits.H"
#include "direction.H" #include "direction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -119,9 +120,11 @@ inline bool read(const std::string& str, int32_t& val)
Istream& operator>>(Istream& is, int32_t& val); Istream& operator>>(Istream& is, int32_t& val);
Ostream& operator<<(Ostream& os, const int32_t val); Ostream& operator<<(Ostream& os, const int32_t val);
// 32bit OS: long is not unambiguously (int32_t | int64_t) // 32bit compilation with long as int32_t
// - resolve explicitly for input and output // - resolve explicitly for input and output
#if WM_ARCH_OPTION == 32 //
// Test works for gcc, icc, llvm.
#if (__SIZEOF_LONG__ == 4)
Istream& operator>>(Istream& is, long& val); Istream& operator>>(Istream& is, long& val);
Ostream& operator<<(Ostream& os, const long val); Ostream& operator<<(Ostream& os, const long val);
#endif #endif

View File

@ -2,7 +2,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) 2016-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2014-2016 OpenFOAM Foundation | Copyright (C) 2014-2016 OpenFOAM Foundation
@ -125,7 +125,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const int32_t val)
} }
#if WM_ARCH_OPTION == 32 #if (__SIZEOF_LONG__ == 4)
Foam::Istream& Foam::operator>>(Istream& is, long& val) Foam::Istream& Foam::operator>>(Istream& is, long& val)
{ {
return operator>>(is, reinterpret_cast<int32_t&>(val)); return operator>>(is, reinterpret_cast<int32_t&>(val));
@ -133,8 +133,7 @@ Foam::Istream& Foam::operator>>(Istream& is, long& val)
Foam::Ostream& Foam::operator<<(Ostream& os, const long val) Foam::Ostream& Foam::operator<<(Ostream& os, const long val)
{ {
os << int32_t(val); return (os << int32_t(val));
return os;
} }
#endif #endif

View File

@ -182,7 +182,7 @@ public:
//- Vector part of the quaternion ( = axis of rotation) //- Vector part of the quaternion ( = axis of rotation)
inline const vector& v() const; inline const vector& v() const;
//- The rotation tensor corresponding the quaternion //- The rotation tensor corresponding to the quaternion
inline tensor R() const; inline tensor R() const;
//- Return the Euler rotation angles corresponding to the //- Return the Euler rotation angles corresponding to the

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
isoAdvector | Copyright (C) 2016-2017 DHI isoAdvector | Copyright (C) 2016-2017 DHI
Modified work | Copyright (C) 2018 Johan Roenby Modified work | Copyright (C) 2019 Johan Roenby
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -852,6 +852,12 @@ void Foam::isoAdvection::advect()
// Do the isoAdvection on surface cells // Do the isoAdvection on surface cells
timeIntegratedFlux(); timeIntegratedFlux();
// Adjust alpha for mesh motion
if (mesh_.moving())
{
alpha1In_ *= (mesh_.Vsc0()/mesh_.Vsc());
}
// Adjust dVf for unbounded cells // Adjust dVf for unbounded cells
limitFluxes(); limitFluxes();

View File

@ -107,6 +107,7 @@ void Foam::functionObjects::forces::writeBinHeader
writeHeader(os, header + " bins"); writeHeader(os, header + " bins");
writeHeaderValue(os, "bins", nBin_); writeHeaderValue(os, "bins", nBin_);
writeHeaderValue(os, "start", binMin_); writeHeaderValue(os, "start", binMin_);
writeHeaderValue(os, "end", binMax_);
writeHeaderValue(os, "delta", binDx_); writeHeaderValue(os, "delta", binDx_);
writeHeaderValue(os, "direction", binDir_); writeHeaderValue(os, "direction", binDir_);
@ -249,14 +250,14 @@ void Foam::functionObjects::forces::initialiseBins()
const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
// Determine extents of patches // Determine extents of patches
binMin_ = GREAT; scalar geomMin = GREAT;
scalar binMax = -GREAT; scalar geomMax = -GREAT;
for (const label patchi : patchSet_) for (const label patchi : patchSet_)
{ {
const polyPatch& pp = pbm[patchi]; const polyPatch& pp = pbm[patchi];
scalarField d(pp.faceCentres() & binDir_); scalarField d(pp.faceCentres() & binDir_);
binMin_ = min(min(d), binMin_); geomMin = min(min(d), geomMin);
binMax = max(max(d), binMax); geomMax = max(max(d), geomMax);
} }
// Include porosity // Include porosity
@ -276,22 +277,31 @@ void Foam::functionObjects::forces::initialiseBins()
{ {
const cellZone& cZone = mesh_.cellZones()[zonei]; const cellZone& cZone = mesh_.cellZones()[zonei];
const scalarField d(dd, cZone); const scalarField d(dd, cZone);
binMin_ = min(min(d), binMin_); geomMin = min(min(d), geomMin);
binMax = max(max(d), binMax); geomMax = max(max(d), geomMax);
} }
} }
} }
reduce(binMin_, minOp<scalar>()); reduce(geomMin, minOp<scalar>());
reduce(binMax, maxOp<scalar>()); reduce(geomMax, maxOp<scalar>());
// Slightly boost binMax so that region of interest is fully // Slightly boost max so that region of interest is fully within bounds
// within bounds geomMax = 1.0001*(geomMax - geomMin) + geomMin;
binMax = 1.0001*(binMax - binMin_) + binMin_;
binDx_ = (binMax - binMin_)/scalar(nBin_); // Use geometry limits if not specified by the user
if (binMin_ == GREAT)
{
binMin_ = geomMin;
}
if (binMax_ == GREAT)
{
binMax_ = geomMax;
}
// Create the bin points used for writing binDx_ = (binMax_ - binMin_)/scalar(nBin_);
// Create the bin mid-points used for writing
binPoints_.setSize(nBin_); binPoints_.setSize(nBin_);
forAll(binPoints_, i) forAll(binPoints_, i)
{ {
@ -712,19 +722,20 @@ Foam::functionObjects::forces::forces
forceBinFilePtr_(), forceBinFilePtr_(),
momentBinFilePtr_(), momentBinFilePtr_(),
patchSet_(), patchSet_(),
pName_(word::null), pName_("p"),
UName_(word::null), UName_("U"),
rhoName_(word::null), rhoName_("rho"),
directForceDensity_(false), directForceDensity_(false),
fDName_(""), fDName_("fD"),
rhoRef_(VGREAT), rhoRef_(VGREAT),
pRef_(0), pRef_(0),
coordSys_(), coordSys_(),
porosity_(false), porosity_(false),
nBin_(1), nBin_(1),
binDir_(Zero), binDir_(Zero),
binDx_(0.0), binDx_(0),
binMin_(GREAT), binMin_(GREAT),
binMax_(GREAT),
binPoints_(), binPoints_(),
binCumulative_(true), binCumulative_(true),
writeFields_(false), writeFields_(false),
@ -756,19 +767,20 @@ Foam::functionObjects::forces::forces
forceBinFilePtr_(), forceBinFilePtr_(),
momentBinFilePtr_(), momentBinFilePtr_(),
patchSet_(), patchSet_(),
pName_(word::null), pName_("p"),
UName_(word::null), UName_("U"),
rhoName_(word::null), rhoName_("rho"),
directForceDensity_(false), directForceDensity_(false),
fDName_(""), fDName_("fD"),
rhoRef_(VGREAT), rhoRef_(VGREAT),
pRef_(0), pRef_(0),
coordSys_(), coordSys_(),
porosity_(false), porosity_(false),
nBin_(1), nBin_(1),
binDir_(Zero), binDir_(Zero),
binDx_(0.0), binDx_(0),
binMin_(GREAT), binMin_(GREAT),
binMax_(GREAT),
binPoints_(), binPoints_(),
binCumulative_(true), binCumulative_(true),
writeFields_(false), writeFields_(false),
@ -814,14 +826,26 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
if (directForceDensity_) if (directForceDensity_)
{ {
// Optional entry for fDName // Optional entry for fDName
fDName_ = dict.lookupOrDefault<word>("fD", "fD"); if (dict.readIfPresent<word>("fD", fDName_))
{
Info<< " fD: " << fDName_ << endl;
}
} }
else else
{ {
// Optional entries U and p // Optional field name entries
pName_ = dict.lookupOrDefault<word>("p", "p"); if (dict.readIfPresent<word>("p", pName_))
UName_ = dict.lookupOrDefault<word>("U", "U"); {
rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); Info<< " p: " << pName_ << endl;
}
if (dict.readIfPresent<word>("U", UName_))
{
Info<< " U: " << UName_ << endl;
}
if (dict.readIfPresent<word>("rho", rhoName_))
{
Info<< " rho: " << rhoName_ << endl;
}
// Reference density needed for incompressible calculations // Reference density needed for incompressible calculations
if (rhoName_ == "rhoInf") if (rhoName_ == "rhoInf")
@ -831,10 +855,11 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
} }
// Reference pressure, 0 by default // Reference pressure, 0 by default
pRef_ = dict.lookupOrDefault<scalar>("pRef", 0); if (dict.readIfPresent<scalar>("pRef", pRef_))
{
Info<< " Reference pressure (pRef) set to " << pRef_ << endl; Info<< " Reference pressure (pRef) set to " << pRef_ << endl;
} }
}
dict.readIfPresent("porosity", porosity_); dict.readIfPresent("porosity", porosity_);
if (porosity_) if (porosity_)
@ -848,8 +873,9 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
if (dict.found("binData")) if (dict.found("binData"))
{ {
Info<< " Activated data bins" << endl;
const dictionary& binDict(dict.subDict("binData")); const dictionary& binDict(dict.subDict("binData"));
binDict.readEntry("nBin", nBin_); nBin_ = binDict.get<label>("nBin");
if (nBin_ < 0) if (nBin_ < 0)
{ {
@ -865,9 +891,21 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
else else
{ {
Info<< " Employing " << nBin_ << " bins" << endl; Info<< " Employing " << nBin_ << " bins" << endl;
binDict.readEntry("cumulative", binCumulative_); if (binDict.readIfPresent("min", binMin_))
binDict.readEntry("direction", binDir_); {
Info<< " - min : " << binMin_ << endl;
}
if (binDict.readIfPresent("max", binMax_))
{
Info<< " - max : " << binMax_ << endl;
}
binCumulative_ = binDict.get<bool>("cumulative");
Info<< " - cumuluative : " << binCumulative_ << endl;
binDir_ = binDict.get<vector>("direction");
binDir_.normalise(); binDir_.normalise();
Info<< " - direction : " << binDir_ << endl;
} }
} }

View File

@ -34,21 +34,17 @@ Description
skin-friction forces over a given list of patches, and the resistance skin-friction forces over a given list of patches, and the resistance
from porous zones. from porous zones.
Forces and moments are calculated, with optional coordinate system and Forces and moments are calculated in a global Cartesian coordinate system
writing of binned data, where force and moment contributions are collected by default, or using a user-defined system. Contributions can be 'binned'
into a user-defined number of bins that span the input geometries for a according to a user-defined number of uniform-width collection zones (bins)
user-defined direction vector. that span the input geometries, oriented by a user-defined direction vector.
Data is written into multiple files in the Results are written to multiple files as a function of time in the
postProcessing/\<functionObjectName\> directory: postProcessing/\<functionObjectName\> directory:
- force.dat : forces in global Cartesian coordinate system - force.dat : forces
- moment.dat : moments in global Cartesian coordinate system - moment.dat : moments
- forceBin.dat : force bins in global Cartesian coordinate system - forceBin.dat : force bins
- momentBin.dat : moment bins in global Cartesian coordinate system - momentBin.dat : moment bins
- localForce.dat : forces in local Cartesian coordinate system
- localMoment.dat : moments in local Cartesian coordinate system
- localForceBin.dat : force bins in local Cartesian coordinate system
- localMomentBin.dat : moment bins in local Cartesian coordinate system
Usage Usage
Example of function object specification: Example of function object specification:
@ -240,6 +236,9 @@ protected:
//- Minimum bin bounds //- Minimum bin bounds
scalar binMin_; scalar binMin_;
//- Maximum bin bounds
scalar binMax_;
//- Bin positions along binDir //- Bin positions along binDir
List<point> binPoints_; List<point> binPoints_;

View File

@ -53,7 +53,7 @@ void Foam::functionObjects::runTimePostPro::scalarBar::clear()
bold_ = true; bold_ = true;
shadow_ = false; shadow_ = false;
italic_ = false; italic_ = false;
titleHack_ = true; titleHack_ = false;
position_ = {0.8, 0.1}; position_ = {0.8, 0.1};
size_ = {0.1, 0.5}; size_ = {0.1, 0.5};
title_ = ""; title_ = "";

View File

@ -42,7 +42,7 @@ Description
bold | Title in bold | no | yes bold | Title in bold | no | yes
italic | Title in italic font | no | no italic | Title in italic font | no | no
shadow | Title with shadowont | no | no shadow | Title with shadowont | no | no
titleHack | Alternative placement strategy | no | yes titleHack | Alternative placement strategy | no | no
\endtable \endtable
Note Note

View File

@ -57,6 +57,10 @@ Foam::dimensionedScalar
Foam::functionObjects::hydrostaticPressure::pRef() const Foam::functionObjects::hydrostaticPressure::pRef() const
{ {
if (pRefName_ == "none") if (pRefName_ == "none")
{
return dimensionedScalar(dimPressure, Zero);
}
else if (pRefName_ == "pInf")
{ {
return dimensionedScalar("pRef", dimPressure, pRefValue_); return dimensionedScalar("pRef", dimPressure, pRefValue_);
} }
@ -217,10 +221,12 @@ bool Foam::functionObjects::hydrostaticPressure::read(const dictionary& dict)
dict.readIfPresent("ghf", ghfName_); dict.readIfPresent("ghf", ghfName_);
dict.readIfPresent("nCorrectors", nCorrectors_); dict.readIfPresent("nCorrectors", nCorrectors_);
if (pRefName_ == "none") pRefValue_ = 0;
if (pRefName_ == "pInf")
{ {
pRefValue_ = dict.get<scalar>("pRefValue"); pRefValue_ = dict.get<scalar>("pRefValue");
} }
return true; return true;
} }

View File

@ -2,7 +2,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) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,6 +48,7 @@ Usage
p_rgh | Name of p_rgh field | no | p_rgh p_rgh | Name of p_rgh field | no | p_rgh
ph_rgh | Name of ph_rgh field | no | ph_rgh ph_rgh | Name of ph_rgh field | no | ph_rgh
pRef | Name of pressure ref field | no | pRef pRef | Name of pressure ref field | no | pRef
pRefValue | Value of pressure ref when pRef set to pInf | no | 0
rho | Name of density field | no | rho rho | Name of density field | no | rho
U | Name of velocity field | no | U U | Name of velocity field | no | U
gh | Name of gravity*height volume field | no | gh gh | Name of gravity*height volume field | no | gh
@ -97,10 +98,10 @@ protected:
word ph_rghName_; word ph_rghName_;
//- Name of uniform pressure reference field, default is "pRef" //- Name of uniform pressure reference field, default is "pRef"
// Set to "none" to set to zero // Set to "none" to set to zero or pInf to set according to pRefValue
word pRefName_; word pRefName_;
//- Reference pressure if pRef is set to "none" //- Reference pressure if pRefName is set to "pInf"
scalar pRefValue_; scalar pRefValue_;
//- Name of density field, default is "rho" //- Name of density field, default is "rho"

View File

@ -2,7 +2,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) 2016-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,10 +25,8 @@ License
#include "lumpedPointState.H" #include "lumpedPointState.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "EulerCoordinateRotation.H"
#include "unitConversion.H" #include "unitConversion.H"
#include "EulerCoordinateRotation.H"
#include "ISstream.H"
#include "IFstream.H" #include "IFstream.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -70,13 +68,15 @@ static Foam::string getLineNoComment
void Foam::lumpedPointState::calcRotations() const void Foam::lumpedPointState::calcRotations() const
{ {
rotationPtr_ = new tensorField(angles_.size()); rotationPtr_ = new tensorField(angles_.size());
forAll(angles_, itemi)
auto rotIter = rotationPtr_->begin();
for (const vector& angles : angles_)
{ {
rotationPtr_->operator[](itemi) = EulerCoordinateRotation *rotIter =
( coordinateRotations::euler::rotation(order_, angles, degrees_);
angles_[itemi],
degrees_ // true=degrees, false=radians ++rotIter;
).R();
} }
} }
@ -85,7 +85,15 @@ void Foam::lumpedPointState::readDict(const dictionary& dict)
{ {
dict.readEntry("points", points_); dict.readEntry("points", points_);
dict.readEntry("angles", angles_); dict.readEntry("angles", angles_);
order_ =
quaternion::eulerOrderNames.getOrDefault
(
"order",
dict,
quaternion::eulerOrder::ZXZ
);
degrees_ = dict.lookupOrDefault("degrees", false); degrees_ = dict.lookupOrDefault("degrees", false);
deleteDemandDrivenData(rotationPtr_); deleteDemandDrivenData(rotationPtr_);
} }
@ -96,6 +104,7 @@ Foam::lumpedPointState::lumpedPointState()
: :
points_(), points_(),
angles_(), angles_(),
order_(quaternion::eulerOrder::ZXZ),
degrees_(false), degrees_(false),
rotationPtr_(nullptr) rotationPtr_(nullptr)
{} {}
@ -105,6 +114,7 @@ Foam::lumpedPointState::lumpedPointState(const lumpedPointState& rhs)
: :
points_(rhs.points_), points_(rhs.points_),
angles_(rhs.angles_), angles_(rhs.angles_),
order_(rhs.order_),
degrees_(rhs.degrees_), degrees_(rhs.degrees_),
rotationPtr_(nullptr) rotationPtr_(nullptr)
{} {}
@ -114,6 +124,7 @@ Foam::lumpedPointState::lumpedPointState(const pointField& pts)
: :
points_(pts), points_(pts),
angles_(points_.size(), Zero), angles_(points_.size(), Zero),
order_(quaternion::eulerOrder::ZXZ),
degrees_(false), degrees_(false),
rotationPtr_(nullptr) rotationPtr_(nullptr)
{} {}
@ -123,6 +134,7 @@ Foam::lumpedPointState::lumpedPointState(tmp<pointField>& pts)
: :
points_(pts), points_(pts),
angles_(points_.size(), Zero), angles_(points_.size(), Zero),
order_(quaternion::eulerOrder::ZXZ),
degrees_(false), degrees_(false),
rotationPtr_(nullptr) rotationPtr_(nullptr)
{} {}
@ -132,6 +144,7 @@ Foam::lumpedPointState::lumpedPointState(const dictionary& dict)
: :
points_(), points_(),
angles_(), angles_(),
order_(quaternion::eulerOrder::ZXZ),
degrees_(false), degrees_(false),
rotationPtr_(nullptr) rotationPtr_(nullptr)
{ {
@ -153,6 +166,7 @@ void Foam::lumpedPointState::operator=(const lumpedPointState& rhs)
{ {
points_ = rhs.points_; points_ = rhs.points_;
angles_ = rhs.angles_; angles_ = rhs.angles_;
order_ = rhs.order_;
degrees_ = rhs.degrees_; degrees_ = rhs.degrees_;
deleteDemandDrivenData(rotationPtr_); deleteDemandDrivenData(rotationPtr_);
@ -228,6 +242,7 @@ bool Foam::lumpedPointState::readPlain(Istream& is)
points_.setSize(count); points_.setSize(count);
angles_.setSize(count); angles_.setSize(count);
order_ = quaternion::eulerOrder::ZXZ;
degrees_ = false; degrees_ = false;
deleteDemandDrivenData(rotationPtr_); deleteDemandDrivenData(rotationPtr_);
@ -256,9 +271,13 @@ void Foam::lumpedPointState::writeDict(Ostream& os) const
{ {
os.writeEntry("points", points_); os.writeEntry("points", points_);
os.writeEntry("angles", angles_); os.writeEntry("angles", angles_);
if (order_ != quaternion::eulerOrder::ZXZ)
{
os.writeEntry("order", quaternion::eulerOrderNames[order_]);
}
if (degrees_) if (degrees_)
{ {
os.writeEntry("degrees", word("true")); os.writeEntry("degrees", "true");
} }
} }

View File

@ -2,7 +2,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) 2016-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,6 +35,7 @@ Description
Property | Description | Required | Default Property | Description | Required | Default
points | List of points | yes | points | List of points | yes |
angles | List of Euler rotation angles | yes | angles | List of Euler rotation angles | yes |
order | The Euler-angle rotation order | no | zxz
degrees | Rotation angles in degrees | no | false degrees | Rotation angles in degrees | no | false
\endtable \endtable
@ -49,10 +50,11 @@ Description
\endverbatim \endverbatim
SeeAlso SeeAlso
EulerCoordinateRotation Foam::coordinateRotations::euler, Foam::quaternion
SourceFiles SourceFiles
lumpedPointState.C lumpedPointState.C
lumpedPointStateI.H
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -65,6 +67,7 @@ SourceFiles
#include "scalarField.H" #include "scalarField.H"
#include "vectorField.H" #include "vectorField.H"
#include "tensorField.H" #include "tensorField.H"
#include "quaternion.H"
#include "Enum.H" #include "Enum.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -98,7 +101,7 @@ public:
private: private:
// Private data // Private Data
//- Positions of lumped points //- Positions of lumped points
pointField points_; pointField points_;
@ -106,7 +109,10 @@ private:
//- Orientation of lumped points (as Euler angles) //- Orientation of lumped points (as Euler angles)
vectorField angles_; vectorField angles_;
//- Euler angles in degrees instead radians //- The Euler-angle rotation order (default: zxz)
quaternion::eulerOrder order_;
//- Euler angles measured in degrees
bool degrees_; bool degrees_;
//- Tensor rotation of lumped points //- Tensor rotation of lumped points

View File

@ -51,7 +51,7 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::labelList Foam::randomDecomp::decompose(const label nCells) const Foam::labelList Foam::randomDecomp::randomMap(const label nCells) const
{ {
Random rndGen(0); Random rndGen(0);
@ -93,7 +93,7 @@ Foam::labelList Foam::randomDecomp::decompose
const scalarField& const scalarField&
) const ) const
{ {
return decompose(mesh.nCells()); // or cc.size() return randomMap(mesh.nCells()); // or cc.size()
} }
@ -104,7 +104,7 @@ Foam::labelList Foam::randomDecomp::decompose
const scalarField& const scalarField&
) const ) const
{ {
return decompose(globalCellCells.size()); // or cc.size() return randomMap(globalCellCells.size()); // or cc.size()
} }

View File

@ -51,7 +51,7 @@ class randomDecomp
// Private Member Functions // Private Member Functions
//- Random distribution on the 0-nCells interval //- Random distribution on the 0-nCells interval
labelList decompose(const label nCells) const; labelList randomMap(const label nCells) const;
//- No copy construct //- No copy construct
void operator=(const randomDecomp&) = delete; void operator=(const randomDecomp&) = delete;

View File

@ -2,7 +2,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) 2016-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation | Copyright (C) 2011-2016 OpenFOAM Foundation
@ -36,15 +36,16 @@ License
#include "metis.h" #include "metis.h"
// Provide a clear error message if we have a size mismatch // Provide a clear error message if we have a severe size mismatch
// Allow widening, but not narrowing
// //
// Metis has an 'idx_t' type, but the IDXTYPEWIDTH define is perhaps // Metis has an 'idx_t' type, but the IDXTYPEWIDTH define is perhaps
// more future-proof? // more future-proof?
//#ifdef IDXTYPEWIDTH //#ifdef IDXTYPEWIDTH
//static_assert //static_assert
//( //(
// sizeof(Foam::label) == (IDXTYPEWIDTH/8), // sizeof(Foam::label) > (IDXTYPEWIDTH/8),
// "sizeof(Foam::label) == (IDXTYPEWIDTH/8), check your metis headers" // "sizeof(Foam::label) > (IDXTYPEWIDTH/8), check your metis headers"
//); //);
//#endif //#endif
@ -91,7 +92,7 @@ Foam::label Foam::metisDecomp::decomposeSerial
// Decomposition options // Decomposition options
List<idx_t> options(METIS_NOPTIONS); List<idx_t> options(METIS_NOPTIONS);
METIS_SetDefaultOptions(options.begin()); METIS_SetDefaultOptions(options.data());
// Processor weights initialised with no size, only used if specified in // Processor weights initialised with no size, only used if specified in
// a file // a file
@ -128,7 +129,7 @@ Foam::label Foam::metisDecomp::decomposeSerial
cellWeights.setSize(cWeights.size()); cellWeights.setSize(cWeights.size());
forAll(cellWeights, i) forAll(cellWeights, i)
{ {
cellWeights[i] = int(cWeights[i]/minWeights); cellWeights[i] = idx_t(cWeights[i]/minWeights);
} }
} }
@ -205,17 +206,17 @@ Foam::label Foam::metisDecomp::decomposeSerial
( (
&numCells, // num vertices in graph &numCells, // num vertices in graph
&ncon, // num balancing constraints &ncon, // num balancing constraints
xadj_metis.ref().begin(), // indexing into adjncy xadj_metis.ref().data(), // indexing into adjncy
adjncy_metis.ref().begin(), // neighbour info adjncy_metis.ref().data(), // neighbour info
cellWeights.begin(), // vertex wts cellWeights.data(), // vertex wts
nullptr, // vsize: total communication vol nullptr, // vsize: total communication vol
faceWeights.begin(), // edge wts faceWeights.data(), // edge wts
&nProcs, // nParts &nProcs, // nParts
processorWeights.begin(), // tpwgts processorWeights.data(), // tpwgts
nullptr, // ubvec: processor imbalance (default) nullptr, // ubvec: processor imbalance (default)
options.begin(), options.data(),
&edgeCut, &edgeCut,
decomp_metis.ref().begin() decomp_metis.ref().data()
); );
} }
else else
@ -224,17 +225,17 @@ Foam::label Foam::metisDecomp::decomposeSerial
( (
&numCells, // num vertices in graph &numCells, // num vertices in graph
&ncon, // num balancing constraints &ncon, // num balancing constraints
xadj_metis.ref().begin(), // indexing into adjncy xadj_metis.ref().data(), // indexing into adjncy
adjncy_metis.ref().begin(), // neighbour info adjncy_metis.ref().data(), // neighbour info
cellWeights.begin(), // vertex wts cellWeights.data(), // vertex wts
nullptr, // vsize: total communication vol nullptr, // vsize: total communication vol
faceWeights.begin(), // edge wts faceWeights.data(), // edge wts
&nProcs, // nParts &nProcs, // nParts
processorWeights.begin(), // tpwgts processorWeights.data(), // tpwgts
nullptr, // ubvec: processor imbalance (default) nullptr, // ubvec: processor imbalance (default)
options.begin(), options.data(),
&edgeCut, &edgeCut,
decomp_metis.ref().begin() decomp_metis.ref().data()
); );
} }

View File

@ -1,13 +1,23 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
wmakeLnInclude reactingEulerFoam/interfacialCompositionModels wmakeLnInclude reactingEulerFoam/interfacialCompositionModels
wmakeLnInclude reactingEulerFoam/interfacialModels wmakeLnInclude reactingEulerFoam/interfacialModels
wmakeLnInclude reactingEulerFoam/derivedFvPatchFields wmakeLnInclude reactingEulerFoam/derivedFvPatchFields
case "$WM_COMPILER" in
Mingw*)
echo "Skipping $WM_COMPILER compilation of $PWD"
echo "... needs further resolution of cyclic dependencies"
exit 0
;;
esac
#------------------------------------------------------------------------------
wmake $targetType reactingEulerFoam/phaseSystems wmake $targetType reactingEulerFoam/phaseSystems
wmake $targetType reactingEulerFoam/interfacialModels wmake $targetType reactingEulerFoam/interfacialModels
wmake $targetType reactingEulerFoam/interfacialCompositionModels wmake $targetType reactingEulerFoam/interfacialCompositionModels
@ -19,5 +29,4 @@ wmake $targetType reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompr
wmake $targetType reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem wmake $targetType reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem
wmake $targetType reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels wmake $targetType reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,9 +1,9 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I../phaseSystems/lnInclude \ -I../phaseSystems/lnInclude \
-I../interfacialModels/lnInclude\ -I../interfacialModels/lnInclude\
-I../interfacialCompositionModels/lnInclude \ -I../interfacialCompositionModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \ -I$(LIB_SRC)/transportModels/incompressible/transportModel \
@ -17,4 +17,6 @@ LIB_LIBS = \
-lmeshTools \ -lmeshTools \
-lreactingPhaseSystem \ -lreactingPhaseSystem \
-lreactingEulerianInterfacialModels \ -lreactingEulerianInterfacialModels \
-lreactingEulerianInterfacialCompositionModels -lreactingEulerianInterfacialCompositionModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels

View File

@ -16,6 +16,7 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie -lspecie

View File

@ -11,7 +11,10 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lcompressibleTransportModels \ -lcompressibleTransportModels \
-lspecie \ -lspecie \
-lreactingPhaseSystem -lreactingPhaseSystem \
-lturbulenceModels \
-lcompressibleTurbulenceModels

View File

@ -1,10 +1,10 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I../interfacialModels/lnInclude \ -I../interfacialModels/lnInclude \
-I../interfacialCompositionModels/lnInclude \ -I../interfacialCompositionModels/lnInclude \
-I../derivedFvPatchFields/lnInclude \ -I../derivedFvPatchFields/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
@ -16,6 +16,8 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \
-lsampling \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \

View File

@ -4,6 +4,8 @@ EXE_INC = \
-I../../interfacialModels/lnInclude\ -I../../interfacialModels/lnInclude\
-I../../interfacialCompositionModels/lnInclude \ -I../../interfacialCompositionModels/lnInclude \
-I../../derivedFvPatchFields/lnInclude \ -I../../derivedFvPatchFields/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
@ -11,16 +13,16 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \ -I$(LIB_SRC)/transportModels/incompressible/transportModel \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lreactingPhaseSystem \ -lreactingPhaseSystem \
-lreactingMultiphaseSystem \ -lreactingMultiphaseSystem \
-lreactingEulerianInterfacialModels \ -lreactingEulerianInterfacialModels \
-lreactingEulerianInterfacialCompositionModels \ -lreactingEulerianInterfacialCompositionModels \
-lreactingEulerianFvPatchFields \ -lreactingEulerianFvPatchFields \
-lfiniteVolume \ -lturbulenceModels \
-lfvOptions \ -lcompressibleTurbulenceModels
-lmeshTools

View File

@ -5,6 +5,9 @@ EXE_INC = \
-I../multiphaseCompressibleTurbulenceModels/lnInclude \ -I../multiphaseCompressibleTurbulenceModels/lnInclude \
-I../../derivedFvPatchFields/lnInclude \ -I../../derivedFvPatchFields/lnInclude \
-IalphaContactAngle \ -IalphaContactAngle \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
@ -12,11 +15,12 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-lcombustionModels \ -lcombustionModels \
-lreactingPhaseSystem -lreactingPhaseSystem

View File

@ -1,11 +1,11 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I../twoPhaseSystem/lnInclude \ -I../twoPhaseSystem/lnInclude \
-I../../phaseSystems/lnInclude \ -I../../phaseSystems/lnInclude \
-I../../interfacialModels/lnInclude\ -I../../interfacialModels/lnInclude\
-I../../interfacialCompositionModels/lnInclude \ -I../../interfacialCompositionModels/lnInclude \
-I../../derivedFvPatchFields/lnInclude \ -I../../derivedFvPatchFields/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \ -I$(LIB_SRC)/transportModels/incompressible/transportModel \

View File

@ -4,6 +4,9 @@ EXE_INC = \
-I../../phaseSystems/lnInclude \ -I../../phaseSystems/lnInclude \
-I../twoPhaseCompressibleTurbulenceModels/lnInclude \ -I../twoPhaseCompressibleTurbulenceModels/lnInclude \
-I../../derivedFvPatchFields/lnInclude \ -I../../derivedFvPatchFields/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
@ -12,10 +15,12 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lsampling \
-lcombustionModels \ -lcombustionModels \
-lreactingPhaseSystem -lreactingPhaseSystem \
-lturbulenceModels \
-lcompressibleTurbulenceModels

View File

@ -105,6 +105,7 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
waveHeight_(0), waveHeight_(0),
wavePhase_(0), wavePhase_(0),
waveLength_(0), waveLength_(0),
startTime_(0),
rampTime_(1), rampTime_(1),
secondOrder_(false) secondOrder_(false)
{} {}
@ -126,6 +127,14 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
waveHeight_(dict.get<scalar>("waveHeight")), waveHeight_(dict.get<scalar>("waveHeight")),
wavePhase_(dict.get<scalar>("wavePhase")), wavePhase_(dict.get<scalar>("wavePhase")),
waveLength_(this->waveLength(initialDepth_, wavePeriod_)), waveLength_(this->waveLength(initialDepth_, wavePeriod_)),
startTime_
(
dict.lookupOrDefault<scalar>
(
"startTime",
db().time().startTime().value()
)
),
rampTime_(dict.get<scalar>("rampTime")), rampTime_(dict.get<scalar>("rampTime")),
secondOrder_(dict.lookupOrDefault<bool>("secondOrder", false)) secondOrder_(dict.lookupOrDefault<bool>("secondOrder", false))
{ {
@ -165,6 +174,7 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
waveHeight_(ptf.waveHeight_), waveHeight_(ptf.waveHeight_),
wavePhase_(ptf.wavePhase_), wavePhase_(ptf.wavePhase_),
waveLength_(ptf.waveLength_), waveLength_(ptf.waveLength_),
startTime_(ptf.startTime_),
rampTime_(ptf.rampTime_), rampTime_(ptf.rampTime_),
secondOrder_(ptf.secondOrder_) secondOrder_(ptf.secondOrder_)
{} {}
@ -185,6 +195,7 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
waveHeight_(ptf.waveHeight_), waveHeight_(ptf.waveHeight_),
wavePhase_(ptf.wavePhase_), wavePhase_(ptf.wavePhase_),
waveLength_(ptf.waveLength_), waveLength_(ptf.waveLength_),
startTime_(ptf.startTime_),
rampTime_(ptf.rampTime_), rampTime_(ptf.rampTime_),
secondOrder_(ptf.secondOrder_) secondOrder_(ptf.secondOrder_)
{} {}
@ -199,7 +210,7 @@ void Foam::waveMakerPointPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = db().time().value(); const scalar t = db().time().value() - startTime_;
const scalar waveK = constant::mathematical::twoPi/waveLength_; const scalar waveK = constant::mathematical::twoPi/waveLength_;
const scalar sigma = constant::mathematical::twoPi/wavePeriod_; const scalar sigma = constant::mathematical::twoPi/wavePeriod_;
@ -259,9 +270,7 @@ void Foam::waveMakerPointPatchVectorField::updateCoeffs()
const scalar stroke = sqrt(16.0*waveHeight_*initialDepth_/3.0); const scalar stroke = sqrt(16.0*waveHeight_*initialDepth_/3.0);
const scalar hr = waveHeight_/initialDepth_; const scalar hr = waveHeight_/initialDepth_;
wavePeriod_ = (2.0/(kappa*waveCelerity))*(3.8 + hr); wavePeriod_ = (2.0/(kappa*waveCelerity))*(3.8 + hr);
const scalar tSolitary = -0.5*wavePeriod_ + t;
const scalar tSolitary =
-0.5*wavePeriod_ + t - db().time().startTime().value();
// Newton-Rapshon // Newton-Rapshon
scalar theta1 = 0; scalar theta1 = 0;
@ -308,6 +317,7 @@ void Foam::waveMakerPointPatchVectorField::write(Ostream& os) const
os.writeEntry("wavePeriod", wavePeriod_); os.writeEntry("wavePeriod", wavePeriod_);
os.writeEntry("waveHeight", waveHeight_); os.writeEntry("waveHeight", waveHeight_);
os.writeEntry("wavePhase", wavePhase_); os.writeEntry("wavePhase", wavePhase_);
os.writeEntry("startTime", startTime_);
os.writeEntry("rampTime", rampTime_); os.writeEntry("rampTime", rampTime_);
os.writeEntry("secondOrder", secondOrder_); os.writeEntry("secondOrder", secondOrder_);
writeEntry("value", os); writeEntry("value", os);

View File

@ -63,6 +63,7 @@ Usage
wavePeriod | wave period | yes | wavePeriod | wave period | yes |
waveHeight | Wave height | yes | waveHeight | Wave height | yes |
wavePhase | wave phase | yes | wavePhase | wave phase | yes |
startTime | Start time | no | case start time
rampTime | Time to reach maximum motion | yes | rampTime | Time to reach maximum motion | yes |
secondOrder | Second order calculation | no | no secondOrder | Second order calculation | no | no
\endtable \endtable
@ -137,6 +138,9 @@ class waveMakerPointPatchVectorField
//- Wave length //- Wave length
scalar waveLength_; scalar waveLength_;
//- Start time
scalar startTime_;
//- Ramp time //- Ramp time
scalar rampTime_; scalar rampTime_;

View File

@ -33,6 +33,15 @@ solvers
{ {
$p; $p;
relTol 0; relTol 0;
// Explicit specify solver for coarse-level correction to override
// solution tolerance
coarsestLevelCorr
{
solver PCG;
preconditioner DIC;
relTol 0.05;
}
} }
"(U|k|B|nuTilda)" "(U|k|B|nuTilda)"

View File

@ -7,7 +7,7 @@ RANLIB = ranlib
CPP = cpp CPP = cpp
LD = ld LD = ld
GFLAGS = -D$(WM_VERSION) -DWM_ARCH_OPTION=$(WM_ARCH_OPTION) \ GFLAGS = -D$(WM_VERSION) \
-DWM_$(WM_PRECISION_OPTION) -DWM_LABEL_SIZE=$(WM_LABEL_SIZE) -DWM_$(WM_PRECISION_OPTION) -DWM_LABEL_SIZE=$(WM_LABEL_SIZE)
GINC = GINC =
GLIBS = -lm GLIBS = -lm