Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4aa14af
Update README.md
xiao312 Feb 13, 2023
1f03758
Update examples.rst
xiao312 Feb 13, 2023
c2d9d8b
Merge pull request #196 from xiao312/master
JX278 Feb 13, 2023
37092ec
fix bugs in updating solution buffer
maorz1998 Feb 15, 2023
d4b7d20
Update CanteraTorchProperties
maorz1998 Feb 15, 2023
34cdfa9
Update corrtest.cpp
maorz1998 Feb 15, 2023
0344435
Update dfChemistryModel.C
maorz1998 Feb 15, 2023
640ae80
Merge pull request #199 from maorz1998/master
JX278 Feb 15, 2023
a0c414b
Create README.md
zhixchen Feb 16, 2023
7ac1d1f
Update README.md
xiao312 Feb 16, 2023
418f934
Merge pull request #201 from xiao312/master
OpenFOAMFans Feb 19, 2023
4bfd09f
refactor dfChemistryModel
Feb 19, 2023
c47a8d8
Merge pull request #204 from OpenFOAMFans/master
maorz1998 Feb 21, 2023
0afc60d
add new loadBalancing algorithm
maorz1998 Feb 21, 2023
20df5e3
modify compile options of dfCombustionModel
maorz1998 Feb 22, 2023
4d0c0cd
modity test
maorz1998 Feb 23, 2023
319db08
Merge pull request #205 from maorz1998/master
JX278 Feb 23, 2023
0c3adb3
compile DNNInferencer.so via install.sh
maorz1998 Feb 23, 2023
4a7348c
Merge pull request #206 from maorz1998/master
JX278 Feb 23, 2023
1849571
remove mpi communications in DNN solving procedure when use pure GPU
maorz1998 Feb 23, 2023
d3417b8
add flareFGM case
minzhang0929 Feb 24, 2023
c8d230d
Update baseFGM.C
minzhang0929 Feb 24, 2023
5ae660c
Merge pull request #207 from maorz1998/Archer
JX278 Feb 24, 2023
5c76d1c
Merge pull request #208 from minzhang0929/master
maorz1998 Feb 24, 2023
71346ab
fix a minor problem in install.sh
JX278 Feb 24, 2023
697e7fa
Merge pull request #209 from JX278/master
maorz1998 Feb 24, 2023
7e022c8
remove mpi communications in DNN solving procedure when use pure CPU
maorz1998 Feb 24, 2023
7016614
Merge pull request #211 from maorz1998/Archer
JX278 Feb 24, 2023
a68430d
Update README.md
xiao312 Mar 1, 2023
77aa2d0
Merge pull request #213 from xiao312/master
JX278 Mar 1, 2023
9fe6504
Update tableSolver.C
haixiao-stack Mar 9, 2023
3b425fd
Update CPU_inferencce_validation.yml
JX278 Mar 9, 2023
2305e99
Add TCI test (#217)
JX278 Mar 10, 2023
a9d6347
Merge pull request #218 from haixiao-stack/master
maorz1998 Mar 13, 2023
79ba6b4
add GPU-compatible linear solver amgx
maorz1998 Mar 17, 2023
a1f9660
remove redundant .gitignore
maorz1998 Mar 17, 2023
61ba214
Delete PaSR.C
minzhang0929 Mar 22, 2023
e83da82
Delete PaSR.H
minzhang0929 Mar 22, 2023
1063571
Merge branch 'deepmodeling:master' into master
minzhang0929 Mar 22, 2023
b946e55
update PaSR model
minzhang0929 Mar 22, 2023
9e1610f
Merge pull request #223 from minzhang0929/master
OpenFOAMFans Mar 22, 2023
354b7c8
Merge pull request #222 from maorz1998/master
maorz1998 Mar 22, 2023
67e5b4d
add Cmake
JX278 Mar 27, 2023
9147f41
Merge branch 'CMakeBuild' into master
JX278 Mar 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 38 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ set(OpenFOAM_VERSION $ENV{WM_PROJECT_VERSION})
set(OpenFOAM_DIR $ENV{WM_PROJECT_DIR})
set(OpenFOAM_LIB_DIR $ENV{FOAM_LIBBIN})
set(OpenFOAM_SRC $ENV{FOAM_SRC})

set(OpenFOAM_APP $ENV{FOAM_APP})


set(SRC_ORIG ${CMAKE_CURRENT_SOURCE_DIR}/src_orig)


Expand All @@ -34,19 +36,37 @@ ENDFUNCTION(R_SEARCH)
set(DF_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(DF_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src)

# set the link options
set(LINK_FLAGS "-Xlinker --add-needed -Xlinker --no-as-needed")

set(CMAKE_INSTALL_PREFIX ${DF_ROOT})

#set the options for the shared library
set(LINK_FLAGS "-fuse-ld=bfd -Xlinker --add-needed -Xlinker --no-as-needed")

set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")


SET(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64
-DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor
-Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3
-DNoRepository -ftemplate-depth-100 -std=c++14
-Wno-unused-variable -Wno-unused-but-set-variable -Wno-old-style-cast -DOMPI_SKIP_MPICXX
-pthread -fPIC")

# Compiling configure
add_definitions("${DEFINITIONS_COMPILE}")


R_SEARCH(${DF_SRC}/dfCombustionModels dfcombustion_inc)
R_SEARCH(${DF_SRC}/dfCanteraMixture dfcantera_inc)
R_SEARCH(${DF_SRC}/lagrangian/intermediate dflagrangianinter_inc)
R_SEARCH(${DF_SRC}/lagrangian/spray dflagrangianspray_inc)
R_SEARCH(${DF_SRC}/lagrangian/turbulence dflagrangianturb_inc)
R_SEARCH(${DF_SRC}/dfChemistryModel dfchemistry_inc)
R_SEARCH(${DF_SRC}/thermophysicalModels/thermophysicalProperties dfthermophysicalprop_inc)

R_SEARCH(${DF_SRC}/thermophysicalModels/basic dfthermophysicalbasic_inc)
R_SEARCH(${DF_SRC}/thermophysicalModels/SLGThermo dfthermophysicalslg_inc)
R_SEARCH(${DF_SRC}/TurbulenceModels dfturbulence_inc)
Expand All @@ -64,14 +84,16 @@ endif(DEFINED ENV{CANTERA_ROOT})



set(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -DWM_ARCH_OPTION=64 -DWM_DP
-DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter
-Wno-old-style-cas -Wno-overloaded-virtual -Wno-unused-variable
-Wno-unused-local-typedef -Wno-invalid-offsetof -Wno-deprecated-register
-Wno-undefined-var-template -O0 -g -DFULLDEBUG -DNoRepository
-ftemplate-depth-100 -fPIC")

include_directories(
${OpenFOAM_SRC}/finiteVolume/lnInclude

${OpenFOAM_SRC}/OSspecific/POSIX/lnInclude
${OpenFOAM_SRC}/OpenFOAM/lnInclude
)

link_directories(${OpenFOAM_LIB_DIR} ${OpenFOAM_LIB_DIR}/dummy )



# Compiling configure
Expand All @@ -84,6 +106,7 @@ include_directories(
)



set(CMAKE_INSTALL_PREFIX ${DF_ROOT})

add_subdirectory(${DF_SRC}/thermophysicalModels/thermophysicalProperties)
Expand All @@ -102,8 +125,9 @@ add_subdirectory(${DF_SRC}/dfCombustionModels)
add_subdirectory(${DF_SRC}/dynamicMesh)
add_subdirectory(${DF_SRC}/dynamicFvMesh)

# add_subdirectory(${DF_ROOT}/applications/solvers/df0DFoam)
#add_subdirectory(${DF_ROOT}/applications/solvers/dfLowMachFoam)
# add_subdirectory(${DF_ROOT}/applications/solvers/dfHighSpeedFoam)
# add_subdirectory(${DF_ROOT}/applications/solvers/dfSprayFoam)


add_subdirectory(${DF_ROOT}/applications/solvers/df0DFoam)
add_subdirectory(${DF_ROOT}/applications/solvers/dfLowMachFoam)
add_subdirectory(${DF_ROOT}/applications/solvers/dfHighSpeedFoam)
add_subdirectory(${DF_ROOT}/applications/solvers/dfSprayFoam)
112 changes: 112 additions & 0 deletions applications/solvers/dfLowMachFoam/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,109 @@
cmake_minimum_required(VERSION 3.5)
project(dfLowMachFoam LANGUAGES CXX)
FIND_PACKAGE(MPI REQUIRED)

message(STATUS "MPI include path is " ${MPI_INCLUDE_PATH})
message(STATUS "MPI libraries " ${MPI_LIBRARIES})


# Check valid OpenFOAM
if(DEFINED ENV{WM_PROJECT_DIR})
MESSAGE(STATUS "OpenFOAM: " $ENV{WM_PROJECT_DIR})
else()
message(FATAL_ERROR "OpenFOAM is not sourced")
endif(DEFINED ENV{WM_PROJECT_DIR})
set(OpenFOAM_VERSION $ENV{WM_PROJECT_VERSION})
set(OpenFOAM_DIR $ENV{WM_PROJECT_DIR})
set(OpenFOAM_LIB_DIR $ENV{FOAM_LIBBIN})
set(OpenFOAM_SRC $ENV{FOAM_SRC})

set(DF_ROOT $ENV{DF_ROOT})
set(DF_SRC ${DF_ROOT}/src)
set(SRC_ORIG ${DF_ROOT}/src_orig)


FUNCTION(R_SEARCH search_path return_list)
FILE(GLOB_RECURSE new_list ${search_path}/*.H)
SET(dir_list "")
FOREACH(file_path ${new_list})
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)
SET(dir_list ${dir_list} ${dir_path})
ENDFOREACH()
LIST(REMOVE_DUPLICATES dir_list)
SET(${return_list} ${dir_list} PARENT_SCOPE)
ENDFUNCTION(R_SEARCH)




R_SEARCH(${DF_SRC}/dfCombustionModels dfcombustion_inc)
R_SEARCH(${DF_SRC}/dfCanteraMixture dfcantera_inc)
R_SEARCH(${DF_SRC}/lagrangian/intermediate dflagrangianinter_inc)
R_SEARCH(${DF_SRC}/lagrangian/spray dflagrangianspray_inc)
R_SEARCH(${DF_SRC}/lagrangian/turbulence dflagrangianturb_inc)
R_SEARCH(${DF_SRC}/dfChemistryModel dfchemistry_inc)
R_SEARCH(${DF_SRC}/thermophysicalModels/thermophysicalProperties dfthermophysicalprop_inc)
R_SEARCH(${DF_SRC}/thermophysicalModels/thermophysicalProperties dfthermophysicalprop_inc)
R_SEARCH(${DF_SRC}/thermophysicalModels/basic dfthermophysicalbasic_inc)
R_SEARCH(${DF_SRC}/thermophysicalModels/SLGThermo dfthermophysicalslg_inc)
R_SEARCH(${DF_SRC}/TurbulenceModels dfturbulence_inc)
R_SEARCH(${DF_SRC}/dynamicMesh dfnewdynamic_inc)
R_SEARCH(${DF_SRC}/dynamicFvMesh dffvdynamic_inc)


# Check valid libcantera
if(DEFINED ENV{CANTERA_ROOT})
MESSAGE(STATUS "libcantera: " $ENV{CANTERA_ROOT})
set(CANTERA_ROOT $ENV{CANTERA_ROOT})
else()
message(FATAL_ERROR "libcantera directory is not specified")
endif(DEFINED ENV{CANTERA_ROOT})


# Check valid Torch
#if(DEFINED $ENV{PYTHON_INC_DIR)})
# MESSAGE(STATUS "Torch: " $ENV{CANTERA_ROOT})
#else()
# message(FATAL_ERROR "no torch used")
#endif(DEFINED ENV{PYTHON_INC_DIR})



include_directories(
${OpenFOAM_SRC}/finiteVolume/lnInclude

${OpenFOAM_SRC}/OSspecific/POSIX/lnInclude
${OpenFOAM_SRC}/OpenFOAM/lnInclude
)

message(STATUS "dummydir:" ${OpenFOAM_LIB_DIR}/dummy)
link_directories(${OpenFOAM_LIB_DIR} ${OpenFOAM_LIB_DIR}/dummy )

set(CMAKE_INSTALL_PREFIX ${DF_ROOT})

#set the options for the shared library
set(LINK_FLAGS "-fuse-ld=bfd -Xlinker --add-needed -Xlinker --no-as-needed")

#set the link options
set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")


SET(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64
-DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor
-Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3
-DNoRepository -ftemplate-depth-100 -std=c++14
-Wno-unused-variable -Wno-unused-but-set-variable -Wno-old-style-cast -DOMPI_SKIP_MPICXX
-pthread -fPIC")


# Compiling configure
add_definitions("${DEFINITIONS_COMPILE}")

FIND_PACKAGE(MPI REQUIRED)


include_directories(
${OpenFOAM_SRC}/transportModels/compressible/lnInclude
Expand Down Expand Up @@ -35,6 +140,12 @@ target_link_libraries(${PROJECT_NAME} $ENV{FOAM_LIBBIN}/libfiniteVolume.so libme

target_link_libraries(${PROJECT_NAME} ${CANTERA_ROOT}/lib/libcantera_shared.so.2)


#set_target_properties(${PROJECT_NAME}
# PROPERTIES
# LINK_OPTIONS "-Xlinker --add-needed -Xlinker --no-as-needed"
# )

target_link_libraries(${PROJECT_NAME} dfCompressibleTurbulenceModels
dfChemistryModel
dfCanteraMixture
Expand All @@ -45,4 +156,5 @@ $ENV{FOAM_LIBBIN}/openmpi-system/libPstream.so
)



install(TARGETS ${PROJECT_NAME} DESTINATION bin)
22 changes: 22 additions & 0 deletions src/TurbulenceModels/compressible/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@

project(dfCompressibleTurbulenceModels LANGUAGES CXX)

#set the options for the shared library
set(LINK_FLAGS "-fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed")

#set the link options
set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")


SET(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64
-DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor
-Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3
-DNoRepository -ftemplate-depth-100 -std=c++14
-Wno-unused-variable -Wno-unused-but-set-variable -Wno-old-style-cast -DOMPI_SKIP_MPICXX
-pthread
-fPIC -c")


# Compiling configure
add_definitions("${DEFINITIONS_COMPILE}")

set(WORKINGDIR ${SRC_ORIG}/TurbulenceModels/compressible/)
include_directories(
${OpenFOAM_SRC}/TurbulenceModels/compressible/lnInclude
Expand Down
21 changes: 21 additions & 0 deletions src/TurbulenceModels/turbulenceModels/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
project(dfTurbulenceModels LANGUAGES CXX)

#set the options for the shared library
set(LINK_FLAGS "-fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed")

#set the link options
set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")


SET(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64
-DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor
-Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3
-DNoRepository -ftemplate-depth-100 -std=c++14
-Wno-unused-variable -Wno-unused-but-set-variable -Wno-old-style-cast -DOMPI_SKIP_MPICXX
-pthread
-fPIC -c")


# Compiling configure
add_definitions("${DEFINITIONS_COMPILE}")

include_directories(
${dfturbulence_inc}
Expand Down
22 changes: 22 additions & 0 deletions src/dfCanteraMixture/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ add_library(dfCanteraMixture SHARED
)


#set the options for the shared library
set(LINK_FLAGS "-fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed")

#set the link options
set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")


SET(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64
-DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor
-Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3
-DNoRepository -ftemplate-depth-100 -std=c++14
-Wno-unused-variable -Wno-unused-but-set-variable -Wno-old-style-cast -DOMPI_SKIP_MPICXX
-pthread
-fPIC -c")


# Compiling configure
add_definitions("${DEFINITIONS_COMPILE}")

# dynamic link
target_link_libraries(${PROJECT_NAME} $ENV{FOAM_LIBBIN}/libfiniteVolume.so libmeshTools.so)

Expand Down
30 changes: 28 additions & 2 deletions src/dfChemistryModel/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

project(dfChemistryModel LANGUAGES CXX)

find_package(MPI REQUIRED)

include_directories(
${dfchemistry_inc}
${OpenFOAM_SRC}/meshTools/lnInclude
Expand All @@ -10,11 +12,34 @@ include_directories(
${OpenFOAM_SRC}/TurbulenceModels/compressible/lnInclude
${dfcantera_inc}
${CANTERA_ROOT}/include
${OpenFOAM_SRC}/Pstream/mpi
${MPI_INCLUDE_PATH}

)

#set the options for the shared library
set(LINK_FLAGS "-fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed")

#set the link options
set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")


SET(CMAKE_C_COMPILER g++)
set(PATH_LIB_OPENMPI "openmpi-system") # Foundation version
set(DEFINITIONS_COMPILE "-std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64
-DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor
-Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3
-DNoRepository -ftemplate-depth-100 -std=c++14
-Wno-unused-variable -Wno-unused-but-set-variable -Wno-old-style-cast -DOMPI_SKIP_MPICXX
-pthread
-fPIC -c")


# Compiling configure
add_definitions("${DEFINITIONS_COMPILE}")

${OpenFOAM_SRC}/Pstream/mpi
${MPI_INCLUDE_PATH}
)


add_library(dfChemistryModel SHARED
Expand Down Expand Up @@ -54,6 +79,7 @@ target_link_libraries(${PROJECT_NAME} dfFluidThermophysicalModels
dfCompressibleTurbulenceModels
dfCanteraMixture
${MPI_LIBRARIES}

)


Expand Down
Loading