Using CAD/DAGMC geometry with FLUKA 4.5-1 - FluDAG no longer works

Versions

Please provide the used software versions.

FLUKA:4.5-1
Flair:

Description

Dear FLUKA experts,

I’m trying to run FLUKA simulations with complex CAD geometry (STEP files), and I need help finding the right approach. What I have:

FLUKA 4-5.1
CAD geometry in STEP format
The same geometry already works in OpenMC via DAGMC (H5M file)
DAGMC/MOAB v5.6.0 installed

What I tried:

FluDAG — fails to compile because libflukahp.a no longer exists in FLUKA 4.5-1
FLUKA Voxel geometry — only creates bounding boxes per material, not individual voxels
FLUKA Unstructured Mesh (UMESH) — gmsh/netgen fail to generate volume mesh from our STEP files due to non-watertight surfaces

My question:
What is the recommended workflow in 2024/2025 to use complex CAD geometry in FLUKA 4.5-1? Is there an updated alternative to FluDAG that works with FLUKA 4.5? Or is there a way to use our existing DAGMC H5M file directly?

Thank you!

Alejandra

Input files

Please upload all relevant files. (FLUKA input file, Flair project file, user routines, and data files)

It’s lib/libfluka.a

Thank you for the response. We have libfluka.a at /usr/local/fluka/lib/libfluka.a.
Could you please clarify: should we simply replace libflukahp.a with libfluka.a in the FluDAG CMakeLists.txt? Or is there a newer/updated version of FluDAG that officially supports FLUKA 4.5?

Dear Alejandra,

There are a few additional FLUKA libraries that have to be linked.

I successfully compiled FluDAG and ran the tests with this modified version of FindFluka.cmake

find_path(FLUKA_LIBDIR
  NAMES libfluka.a
  HINTS ${FLUKA_DIR}
  PATHS ENV FLUKA_DIR
  NO_DEFAULT_PATH
)

if (NOT FLUKA_LIBDIR)
  message(FATAL_ERROR "Could not find Fluka")
endif ()

set(FLUKA_LIBRARIES
  ${FLUKA_LIBDIR}/libfluka.a
  ${FLUKA_LIBDIR}/libgeometry.a
  ${FLUKA_LIBDIR}/libdata.a
  ${FLUKA_LIBDIR}/libmath.a
  ${FLUKA_LIBDIR}/libtool.a
  gfortran
  z
  pthread
)

message(STATUS "FLUKA_LIBRARIES: ${FLUKA_LIBRARIES}")
message(STATUS "Found Fluka")

However, we’d recommend using the UMESH feature. Sometimes, meshing tools (tetgen/gmsh etc.) create non-watertight geometry due to too coarse tessellation. If you could send me your STEP files (privately), I can check it for issues.

FluDAG might have worked for you because, with certain workflows, it calls the make_watertight command, which patches geometry issues behind the scenes.

Best regards,
Volodymyr

1 Like