ExtremeFLOW / neko

/ᐠ. 。.ᐟ\ᵐᵉᵒʷˎˊ˗
https://neko.cfd/
Other
161 stars 29 forks source link

Source terms improvements #1121

Open timofeymukha opened 6 months ago

timofeymukha commented 6 months ago

It would be good to add these 2 things to source terms:

  1. Possibility to write the source term as a field, for inspection. Useful in various debugging contexts.
  2. Limit the addition of the source term in time. Useful for some flow cases, e.g. the "suddenly decelerated" channel flow.

Should be easy to implement, particularly after merging #1117

timofeymukha commented 6 months ago

Of course, since I wrote it easy, things immediately got cursed, particular point 2. The main issue is that it is not possible to have access to the case sampler, and even t_end, from inside the source term. The latter even bars from creating a local time_based_controller. These things are not passed down to schemes either, it is the case object itself that handles the sampler. Having it crawl down to see if output is needed for the source terms feels very much awkward. So I think I will defer 2 to better days.

timofeymukha commented 6 months ago

A partial resolution will come if schemes become simulation_components thus having access to the case, inverting the current relationship, where the case has the schemes as its components.

timofeymukha commented 3 months ago

Regrding output, we can limit ourselves to storing a field in the registry and let the field_writer handle the actual output.