Closed SLGY closed 1 year ago
Wow nice! Regarding lbm.update_moving_boundaries() this is actually quite similar to what I'm trying to do at #39, where the velocity of the fluid nodes near the boundary need to be repeatedly set to the instantaneous velocity of the solid. I think it needs to look something like:
//once revoxelization is complete
lbm.u.read_from_device(); //read velocity field from GPU
//do stuff like modify boundary node velocity, using the velocity of the solid (still working on what to put here)
//for rotating body v = omega*r see issue #39
lbm.u.write_to_device(); //write the new instantaneous velocity of the boundary nodes to the GPU
lbm.update_moving_boundaries(); //update the moving boundary
lbm.run(14u);
@SirWixy thank you so much! I will experiment with moving boundaries + revoxelization further, and I'll try to find a faster voxelization algorithm. This setup seems a very nice test case!
Wow nice! Regarding lbm.update_moving_boundaries() this is actually quite similar to what I'm trying to do at #39, where the velocity of the fluid nodes near the boundary need to be repeatedly set to the instantaneous velocity of the solid. I think it needs to look something like:
//once revoxelization is complete lbm.u.read_from_device(); //read velocity field from GPU //do stuff like modify boundary node velocity, using the velocity of the solid (still working on what to put here) //for rotating body v = omega*r see issue #39 lbm.u.write_to_device(); //write the new instantaneous velocity of the boundary nodes to the GPU lbm.update_moving_boundaries(); //update the moving boundary lbm.run(14u);
This is a bit of a delayed reply, I've been hitting a few complexity barriers with this project and I'm only now coming back to reattack the issue.
I don't think I'll be able to easily recalculate the instantaneous velocity of the boundary nodes using the stop-motion method I mentioned in this issue above. Each revoxelisation essentially involves the previous mesh disappearing and a new mesh appearing (not just a rotated mesh) and it is well beyond my ability to know if that's even something I can create an algorithm for.
Thanks for the help though. I'll continue making projects that rotate but hope that it doesn't happen fast enough to affect the resulting airflow too much (so I'll need to stay away from rotor blades and Ornithopters for now) 👍
Hi there, As requested here are the STL's and setup code for the Ornithopter sequence in this Youtube video. You mentioned you'd like to have a look for the purposes of improving the revoxelisation.
Here is the STL sequence in a zip file.
This is the code I used in my setup below. I'm sure anyone who knows C++ can write some much simpler code to reference 125+ meshes instead of the way I've done it, haha. Note that this positioning and rotation etc for this code is for a different STL sequence of a helicopter, so you'll need to adjust the centre point and rotation for the Orni. _lbm.update_movingboundaries() may also be called at the incorrect position in the loop...?