tum-pbs / PhiFlow

A differentiable PDE solving framework for machine learning
MIT License
1.39k stars 189 forks source link

Custom geometry #147

Closed Zhaozhiwhy closed 1 month ago

Zhaozhiwhy commented 8 months ago

Is it possible to define some complex geometry domain for simulation? For example, a triangle, ellipse or even a car domain in the karman vortex street? I think it should be grid first, then to be defined as a class of geometry. But I don't know is it could be achieved?

holl- commented 8 months ago

Hi, heightmaps have recently been added to version 3.0. These allow you to built complex geometries that run very efficiently. You can combine two or more heightmaps to model all sides of your geometry.

Theoretically, you can also define your own Geometry class, but that requires in-depth knowledge of the geometry system, so I don't recommend that.