Bio-inspired forward and backward swimming gaits resulting from fluid-structure interactions
Abstract
Biological undulatory swimmers display a wide range of gaits and are adept at swimming in different directions. This study explores the impact of passive dynamics as a result of fluid-structure interaction on the gaits of a model swimmer through computational simulations. Inspired by slender-bodied natural aquatic swimmers, the model consists of a flexible body and a rigid head. Systematically varying body stiffness and head pitching, the research replicates various swimming patterns observed in nature (both forward and backward). Optimal forward gaits, akin to anguilliforms and carangiforms, result from low to high bending rigidity and small pitching amplitudes. Conversely, low bending rigidity with high pitching amplitude produces backward swimming (tail-first), similar to mosquito larvae, exhibiting unique flow-field features and generating backward propulsion forces. The study underscores the significant role of passive dynamics in undulatory swimming and the potential for diverse gait generation through tailored structural and kinematic design in bio-inspired devices.
README: Bio-inspired forward and backward swimming gaits resulting from fluid-structure interactions
https://doi.org/10.5061/dryad.cz8w9gj9q
Description of the data and file structure
There are four different folders: Solver_source_code, Post_processing_code, Data and Movies.
1. Solver_source_code:
This folder contains in-house FSI solver code which is used to generate the data in this study. The source code is written in C++ language, and it is also parallelized using OpenACC to run the simulation on GPU. To compile and run the simulation, please follow the following steps:
-->// First load the GPU module using the following command in the terminal (it should be changed as per the nvhpc version)//
module load nvhpc/20.7
-->// Compile the souce_code using the following command in the terminal (Note that one should change the cc80 to the specific GPU used, and it can checked by typing pgaccelinfo in a terminal window) //
pgc++ -o make.out -acc -Minfo=accel -ta=tesla:cc80 source_code.cpp
-->\\ To run the simulation, type the following command in terminal \\
./make.out > output.txt
-->// Alternatively, one can also submit the job for simulation using run_IBMFSI.cmd (this script file is given in the respective folder) //
qsub run_IBMFSI.cmd
2. Post_processing_code:
This folder contains all the MATLAB code for the postprocessing (i.e., generating figures). This code can be executed using MATLAB, and all the required information is mentioned in the code and folder.
3. Data:
This folder contains all the required data for the MATLAB plot using Post_processing_code in the present study. This folder should be copied into the respective path while executing MATLAB code.
The folder 'Data' contains the following five folders:
a. gamma_0_015 --> (Theta_10, Theta_60)
b. gamma_01 --> (Theta_30)
c. gamma_03 --> (Theta_10, Theta_25)
d. gamma_05 --> (Theta_25)
e. gamma_07 --> (Theta_10, Theta_60)
Here, gamma represents bending stiffness, and the suffix represents bending stiffness values. For example, gamma_01 means the the value of gamma is 0.1 (gamma=0.1). Each of the gamma folders contains the Theta folders, where Theta represents the pitching amplitude, and the suffix represents the corresponding values. There are four .dat and one .txt files inside each of the 'Theta' folders named as, Drag_inst.dat, Lift_inst.dat, xf_total.dat, yf_total.dat, forcec.txt.
a. Drag_inst.dat: This contains instantaneous Drag coefficient data in .dat format. It has 271 columns containing instantaneous drag coefficient corresponding to each nodes of structural elements.
b. Lift_inst.dat: This contains instantaneous Lift coefficient data in .dat format. It has 271 columns containing instantaneous Lift coefficient corresponding to each nodes of structural elements.
c. xf_total.dat: This contains instantaneous structural displacement data in x-direction in .dat format. It has 272 columns, where first column represents the instantaneous non-dimensional time (non-dimensionalized using reference velocity, and body length of the numerical swimmer) and remaining columns represent instantaneous structural displacements (normalized using the total body length of the numerical swimmer) corresponding to each nodes of structural elements.
d. yf_total.dat: This contains instantaneous structural displacement data in y-direction in .dat format. It has 272 columns, where first column represents the instantaneous non-dimensional time (non-dimensionalized using reference velocity, and body length of the numerical swimmer) and remaining columns represent instantaneous structural displacements (normalized using the total body length of the numerical swimmer) corresponding to each nodes of structural elements.
Note that xf_total.dat and yf_total.dat are used to investigate the mode shapes.
e. forcec.txt: This contains instantaneous total hydrodynamic force in .txt format acting on the whole body. It has four columns, where first column represents the instantaneous non-dimensional time time (non-dimensionalized using reference velocity, and body length of the numerical swimmer) and remaining three columns represent instantaneous total Drag coefficient, total Lift coefficient, and total moment coefficient, respectively.
4. Movies:
This folder contains supplementary Movies showing vortex interactions for the present results.
Sharing/Access information
One can also access the folders containing source code and Matlab code along with the vortex interaction movies using the following link:
Code/Software
In this study, the in-house Immersed Boundary Method (IBM)-based Fluid-structure Interaction (FSI) solver is written c++ environment and all the postprocessing is done in MATLAB.
Methods
Data is collected by simulation using an in-house fluid-structure interaction solver. The raw data from the simulations are further processed using MATLAB. All the details about the script file are mentioned in the respective folders.