google / google/jax-cfd

Examples of using kolmogorov_forcing in semi_implicit_navier_stokes

Open
#233 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
964
Forks
142
Avg merge
3h 9m
Merged PRs (30d)
1

Description

Dear researchers:

Do you happen to have any example of using [kolmogorov_forcing](https://github.com/google/jax-cfd/blob/main/jax_cfd/base/forcings.py#L63) in [semi_implicit_navier_stokes](https://github.com/google/jax-cfd/blob/main/jax_cfd/base/equations.py#L128) ?

Naively passing `kolmogorov_forcing` into `semi_implicit_navier_stokes` will not work.
Mimic the usage in [spectral](https://github.com/google/jax-cfd/blob/main/jax_cfd/spectral/equations.py#L213) will give errors like "TypeError: unsupported operand type(s) for /: 'function' and 'float'" or "ValueError: arguments have different tree structures"

Examples in https://github.com/google/jax-cfd/blob/main/notebooks/spectral_forced_turbulence.ipynb will work, but one has to manually convert vorticity into velocity.

Thank you very much!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.