Skip to content

[Feature]: Post_Streaming_Boundaries #294

@MaxBille

Description

@MaxBille

Contact Details

No response

Is your proposal related to a problem?

The boundaries originally implemented prior to lettuce version 0.2.3 where implemented with the following simulation step order in mind:

  1. Collision
  2. Streaming
  3. (Boundary Condition)
  4. (Reporter)

Now boundaries are only either pre_boundaries (applied before the collision operator) or post_boundaries (applied after the collision operator).

  1. (Pre_boundary)
  2. Collision
  3. (Post_boundary)
  4. Streaming
  5. (Reporter)

(and collision and streaming can now be interchanged etc. but I'll not focus on that because of complexity).

The code changes from 0.2.3 to current 2025 lettuce mostly reflect changes in architecture (what is tensor, what is array, make native-CUDA-code possible etc. and NOT changes in mathematical algorithm to adapt the implementation to the new boundary position in the simulation step.
Because populations will be either at a different location (with or without a streaming substep being applied prior to the boundary algorithm), OR populations might be completely altered (by the collision operator). The order of Collision, Streaming and Boundary Algorithm must not be arbitrary.

(!) Results from flows containing boundary conditions are not numerically (and logically) identical now, in an extend that is more pronounced than round-off or parallelization error!

The error might be small (around 0.5 % deviation in the temporal mean drag coefficient of my cylinder flow for Re200 in an arbitrary example) but may become huge in some use cases.

Examples:

  • accuracy: when very local observable values close to boundaries are evaluated
  • stability: boundaries play a huge role in stability. These small deviations might make a significant difference in stability-critical applications!
  • etc.

Describe the solution you'd like

either
the boundary-algorithms should be adapted to work at a different position in the simulation timestep
or
besides the pre_boundaries and post_boundaries option, there should be a post_streaming option for boundary conditions to use the existing boundary condition algorithms as intended when implemented.

Describe alternatives you've considered

see above

Additional context

see description. I'm currently working on implementing HWBB and IBB,which required enhancements to the simulation class, adding post_streaming_boundaries and the buffering of specific populations from between collision and streaming for use by the boundary algorithm after the streaming substep.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions