Closed rcremese closed 1 year ago
Thank you for your feedback!
@
operator is being phased out in 2.3. You can already replace it by arg1.at(arg2)
. I'll revisit the documentation of the geometry masks.2.3-develop
. It will now also accept single Geometry or Obstacle values.fluid
module. Other modules use Geometry
. Obstacles extend Geometry by a velocity vector and rotation speed which only makes sense in fluid-like settings.If you run into any other strange behavior or missing documentation, let me know!
By the way, you can install 2.3-develop by running
pip install --upgrade git+https://github.com/tum-pbs/PhiFlow@2.3-develop
Thank you for your quick reply. Now, I better understand what the purpose of Geometry and Obstacle are. I'll see if i need to use the 2.3 version. Thanks again.
Hello, I'm kind of new using PhiFlow so I might do mistakes. But, while trying to implement a very simple 2D diffusion equation with obstacles, I faced some problems.
First, it's hard from the documentation to understand how to use the GeometryMask class. For exemple, figuring out what the @ symbole is used to in the creation of an obstacle mask is hard to understand from the API documentation (ex:
obs_mask = SoftGeometryMask(obstacle.geometry, balance=1) @ velocity
)Second, there is no type checking in the
apply_boundary_conditions
function for the input variable, leading to a strangeTypeError: 'Obstacle' object is not iterable
when calling the function with only one istance of an Obstacle instead of a list of obstacles. Handling the case where there is only one obstacle might be usefull. Otherwise, a simple type checkassert isinstance(obstacles, (tuple, list))
would do the job.Third, why do
Obstacle
andapply_boundary_conditions
are bounded to thephysic.fluid
submodule and not accessible from the flow module ? Boundary conditions and obstacles can be applied outside of a CFD problem, isn't it ?Nevertheless, thank you for your work on all of this, I'm very existed to use your package to implement PDE with JAX !