Merge branch 'nextRelease' of git://git.code.sf.net/p/foam-extend/foam-extend-3.2 into nextRelease

This commit is contained in:
Vuko Vukcevic 2015-10-23 14:07:08 +02:00
commit 4298022f79
63 changed files with 3194 additions and 116 deletions

View file

@ -39,6 +39,117 @@ cmake_minimum_required (VERSION 2.8)
PROJECT(foam-extend-3.2) PROJECT(foam-extend-3.2)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Utility functions
#
# GetHostName(var)
#
# Set the variable named ${var} to the host hostname
#
function(GetHostName var)
set( thisHostName "unknown")
if(CMAKE_HOST_WIN32)
execute_process(
COMMAND hostname
OUTPUT_VARIABLE thisHostname
)
else()
execute_process(
COMMAND hostname -f
OUTPUT_VARIABLE thisHostname
)
endif()
set(${var} ${thisHostname} PARENT_SCOPE)
endfunction()
#
# GetGitStatus(status ecode)
#
# Get the git status for the local git repository of the source code
# The variable named ${status} will get the git status
# The variable named ${ecode} will get the command error code
#
function(GetGitStatus _status _ecode)
set( git_status "unknown")
set( git_ecode "1")
execute_process(
COMMAND git status
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE git_status
RESULT_VARIABLE git_ecode
ERROR_QUIET
)
set(${_status} ${git_status} PARENT_SCOPE)
set(${_ecode} ${git_ecode} PARENT_SCOPE)
endfunction()
#
# GetGitBranchName(var)
#
# Set the variable named ${var} to the git branch name of the source code
#
function(GetGitBranchName var)
set( retValue "unknown")
execute_process(
COMMAND git branch --no-color
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE listOfGitBranches
)
# Create list of strings
string(REPLACE "\n" ";" listOfGitBranches ${listOfGitBranches})
# Iterate over list, find the string beginning with "* "
foreach(branch ${listOfGitBranches})
string(REGEX MATCH "\\* .*$" matchString ${branch})
string(LENGTH "${matchString}" lengthMatchString)
if(lengthMatchString GREATER 0)
# We have match. Cleanup and set retValue
string(REPLACE "* " "" retValue ${matchString})
endif()
endforeach()
set(${var} ${retValue} PARENT_SCOPE)
endfunction()
#
# GetGitRevNumber(var)
#
# Set the variable named ${var} to the git revision number of the source code
#
function(GetGitRevNumber var)
set( retValue "unknown")
execute_process(
COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE git_rev_number
)
# Minimal check that we do have a valid string
string(LENGTH "${git_rev_number}" lengthString)
if(lengthString GREATER 0)
set(retValue ${git_rev_number})
endif()
set(${var} ${retValue} PARENT_SCOPE)
endfunction()
# CleanUpStringForCDash(var)
#
# Cleanup the variable named ${value} for characters not supported
# for CDash identifiers. Return the modified value in retVar
#
function(CleanUpStringForCDash value retVar)
string(REPLACE "/" "_" value "${value}")
string(REPLACE " " "_" value ${value})
set(${retVar} ${value} PARENT_SCOPE)
endfunction()
#-----------------------------------------------------------------------------
#
#
# Initialization of CTest specific variables # Initialization of CTest specific variables
# #
## Run ctest in parallel if environment variable WM_NCOMPPROCS is set ## Run ctest in parallel if environment variable WM_NCOMPPROCS is set
@ -57,13 +168,11 @@ IF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
SITENAME $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} SITENAME $ENV{CDASH_SUBMIT_LOCAL_HOST_ID}
CACHE STRING "Name of the local site" CACHE STRING "Name of the local site"
) )
ELSE (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "") ELSE ()
# Grab the hostname FQN; will be used for the sitename # Grab the hostname FQN; will be used for the sitename
execute_process( GetHostName(SITENAME)
COMMAND hostname -f
OUTPUT_VARIABLE SITENAME ENDIF()
)
ENDIF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
MESSAGE("Initializing the name of this local site to: ${SITENAME}") MESSAGE("Initializing the name of this local site to: ${SITENAME}")
@ -146,27 +255,15 @@ elseif(GIT_FOUND)
message("The git command was found: ${GIT_EXECUTABLE}") message("The git command was found: ${GIT_EXECUTABLE}")
# Check if the source code is under a valid git repository # Check if the source code is under a valid git repository
execute_process( GetGitStatus(GIT_STATUS GIT_ECODE)
COMMAND git status
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE GIT_STATUS
RESULT_VARIABLE GIT_ECODE
ERROR_QUIET
)
if(NOT GIT_ECODE) if(NOT GIT_ECODE)
# We have a valid git repository. Grab the branch and revision info. # We have a valid git repository.
# Add to the build name # Grab the branch and revision info. Add to the build name
exec_program(git GetGitBranchName(GIT_BRANCH_NAME)
ARGS branch --no-color 2> /dev/null | grep '*'| awk '{print $2}'
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch: ${GIT_BRANCH_NAME}") message("Git branch: ${GIT_BRANCH_NAME}")
execute_process( GetGitRevNumber(GIT_REV_NUMBER)
COMMAND git rev-parse --short=12 HEAD
OUTPUT_VARIABLE GIT_REV_NUMBER
)
message("Git revision: ${GIT_REV_NUMBER}") message("Git revision: ${GIT_REV_NUMBER}")
SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}") SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}")
@ -216,13 +313,13 @@ endif()
# Some last minute cleanup # Some last minute cleanup
# Seems like no '/' or ' 'are allowed in the BUILDNAME or in the SITE name # Seems like no '/' or ' 'are allowed in the BUILDNAME or in the SITE name
string(REPLACE "/" "_" BUILDNAME ${BUILDNAME}) CleanUpStringForCDash(${BUILDNAME} BUILDNAME)
string(REPLACE " " "_" BUILDNAME ${BUILDNAME}) CleanUpStringForCDash(${SITE} SITE)
string(REPLACE "/" "_" SITE ${SITE})
string(REPLACE " " "_" SITE ${SITE})
message("Build name: ${BUILDNAME}") message("Build name: ${BUILDNAME}")
message("Site name: ${SITE}")
#
# Build section # Build section
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -282,10 +379,18 @@ IF(BUILD_TESTING)
IF(RUN_FROM_ONE_TIMESTEP) IF(RUN_FROM_ONE_TIMESTEP)
# Modify the cases controlDict file in order to run for only one time step # Modify the cases controlDict file in order to run for only one time step
MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}") MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}")
if(CMAKE_HOST_WIN32)
# Need to supply a bash shell to run the script under Windows
EXECUTE_PROCESS(
COMMAND bash -c "$ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}"
WORKING_DIRECTORY .
)
else()
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR} COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}
WORKING_DIRECTORY . WORKING_DIRECTORY .
) )
endif()
ENDIF(RUN_FROM_ONE_TIMESTEP) ENDIF(RUN_FROM_ONE_TIMESTEP)
ENDIF(BUILD_TESTING) ENDIF(BUILD_TESTING)

View file

@ -6,6 +6,10 @@
## ENABLE_TESTING() ## ENABLE_TESTING()
## INCLUDE(CTest) ## INCLUDE(CTest)
# These settings will allow you to publish your dashboards results
# on the foam-extend CDash service hosted on SourceForge.Net
# See here: http://foam-extend.sourceforge.net/CDash/index.php
#
set(CTEST_PROJECT_NAME "foam-extend-3.2") set(CTEST_PROJECT_NAME "foam-extend-3.2")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
@ -13,3 +17,17 @@ set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "foam-extend.sourceforge.net") set(CTEST_DROP_SITE "foam-extend.sourceforge.net")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=foam-extend-3.2") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=foam-extend-3.2")
set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_DROP_SITE_CDASH TRUE)
# We can override those variables for local sites so you can use
# your own site CDash service
# This optional file will be located here:
# $FOAM_SITE_DIR/etc/CTestConfig.site.cmake
#
include($ENV{FOAM_SITE_DIR}/etc/CTestConfig.site.cmake OPTIONAL)
# We can override those variables from user space so you can use
# your own personal CDash service
# This optional file will be located here:
# $WM_PROJECT_USER_DIR/etc/CTestConfig.user.cmake
#
include($ENV{WM_PROJECT_USER_DIR}/etc/CTestConfig.user.cmake OPTIONAL)

View file

@ -65,43 +65,43 @@ echo
# #
[ ! -z "$WM_THIRD_PARTY_USE_GCC_445" ] && { [ ! -z "$WM_THIRD_PARTY_USE_GCC_445" ] && {
echo "Building gmp-5.0.1 mpfr-3.0.1 gcc-4.4.5" echo "Building gmp-5.0.1 mpfr-3.0.1 gcc-4.4.5"
( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) ( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u http://ftpmirror.gnu.org/gmp/gmp-5.0.1.tar.gz )
( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz ) ( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u http://ftpmirror.gnu.org/mpfr/mpfr-3.0.1.tar.gz )
( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz ) ( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u http://ftpmirror.gnu.org/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz )
} }
# Gcc 4.5.1 and companion libraries # Gcc 4.5.1 and companion libraries
# #
[ ! -z "$WM_THIRD_PARTY_USE_GCC_451" ] && { [ ! -z "$WM_THIRD_PARTY_USE_GCC_451" ] && {
echo "Building gmp-5.0.1 mpfr-3.0.1 mpc-0.8.2 gcc-4.5.1" echo "Building gmp-5.0.1 mpfr-3.0.1 mpc-0.8.2 gcc-4.5.1"
( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) ( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u http://ftpmirror.gnu.org/gmp/gmp-5.0.1.tar.gz )
( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz ) ( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u http://ftpmirror.gnu.org/mpfr/mpfr-3.0.1.tar.gz )
( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz ) ( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz )
( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz ) ( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u http://ftpmirror.gnu.org/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz )
} }
# Gcc 4.6.3 and companion libraries # Gcc 4.6.3 and companion libraries
# #
[ ! -z "$WM_THIRD_PARTY_USE_GCC_463" ] && { [ ! -z "$WM_THIRD_PARTY_USE_GCC_463" ] && {
echo "Building gmp-5.0.5 mpfr-3.1.0 mpc-0.9 gcc-4.6.3" echo "Building gmp-5.0.5 mpfr-3.1.0 mpc-0.9 gcc-4.6.3"
( rpm_make -p gmp-5.0.5 -s gmp-5.0.5.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.5.tar.bz2 ) ( rpm_make -p gmp-5.0.5 -s gmp-5.0.5.spec -u http://ftpmirror.gnu.org/gmp/gmp-5.0.5.tar.bz2 )
( rpm_make -p mpfr-3.1.0 -s mpfr-3.1.0.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.0.tar.gz ) ( rpm_make -p mpfr-3.1.0 -s mpfr-3.1.0.spec -u http://ftpmirror.gnu.org/mpfr/mpfr-3.1.0.tar.gz )
( rpm_make -p mpc-0.9 -s mpc-0.9.spec -u http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz ) ( rpm_make -p mpc-0.9 -s mpc-0.9.spec -u http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz )
( rpm_make -p gcc-4.6.3 -s gcc-4.6.3.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.gz ) ( rpm_make -p gcc-4.6.3 -s gcc-4.6.3.spec -u http://ftpmirror.gnu.org/gcc/gcc-4.6.3/gcc-4.6.3.tar.gz )
} }
# Gcc 4.8.4 and companion libraries # Gcc 4.8.4 and companion libraries
# #
[ ! -z "$WM_THIRD_PARTY_USE_GCC_484" ] && { [ ! -z "$WM_THIRD_PARTY_USE_GCC_484" ] && {
echo "Building gcc-4.8.4" echo "Building gcc-4.8.4"
( rpm_make -p gcc-4.8.4 -s gcc-4.8.4.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.gz ) ( rpm_make -p gcc-4.8.4 -s gcc-4.8.4.spec -u http://ftpmirror.gnu.org/gcc/gcc-4.8.4/gcc-4.8.4.tar.gz )
} }
# Gcc 4.9.2 and companion libraries # Gcc 4.9.2 and companion libraries
# #
[ ! -z "$WM_THIRD_PARTY_USE_GCC_492" ] && { [ ! -z "$WM_THIRD_PARTY_USE_GCC_492" ] && {
echo "Building gcc-4.9.2" echo "Building gcc-4.9.2"
( rpm_make -p gcc-4.9.2 -s gcc-4.9.2.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz ) ( rpm_make -p gcc-4.9.2 -s gcc-4.9.2.spec -u http://ftpmirror.gnu.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz )
} }
# Clang 3.6.0 # Clang 3.6.0
@ -123,7 +123,7 @@ echo
[ ! -z "$WM_THIRD_PARTY_USE_M4_1416" ] && { [ ! -z "$WM_THIRD_PARTY_USE_M4_1416" ] && {
echo "Building m4 1.4.16" echo "Building m4 1.4.16"
# You need a recent version of m4 in order to compile a recent version of bison # You need a recent version of m4 in order to compile a recent version of bison
( rpm_make -p m4-1.4.16 -s m4-1.4.16.spec -u http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz ) ( rpm_make -p m4-1.4.16 -s m4-1.4.16.spec -u http://ftpmirror.gnu.org/m4/m4-1.4.16.tar.gz )
} }
# bison 2.7 # bison 2.7
@ -131,7 +131,7 @@ echo
[ ! -z "$WM_THIRD_PARTY_USE_BISON_27" ] && { [ ! -z "$WM_THIRD_PARTY_USE_BISON_27" ] && {
echo "Building bison 2.7" echo "Building bison 2.7"
# You need a recent version of m4 in order to compile a recent version of bison # You need a recent version of m4 in order to compile a recent version of bison
( rpm_make -p bison-2.7 -s bison-2.7.spec -u http://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz ) ( rpm_make -p bison-2.7 -s bison-2.7.spec -u http://ftpmirror.gnu.org/bison/bison-2.7.tar.gz )
} }
# flex 2.5.35 # flex 2.5.35

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: http://ftp.gnu.org/gnu/bison URL: http://ftpmirror.gnu.org/bison
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: http://ftp.gnu.org/gnu/bison URL: http://ftpmirror.gnu.org/bison
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5 URL: http://ftpmirror.gnu.org/gcc/gcc-4.4.5
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1 URL: http://ftpmirror.gnu.org/gcc/gcc-4.5.1
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.4 URL: http://ftpmirror.gnu.org/gcc/gcc-4.6.4
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.4 URL: http://ftpmirror.gnu.org/gcc/gcc-4.7.4
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.4 URL: http://ftpmirror.gnu.org/gcc/gcc-4.8.4
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2 URL: http://ftpmirror.gnu.org/gcc/gcc-4.9.2
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gmp URL: http://ftpmirror.gnu.org/gmp
Source: %url/%{name}-%{version}.tar.bz2 Source: %url/%{name}-%{version}.tar.bz2
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gmp URL: http://ftpmirror.gnu.org/gmp
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/gmp URL: http://ftpmirror.gnu.org/gmp
Source: %url/%{name}-%{version}.tar.bz2 Source: %url/%{name}-%{version}.tar.bz2
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: http://ftp.gnu.org/gnu/m4 URL: http://ftpmirror.gnu.org/m4
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/mpfr URL: http://ftpmirror.gnu.org/mpfr
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -72,7 +72,7 @@ License: Unkown
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
URL: ftp://ftp.gnu.org/gnu/mpfr URL: http://ftpmirror.gnu.org/mpfr
Source: %url/%{name}-%{version}.tar.gz Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix} Prefix: %{_prefix}
Group: Development/Tools Group: Development/Tools

View file

@ -0,0 +1,3 @@
icoDyMIbFoam.C
EXE = $(FOAM_APPBIN)/icoDyMIbFoam

View file

@ -0,0 +1,15 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I./lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-limmersedBoundary \
-ldynamicFvMesh \
-ldynamicMesh \
-llduSolvers

View file

@ -0,0 +1,52 @@
Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
dimensionedScalar nu
(
transportProperties.lookup("nu")
);
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "createPhi.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);

View file

@ -0,0 +1,141 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
icoDyMOversetFoam
Description
Transient solver for incompressible, laminar flow of Newtonian fluids
with dynamic mesh and immersed boundary mesh support.
Author
Hrvoje Jasak, Wikki Ltd. All rights reserved
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "immersedBoundaryFvPatch.H"
#include "immersedBoundaryAdjustPhi.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createDynamicFvMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
// Make the fluxes absolute
fvc::makeAbsolute(phi, U);
bool meshChanged = mesh.update();
reduce(meshChanged, orOp<bool>());
Info<< "Mesh update" << meshChanged << endl;
# include "createIbMasks.H"
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);
# include "readPIMPLEControls.H"
# include "CourantNo.H"
// Pressure-velocity corrector
int oCorr = 0;
do
{
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);
solve(UEqn == -fvc::grad(p));
// --- PISO loop
for (int corr = 0; corr < nCorr; corr++)
{
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
// Immersed boundary update
U.correctBoundaryConditions();
phi = faceIbMask*(fvc::interpolate(U) & mesh.Sf());
// Adjust immersed boundary fluxes
immersedBoundaryAdjustPhi(phi, U);
adjustPhi(phi, U, p);
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "immersedBoundaryContinuityErrs.H"
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
}
} while (++oCorr < nOuterCorr);
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}
// ************************************************************************* //

View file

@ -69,7 +69,7 @@ already have the correct tools installed on your system.
using the command: using the command:
git clone --branch nextRelease git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 foam-extend-3.2 git clone --branch nextRelease git://git.code.sf.net/p/foam-extend/foam-extend-3.2
5) Open a new MSYS shell and chdir to your foam-extend-3.2 source directory. 5) Open a new MSYS shell and chdir to your foam-extend-3.2 source directory.

6
doc/testHarness/Allrun Normal file
View file

@ -0,0 +1,6 @@
# Generate the ASCII version of testHarness.org
pandoc testHarness.org -N -s -S -f org -t asciidoc -o testHarness.txt
# Generate the Mediawiki version of testHarness.org
pandoc testHarness.org -s -S -f org -t mediawiki -o testHarness.mediawiki

View file

@ -0,0 +1,331 @@
# -*- mode: org; -*-
#
#+TITLE: *foam-extend-3.2: A guide to test harness*
#+AUTHOR: Martin Beaudoin
#+DATE: 5 September 2015
#+LINK: foam-extend https://sourceforge.net/projects/openfoam-extend/
#+OPTIONS: author:t
#+OPTIONS: toc:2
#+OPTIONS: ^:{}
#+OPTIONS: _:{}
###############################################################################
* A guide to the foam-extend test harness
This file is a guide to the foam-extend test harness.
The test harness from foam-extend version 3.2 was used as a reference
implementation for this documentation.
The original version of this file is located at
$WM\_PROJECT\_DIR/doc/testHarness/testHarness.org.
A plain text version of this file is located at
$WM\_PROJECT\_DIR/doc/testHarness/testHarness.txt.
A MediaWiki version of this file is located at
In case any converted versions (text, MediaWiki, etc.) of this file differ from
the original testHarness.org file, the latter should always be considered the
reference version. But we do appreciate your feedback and comments for improving
this text.
For instance, if you ever decide to improve the Mediawiki version only, please
consider contributing your changes back to the testHarness.org file as
well. Otherwise, your Mediawiki changes might get overwritten by an updated
version of the .org reference file.
** Introduction
The foam-extend test harness scripts are based mainly on Kitware CMake/CTest
utilities http://www.cmake.org/.
In its current version, the test harness is designed for running the full suite
of foam-extend tutorials, and report the fail/success results to a CDash Web
service one can consult using a simple browser.
The CDash Web service for foam-extend 3.2 is available here:
http://foam-extend.sourceforge.net/CDash/index.php
For a quick introduction of CMake/CTest, see here:
http://www.cmake.org/Wiki/CMake/Testing_With_CTest
For a more complete introduction to CMake and CTest, one can also refer to the
Kitware book `Mastering CMake: A Cross-Platform Build System`
http://www.kitware.com/products/books.php
For more information on Kitware CDash, see here: http://www.cdash.org/
The rest of this document will provide suficient information so you can run the
foam-extend test harness on your own.
** Files location and a short description
The foam-extend test harness is currently built from the following files:
- =$WM_PROJECT_DIR/CMakeLists.txt= :: This is the main CMake file driving the
configuration of the test harness. When processed though the cmake
utility, all the necessary Makefiles and CTest scripts will get
generated.
- =$WM_PROJECT_DIR/CTestConfig.cmake= :: This file contains the various variables
and definitions necessary to publish your test harness results over the
CDash Web service for foam-extend 3.2.
- =$FOAM_SITE_DIR/etc/CTestConfig.site.cmake= :: This file allow you to override
the values from the main $WM\_PROJECT\_DIR/CTestConfig.cmake. This file
should be used if you are hosting your own site CDash Web
service.
- =$WM_PROJECT_USER_DIR/etc/CTestConfig.user.cmake= :: This file allow you to
override the values from the main $WM\_PROJECT\_DIR/CTestConfig.cmake and the
site file $FOAM\_SITE\_DIR/etc/CTestConfig.site.cmake. This file should be
used if you are hosting your own user space personal CDash Web service.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/CMakeFiles/CMakeLists.txt= ::
This file is a copy of the main $WM\_PROJECT\_DIR/CMakeLists.txt file.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/CMakeFiles/CTestConfig.cmake.foam-extend= :: This file is a copy of the main $WM\_PROJECT\_DIR/CTestConfig.cmake file.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/CMakeFiles/Dashboard_Tutorials.cmake.in= :: This file is a template for generating the file `ctest -S` file
$WM\_PROJECT\_DIR/testHarness/foam-extend/3.2/runDir/Dashboard\_Tutorials.cmake
CMake will take care of automatically generating the Dashboard\_Tutorials.cmake file.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/CMakeFiles/FOAM_Tutorials.cmake= :: This file will configure a copy the foam-extend tutorials for running
under the test harness. The copy will be made under
$WM\_PROJECT\_DIR/testHarness/foam-extend/3.2/runDir.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/runDir/Allclean= :: Cleanup
script. Will remove all the automatically generated files and directories
for the test harness. Should be called prior to running the Allrun\_\* scripts.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/runDir/Allrun_CMakeOnly= :: This
script will generate all the necessary files for running the test harness
on the foam-extend tutorials. One can then invoke `make help` to see all
the available make options.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/runDir/Allrun_Experimental= ::
Same script as `Allrun\_CMakeOnly`, but will also call `make
Experimental`.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/runDir/Allrun_Nightly= :: Same
script as `Allrun\_CMakeOnly`, but will also call `make Nightly`.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/scripts/AdditionalRunFunctions= :: Additional `bash` macros for the tutorial Allrun files.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/scripts/Allrun.default= ::
Default Allrun script for the tutorial when none are provided.
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/scripts/addMissingAllrunFileToTutorial.sh= :: Bash script for adding a default Allrun file to the tutorials that do not
have one. The test harness only run tutorials with an existing Allrun file
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/scripts/prepareCasesForOneTimeStep.sh= :: This script will modify the test cases system/controlDict in order for the
case to run for only 1 time step
- =$WM_PROJECT_DIR/testHarness/foam-extend/3.2/scripts/prepareCasesForTestHarness.sh= :: This script will modify the test cases Allrun file so it can run properly
under the test harness.
** Configuring your $WM\_PROJECT\_DIR/etc/prefs.sh file for the test harness
The following environment variables are used for configuring the test
harness. You should use your $WM\_PROJECT\_DIR/etc/prefs.sh file to initialize
these variables.
- =CDASH_SUBMIT_LOCAL_HOST_ID= :: System identifier for the FOAM CDash test harness
on foam-extend. By default, your system FQN/hostname will be used as the
system identifier when publishing your test harness results on the FOAM CDash
server on foam-extend. You can override your identifier using this environment
variable.
- =CDASH_SCM_INFO= :: Buildname suffix for the FOAM CDash test harness on foam-extend.
By default, the git branch name and git revision number will be appended to the CDash build name.
Otherwise, for users not using git, or wanting to provide additionnal
information, simply initialize the CDASH\_SCM\_INFO with the proper information.
- =WM_NCOMPPROCS= :: Specify the number of cores to use for the parallel execution
of the test harness.
- =FOAM_TUTORIALS= :: Directory where the original test cases are located. For
foam-extend, this would be by default $WM\_PROJECT\_DIR/tutorials.
** The main dashboards : Experimental, Nightly and Continuous
The result of a test run, reformatted for easy review, is called a
`dashboard`. A dashboard can be submitted to a central server, like CDash. Once
properly configured, the test harness will offer 3 main dashboards.
- =Experimental= :: Will test the current state of the project. An experimental
submission can be performed at any time, usually interactively from the
current working copy of a developer.
- =Nightly= :: Is similar to Experimental, except that the source tree will be set
to the state it was in at a specific nightly time. This ensures that all
`nightly` submissions correspond to the state of the project at the same
point in time. `Nightly` builds are usually done automatically at a preset
time of day. Nightly build will also update your source code to the latest
available revision. So it is best not to run a Nightly dashboard on source
code that is not yet committed.
- =Continuous= :: Means that the source tree is updated to the latest revision,
and a build / test cycle is performed only if any files were actually
updated. Like `Nightly` builds, `Continuous` ones are usually done
automatically and repeatedly in intervals.
There are also `intermediary dashboards` that allow you to select a specific
test harness intermediary step. The command `make help` will show you that list:
#+BEGIN_SRC
... ContinuousBuild
... ContinuousConfigure
... ContinuousCoverage
... ContinuousMemCheck
... ContinuousStart
... ContinuousSubmit
... ContinuousTest
... ContinuousUpdate
... ExperimentalBuild
... ExperimentalConfigure
... ExperimentalCoverage
... ExperimentalMemCheck
... ExperimentalStart
... ExperimentalSubmit
... ExperimentalTest
... ExperimentalUpdate
... NightlyBuild
... NightlyConfigure
... NightlyCoverage
... NightlyMemCheck
... NightlyMemoryCheck
... NightlyStart
... NightlySubmit
... NightlyTest
... NightlyUpdate
#+END_SRC
- Note :: For foam-extend, the MemCheck and Coverage dashboards are not supported.
** Running the test harness
Running the test harness is pretty simple:
These commands will configure and run the `Experimental` version of the test harness:
#+BEGIN_SRC
cd $WM_PROJECT_DIR/testHarness/foam-extend/3.2/runDir
./Allclean
./Allrun_Experimental
#+END_SRC
To run the `Nightly` version of the test harness:
#+BEGIN_SRC
cd $WM_PROJECT_DIR/testHarness/foam-extend/3.2/runDir
./Allclean
./Allrun_Nightly
#+END_SRC
To see the full range of available options, run the command:
#+BEGIN_SRC
make help
#+END_SRC
** Selecting a subset of test cases to run
Instead of using the `make` command to run the test harness, one can also use
command `ctest`. The commmand `ctest` offers additionnal options to select or limit the number
of tests to run.
The following command will provide all the available options for ctest:
#+BEGIN_SRC
ctest -N
#+END_SRC
Here is a list of useful ctest options:
- =ctest -N= :: this command will list the available tests by their name and
number. By default, all the tests are run in succession following the
numerical order shown.
- =ctest -R <regex>= :: run all the tests whose name are matching the supplied
regular expression. For instance, to run all the tests related to cfMesh,
one can use the following command: `ctest -R cfMesh`
- =ctest -E <regex>= :: run all the tests, but exclude the ones whose name is
matching the supplied regular expression. For instance, to run all the
tests except those for cfMesh, one can use the following command: `ctest -E
cfMesh`
- =ctest -I [Start,End,Stride,test#,test#]= :: run individual tests by
number. `ctest -I 3,5` will run test 3, 4 and 5. `ctest -I 4,4,,4,7,13`
will run tests 4, 7 and 13.
- =ctest -D dashboard= :: run a specific dashboard test. For example, the command
`make Experimental` can be replaced by the following suite of ctest
commands:
#+BEGIN_SRC
ctest -D ExperimentalStart
ctest -D ExperimentalConfigure
ctest -D ExperimentalBuild
ctest -D ExperimentalTest
ctest -D ExperimentalSubmit
#+END_SRC
Here is a more complete example where we will configure, build, test and submit the test
harness results, but only for the incompressible tutorials:
#+BEGIN_SRC
ctest -D Experimental -R incompressible
#+END_SRC
** Browsing the CDash service
The results of the test harness run will be published on the CDash dashboard on foam-extend.
To see your results:
URL : http://foam-extend.sourceforge.net/CDash/index.php?project=foam-extend-3.2
On this interactive Web site, one can then point and click various buttons
and menus to explore the various reports uploaded from your test harness runs.
** Configuring the test harness for using your own site or personal CDash service
The foam-extend source code comes with a set pre-configured parameters for
uploading your dashboards results on the main project CDash server. One can also
choose to host their own CDash service, either as a site service, or as a
personnal service running in your own user space. Your CDash administrator can
generate a file similar to $WM\_PROJECT\_DIR/CTestConfig.cmake where all the
necessary parameters for connecting to your local service are specified.
In order to use your site CDash service, simply copy your site CTestConfig.cmake
file to $FOAM\_SITE\_DIR/etc/CTestConfig.site.cmake
In order to use your personnal CDash service, simply copy your personnal CTestConfig.cmake
file to $WM\_PROJECT\_USER\_DIR/etc/CTestConfig.user.cmake
As usual, your site configuration will override the default parameters from the
main configuration file $WM\_PROJECT\_DIR/CTestConfig.cmake.
Likewise, your personnal configuration will override the default parameters from the
main configuration file $WM\_PROJECT\_DIR/CTestConfig.cmake and the default
parameters from the site file $FOAM\_SITE\_DIR/etc/CTestConfig.site.cmake.
** New features for the test harness (foam-extend 3.2):
- =Running the test harness in parallel= :: It is now possible to run the test
harness in parallel over a single node or computer. The environment
variable WM\_NCOMPPROCS will specify the number of cores to use for
running the test harness. For `n` cores specified, `n` tutorials will
be running in parallel on your computer. Since all the tests will
still run on the same computer, make sure you have enough ressources to
run `n` tutorials in parallel. Depending on the number of cores
available, one might have to tweak some of the shell `limits`
values. The command `ulimit -a` will show you the actual limits values
imposed on your shell. Some limit values like `open files` (ulimit -n)
or `max user processes` (ulimit -u) might need to be adjusted to some
higher values. In doubt, consult with your local sysadmin.
** Notes
The MediaWiki version of this file was generated using the following command:
#+BEGIN_SRC
pandoc testHarness.org -s -S -f org -t mediawiki -o testHarness.mediawiki
#+END_SRC
The ASCII version of this file was generated using the following command:
#+BEGIN_SRC
pandoc testHarness.org -N -s -S -f org -t asciidoc -o testHarness.txt
#+END_SRC

View file

@ -52,8 +52,9 @@ setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
setenv FOAM_SRC $WM_PROJECT_DIR/src setenv FOAM_SRC $WM_PROJECT_DIR/src
# shared site configuration - similar naming convention as ~FOAM expansion # shared site configuration - similar naming convention as ~FOAM expansion
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS setenv FOAM_SITE_DIR $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS setenv FOAM_SITE_APPBIN $FOAM_SITE_DIR/bin/$WM_OPTIONS
setenv FOAM_SITE_LIBBIN $FOAM_SITE_DIR/lib/$WM_OPTIONS
# user configuration # user configuration
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
@ -64,6 +65,7 @@ setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
setenv FOAM_UTILITIES $FOAM_APP/utilities setenv FOAM_UTILITIES $FOAM_APP/utilities
setenv FOAM_SOLVERS $FOAM_APP/solvers setenv FOAM_SOLVERS $FOAM_APP/solvers
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
setenv FOAM_TEST_HARNESS_DIR $WM_PROJECT_DIR/testHarness/foam-extend/$WM_PROJECT_VERSION
# add FOAM scripts and wmake to the path # add FOAM scripts and wmake to the path
set path=($WM_DIR $WM_PROJECT_DIR/bin $path) set path=($WM_DIR $WM_PROJECT_DIR/bin $path)

View file

@ -90,8 +90,9 @@ export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
export FOAM_SRC=$WM_PROJECT_DIR/src export FOAM_SRC=$WM_PROJECT_DIR/src
# shared site configuration - similar naming convention as ~FOAM expansion # shared site configuration - similar naming convention as ~FOAM expansion
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS export FOAM_SITE_DIR=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS export FOAM_SITE_APPBIN=$FOAM_SITE_DIR/bin/$WM_OPTIONS
export FOAM_SITE_LIBBIN=$FOAM_SITE_DIR/lib/$WM_OPTIONS
# user configuration # user configuration
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
@ -102,6 +103,7 @@ export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
export FOAM_UTILITIES=$FOAM_APP/utilities export FOAM_UTILITIES=$FOAM_APP/utilities
export FOAM_SOLVERS=$FOAM_APP/solvers export FOAM_SOLVERS=$FOAM_APP/solvers
export FOAM_RUN=$WM_PROJECT_USER_DIR/run export FOAM_RUN=$WM_PROJECT_USER_DIR/run
export FOAM_TEST_HARNESS_DIR=$WM_PROJECT_DIR/testHarness/foam-extend/$WM_PROJECT_VERSION
# add FOAM scripts and wmake to the path # add FOAM scripts and wmake to the path
export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH

View file

@ -77,6 +77,7 @@ wmake libso dbns
wmake libso immersedBoundary/immersedBoundary wmake libso immersedBoundary/immersedBoundary
wmake libso immersedBoundary/immersedBoundaryTurbulence wmake libso immersedBoundary/immersedBoundaryTurbulence
wmake libso immersedBoundary/immersedBoundaryForce wmake libso immersedBoundary/immersedBoundaryForce
wmake libso immersedBoundary/immersedBoundaryDynamicMesh
( cd cudaSolvers ; ./Allwmake ) ( cd cudaSolvers ; ./Allwmake )

View file

@ -0,0 +1,4 @@
movingImmersedBoundary/movingImmersedBoundary.C
immersedBoundarySolidBodyMotionFvMesh/immersedBoundarySolidBodyMotionFvMesh.C
LIB = $(FOAM_LIBBIN)/libimmersedBoundaryDynamicFvMesh

View file

@ -0,0 +1,18 @@
EXE_INC = \
-I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/meshMotion/solidBodyMotion/lnInclude \
EXE_LIBS = \
-limmersedBoundary \
-lfiniteVolume \
-lmeshTools \
-lsurfMesh \
-lsampling \
-ldynamicMesh \
-ldynamicFvMesh \
-lsolidBodyMotion

View file

@ -0,0 +1,119 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "immersedBoundarySolidBodyMotionFvMesh.H"
#include "addToRunTimeSelectionTable.H"
#include "volFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(immersedBoundarySolidBodyMotionFvMesh, 0);
addToRunTimeSelectionTable
(
dynamicFvMesh,
immersedBoundarySolidBodyMotionFvMesh,
IOobject
);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::immersedBoundarySolidBodyMotionFvMesh::
immersedBoundarySolidBodyMotionFvMesh
(
const IOobject& io
)
:
dynamicFvMesh(io),
dynamicMeshCoeffs_
(
IOdictionary
(
IOobject
(
"dynamicMeshDict",
time().constant(),
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
).subDict(typeName + "Coeffs")
),
ibMotions_()
{
// Read motion function for all regions
PtrList<entry> motionDicts(dynamicMeshCoeffs_.lookup("motionFunctions"));
ibMotions_.setSize(motionDicts.size());
forAll (motionDicts, mI)
{
ibMotions_.set
(
mI,
new movingImmersedBoundary
(
motionDicts[mI].keyword(),
*this,
motionDicts[mI].dict()
)
);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::immersedBoundarySolidBodyMotionFvMesh::
~immersedBoundarySolidBodyMotionFvMesh()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::immersedBoundarySolidBodyMotionFvMesh::update()
{
forAll (ibMotions_, ibI)
{
ibMotions_[ibI].movePoints();
}
// Force flux and addressing recalculation as in topo change
pointField newAllPoints = allPoints();
movePoints(newAllPoints);
return true;
}
// ************************************************************************* //

View file

@ -0,0 +1,112 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::immersedBoundarySolidBodyMotionFvMesh
Description
Solid-body motion of the immersed boundary mesh specified by a
run-time selectable motion function for each immersed boundary surface
SourceFiles
immersedBoundarySolidBodyMotionFvMesh.C
\*---------------------------------------------------------------------------*/
#ifndef immersedBoundarySolidBodyMotionFvMesh_H
#define immersedBoundarySolidBodyMotionFvMesh_H
#include "dynamicFvMesh.H"
#include "dictionary.H"
#include "movingImmersedBoundary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class immersedBoundarySolidBodyMotionFvMesh Declaration
\*---------------------------------------------------------------------------*/
class immersedBoundarySolidBodyMotionFvMesh
:
public dynamicFvMesh
{
// Private data
//- Dictionary of motion control parameters
dictionary dynamicMeshCoeffs_;
//- Immersed boundary motion control function
PtrList<movingImmersedBoundary> ibMotions_;
// Private Member Functions
//- Disallow default bitwise copy construct
immersedBoundarySolidBodyMotionFvMesh
(
const immersedBoundarySolidBodyMotionFvMesh&
);
//- Disallow default bitwise assignment
void operator=
(
const immersedBoundarySolidBodyMotionFvMesh&
);
public:
//- Runtime type information
TypeName("immersedBoundarySolidBodyMotionFvMesh");
// Constructors
//- Construct from IOobject
explicit immersedBoundarySolidBodyMotionFvMesh(const IOobject& io);
// Destructor
virtual ~immersedBoundarySolidBodyMotionFvMesh();
// Member Functions
//- Update the mesh for both mesh motion and topology change
virtual bool update();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View file

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration |
\\ / A nd | For copyright notice see file Copyright
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "movingImmersedBoundary.H"
#include "immersedBoundaryPolyPatch.H"
#include "transformField.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::movingImmersedBoundary::movingImmersedBoundary
(
const word& name,
const fvMesh& mesh,
const dictionary& dict
)
:
name_(name),
mesh_(mesh),
sbmfPtr_(solidBodyMotionFunction::New(dict, mesh.time())),
refIbSurface_
(
IOobject
(
name + ".ftr",
mesh.time().constant(), // instance
"triSurface", // local
mesh, // registry
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::movingImmersedBoundary::~movingImmersedBoundary()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::movingImmersedBoundary::movePoints() const
{
// Get ibMesh from patch
const label patchID = mesh().boundaryMesh().findPatchID(name());
if (patchID < 0)
{
FatalErrorIn
(
"void movingImmersedBoundary::movePoints() const"
) << "Patch " << name() << " not found. Available patch names: "
<< mesh().boundaryMesh().names()
<< abort(FatalError);
}
const immersedBoundaryPolyPatch& cibPatch =
refCast<const immersedBoundaryPolyPatch>
(
mesh().boundaryMesh()[patchID]
);
// Get non-const reference to patch
immersedBoundaryPolyPatch& ibPatch =
const_cast<immersedBoundaryPolyPatch&>(cibPatch);
// Move points
ibPatch.moveTriSurfacePoints
(
transform(sbmfPtr_->transformation(), refIbSurface_.points())
);
}
// ************************************************************************* //

View file

@ -0,0 +1,121 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration |
\\ / A nd | For copyright notice see file Copyright
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::movingImmersedBoundary
Description
Moving immesed boundary. Motion is prescribed using a solid body motion
function.
SourceFiles
movingImmersedBoundary.C
\*---------------------------------------------------------------------------*/
#ifndef movingImmersedBoundary_H
#define movingImmersedBoundary_H
#include "fvMesh.H"
#include "solidBodyMotionFunction.H"
#include "triSurfaceMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class movingImmersedBoundary Declaration
\*---------------------------------------------------------------------------*/
class movingImmersedBoundary
{
// Private data
//- Patch name
const word name_;
//- Mesh reference
const fvMesh& mesh_;
//- Overset region motion control function
autoPtr<solidBodyMotionFunction> sbmfPtr_;
//- Reference tri surface mesh position
triSurfaceMesh refIbSurface_;
// Private Member Functions
//- Disallow default bitwise copy construct
movingImmersedBoundary(const movingImmersedBoundary&);
//- Disallow default bitwise assignment
void operator=(const movingImmersedBoundary&);
public:
// Constructors
//- Construct from dictionary
movingImmersedBoundary
(
const word& name,
const fvMesh& mesh,
const dictionary& dict
);
//- Destructor
~movingImmersedBoundary();
// Member Functions
//- Return name
const word& name() const
{
return name_;
}
//- Return mesh
const fvMesh& mesh() const
{
return mesh_;
}
//- Move immersed boundary patch points
void movePoints() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View file

@ -39,6 +39,117 @@ cmake_minimum_required (VERSION 2.8)
PROJECT(foam-extend-3.2) PROJECT(foam-extend-3.2)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Utility functions
#
# GetHostName(var)
#
# Set the variable named ${var} to the host hostname
#
function(GetHostName var)
set( thisHostName "unknown")
if(CMAKE_HOST_WIN32)
execute_process(
COMMAND hostname
OUTPUT_VARIABLE thisHostname
)
else()
execute_process(
COMMAND hostname -f
OUTPUT_VARIABLE thisHostname
)
endif()
set(${var} ${thisHostname} PARENT_SCOPE)
endfunction()
#
# GetGitStatus(status ecode)
#
# Get the git status for the local git repository of the source code
# The variable named ${status} will get the git status
# The variable named ${ecode} will get the command error code
#
function(GetGitStatus _status _ecode)
set( git_status "unknown")
set( git_ecode "1")
execute_process(
COMMAND git status
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE git_status
RESULT_VARIABLE git_ecode
ERROR_QUIET
)
set(${_status} ${git_status} PARENT_SCOPE)
set(${_ecode} ${git_ecode} PARENT_SCOPE)
endfunction()
#
# GetGitBranchName(var)
#
# Set the variable named ${var} to the git branch name of the source code
#
function(GetGitBranchName var)
set( retValue "unknown")
execute_process(
COMMAND git branch --no-color
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE listOfGitBranches
)
# Create list of strings
string(REPLACE "\n" ";" listOfGitBranches ${listOfGitBranches})
# Iterate over list, find the string beginning with "* "
foreach(branch ${listOfGitBranches})
string(REGEX MATCH "\\* .*$" matchString ${branch})
string(LENGTH "${matchString}" lengthMatchString)
if(lengthMatchString GREATER 0)
# We have match. Cleanup and set retValue
string(REPLACE "* " "" retValue ${matchString})
endif()
endforeach()
set(${var} ${retValue} PARENT_SCOPE)
endfunction()
#
# GetGitRevNumber(var)
#
# Set the variable named ${var} to the git revision number of the source code
#
function(GetGitRevNumber var)
set( retValue "unknown")
execute_process(
COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE git_rev_number
)
# Minimal check that we do have a valid string
string(LENGTH "${git_rev_number}" lengthString)
if(lengthString GREATER 0)
set(retValue ${git_rev_number})
endif()
set(${var} ${retValue} PARENT_SCOPE)
endfunction()
# CleanUpStringForCDash(var)
#
# Cleanup the variable named ${value} for characters not supported
# for CDash identifiers. Return the modified value in retVar
#
function(CleanUpStringForCDash value retVar)
string(REPLACE "/" "_" value "${value}")
string(REPLACE " " "_" value ${value})
set(${retVar} ${value} PARENT_SCOPE)
endfunction()
#-----------------------------------------------------------------------------
#
#
# Initialization of CTest specific variables # Initialization of CTest specific variables
# #
## Run ctest in parallel if environment variable WM_NCOMPPROCS is set ## Run ctest in parallel if environment variable WM_NCOMPPROCS is set
@ -57,13 +168,11 @@ IF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
SITENAME $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} SITENAME $ENV{CDASH_SUBMIT_LOCAL_HOST_ID}
CACHE STRING "Name of the local site" CACHE STRING "Name of the local site"
) )
ELSE (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "") ELSE ()
# Grab the hostname FQN; will be used for the sitename # Grab the hostname FQN; will be used for the sitename
execute_process( GetHostName(SITENAME)
COMMAND hostname -f
OUTPUT_VARIABLE SITENAME ENDIF()
)
ENDIF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
MESSAGE("Initializing the name of this local site to: ${SITENAME}") MESSAGE("Initializing the name of this local site to: ${SITENAME}")
@ -146,27 +255,15 @@ elseif(GIT_FOUND)
message("The git command was found: ${GIT_EXECUTABLE}") message("The git command was found: ${GIT_EXECUTABLE}")
# Check if the source code is under a valid git repository # Check if the source code is under a valid git repository
execute_process( GetGitStatus(GIT_STATUS GIT_ECODE)
COMMAND git status
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE GIT_STATUS
RESULT_VARIABLE GIT_ECODE
ERROR_QUIET
)
if(NOT GIT_ECODE) if(NOT GIT_ECODE)
# We have a valid git repository. Grab the branch and revision info. # We have a valid git repository.
# Add to the build name # Grab the branch and revision info. Add to the build name
exec_program(git GetGitBranchName(GIT_BRANCH_NAME)
ARGS branch --no-color 2> /dev/null | grep '*'| awk '{print $2}'
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch: ${GIT_BRANCH_NAME}") message("Git branch: ${GIT_BRANCH_NAME}")
execute_process( GetGitRevNumber(GIT_REV_NUMBER)
COMMAND git rev-parse --short=12 HEAD
OUTPUT_VARIABLE GIT_REV_NUMBER
)
message("Git revision: ${GIT_REV_NUMBER}") message("Git revision: ${GIT_REV_NUMBER}")
SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}") SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}")
@ -216,13 +313,13 @@ endif()
# Some last minute cleanup # Some last minute cleanup
# Seems like no '/' or ' 'are allowed in the BUILDNAME or in the SITE name # Seems like no '/' or ' 'are allowed in the BUILDNAME or in the SITE name
string(REPLACE "/" "_" BUILDNAME ${BUILDNAME}) CleanUpStringForCDash(${BUILDNAME} BUILDNAME)
string(REPLACE " " "_" BUILDNAME ${BUILDNAME}) CleanUpStringForCDash(${SITE} SITE)
string(REPLACE "/" "_" SITE ${SITE})
string(REPLACE " " "_" SITE ${SITE})
message("Build name: ${BUILDNAME}") message("Build name: ${BUILDNAME}")
message("Site name: ${SITE}")
#
# Build section # Build section
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -282,10 +379,18 @@ IF(BUILD_TESTING)
IF(RUN_FROM_ONE_TIMESTEP) IF(RUN_FROM_ONE_TIMESTEP)
# Modify the cases controlDict file in order to run for only one time step # Modify the cases controlDict file in order to run for only one time step
MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}") MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}")
if(CMAKE_HOST_WIN32)
# Need to supply a bash shell to run the script under Windows
EXECUTE_PROCESS(
COMMAND bash -c "$ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}"
WORKING_DIRECTORY .
)
else()
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR} COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}
WORKING_DIRECTORY . WORKING_DIRECTORY .
) )
endif()
ENDIF(RUN_FROM_ONE_TIMESTEP) ENDIF(RUN_FROM_ONE_TIMESTEP)
ENDIF(BUILD_TESTING) ENDIF(BUILD_TESTING)

View file

@ -6,6 +6,10 @@
## ENABLE_TESTING() ## ENABLE_TESTING()
## INCLUDE(CTest) ## INCLUDE(CTest)
# These settings will allow you to publish your dashboards results
# on the foam-extend CDash service hosted on SourceForge.Net
# See here: http://foam-extend.sourceforge.net/CDash/index.php
#
set(CTEST_PROJECT_NAME "foam-extend-3.2") set(CTEST_PROJECT_NAME "foam-extend-3.2")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
@ -13,3 +17,17 @@ set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "foam-extend.sourceforge.net") set(CTEST_DROP_SITE "foam-extend.sourceforge.net")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=foam-extend-3.2") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=foam-extend-3.2")
set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_DROP_SITE_CDASH TRUE)
# We can override those variables for local sites so you can use
# your own site CDash service
# This optional file will be located here:
# $FOAM_SITE_DIR/etc/CTestConfig.site.cmake
#
include($ENV{FOAM_SITE_DIR}/etc/CTestConfig.site.cmake OPTIONAL)
# We can override those variables from user space so you can use
# your own personal CDash service
# This optional file will be located here:
# $WM_PROJECT_USER_DIR/etc/CTestConfig.user.cmake
#
include($ENV{WM_PROJECT_USER_DIR}/etc/CTestConfig.user.cmake OPTIONAL)

View file

@ -0,0 +1,104 @@
# /*-------------------------------------------------------------------------*\
# ========= |
# \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration |
# \\ / A nd | For copyright notice see file Copyright
# \\/ M anipulation |
# -----------------------------------------------------------------------------
# License
# This file is part of foam-extend.
#
# foam-extend 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.
#
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Description
# "ctest -S" script configured to drive the Experimental, Nightly and
# Continuous dashboards for the FOAM tutorials
#
# Author
# Martin Beaudoin, Hydro-Quebec, 2015. All rights reserved
#
# \*-------------------------------------------------------------------------*/
#
set(THIS_SUBPROJECT "Tutorials")
set(CTEST_SOURCE_DIRECTORY $ENV{WM_PROJECT_DIR})
set(CTEST_BINARY_DIRECTORY "@binary_dir@")
set(CTEST_BUILD_NAME "@BUILDNAME@")
set(CTEST_SITE "@SITE@")
set(PROCESSOR_COUNT $ENV{WM_NCOMPPROCS})
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
# We add the current script as a Build note.
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
# Run in parallel
if(PROCESSOR_COUNT)
set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
endif()
# We will be using a CDash subproject if the required subproject is defined
# on the remote CDash server.
# Otherwise, the results will still get submitted, but under the global
# "Project" Dashboard, not under the "SubProjects" section.
# This way, we keep on supporting CDash sites where subprojects are
# still not defined.
# Get the CTEST_PROJECT_SUBPROJECTS definition:
include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
list(FIND CTEST_PROJECT_SUBPROJECTS ${THIS_SUBPROJECT} subProjectIsSupported)
if (NOT subProjectIsSupported EQUAL -1)
message("Dashboard: Using SubProject: ${THIS_SUBPROJECT}")
set_property(GLOBAL PROPERTY SubProject ${THIS_SUBPROJECT})
set_property(GLOBAL PROPERTY Label ${THIS_SUBPROJECT})
endif()
# Select the required model : Experimental, Nightly, Continuous
# Default model: Experimental
set(DASHBOARD_MODEL Experimental)
if(${CTEST_SCRIPT_ARG} MATCHES Nightly)
set(DASHBOARD_MODEL Nightly)
elseif(${CTEST_SCRIPT_ARG} MATCHES Continuous)
set(DASHBOARD_MODEL Continuous)
endif()
# Starting the various tests for the specified dashboard model
ctest_start(${DASHBOARD_MODEL})
# No need to configure, cmake took care of it already
#ctest_configure()
# Intentionally no ctest_update() step in this script when running the
# Experimental dashboard.
# We do not want the source code to get updated since we actually want to test
# the current instance of this source code. So we can test without having to
# commit the source code
if(${DASHBOARD_MODEL} MATCHES Experimental)
message("Experimental dashboard: We skip the repository update.")
else()
# Updating the repository for the Nightly and Continuous dashboards
ctest_update()
endif()
# We compile the source code
ctest_build()
# We run the tests
ctest_test()
# We submit the results to the CDash service
ctest_submit()

View file

@ -53,11 +53,18 @@ file(COPY $ENV{FOAM_TUTORIALS}/ DESTINATION ${TEST_CASE_DIR})
# The test harness relies on the presence of an Allrun file for # The test harness relies on the presence of an Allrun file for
# running the case # running the case
MESSAGE("${testRunTimeDirectory}: Checking for missing Allrun file in tutorials") MESSAGE("${testRunTimeDirectory}: Checking for missing Allrun file in tutorials")
if(CMAKE_HOST_WIN32)
# Need to supply a bash shell to run the script under Windows
EXECUTE_PROCESS(
COMMAND bash -c "$ENV{FOAM_TEST_HARNESS_DIR}/scripts/addMissingAllrunFileToTutorial.sh ${TEST_CASE_DIR} $ENV{FOAM_TEST_HARNESS_DIR}/scripts/Allrun.default"
WORKING_DIRECTORY .
)
else()
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/addMissingAllrunFileToTutorial.sh ${TEST_CASE_DIR} $ENV{FOAM_TEST_HARNESS_DIR}/scripts/Allrun.default COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/addMissingAllrunFileToTutorial.sh ${TEST_CASE_DIR} $ENV{FOAM_TEST_HARNESS_DIR}/scripts/Allrun.default
WORKING_DIRECTORY . WORKING_DIRECTORY .
) )
endif()
# Iterate over each tutorial case: # Iterate over each tutorial case:
# We are looking for tutorial cases with an Allrun file. # We are looking for tutorial cases with an Allrun file.
# If this file is present, (and it should), we add this case to the list of cases to run. # If this file is present, (and it should), we add this case to the list of cases to run.
@ -90,31 +97,61 @@ FOREACH(caseWithAllrun ${listofCasesWithAllrun})
MESSAGE("Found Allrun file in directory: ${thisCasePath}") MESSAGE("Found Allrun file in directory: ${thisCasePath}")
# Grab the parent name of the case directory # Grab the parent name of the case directory
string(REPLACE ${TEST_CASE_DIR}/ "" caseParentPath ${caseWithAllrun}) string(REPLACE ${TEST_CASE_DIR}/ "" caseParentPath ${thisCasePath})
# Construct the testId # Construct the testId
string(REPLACE "/" "_" testId ${caseParentPath}) string(REPLACE "/" "_" testId ${caseParentPath})
SET(testId ${testId}${testIdSuffix}) SET(testId ${testId}_Allrun${testIdSuffix})
# Add the test to the test harness # Add the test to the test harness
MESSAGE(" Adding test: ${testId}") MESSAGE(" Adding test: ${testId}")
ADD_TEST(${testId} bash -c "cd ${thisCasePath}; ./Allrun") ADD_TEST(${testId} bash -c "cd ${thisCasePath}; ./Allrun")
# We extract a label name from the top level tutorial directories
# (eg: basic, incompressible, immersedBoundary, etc). We will use this
# label in order to categorize the various test cases under a more 'generic
# topic', so we can for instance limit the testharness to the
# 'incompressible' test cases, etc., simply by using the ctest -L command.
#
# ctest --print-labels will print the list of all available labels.
#
string(REPLACE ${TEST_CASE_DIR}/ "" tmpLabel ${caseWithAllrun})
string(FIND ${tmpLabel} "/" indexFirstSlash)
string(SUBSTRING ${tmpLabel} 0 ${indexFirstSlash} testLabel)
# Add a dependency on the global clean-up target # Add a dependency on the global clean-up target
# When running in parallel, you need to wait for the cleanup to finish first # When running in parallel, you need to wait for the cleanup to finish first
SET_TESTS_PROPERTIES(${testId} PROPERTIES DEPENDS ${cleanCasesTestId}) message(" This test case will have the following labels: Tutorials, ${testLabel}")
SET_TESTS_PROPERTIES(${testId} PROPERTIES DEPENDS ${cleanCasesTestId} LABELS "Tutorials;${testLabel}")
# Use this following entry instead for testing purpose # Use this following entry instead for testing purpose
#ADD_TEST(${testId} bash -c "cd ${thisCasePath}; true") #ADD_TEST(${testId} bash -c "cd ${thisCasePath}; true")
ENDIF(NOT ${thisCasePath} STREQUAL ${TEST_CASE_DIR}) ENDIF()
ENDFOREACH(caseWithAllrun) ENDFOREACH(caseWithAllrun)
# Modify the cases Allrun files to incorporate additional shell functions # Modify the cases Allrun files to incorporate additional shell functions
MESSAGE("${testRunTimeDirectory}: Modifying the Allrun files for additional shell functions in directory: ${TEST_CASE_DIR}") MESSAGE("${testRunTimeDirectory}: Modifying the Allrun files for additional shell functions in directory: ${TEST_CASE_DIR}")
if(CMAKE_HOST_WIN32)
# Need to supply a bash shell to run the script under Windows
EXECUTE_PROCESS(
COMMAND bash -c "$ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForTestHarness.sh ${TEST_CASE_DIR} $ENV{FOAM_TEST_HARNESS_DIR}/scripts/AdditionalRunFunctions"
WORKING_DIRECTORY .
)
else()
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForTestHarness.sh ${TEST_CASE_DIR} $ENV{FOAM_TEST_HARNESS_DIR}/scripts/AdditionalRunFunctions COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForTestHarness.sh ${TEST_CASE_DIR} $ENV{FOAM_TEST_HARNESS_DIR}/scripts/AdditionalRunFunctions
WORKING_DIRECTORY . WORKING_DIRECTORY .
) )
endif()
# Configure the various ctest -S Dashboard drivers
# Driver for the tutorials
configure_file(
"$ENV{FOAM_TEST_HARNESS_DIR}/CMakeFiles/Dashboard_Tutorials.cmake.in"
"$ENV{FOAM_TEST_HARNESS_DIR}/runDir/Dashboard_Tutorials.cmake"
@ONLY)
# That's it. # That's it.

View file

@ -73,7 +73,12 @@ fi
# Make sure the CMake and tutorials runtime files are updated # Make sure the CMake and tutorials runtime files are updated
# We need cmake version 2.8.0 at least # We need cmake version 2.8.0 at least
cmake $WM_PROJECT_DIR if [ "$WM_ARCH_BASE" == "mingw" ]
then
cmake $WM_PROJECT_DIR -G "MSYS Makefiles"
else
cmake $WM_PROJECT_DIR -G "Unix Makefiles"
fi
# All set. Now we can run the available test harness # All set. Now we can run the available test harness
# #

View file

@ -79,18 +79,28 @@ fi
# Make sure the CMake and tutorials runtime files are updated # Make sure the CMake and tutorials runtime files are updated
# We need cmake version 2.8.0 at least # We need cmake version 2.8.0 at least
cmake $WM_PROJECT_DIR if [ "$WM_ARCH_BASE" == "mingw" ]
then
cmake $WM_PROJECT_DIR -G "MSYS Makefiles"
else
cmake $WM_PROJECT_DIR -G "Unix Makefiles"
fi
# All set. Now we can run the available test harness # All set. Now we can run the available test harness
# #
# Invoke make help for the complete list of available commands. # Invoke make help for the complete list of available commands.
# #
# User-demand testing. # User-demand testing.
# Will do: ExperimentalConfigure + ExperimentalBuild + ExperimentalTest + ExperimentalSubmit #
make Experimental # The old way. Still valid, but not supporting subprojects
# Will do: ExperimentalBuild + ExperimentalTest + ExperimentalSubmit
#make Experimental
#
# Nightly testing # Nightly testing
# Will do: NightlyUpdate + NightylConfigure + NightlyBuild + NightlyTest + NightlySubmit # Will do: NightlyUpdate + NightlyBuild + NightlyTest + NightlySubmit
# make Nightly # make Nightly
# The new way. With support for subprojects
ctest -V -S ./Dashboard_Tutorials.cmake,Experimental
# That's it # That's it

View file

@ -79,18 +79,28 @@ fi
# Make sure the CMake and tutorials runtime files are updated # Make sure the CMake and tutorials runtime files are updated
# We need cmake version 2.8.0 at least # We need cmake version 2.8.0 at least
cmake $WM_PROJECT_DIR if [ "$WM_ARCH_BASE" == "mingw" ]
then
cmake $WM_PROJECT_DIR -G "MSYS Makefiles"
else
cmake $WM_PROJECT_DIR -G "Unix Makefiles"
fi
# All set. Now we can run the available test harness # All set. Now we can run the available test harness
# #
# Invoke make help for the complete list of available commands. # Invoke make help for the complete list of available commands.
# #
# User-demand testing. # User-demand testing.
# Will do: ExperimentalConfigure + ExperimentalBuild + ExperimentalTest + ExperimentalSubmit #
# The old way. Still valid, but not supporting subprojects
# Will do: ExperimentalBuild + ExperimentalTest + ExperimentalSubmit
#make Experimental #make Experimental
#
# Nightly testing # Nightly testing
# Will do: NightlyUpdate + NightylConfigure + NightlyBuild + NightlyTest + NightlySubmit # Will do: NightlyUpdate + NightlyBuild + NightlyTest + NightlySubmit
make Nightly # make Nightly
# The new way. With support for subprojects
ctest -V -S ./Dashboard_Tutorials.cmake,Nightly
# That's it # That's it

View file

@ -6,7 +6,7 @@
application="simpleIbFoam" application="simpleIbFoam"
runApplication blockMesh runApplication blockMesh
cp save/boundary constant/polyMesh \cp save/boundary constant/polyMesh
\mkdir 0 \mkdir 0
\cp 0_org/* 0/ \cp 0_org/* 0/

View file

@ -6,6 +6,7 @@
application="interIbFoam" application="interIbFoam"
runApplication blockMesh runApplication blockMesh
\cp -f save/boundary constant/polyMesh/
mkdir 0 mkdir 0
cp 0_org/* 0/ cp 0_org/* 0/

View file

@ -0,0 +1,52 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[1-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,65 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
ibCylinder
{
type immersedBoundary;
refValue uniform (0 0 0);
refGradient uniform (0 0 0);
fixesValue yes;
setDeadCellValue yes;
deadCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (1 0 0);
}
top
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,65 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
ibCylinder
{
type immersedBoundary;
refValue uniform 0;
refGradient uniform 0;
fixesValue no;
setDeadCellValue yes;
deadCellValue 0;
value uniform 0;
}
in
{
type zeroGradient;
}
out
{
// type zeroGradient;
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,9 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
\rm -rf 0
\rm -f constant/polyMesh/boundary

View file

@ -0,0 +1,15 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="icoDyMIbFoam"
runApplication blockMesh
\cp save/boundary constant/polyMesh/
mkdir 0
\cp -f 0_org/* 0/
runApplication potentialIbFoam
runApplication $application

View file

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// dynamicFvMesh staticFvMesh;
dynamicFvMesh immersedBoundarySolidBodyMotionFvMesh;
immersedBoundarySolidBodyMotionFvMeshCoeffs
{
motionFunctions
(
ibCylinder
{
// solidBodyMotionFunction translation;
// translationCoeffs
// {
// velocity (0.1 0 0);
// }
solidBodyMotionFunction linearOscillation;
linearOscillationCoeffs
{
amplitude (0.5 0 0);
period 2.5;
}
}
);
}
// ************************************************************************* //

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-1 -0.5 0)
(2 -0.5 0)
(2 0.5 0)
(-1 0.5 0)
(-1 -0.5 0.1)
(2 -0.5 0.1)
(2 0.5 0.1)
(-1 0.5 0.1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (75 25 1) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch in
(
(0 4 7 3)
)
patch out
(
(2 6 5 1)
)
patch top
(
(3 7 6 2)
)
patch bottom
(
(1 5 4 0)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,19 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 0.01;
// ************************************************************************* //

View file

@ -0,0 +1,210 @@
1
(
cylinder
empty
)
96
(
(0.176776 -0.176776 0)
(0.176776 0.176776 0)
(-0.176776 0.176776 0)
(-0.176776 -0.176776 0)
(0.241481 -0.064705 0)
(0.241481 0.064705 0)
(0.064705 0.241481 0)
(-0.064705 0.241481 0)
(-0.241481 0.064705 0)
(-0.241481 -0.064705 0)
(0.064705 -0.241481 0)
(-0.064705 -0.241481 0)
(0.216506 -0.125 0)
(0.216506 0.125 0)
(0.125 0.216506 0)
(-0.125 0.216506 0)
(-0.216506 0.125 0)
(-0.216506 -0.125 0)
(0.125 -0.216506 0)
(-0.125 -0.216506 0)
(0.247861 -0.0326315 0)
(0.247861 0.0326315 0)
(0.0326315 0.247861 0)
(-0.0326315 0.247861 0)
(-0.247861 0.0326315 0)
(-0.247861 -0.0326315 0)
(0.0326315 -0.247861 0)
(-0.0326315 -0.247861 0)
(0.25 8.32665e-17 0)
(-8.32665e-17 0.25 0)
(-0.25 -8.32665e-17 0)
(8.32665e-17 -0.25 0)
(0.198338 -0.152191 0)
(0.198338 0.152191 0)
(0.152191 0.198338 0)
(-0.152191 0.198338 0)
(-0.198338 0.152191 0)
(-0.198338 -0.152191 0)
(0.152191 -0.198338 0)
(-0.152191 -0.198338 0)
(0.23097 -0.095671 0)
(0.23097 0.095671 0)
(0.095671 0.23097 0)
(-0.095671 0.23097 0)
(-0.23097 0.095671 0)
(-0.23097 -0.095671 0)
(0.095671 -0.23097 0)
(-0.095671 -0.23097 0)
(0.176776 -0.176776 0.1)
(0.176776 0.176776 0.1)
(-0.176776 0.176776 0.1)
(-0.176776 -0.176776 0.1)
(0.241481 -0.064705 0.1)
(0.241481 0.064705 0.1)
(0.064705 0.241481 0.1)
(-0.064705 0.241481 0.1)
(-0.241481 0.064705 0.1)
(-0.241481 -0.064705 0.1)
(0.064705 -0.241481 0.1)
(-0.064705 -0.241481 0.1)
(0.216506 -0.125 0.1)
(0.216506 0.125 0.1)
(0.125 0.216506 0.1)
(-0.125 0.216506 0.1)
(-0.216506 0.125 0.1)
(-0.216506 -0.125 0.1)
(0.125 -0.216506 0.1)
(-0.125 -0.216506 0.1)
(0.247861 -0.0326315 0.1)
(0.247861 0.0326315 0.1)
(0.0326315 0.247861 0.1)
(-0.0326315 0.247861 0.1)
(-0.247861 0.0326315 0.1)
(-0.247861 -0.0326315 0.1)
(0.0326315 -0.247861 0.1)
(-0.0326315 -0.247861 0.1)
(0.25 -8.32665e-17 0.1)
(8.32665e-17 0.25 0.1)
(-0.25 8.32665e-17 0.1)
(-8.32665e-17 -0.25 0.1)
(0.198338 -0.152191 0.1)
(0.198338 0.152191 0.1)
(0.152191 0.198338 0.1)
(-0.152191 0.198338 0.1)
(-0.198338 0.152191 0.1)
(-0.198338 -0.152191 0.1)
(0.152191 -0.198338 0.1)
(-0.152191 -0.198338 0.1)
(0.23097 -0.095671 0.1)
(0.23097 0.095671 0.1)
(0.095671 0.23097 0.1)
(-0.095671 0.23097 0.1)
(-0.23097 0.095671 0.1)
(-0.23097 -0.095671 0.1)
(0.095671 -0.23097 0.1)
(-0.095671 -0.23097 0.1)
)
96
(
((0 32 80) 0)
((80 48 0) 0)
((32 12 60) 0)
((60 80 32) 0)
((12 40 88) 0)
((88 60 12) 0)
((40 4 52) 0)
((52 88 40) 0)
((4 20 68) 0)
((68 52 4) 0)
((76 68 20) 0)
((20 28 76) 0)
((28 21 69) 0)
((69 76 28) 0)
((21 5 53) 0)
((53 69 21) 0)
((5 41 89) 0)
((89 53 5) 0)
((41 13 61) 0)
((61 89 41) 0)
((13 33 81) 0)
((81 61 13) 0)
((33 1 49) 0)
((49 81 33) 0)
((1 34 82) 0)
((82 49 1) 0)
((34 14 62) 0)
((62 82 34) 0)
((14 42 90) 0)
((90 62 14) 0)
((42 6 54) 0)
((54 90 42) 0)
((6 22 70) 0)
((70 54 6) 0)
((77 70 22) 0)
((22 29 77) 0)
((29 23 71) 0)
((71 77 29) 0)
((23 7 55) 0)
((55 71 23) 0)
((7 43 91) 0)
((91 55 7) 0)
((43 15 63) 0)
((63 91 43) 0)
((15 35 83) 0)
((83 63 15) 0)
((35 2 50) 0)
((50 83 35) 0)
((2 36 84) 0)
((84 50 2) 0)
((36 16 64) 0)
((64 84 36) 0)
((16 44 92) 0)
((92 64 16) 0)
((44 8 56) 0)
((56 92 44) 0)
((8 24 72) 0)
((72 56 8) 0)
((78 72 24) 0)
((24 30 78) 0)
((30 25 73) 0)
((73 78 30) 0)
((25 9 57) 0)
((57 73 25) 0)
((9 45 93) 0)
((93 57 9) 0)
((45 17 65) 0)
((65 93 45) 0)
((17 37 85) 0)
((85 65 17) 0)
((37 3 51) 0)
((51 85 37) 0)
((0 48 86) 0)
((86 38 0) 0)
((38 86 66) 0)
((66 18 38) 0)
((18 66 94) 0)
((94 46 18) 0)
((46 94 58) 0)
((58 10 46) 0)
((10 58 74) 0)
((74 26 10) 0)
((31 26 74) 0)
((74 79 31) 0)
((79 75 27) 0)
((27 31 79) 0)
((27 75 59) 0)
((59 11 27) 0)
((11 59 95) 0)
((95 47 11) 0)
((47 95 67) 0)
((67 19 47) 0)
((19 67 87) 0)
((87 39 19) 0)
((39 87 51) 0)
((51 3 39) 0)
)

View file

@ -0,0 +1,674 @@
solid cylinder
facet normal 0.75183 -0.659357 0
outer loop
vertex 0.176776 -0.176776 0
vertex 0.198338 -0.152191 0
vertex 0.198338 -0.152191 0.1
endloop
endfacet
facet normal 0.75183 -0.659357 0
outer loop
vertex 0.198338 -0.152191 0.1
vertex 0.176776 -0.176776 0.1
vertex 0.176776 -0.176776 0
endloop
endfacet
facet normal 0.831471 -0.555568 0
outer loop
vertex 0.198338 -0.152191 0
vertex 0.216506 -0.125 0
vertex 0.216506 -0.125 0.1
endloop
endfacet
facet normal 0.831471 -0.555568 0
outer loop
vertex 0.216506 -0.125 0.1
vertex 0.198338 -0.152191 0.1
vertex 0.198338 -0.152191 0
endloop
endfacet
facet normal 0.896872 -0.44229 0
outer loop
vertex 0.216506 -0.125 0
vertex 0.23097 -0.095671 0
vertex 0.23097 -0.095671 0.1
endloop
endfacet
facet normal 0.896872 -0.44229 0
outer loop
vertex 0.23097 -0.095671 0.1
vertex 0.216506 -0.125 0.1
vertex 0.216506 -0.125 0
endloop
endfacet
facet normal 0.94693 -0.321438 0
outer loop
vertex 0.23097 -0.095671 0
vertex 0.241481 -0.064705 0
vertex 0.241481 -0.064705 0.1
endloop
endfacet
facet normal 0.94693 -0.321438 0
outer loop
vertex 0.241481 -0.064705 0.1
vertex 0.23097 -0.095671 0.1
vertex 0.23097 -0.095671 0
endloop
endfacet
facet normal 0.980787 -0.195081 0
outer loop
vertex 0.241481 -0.064705 0
vertex 0.247861 -0.0326315 0
vertex 0.247861 -0.0326315 0.1
endloop
endfacet
facet normal 0.980787 -0.195081 0
outer loop
vertex 0.247861 -0.0326315 0.1
vertex 0.241481 -0.064705 0.1
vertex 0.241481 -0.064705 0
endloop
endfacet
facet normal 0.997858 -0.0654097 0
outer loop
vertex 0.25 -8.32665e-17 0.1
vertex 0.247861 -0.0326315 0.1
vertex 0.247861 -0.0326315 0
endloop
endfacet
facet normal 0.997858 -0.0654097 -1.07752e-16
outer loop
vertex 0.247861 -0.0326315 0
vertex 0.25 8.32665e-17 0
vertex 0.25 -8.32665e-17 0.1
endloop
endfacet
facet normal 0.997858 0.0654097 0
outer loop
vertex 0.25 8.32665e-17 0
vertex 0.247861 0.0326315 0
vertex 0.247861 0.0326315 0.1
endloop
endfacet
facet normal 0.997858 0.0654097 1.07752e-16
outer loop
vertex 0.247861 0.0326315 0.1
vertex 0.25 -8.32665e-17 0.1
vertex 0.25 8.32665e-17 0
endloop
endfacet
facet normal 0.980787 0.195081 0
outer loop
vertex 0.247861 0.0326315 0
vertex 0.241481 0.064705 0
vertex 0.241481 0.064705 0.1
endloop
endfacet
facet normal 0.980787 0.195081 0
outer loop
vertex 0.241481 0.064705 0.1
vertex 0.247861 0.0326315 0.1
vertex 0.247861 0.0326315 0
endloop
endfacet
facet normal 0.94693 0.321438 0
outer loop
vertex 0.241481 0.064705 0
vertex 0.23097 0.095671 0
vertex 0.23097 0.095671 0.1
endloop
endfacet
facet normal 0.94693 0.321438 0
outer loop
vertex 0.23097 0.095671 0.1
vertex 0.241481 0.064705 0.1
vertex 0.241481 0.064705 0
endloop
endfacet
facet normal 0.896872 0.44229 0
outer loop
vertex 0.23097 0.095671 0
vertex 0.216506 0.125 0
vertex 0.216506 0.125 0.1
endloop
endfacet
facet normal 0.896872 0.44229 0
outer loop
vertex 0.216506 0.125 0.1
vertex 0.23097 0.095671 0.1
vertex 0.23097 0.095671 0
endloop
endfacet
facet normal 0.831471 0.555568 0
outer loop
vertex 0.216506 0.125 0
vertex 0.198338 0.152191 0
vertex 0.198338 0.152191 0.1
endloop
endfacet
facet normal 0.831471 0.555568 0
outer loop
vertex 0.198338 0.152191 0.1
vertex 0.216506 0.125 0.1
vertex 0.216506 0.125 0
endloop
endfacet
facet normal 0.75183 0.659357 0
outer loop
vertex 0.198338 0.152191 0
vertex 0.176776 0.176776 0
vertex 0.176776 0.176776 0.1
endloop
endfacet
facet normal 0.75183 0.659357 0
outer loop
vertex 0.176776 0.176776 0.1
vertex 0.198338 0.152191 0.1
vertex 0.198338 0.152191 0
endloop
endfacet
facet normal 0.659357 0.75183 0
outer loop
vertex 0.176776 0.176776 0
vertex 0.152191 0.198338 0
vertex 0.152191 0.198338 0.1
endloop
endfacet
facet normal 0.659357 0.75183 0
outer loop
vertex 0.152191 0.198338 0.1
vertex 0.176776 0.176776 0.1
vertex 0.176776 0.176776 0
endloop
endfacet
facet normal 0.555568 0.831471 0
outer loop
vertex 0.152191 0.198338 0
vertex 0.125 0.216506 0
vertex 0.125 0.216506 0.1
endloop
endfacet
facet normal 0.555568 0.831471 0
outer loop
vertex 0.125 0.216506 0.1
vertex 0.152191 0.198338 0.1
vertex 0.152191 0.198338 0
endloop
endfacet
facet normal 0.44229 0.896872 0
outer loop
vertex 0.125 0.216506 0
vertex 0.095671 0.23097 0
vertex 0.095671 0.23097 0.1
endloop
endfacet
facet normal 0.44229 0.896872 0
outer loop
vertex 0.095671 0.23097 0.1
vertex 0.125 0.216506 0.1
vertex 0.125 0.216506 0
endloop
endfacet
facet normal 0.321438 0.94693 0
outer loop
vertex 0.095671 0.23097 0
vertex 0.064705 0.241481 0
vertex 0.064705 0.241481 0.1
endloop
endfacet
facet normal 0.321438 0.94693 0
outer loop
vertex 0.064705 0.241481 0.1
vertex 0.095671 0.23097 0.1
vertex 0.095671 0.23097 0
endloop
endfacet
facet normal 0.195081 0.980787 0
outer loop
vertex 0.064705 0.241481 0
vertex 0.0326315 0.247861 0
vertex 0.0326315 0.247861 0.1
endloop
endfacet
facet normal 0.195081 0.980787 0
outer loop
vertex 0.0326315 0.247861 0.1
vertex 0.064705 0.241481 0.1
vertex 0.064705 0.241481 0
endloop
endfacet
facet normal 0.0654097 0.997858 0
outer loop
vertex 8.32665e-17 0.25 0.1
vertex 0.0326315 0.247861 0.1
vertex 0.0326315 0.247861 0
endloop
endfacet
facet normal 0.0654097 0.997858 -1.07752e-16
outer loop
vertex 0.0326315 0.247861 0
vertex -8.32665e-17 0.25 0
vertex 8.32665e-17 0.25 0.1
endloop
endfacet
facet normal -0.0654097 0.997858 0
outer loop
vertex -8.32665e-17 0.25 0
vertex -0.0326315 0.247861 0
vertex -0.0326315 0.247861 0.1
endloop
endfacet
facet normal -0.0654097 0.997858 1.07752e-16
outer loop
vertex -0.0326315 0.247861 0.1
vertex 8.32665e-17 0.25 0.1
vertex -8.32665e-17 0.25 0
endloop
endfacet
facet normal -0.195081 0.980787 0
outer loop
vertex -0.0326315 0.247861 0
vertex -0.064705 0.241481 0
vertex -0.064705 0.241481 0.1
endloop
endfacet
facet normal -0.195081 0.980787 0
outer loop
vertex -0.064705 0.241481 0.1
vertex -0.0326315 0.247861 0.1
vertex -0.0326315 0.247861 0
endloop
endfacet
facet normal -0.321438 0.94693 0
outer loop
vertex -0.064705 0.241481 0
vertex -0.095671 0.23097 0
vertex -0.095671 0.23097 0.1
endloop
endfacet
facet normal -0.321438 0.94693 0
outer loop
vertex -0.095671 0.23097 0.1
vertex -0.064705 0.241481 0.1
vertex -0.064705 0.241481 0
endloop
endfacet
facet normal -0.44229 0.896872 0
outer loop
vertex -0.095671 0.23097 0
vertex -0.125 0.216506 0
vertex -0.125 0.216506 0.1
endloop
endfacet
facet normal -0.44229 0.896872 0
outer loop
vertex -0.125 0.216506 0.1
vertex -0.095671 0.23097 0.1
vertex -0.095671 0.23097 0
endloop
endfacet
facet normal -0.555568 0.831471 0
outer loop
vertex -0.125 0.216506 0
vertex -0.152191 0.198338 0
vertex -0.152191 0.198338 0.1
endloop
endfacet
facet normal -0.555568 0.831471 0
outer loop
vertex -0.152191 0.198338 0.1
vertex -0.125 0.216506 0.1
vertex -0.125 0.216506 0
endloop
endfacet
facet normal -0.659357 0.75183 0
outer loop
vertex -0.152191 0.198338 0
vertex -0.176776 0.176776 0
vertex -0.176776 0.176776 0.1
endloop
endfacet
facet normal -0.659357 0.75183 0
outer loop
vertex -0.176776 0.176776 0.1
vertex -0.152191 0.198338 0.1
vertex -0.152191 0.198338 0
endloop
endfacet
facet normal -0.75183 0.659357 0
outer loop
vertex -0.176776 0.176776 0
vertex -0.198338 0.152191 0
vertex -0.198338 0.152191 0.1
endloop
endfacet
facet normal -0.75183 0.659357 0
outer loop
vertex -0.198338 0.152191 0.1
vertex -0.176776 0.176776 0.1
vertex -0.176776 0.176776 0
endloop
endfacet
facet normal -0.831471 0.555568 0
outer loop
vertex -0.198338 0.152191 0
vertex -0.216506 0.125 0
vertex -0.216506 0.125 0.1
endloop
endfacet
facet normal -0.831471 0.555568 0
outer loop
vertex -0.216506 0.125 0.1
vertex -0.198338 0.152191 0.1
vertex -0.198338 0.152191 0
endloop
endfacet
facet normal -0.896872 0.44229 0
outer loop
vertex -0.216506 0.125 0
vertex -0.23097 0.095671 0
vertex -0.23097 0.095671 0.1
endloop
endfacet
facet normal -0.896872 0.44229 0
outer loop
vertex -0.23097 0.095671 0.1
vertex -0.216506 0.125 0.1
vertex -0.216506 0.125 0
endloop
endfacet
facet normal -0.94693 0.321438 0
outer loop
vertex -0.23097 0.095671 0
vertex -0.241481 0.064705 0
vertex -0.241481 0.064705 0.1
endloop
endfacet
facet normal -0.94693 0.321438 0
outer loop
vertex -0.241481 0.064705 0.1
vertex -0.23097 0.095671 0.1
vertex -0.23097 0.095671 0
endloop
endfacet
facet normal -0.980787 0.195081 0
outer loop
vertex -0.241481 0.064705 0
vertex -0.247861 0.0326315 0
vertex -0.247861 0.0326315 0.1
endloop
endfacet
facet normal -0.980787 0.195081 0
outer loop
vertex -0.247861 0.0326315 0.1
vertex -0.241481 0.064705 0.1
vertex -0.241481 0.064705 0
endloop
endfacet
facet normal -0.997858 0.0654097 0
outer loop
vertex -0.25 8.32665e-17 0.1
vertex -0.247861 0.0326315 0.1
vertex -0.247861 0.0326315 0
endloop
endfacet
facet normal -0.997858 0.0654097 -1.07752e-16
outer loop
vertex -0.247861 0.0326315 0
vertex -0.25 -8.32665e-17 0
vertex -0.25 8.32665e-17 0.1
endloop
endfacet
facet normal -0.997858 -0.0654097 0
outer loop
vertex -0.25 -8.32665e-17 0
vertex -0.247861 -0.0326315 0
vertex -0.247861 -0.0326315 0.1
endloop
endfacet
facet normal -0.997858 -0.0654097 1.07752e-16
outer loop
vertex -0.247861 -0.0326315 0.1
vertex -0.25 8.32665e-17 0.1
vertex -0.25 -8.32665e-17 0
endloop
endfacet
facet normal -0.980787 -0.195081 0
outer loop
vertex -0.247861 -0.0326315 0
vertex -0.241481 -0.064705 0
vertex -0.241481 -0.064705 0.1
endloop
endfacet
facet normal -0.980787 -0.195081 0
outer loop
vertex -0.241481 -0.064705 0.1
vertex -0.247861 -0.0326315 0.1
vertex -0.247861 -0.0326315 0
endloop
endfacet
facet normal -0.94693 -0.321438 0
outer loop
vertex -0.241481 -0.064705 0
vertex -0.23097 -0.095671 0
vertex -0.23097 -0.095671 0.1
endloop
endfacet
facet normal -0.94693 -0.321438 0
outer loop
vertex -0.23097 -0.095671 0.1
vertex -0.241481 -0.064705 0.1
vertex -0.241481 -0.064705 0
endloop
endfacet
facet normal -0.896872 -0.44229 0
outer loop
vertex -0.23097 -0.095671 0
vertex -0.216506 -0.125 0
vertex -0.216506 -0.125 0.1
endloop
endfacet
facet normal -0.896872 -0.44229 0
outer loop
vertex -0.216506 -0.125 0.1
vertex -0.23097 -0.095671 0.1
vertex -0.23097 -0.095671 0
endloop
endfacet
facet normal -0.831471 -0.555568 0
outer loop
vertex -0.216506 -0.125 0
vertex -0.198338 -0.152191 0
vertex -0.198338 -0.152191 0.1
endloop
endfacet
facet normal -0.831471 -0.555568 0
outer loop
vertex -0.198338 -0.152191 0.1
vertex -0.216506 -0.125 0.1
vertex -0.216506 -0.125 0
endloop
endfacet
facet normal -0.75183 -0.659357 0
outer loop
vertex -0.198338 -0.152191 0
vertex -0.176776 -0.176776 0
vertex -0.176776 -0.176776 0.1
endloop
endfacet
facet normal -0.75183 -0.659357 0
outer loop
vertex -0.176776 -0.176776 0.1
vertex -0.198338 -0.152191 0.1
vertex -0.198338 -0.152191 0
endloop
endfacet
facet normal 0.659357 -0.75183 0
outer loop
vertex 0.176776 -0.176776 0
vertex 0.176776 -0.176776 0.1
vertex 0.152191 -0.198338 0.1
endloop
endfacet
facet normal 0.659357 -0.75183 0
outer loop
vertex 0.152191 -0.198338 0.1
vertex 0.152191 -0.198338 0
vertex 0.176776 -0.176776 0
endloop
endfacet
facet normal 0.555568 -0.831471 0
outer loop
vertex 0.152191 -0.198338 0
vertex 0.152191 -0.198338 0.1
vertex 0.125 -0.216506 0.1
endloop
endfacet
facet normal 0.555568 -0.831471 0
outer loop
vertex 0.125 -0.216506 0.1
vertex 0.125 -0.216506 0
vertex 0.152191 -0.198338 0
endloop
endfacet
facet normal 0.44229 -0.896872 0
outer loop
vertex 0.125 -0.216506 0
vertex 0.125 -0.216506 0.1
vertex 0.095671 -0.23097 0.1
endloop
endfacet
facet normal 0.44229 -0.896872 0
outer loop
vertex 0.095671 -0.23097 0.1
vertex 0.095671 -0.23097 0
vertex 0.125 -0.216506 0
endloop
endfacet
facet normal 0.321438 -0.94693 0
outer loop
vertex 0.095671 -0.23097 0
vertex 0.095671 -0.23097 0.1
vertex 0.064705 -0.241481 0.1
endloop
endfacet
facet normal 0.321438 -0.94693 0
outer loop
vertex 0.064705 -0.241481 0.1
vertex 0.064705 -0.241481 0
vertex 0.095671 -0.23097 0
endloop
endfacet
facet normal 0.195081 -0.980787 0
outer loop
vertex 0.064705 -0.241481 0
vertex 0.064705 -0.241481 0.1
vertex 0.0326315 -0.247861 0.1
endloop
endfacet
facet normal 0.195081 -0.980787 0
outer loop
vertex 0.0326315 -0.247861 0.1
vertex 0.0326315 -0.247861 0
vertex 0.064705 -0.241481 0
endloop
endfacet
facet normal 0.0654097 -0.997858 0
outer loop
vertex 8.32665e-17 -0.25 0
vertex 0.0326315 -0.247861 0
vertex 0.0326315 -0.247861 0.1
endloop
endfacet
facet normal 0.0654097 -0.997858 1.07752e-16
outer loop
vertex 0.0326315 -0.247861 0.1
vertex -8.32665e-17 -0.25 0.1
vertex 8.32665e-17 -0.25 0
endloop
endfacet
facet normal -0.0654097 -0.997858 0
outer loop
vertex -8.32665e-17 -0.25 0.1
vertex -0.0326315 -0.247861 0.1
vertex -0.0326315 -0.247861 0
endloop
endfacet
facet normal -0.0654097 -0.997858 -1.07752e-16
outer loop
vertex -0.0326315 -0.247861 0
vertex 8.32665e-17 -0.25 0
vertex -8.32665e-17 -0.25 0.1
endloop
endfacet
facet normal -0.195081 -0.980787 0
outer loop
vertex -0.0326315 -0.247861 0
vertex -0.0326315 -0.247861 0.1
vertex -0.064705 -0.241481 0.1
endloop
endfacet
facet normal -0.195081 -0.980787 -0
outer loop
vertex -0.064705 -0.241481 0.1
vertex -0.064705 -0.241481 0
vertex -0.0326315 -0.247861 0
endloop
endfacet
facet normal -0.321438 -0.94693 0
outer loop
vertex -0.064705 -0.241481 0
vertex -0.064705 -0.241481 0.1
vertex -0.095671 -0.23097 0.1
endloop
endfacet
facet normal -0.321438 -0.94693 -0
outer loop
vertex -0.095671 -0.23097 0.1
vertex -0.095671 -0.23097 0
vertex -0.064705 -0.241481 0
endloop
endfacet
facet normal -0.44229 -0.896872 0
outer loop
vertex -0.095671 -0.23097 0
vertex -0.095671 -0.23097 0.1
vertex -0.125 -0.216506 0.1
endloop
endfacet
facet normal -0.44229 -0.896872 -0
outer loop
vertex -0.125 -0.216506 0.1
vertex -0.125 -0.216506 0
vertex -0.095671 -0.23097 0
endloop
endfacet
facet normal -0.555568 -0.831471 0
outer loop
vertex -0.125 -0.216506 0
vertex -0.125 -0.216506 0.1
vertex -0.152191 -0.198338 0.1
endloop
endfacet
facet normal -0.555568 -0.831471 -0
outer loop
vertex -0.152191 -0.198338 0.1
vertex -0.152191 -0.198338 0
vertex -0.125 -0.216506 0
endloop
endfacet
facet normal -0.659357 -0.75183 0
outer loop
vertex -0.152191 -0.198338 0
vertex -0.152191 -0.198338 0.1
vertex -0.176776 -0.176776 0.1
endloop
endfacet
facet normal -0.659357 -0.75183 -0
outer loop
vertex -0.176776 -0.176776 0.1
vertex -0.176776 -0.176776 0
vertex -0.152191 -0.198338 0
endloop
endfacet
endsolid cylinder

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-1 -0.5 0)
(2 -0.5 0)
(2 0.5 0)
(-1 0.5 0)
(-1 -0.5 0.1)
(2 -0.5 0.1)
(2 0.5 0.1)
(-1 0.5 0.1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (75 25 1) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch in
(
(0 4 7 3)
)
patch out
(
(2 6 5 1)
)
patch top
(
(3 7 6 2)
)
patch bottom
(
(1 5 4 0)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,60 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
(
ibCylinder
{
type immersedBoundary;
nFaces 0;
startFace 3650;
internalFlow no;
}
in
{
type patch;
nFaces 25;
startFace 3650;
}
out
{
type patch;
nFaces 25;
startFace 3675;
}
top
{
type patch;
nFaces 75;
startFace 3700;
}
bottom
{
type patch;
nFaces 75;
startFace 3775;
}
frontAndBack
{
type empty;
nFaces 3750;
startFace 3850;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,83 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoDyMFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 0.01;
writeControl runTime;
writeInterval 0.2;
// writeControl timeStep;
// writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.2;
libs
(
"libimmersedBoundary.so"
"libimmersedBoundaryDynamicFvMesh.so"
);
functions
(
forces
{
type immersedBoundaryForces;
functionObjectLibs ("libimmersedBoundaryForceFunctionObject.so");
outputControl timeStep;
outputInterval 1;
patches ( ibCylinder );
pName p;
UName U;
rhoName rhoInf;
rhoInf 1;
log true;
CofR ( 0 0 0 );
Aref 0.05;
Uref 1;
}
);
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 10;
method simple;
simpleCoeffs
{
n (5 2 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
processorWeights 4(1 1 1 1);
}
manualCoeffs
{
dataFile "cellDecomposition";
}
distributed no;
roots
(
);
// ************************************************************************* //

View file

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
p;
}
// ************************************************************************* //

View file

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver amgSolver;
cycle W-cycle;
policy PAMG;
nPreSweeps 2;
nPostSweeps 2;
groupSize 4;
minCoarseEqns 4;
nMaxLevels 100;
scale on;
smoother symGaussSeidel;
minIter 1;
maxIter 100;
tolerance 1e-7;
relTol 0.01;
}
U
{
solver BiCGStab;
preconditioner ILU0;
minIter 1;
maxIter 1000;
tolerance 1e-08;
relTol 0;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 5;
pRefPoint (0 -0.45 0.05);
pRefValue 0;
}
PIMPLE
{
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0;
pRefPoint (0 -0.45 0.05);
pRefValue 0;
}
// ************************************************************************* //

View file

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object mapFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// List of pairs of source/target patches for mapping
patchMap
(
// lid movingWall
);
// List of target patches cutting the source domain (these need to be
// handled specially e.g. interpolated from internal values)
cuttingPatches
(
// fixedWalls
);
// ************************************************************************* //

View file

@ -9,7 +9,7 @@ mkdir constant/polyMesh
cp -f save/blockMeshDict constant/polyMesh cp -f save/blockMeshDict constant/polyMesh
runApplication blockMesh runApplication blockMesh
cp -f save/boundary constant/polyMesh/ \cp -f save/boundary constant/polyMesh/
runApplication refineImmersedBoundaryMesh -ibCellCellFaces runApplication refineImmersedBoundaryMesh -ibCellCellFaces

View file

@ -8,10 +8,10 @@ application="icoIbFoam"
compileApplication refineSphereMesh compileApplication refineSphereMesh
mkdir constant/polyMesh mkdir constant/polyMesh
cp -f save/blockMeshDict constant/polyMesh \cp -f save/blockMeshDict constant/polyMesh
runApplication blockMesh runApplication blockMesh
cp -f save/boundary constant/polyMesh/ \cp -f save/boundary constant/polyMesh/
runApplication refineSphereMesh runApplication refineSphereMesh

View file

@ -8,10 +8,10 @@ application="icoIbFoam"
compileApplication refineThickPlateMesh compileApplication refineThickPlateMesh
mkdir constant/polyMesh mkdir constant/polyMesh
cp -f save/blockMeshDict constant/polyMesh \cp -f save/blockMeshDict constant/polyMesh
runApplication blockMesh runApplication blockMesh
cp -f save/boundary constant/polyMesh/ \cp -f save/boundary constant/polyMesh/
runApplication refineThickPlateMesh runApplication refineThickPlateMesh

View file

@ -47,13 +47,13 @@ fi
if [ "$WM_PROJECT_DIR" ] if [ "$WM_PROJECT_DIR" ]
then then
sed -e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% > $depName sed -e s%:.*$WM_PROJECT_DIR%': $(WM_PROJECT_DIR)'% > $depName
else else
cat > $depName cat > $depName
fi fi
sed -e s%".*.o.*:"%'$(OBJECTS_DIR)/'"$objectName\:"% \ sed -e s%".*.o.*:"%'$(OBJECTS_DIR)/'"$objectName\:"% \
-e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% \ -e s%:.*$WM_PROJECT_DIR%': $(WM_PROJECT_DIR)'% \
>> $depName >> $depName
echo '$(OBJECTS_DIR)/'$objectName': $(EXE_DEP)' >> $depName echo '$(OBJECTS_DIR)/'$objectName': $(EXE_DEP)' >> $depName