Yihao-Shi / GeoTaichi

A Taichi-powered high-performance numerical simulator for multiscale and multifield geophysical problems
GNU General Public License v3.0
93 stars 10 forks source link

Setting a tilted boundary in DEMPM #23

Open leyiuu opened 1 month ago

leyiuu commented 1 month ago

Hi,

I am currently working with DEMPM, and I want to define a boundary where the lowest point is at [1, 1, 1], the region size is [0.2, 0.2, 0.2], and it is tilted at a 30° angle relative to the x-axis. However, it seems that the MPM boundary condition can only be set to a horizontal cubic region, such as [1, 1.2], [1, 1.2], [1, 1.2]. I would like to know if there is an appropriate way to create a tilted boundary for my case.

Thank you for your help!

Best regards, Leyiuu

Yihao-Shi commented 4 days ago

you can add a keyword (zdirection) in the region dictionary to set your region's orientation, here is a example:

region={
                            "Name": "region1",
                            "Type": "Rectangle",
                            "BoundingBoxPoint": ti.Vector([0.00, 0.00, 0.00]),
                            "BoundingBoxSize": ti.Vector([0.2, 0.05, 0.1]),
                            "zdirection": ti.Vector([1., 0., 1.])    # change the orientation
                      }