Skip to content

Es walberla#47

Open
itischler wants to merge 2 commits into
RudolfWeeber:walberlafrom
itischler:es_walberla
Open

Es walberla#47
itischler wants to merge 2 commits into
RudolfWeeber:walberlafrom
itischler:es_walberla

Conversation

@itischler
Copy link
Copy Markdown

python interface. If they are not set directly they will be set via
viscosity and magic number
@RudolfWeeber
Copy link
Copy Markdown
Owner

Thank you. I just tried merging this PR.
However, thee are still some issues:

  • the thermalized tests (such as lb_thermostat.py and lb_stats.py) return Nan.
  • There is quite a lot of code duplication, because the eentire constructoin path exists twice, once for relaxation_rates and once for (shear_viscosity, magic_number).
  • You use the same unit conversion for viscosity and relaxation rates in lb.pyx. I'm not sure that's correct.

Could you please centralize the viscosity to relaxation rate (and back) conversion in functions, e.g., in src/walberla_bridge/lb_relaxation_rates.hpp?
I.e.,

RelaxationRates relaxation_rates_from_shear_viscosity(double shear_viscosity, double magic_number=3./16.);

and also the shear viscosity from relaxation rates.

You could than expose this to Python, do any conversion of user input there, and have the entire construction path just once with RelaxationRates as argument.
Furthermore, you can make use of this in the viscosity setter/getter of the lb models.

I deferred merging for now, particularly, since the lb_stats.py and lb_thermostat.py tests are broken. Could you please take an other look?

(FYI: @jngrad)

@jngrad jngrad force-pushed the walberla branch 2 times, most recently from 47db0d3 to 4075cb7 Compare August 4, 2022 12:54
@jngrad jngrad force-pushed the walberla branch 12 times, most recently from 4e447de to 376d80b Compare May 10, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants