Skip to content

Possible corruption of surface field boundaries on LB #32

@FoamScience

Description

@FoamScience

Dear FoamScience @FoamScience and friend M. Elwardi Fadeli

Thank you again for your previous response and for implementing the multi-region support for updateMesh in blastAMR (#23). I really appreciate the continued development.

Following the updates in #22 and #23, I tested the latest blastAMR v2212 setup with twoPhaseFlow v2406 on OpenFOAM v2506 and can confirm that updateMesh now works with my multi-region case, and the AMR process executes correctly when initializing the mesh at time 0.

Previously you mentioned that TwoPhaseFlow solvers rely heavily on hex-AMR logic, and that support with the generic polyRefiner could be difficult. Following that suggestion, I have updated my dynamicMeshDict to use:

refiner    hexRefiner;

I am no longer using polyRefiner, and the simulation is now running with hexRefiner.

However, during runtime of my solver (multiRegionPhaseChangeFlow), a new issue occurs after mesh refinement and load balancing. The mesh refinement itself completes successfully, but the simulation stops with the following error during field mapping / redistribution:

Protecting 0 cells next to requested boundary patches.
Selected 1236 cells for refinement out of 18831.
Refined from 18831 to 27483 cells.
canBalance(): Maximum imbalance = 201.62646 %
Decomposition method scotch [8]
Selecting decompositionConstraint polyRefinement
polyRefinement : setting constraints to preserve refinement history
polyRefinement : reading fvMeshPolyRefiner from time "0.000321"
3D case detected. Adding polyhedralRefinement topology modifier
...
Mapping the fields ...
Distributing the mesh ...
Successfully distributed mesh
New max imbalance: 1.0006186%
Distributing ...
Execution time for mesh.update() = 0.43 s

--> FOAM FATAL ERROR: (openfoam-2506)
Different patches for fvsPatchField

From void Foam::fvsPatchFieldBase::checkPatch(const Foam::fvsPatchFieldBase&) const
in file fields/fvsPatchFields/fvsPatchField/fvsPatchFieldBase.C at line 98.

This error appears during the parallel redistribution stage after AMR, which causes the simulation to abort.

For context:

  • Solver: multiRegionPhaseChangeFlow
  • OpenFOAM: v2506
  • blastAMR: v2212
  • twoPhaseFlow: v2406
  • Decomposition: scotch

From the log it seems that the mesh refinement and redistribution complete successfully, but the simulation fails during the patch consistency check for fvsPatchField.

Also, just to clarify: the uploaded case itself was twoPhaseFlow's tutorialcase, which has already been tested and runs correctly without AMR, so the setup should be valid. To help with debugging, I have uploaded the relevant case files in this thread.

scriven3D.blastAMR-new.zip

If you have any suggestions on what might be causing this issue, or what aspects of the setup I should check first, I would greatly appreciate your guidance.

Thank you again for your time and for the excellent work on blastAMR.

Best regards,
Na

Originally posted by @MontelukastNa in #16

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions