Moving_bodies_callback with user-input point cloud

Hello,

I’m trying to implement a piston-type wavemaker to force a large 3D simulation. I’m also using my own point clouds for both the fluid particles and solid particles. I was wondering if it’s possible to specify the point cloud for the moving body as well. This would be helpful ahead of time since my geometry is pretty specific and requires a lot of preprocessing.

Currently, I use a line like this for the wavemaker:

paddle = addBox(GT_MOVING_BODY, FT_SOLID, Point(paddle_origin), paddle_thickness, paddle_width, paddle_length);

and this for my fluid/solid particles:

GeometryID wall  = addXYZFile(GT_FIXED_BOUNDARY, Point(0,0,0), wall_file.c_str(), NULL);
GeometryID fluid = addXYZFile(GT_FLUID, Point(0,0,0), fluid_file.c_str(), NULL);

Would it be possible to use the addXYZFile function to initialize the paddle points and then use it like a Box?

Hello @rschanta,

that’s an interesting problem. I don’t think this has ever been tried, but it should be possible to add a point cloud as paddle simply by using GT_MOVING_BODY as the geometry type argument to addXYZFile, i.e. with addXYZFile(GT_MOVING_BODY, …).

The only issue that comes to mind off the top of my head is that you may need to set the center of mass / center of rotation yourself setCenterOfGravity(paddle, center_of_rotation) where paddle is the GeometryID returned by addXYZFile, and center_of_rotation is a double3 with the x, y, z coordinates of the center of rotation.

As I said, as far as I know this has never been tried before, but I believe it should work (it is possible that there will be bugs since it’s a less-tested code path). Do let us know if it works for you, or if you come across any issues.