Skip to content

Files

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PyElastica Examples

This directory contains number of examples of elastica. Each example cases are stored in separate subdirectories, containing case descriptions, run file, and all other data/script necessary to run. More advanced cases are stored in separate repository with its description.

Installing Requirements

In order to run examples, you will need to install additional dependencies.

make install_examples_dependencies

Case Examples

Some examples provide additional files or links to published paper for a complete description. Examples can serve as a starting template for customized usages.

  • AxialStretchingCase
    • Purpose: Physical convergence test of simple stretching rod.
    • Features: CosseratRod, OneEndFixedRod, EndpointForces
  • TimoshenkoBeamCase
    • Purpose: Physical convergence test of simple Timoshenko beam.
    • Features: CosseratRod, OneEndFixedRod, EndpointForces,
  • FlexibleSwingingPendulumCase
    • Purpose: Physical convergence test of simple pendulum with flexible rod.
    • Features: CosseratRod, HingeBC, GravityForces
  • ContinuumSnakeCase
    • Purpose: Demonstrate simple case of modeling biological creature using PyElastica. The example use friction to create slithering snake, and optimize the speed using CMA.
    • Features: CosseratRod, MuscleTorques, AnisotropicFrictionalPlane, Gravity, CMA Optimization
    • MuscularSnake
  • ButterflyCase
    • Purpose: Demonstrate simple restoration with initial strain.
    • Features: CosseratRod
  • FrictionValidationCases
    • Purpose: Physical validation of rolling and translational friction.
    • Features: CosseratRod, UniformForces, AnisotropicFrictionalPlane
  • JointCases
    • Purpose: Demonstrate various joint usage with Cosserat Rod.
    • Features: FreeJoint, FixedJoint, HingeJoint, OneEndFixedRod, EndpointForcesSinusoidal
  • RigidBodyCases
    • Purpose: Demonstrate usage of rigid body on simulation.
    • Features: Cylinder, Sphere
    • RodRigidBodyContact
      • Purpose: Demonstrate contact between cylinder and rod, for different intial conditions.
      • Features: Cylinder, CosseratRods, ExternalContact
  • HelicalBucklingCase
    • Purpose: Demonstrate helical buckling with extreme twisting boundary condition.
    • Features: HelicalBucklingBC
  • ContinuumFlagellaCase
    • Purpose: Demonstrate flagella modeling using PyElastica.
    • Features: SlenderBodyTheory, MuscleTorques,
    • MuscularFlagella
      • Purpose: Example of customizing Joint module and Force module to implement muscular flagella.
      • Features: MuscleForces(custom implemented)
  • RodContactCase
    • RodRodContact
      • Purpose: Demonstrates contact between two rods, for different initial conditions.
      • Features: CosseratRod, ExternalContact
    • RodSelfContact
      • PlectonemesCase
        • Purpose: Demonstrates rod self contact with Plectoneme example, and how to use link-writhe-twist after simulation completed.
        • Features: CosseratRod, SelonoidsBC, SelfContact, Link-Writhe-Twist
      • SolenoidsCase
        • Purpose: Demonstrates rod self contact with Solenoid example, and how to use link-writhe-twist after simulation completed.
        • Features: CosseratRod, SelonoidsBC, SelfContact, Link-Writhe-Twist
  • BoundaryConditionsCases
    • Purpose: Demonstrate the usage of boundary conditions for constraining the movement of the system.
    • Features: GeneralConstraint, CosseratRod

Functional Examples

  • RestartExample
    • Purpose: Demonstrate the usage of restart module.
    • Features: save_state, load_state
  • Visualization
    • Purpose: Include simple examples of raytrace rendering data.
    • Features: POVray

Advanced Cases

Experimental Cases