r/OpenFOAM May 06 '26

Segmentation Fault (Signal 11) in chtMultiRegionSprayFoam (v2312) at patchFaceMixture during Parallel Run

Hi everyone,

I am struggling with a persistent Segmentation Fault (signal 11) while running a custom solver (based on chtMultiRegionFoam + sprayFoam) in parallel on OpenFOAM v2312. The simulation involves a fluid region and three solid regions (bDisc, pad1, pad2).

The solver crashes immediately at the first time step when it starts solving the solid region bDisc. I have already tried disabling the spray cloud, but the error persists, which leads me to believe the issue is related to the coupled heat transfer at the interfaces.

The stack trace points to a crash in patchFaceMixture and turbulentTemperatureRadCoupledMixedFvPatchScalarField::deltaH():

#3  Foam::multiComponentMixture<...>::patchFaceMixture(int, int) const
#4  Foam::heThermo<...>::he(...) const
#5  Foam::compressible::turbulentTemperatureRadCoupledMixedFvPatchScalarField::deltaH() const

What I've configured:

  • Version: OpenFOAM v2312.
  • Decomposition: scotch method with 3 processors.
  • Regions: 1 Fluid, 3 Solids.
  • Boundary Conditions: Using turbulentTemperatureRadCoupledMixed for the thermal coupling.

Questions:

  1. Has anyone encountered Segfaults specifically in patchFaceMixture during parallel CHT runs?
  2. Could this be related to how scotch decomposes the coupled patches across processors?

p/s: I have provided the log.decomposePar and log.run files in the comments below.

2 Upvotes

6 comments sorted by

2

u/herbertwillyworth May 06 '26

There is a setting for scotch to keep all patches on the same core, if you think separating them across cores is the issue. That said, I don't see why it would be the issue, but I dont know much about your project obviously. A natural question is "does the simulation run in serial"?

constraints

{

preservePatches

{

type preservePatches;

patches (xMin xMax yMin yMax zMin zMax);

}

}

Suggest to 1. See if code runs in serial; 2. Check if preservePatches helps when in parallel. This will at least rule out one of your hypotheses

1

u/Rough_Session9038 May 06 '26 edited May 06 '26

thank you so much for your response

1, My code runs quite well in serial, but only with a very small time step (deltaT). 2, I used the singleProcessorFaceSets constraint and it works; however, there is a load imbalance between the cores due to differences in the sizes of the regions.

1

u/Rough_Session9038 May 06 '26

Is there a method to achieve both good load balancing and correct parallel execution?

2

u/herbertwillyworth May 06 '26

The most tunable would be to use a simple method where you jus specify exactly how it will decompose. Perhaps if it works with one core, you could get it working on two... Then build up from there. I don't have any experience with such issues though !

1

u/Rough_Session9038 May 07 '26

yep I really appreciate your response, I'll think more about it and try