Skip to content

Commit

Permalink
Updates for soot and spray
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Dec 8, 2023
1 parent f57ae03 commit d540bba
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 36 deletions.
76 changes: 43 additions & 33 deletions CMake/BuildPeleCExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,60 @@ function(build_pelec_exe pelec_exe_name pelec_lib_name)
target_include_directories(${pelec_exe_name} PRIVATE ${CMAKE_BINARY_DIR})
target_include_directories(${pelec_exe_name} PRIVATE ${CMAKE_SOURCE_DIR}/Source/Params/param_includes)

# Set PeleMP flags
set(PELEMP_SRC_DIR ${CMAKE_SOURCE_DIR}/Submodules/PeleMP/Source)
if(PELEC_ENABLE_AMREX_PARTICLES AND PELEMP_SPRAY_FUEL_NUM GREATER 0)
# Spray
set(PELE_PHYSICS_SPRAY_DIR ${CMAKE_SOURCE_DIR}/Submodules/PelePhysics/Source/Spray)
if(PELEC_ENABLE_AMREX_PARTICLES AND PELE_SPRAY_FUEL_NUM GREATER 0)
target_compile_definitions(${pelec_exe_name} PRIVATE PELEC_USE_SPRAY)
target_compile_definitions(${pelec_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELEMP_SPRAY_FUEL_NUM})
target_compile_definitions(${pelec_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELE_SPRAY_FUEL_NUM})
target_sources(${pelec_exe_name} PRIVATE
SprayParticlesInitInsert.cpp
SprayParticlesInitInsert.cpp
${SRC_DIR}/Particle.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayParticles.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayParticles.H
${PELEMP_SRC_DIR}/PP_Spray/SprayFuelData.H
${PELEMP_SRC_DIR}/PP_Spray/SprayInterpolation.H
${PELEMP_SRC_DIR}/PP_Spray/Drag.H
${PELEMP_SRC_DIR}/PP_Spray/SprayInjection.H
${PELEMP_SRC_DIR}/PP_Spray/SpraySetup.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayDerive.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayJet.H
${PELEMP_SRC_DIR}/PP_Spray/SprayJet.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayIO.cpp
${PELEMP_SRC_DIR}/PP_Spray/WallFunctions.H
${PELEMP_SRC_DIR}/PP_Spray/Distribution/DistBase.H
${PELEMP_SRC_DIR}/PP_Spray/Distribution/Distributions.H
${PELEMP_SRC_DIR}/PP_Spray/Distribution/Distributions.cpp)
target_include_directories(${pelec_exe_name} PRIVATE ${PELEMP_SRC_DIR}/PP_Spray)
target_include_directories(${pelec_exe_name} PRIVATE ${PELEMP_SRC_DIR}/PP_Spray/Distribution)
${PELE_PHYSICS_SPRAY_DIR}/Drag.H
${PELE_PHYSICS_SPRAY_DIR}/SprayDerive.cpp
${PELE_PHYSICS_SPRAY_DIR}/SprayFuelData.H
${PELE_PHYSICS_SPRAY_DIR}/SprayIO.cpp
${PELE_PHYSICS_SPRAY_DIR}/SprayInjection.H
${PELE_PHYSICS_SPRAY_DIR}/SprayInterpolation.H
${PELE_PHYSICS_SPRAY_DIR}/SprayJet.H
${PELE_PHYSICS_SPRAY_DIR}/SprayJet.cpp
${PELE_PHYSICS_SPRAY_DIR}/SprayParticles.H
${PELE_PHYSICS_SPRAY_DIR}/SprayParticles.cpp
${PELE_PHYSICS_SPRAY_DIR}/SpraySB.cpp
${PELE_PHYSICS_SPRAY_DIR}/SpraySetup.cpp
${PELE_PHYSICS_SPRAY_DIR}/WallFunctions.H
${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/AhamedSplash.H
${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/ReitzKHRT.H
${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/SBData.H
${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/TABBreakup.H
${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/WallFilm.H
${PELE_PHYSICS_SPRAY_DIR}/Distribution/DistBase.H
${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.H
${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.cpp)
target_include_directories(${pelec_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR})
target_include_directories(${pelec_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/Distribution)
target_include_directories(${pelec_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash)
endif()

# Soot
set(PELE_PHYSICS_SOOT_DIR ${CMAKE_SOURCE_DIR}/Submodules/PelePhysics/Source/Soot)
if(PELEC_ENABLE_SOOT)
target_compile_definitions(${pelec_exe_name} PRIVATE PELEC_USE_SOOT)
target_compile_definitions(${pelec_exe_name} PRIVATE NUM_SOOT_MOMENTS=${PELEMP_NUM_SOOT_MOMENTS})
target_compile_definitions(${pelec_exe_name} PRIVATE NUM_SOOT_MOMENTS=${PELE_NUM_SOOT_MOMENTS})
set(SOOT_MOMENTS_VALUES 3 6)
if(NOT PELEMP_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES)
if(NOT PELE_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES)
message(FATAL_ERROR "NUM_SOOT_MOMENTS must be either 3 or 6")
endif()
target_sources(${pelec_exe_name} PRIVATE
${SRC_DIR}/Soot.cpp
${PELEMP_SRC_DIR}/Soot_Models/SootModel.cpp
${PELEMP_SRC_DIR}/Soot_Models/SootModel_react.cpp
${PELEMP_SRC_DIR}/Soot_Models/SootModel_derive.cpp
${PELEMP_SRC_DIR}/Soot_Models/Constants_Soot.H
${PELEMP_SRC_DIR}/Soot_Models/SootData.H
${PELEMP_SRC_DIR}/Soot_Models/SootReactions.H
${PELEMP_SRC_DIR}/Soot_Models/SootModel.H
${PELEMP_SRC_DIR}/Soot_Models/SootModel_derive.H)
target_include_directories(${pelec_exe_name} PRIVATE ${PELEMP_SRC_DIR}/Soot_Models)
${PELE_PHYSICS_SOOT_DIR}/SootModel.H
${PELE_PHYSICS_SOOT_DIR}/SootModel.cpp
${PELE_PHYSICS_SOOT_DIR}/SootModel_react.cpp
${PELE_PHYSICS_SOOT_DIR}/SootModel_derive.H
${PELE_PHYSICS_SOOT_DIR}/SootModel_derive.cpp
${PELE_PHYSICS_SOOT_DIR}/Constants_Soot.H
${PELE_PHYSICS_SOOT_DIR}/SootData.H
${PELE_PHYSICS_SOOT_DIR}/SootReactions.H)
target_include_directories(${pelec_exe_name} PRIVATE ${PELE_PHYSICS_SOOT_DIR})
endif()

target_sources(${pelec_exe_name}
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/Soot-Flame/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(PELEC_ENABLE_PARTICLES OFF)
set(PELEC_ENABLE_SOOT ON)
set(PELEMP_NUM_SOOT_MOMENTS 3)
set(PELE_NUM_SOOT_MOMENTS 3)
set(PELEC_EOS_MODEL Fuego)
set(PELEC_CHEMISTRY_MODEL SootReaction)
set(PELEC_TRANSPORT_MODEL Simple)
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/Spray-Conv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set(PELEC_ENABLE_AMREX_PARTICLES ON)
set(PELEC_EOS_MODEL Fuego)
set(PELEC_CHEMISTRY_MODEL decane_3sp)
set(PELEC_TRANSPORT_MODEL Simple)
set(PELEMP_SPRAY_FUEL_NUM 1)
set(PELE_SPRAY_FUEL_NUM 1)
include(BuildExeAndLib)
2 changes: 1 addition & 1 deletion Submodules/PelePhysics

0 comments on commit d540bba

Please sign in to comment.