lettucecfd / lettuce

Computational Fluid Dynamics based on PyTorch and the Lattice Boltzmann Method
MIT License
222 stars 39 forks source link

[Feature]: Let boundaries choose to affect collision OR streaming #212

Open PhiSpel opened 3 months ago

PhiSpel commented 3 months ago

Is your proposal related to a problem?

The PeriodicPressureBC in https://github.com/lettucecfd/lettuce/blob/master/examples/porous_medium.ipynb can not really work with the current setup. We need to reconsider the "collision-or-boundary->streaming" workflow.

Describe the solution you'd like

Use also no_streaming_mask to identify individual boundaries, rather than only a boolean tensor of shape [q,x,y,z]

Describe alternatives you've considered

  1. We could also insert boundaries at different steps in the simulation.
  2. Or, we could pass collision to Flow, such that it can be used in Boundary() call

Additional context

May be related to #182