Skip to content

This project implements numerical simulations of a rigid sphere impacting onto a thin elastic membrane.

License

Notifications You must be signed in to change notification settings

elvispy/kinematic-match-sphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kinematic Match: The case of a rigid sphere and an elastic membrane

This repository serves as supplementary material for this article. Here we provide code in Julia, Matlab and Python to simulate an axis-symmetric impact between a rigid sphere and a thin elastic membrane.

Usage

All three languages have a main script, called solveMotion, and the initial conditions of the impact can be passed as name-value pairs. By default, parameters corresponding to the simulation analyzed in detail in the article above are run when solveMotion is called with no arguments.

Both the Julia and Matlab versions are decently documented and offer good performance. Although the python version is up and running, it currently does not pre-allocate the matrices needed to solve the linear system, which makes it impractical to use for comparisons with experiments.

Here's a sketch a basic example of some parameters that can be set by solveMotion (On Julia's REPL, and always on a session with the same directory as the scripts)

julia> include("solveMotion.jl"); using .kinematic_match: solveMotion 
 # The import statement aboce is needed only in Julia.
julia> solveMotion(
       rS =  2.38, # Sphere radius in (mm)
       Tm =   107, # Membrane linear tension in (Pa * m)
       z_k =  3.0, # Initial position of the center of the sphere, in (mm)
       v_k = -0.5, # Sphere's initial velocity in (m/s)
       N =    100, # Number of points on the membrane in the discretized problem per unit radius 
       plotter = false, # Whether to plot a 2D real-time snapshot of the simulation (false is best for performance)
       export_data = true, # Whether to export simulation final results. 
                           # In Julia, a single jld2 file is created and a reference to this file is stored in a .csv
)

Other parameters can be set, for more details see the documentation inside the Matlab or Python versions. Also, please note that units were chosen to match typical parameters of our experiments (i.e. radius in mm as opposed to m)

This project follows this folder structure, and consequently all files generated by solveMotion will be stored in ../2_pipeline/solveMotion/out/example_file.jld2

TODO

  • Implement multi-threading
  • Implement sparse matrices in Python
  • Standarize variable names across all three projects.
  • Include scripts used to generate the plots of our article.
  • Benchmark all three versions.

Cite this work

If you find this piece of software useful, you can cite our work as

@article{https://doi.org/10.48550/arxiv.2208.11089,
  doi = {10.48550/ARXIV.2208.11089},
  url = {https://arxiv.org/abs/2208.11089},
  author = {Agüero, Elvis A. and Alventosa, Luke and Harris, Daniel M. and Galeano-Rios, Carlos A.},
  keywords = {Classical Physics (physics.class-ph), Soft Condensed Matter (cond-mat.soft), FOS: Physical sciences, FOS: Physical sciences},
  title = {Impact of a rigid sphere onto an elastic membrane},
  publisher = {arXiv},
  year = {2022},
  copyright = {Creative Commons Attribution 4.0 International}
}

About

This project implements numerical simulations of a rigid sphere impacting onto a thin elastic membrane.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published