An elasto-hydrodynamic benchmark to test coupled FSI algorithms that involves slabs of fluid and elastic solid. For details, refer to our paper here or access it from JFM.
🚀 Before installing the package, check out an interactive, online version at this link.
For a system wide install, use
python3 -m pip install parallel-slab
For a local install, please clone this repository and execute the following in the repository directory.
python3 -m pip install --user .
You can then use one of the examples for running a single simulation or a parameter sweep of simulations. For more information see Usage and examples
If you want to take full advantage of the package (such as running a phase-space of cases in parallel), please execute
python3 -m pip install parallel-slab[extras]
The two-dimensional setup employs an elastic solid layer sandwiched between two fluid layers, in turn confined by two long planar walls, whose horizontal oscillations drive a characteristic system response. This is shown in the figure below. The fluid is Newtonian while the solid is made of either a neo-Hookean material (with stresses proportional linearly to deformations) or a generalized Mooney--Rivlin material (with stresses varying non-linearly in response to deformations). This setting admits a time periodic, one-dimensional analytical solution for neo-Hookean materials and a semi-analytical solution (based on a sharp interface pseudo-spectral method) for a generalized Mooney--Rivlin solid.
Overall, this problem entails multiple interfaces, phases and boundary conditions interacting dynamically, and serves as a challenging benchmark to validate the long time behaviour, stability and accuracy of FSI solvers.
The simplest example runs a single simulation. This reads parameters of the simulation from a user-defined YAML file (see params.yaml). Two set of solid materials are available for use. The following code should suffice to see some output:
from parallel_slab import NeoHookeanSolution, GeneralizedMooneyRivlinSolution
from parallel_slab import run_and_plot_from_yaml
run_and_plot_from_yaml(
NeoHookeanSolution, # the type of solid material
final_time=20.0 # final time of simulation, till periodic steady state
)
run_and_plot_from_yaml(
GeneralizedMooneyRivlinSolution, # the type of solid material
final_time=20.0 # final time of simulation, till periodic steady state
)
More examples including the one above are given in the example file. Running the script above should produce these two image files (along with other data artefacts, which are under the user's control).
Details on the algorithms employed in the two examples shown above can be found in the following technical paper. If you are employing this benchmark, please cite the work below.
@article{parthasarathy2022elastic,
title={Elastic solid dynamics in a coupled oscillatory Couette flow system},
author={Parthasarathy, Tejaswin and Bhosale, Yashraj and Gazzola, Mattia},
journal={Journal of Fluid Mechanics},
volume={946},
year={2022},
publisher={Cambridge University Press}
}
First install the package with optional dependencies
python3 -m pip install parallel-slab[extras]
Once that is done, install the test requirements using
python3 -m pip install -r tests/requirements.txt
from the repo directory.This package uses py.test
for running unit and integration tests.
To run the tests, execute
python3 -m pytest
from the repository directory.