Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boundary Conditions #116

Closed
juliandwain opened this issue Dec 14, 2021 · 4 comments
Closed

Boundary Conditions #116

juliandwain opened this issue Dec 14, 2021 · 4 comments

Comments

@juliandwain
Copy link

Hi,

I tried to define some boundary conditions. Until recently, everything went perfectly fine with

import jax_cfd.base.grids as grids
bc = grids.BoundaryConditions((grids.PERIODIC, grids.PERIODIC))
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'jax_cfd.base.grids' has no attribute 'BoundaryConditions'

I saw that you moved the boundary conditions to a new module called boundaries.py. I tried then to access them accordingly from the new module via:

import jax_cfd.base as cfd
bc = cfd.boundaries.periodic_boundary_conditions(ndim=2)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'jax_cfd.base' has no attribute 'boundaries'

But now, neither of these work anymore (see the appended error messages) and I wonder how I can define boundary conditions.
I tried installing JAX-CFD according to the documentation and according to #90, but neither of them gave me a solution to my problem.

My python version is 3.8.

Python 3.8.12 (default, Oct 12 2021, 13:49:34) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
@kochkov92
Copy link
Collaborator

Hi @juliandwain

Thanks for flagging - I think we are missing boundaries.py in the jax_cfd/base/__init__.py; I'll send out a fix.

@juliandwain
Copy link
Author

Thank you!

@juliandwain
Copy link
Author

@kochkov92 I saw your commit 57d8bb0, but how can I make use of this on my system? Will you release a new version?

@dynamicwebpaige
Copy link

Am experiencing the same error when using jax-cfd==0.1.0:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-7-e55227ace682>](https://localhost:8080/#) in <module>()
      9 
     10 # Specify periodic BC on x-boundaries, and no-slip walls on the y-boundaries.
---> 11 velocity_bc = (cfd.boundaries.channel_flow_boundary_conditions(ndim=2),
     12                cfd.boundaries.channel_flow_boundary_conditions(ndim=2))
     13 

AttributeError: module 'jax_cfd.base' has no attribute 'boundaries'

Has this fix been pushed to the jax_cfd package on PyPI?

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

No branches or pull requests

3 participants