nickabattista / IB2d

An easy to use immersed boundary method in 2D, with full implementations in MATLAB and Python that contains over 75 built-in examples, including multiple options for fiber-structure models and advection-diffusion, Boussinesq approximations, and/or artificial forcing.
GNU General Public License v3.0
164 stars 90 forks source link

Anguilliform Swimmer #24

Open rohitroxkp7 opened 2 years ago

rohitroxkp7 commented 2 years ago

Hey @nickabattista I have looked at the anguilliform swimmer and went through your publications which are based on the parameter subspaces of the simple Anguilliform swimmer. The Re-in and Re-out depend on the length of the swimmer's body in direct proportion. However, upon closely looking, I noticed that the swimmer's length in certain simulations when I change the Re-in is not exactly the same, instead, It changes quite a bit. [I kept a thread on my screen and actually measured]

The code for testing the swimmer's Lagrangian motion, if studied carefully, reveals that all the endpoints of the head lie in the same straight vertical line instead of moving in a rather circular way. This is changing the length significantly. The interpolation is applied to y only. What about x?. I have attached my revised code in my fork which you may please find in my git hub account. The uploading of simulation results is tough because of the size...however the code can be run.

rohitroxkp7 commented 2 years ago

https://github.com/rohitroxkp7/IB2d/tree/master/matIB2d/Examples/Examples_First_Year_Seminar/Swimmer_2

nickabattista commented 1 year ago

Hi Rohit,

Thank you for your patience. I have not had a chance to respond to any inquiries. You are correct that the length can vary, unless you modify some of the parameter choices (spring and beam stiffnesses).

Yes, you can also interpolate between the x-values as well. However, if you look at the two states provided, the x-values are the same between them, so if you include the additional interpolation it will not solve this issue. Just a couple things:

Thanks, and hope that you're enjoying playing with the code!

rohitroxkp7 commented 1 year ago

Instead of creating more interpolate states, I elected to preserve the length of the lagrangian body by one single line of code. You can find that in lines 99 to 101 in the update non-invariant beams file in the following link: https://github.com/rohitroxkp7/Swimmer-Modified

There is also a report I generated which can be found in the aforementioned link with two youtube links in it which I am mentioning here as well. The two videos show how your model performs vs the model which I modified for the given input parameters. I would say amazing work @nickabattista, sir. I have learned a great deal from your resources on interpolation and the IB2d codes. I am also working on parallelizing your code so it can work faster with the parallel computing toolbox in Matlab. Link to Battista et al model: https://youtu.be/l5gnTvT5rkg Link to My model: https://youtu.be/pQaPte9zTnU