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
167 stars 91 forks source link

issue of convergence study #20

Open cubayang opened 2 years ago

cubayang commented 2 years ago

Hi Nick,

I am trying to reproduce the convergence analysis in your Bioinspiration & Biomimetics paper. I tried three sets of meshes: 256256, 512512, 1024*1024. However, the discrepancies of the results on these three meshes are large. I just changed Nx and Ny for each mesh. I don't know if there are any other parameters need to be changed for different cases, and I hope you can help me on this.

Thanks in advance, Yang

cubayang commented 2 years ago

@nickabattista

nickabattista commented 2 years ago

Hi Yang,

Which Bioinspiration & Biomimetics paper are you referring? The original IB2d?

In general you will also need to scale the stiffness parameters on the fiber models when you change grid resolutions. For example:

%-------------------------------------------------------- % Find k_Spring for certain resolution %-------------------------------------------------------- % ds = 0.5Lx/Nx; % Desired Lagrangian spacing % ds128 = 0.5Lx/128; % Lag. Spacing in 128x128 Resolution k_Spr_128 = 4e5; % Stiffness used in 128x128 Resolution % % Scale Spring Stiffness Coefficient void of any particular resolution k_Spring_Scale = k_Spr_128 ds128^3 / ds128; % % Get Spring Stiffness based on particular resolution, Nx k_Spring_Nx = k_Spring_Scale ds / ds^3;

cubayang commented 2 years ago

Hi Nick,

Thank you for your response. Yes, I am referring to the original IB2d paper published in 2017. I tested the fixed cylinder case for convergence study. I found that the convergence can be verified on the matlab version. However, for the python version, basically the result is dependent on the mesh resolution. For example, the drag force on the $512\times 512$ resolution is twice as that on the $256\times 256$ resolution. Do I also need to change the stiffness parameter for this case? Thanks!

cubayang commented 2 years ago

I tried to modify the stiffness for different resolution, and slight difference can be observed, but the drag force on the 512 512 resolution is still about twice as that on the 256 256 resolution.

cubayang commented 2 years ago

@nickabattista

cubayang commented 2 years ago

I also noticed that tanh function is frequently used for prescribed motion, is it adopted for compatible with the periodic BC?

cubayang commented 2 years ago

untitled Also, for the Insect_flight case, I run the case under Insect_1024x1024 folder and plot the force using Insect_Analysis.m (the result is as attached). It seems that the amplitude is also half of that reported in the Bioinspiration & Biomimetics 2017 paper. Could you please help me solve this issue? Thanks in advance!

nickabattista commented 2 years ago

Dear Yang,

Thanks for providing the plot. I still have the data from that manuscript on a hard drive in my office. When I return back to my office I'll look into the specific details. However, that won't be for another a few weeks. Thanks for your patience.

nickabattista commented 2 years ago

Dear Yang,

What is your email address? It will be easier to communicate through email, I think. Thanks!

cubayang commented 2 years ago

@nickabattista Dear Nick,

I am still struggling with the convergence issue, could you please give me some help? Thanks in advance.