Coder Social home page Coder Social logo

tumaer / jaxfluids Goto Github PK

View Code? Open in Web Editor NEW
258.0 14.0 47.0 12.64 MB

Differentiable Fluid Dynamics Package

License: Other

Jupyter Notebook 5.64% Python 94.25% Makefile 0.11%
automatic-differentiation cfd compressible-flows fluid-dynamics gpu gpu-computing high-performance hpc jax machine-learning

jaxfluids's Issues

import error

Dear developers
I get an error when I use from jaxfluids.simulation_manager import SimulationManager。The reson of this error is that from jax.config import config is used in /JAXFLUIDS/src/jaxfluids/simulation_manager.py.In fact, jax suggest using this way.
import jax jax.config.update(your_config_options_here)
Thank you!
image

weakly compressible low mach

Hi,

I am just a bit curious what the plans of jaxfluids are :-) Is there any activity ongoing (or planned) for low Mach turbulent flow as well?

Best Regards
Fab

Encountering AttributeError with jaxfluids and JAX 0.4.14

Problem

I'm using the jaxfluids library, which is a computational fluid dynamics library that requires JAX. I have installed JAX and jaxlib with versions jax=0.4.14 and jaxlib=0.4.14, respectively. However, when running the provided examples, I encountered the following AttributeError:

AttributeError: module 'jax.numpy' has no attribute 'DeviceArray'

I noticed that this issue has been discussed in various contexts, including GPT-3's responses. Is there a recommended solution for resolving this issue with the mentioned versions of JAX?

Solution

After researching and experimenting, I found a workaround to resolve this issue. I used PyCharm's "Replace in file" feature to replace all instances of jnp.DeviceArray with jnp.Array. This helped me successfully run the examples without encountering the AttributeError.

Here's how I performed the replacement:

Open the file where jnp.DeviceArray is used.
Use the "Replace in file" feature in PyCharm.
Replace all occurrences of jnp.DeviceArray with jnp.Array.
Please note that this is a specific workaround I tried, and it may not be the only solution. However, it worked for me with the mentioned versions of JAX. Others who are facing similar issues might find this workaround helpful.

Result

Success

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.