Skip to content

Issue in Handling Unsmooth Outputs After AMR #21

@MontelukastNa

Description

@MontelukastNa

Dear FoamScience and kind friend M. Elwardi Fadeli,
Thank you for your great work on this AMR and Loadbalance library.

Recently, I’ve encountered an issue that may merit further clarification or improvement,

Specifically, there may be sometime that when the adjustableRunTime writeInterval occurs immediately after a refineInterval (e.g., writeInterval 0.001s, refineInterval 30 timesteps, unrefineInterval 90 timesteps), the output fields sometimes appear unphysical or unsmooth (e.g., P result as follows Fig).
I suspect this might be due to the fact that the solution fields require several time steps to fully adjust and stabilize after mesh refinement and rebalancing.

Image

It’s unclear if this is the exact cause, but the results imply that output written immediately after refinement might be unsmooth because the mesh and interpolation have just changed.

At present, I have some preliminary thoughts regarding how output might be better handled after mesh refinement in AMR simulations, and I would greatly appreciate any guidance:

  • One idea is to set OpenFOAM’s writeInterval to None, then instead manage output through a controlDict function triggered after each refineInterval, which would output by delaying several time steps (e.g., about 10) to allow the fields to smooth. However, this makes it challenging to maintain outputs at fixed adjustableRunTime intervals (e.g., every 0.001 seconds).

  • Another idea is to keep writeInterval based on adjustableRunTime, but introduce a condition so that when refineInterval is close to the output time, smaller time steps are used for several steps to smooth the fields before writing output.

I do not have experience implementing such approaches myself, so any suggestions, best practices, or insights on addressing this issue would be most welcome. 🥂Thank you very much for your time and the continued development of this great tool.

Best regards,
Na

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