How bastiensauty/cornea_simple_mech_model works
This repository is an axisymmetric corneal hyperelastic finite-element model. Its main workflow loads a tagged mesh and material parameters, applies an intraocular-pressure load with boundary conditions, solves successive load steps, and records field and scalar results. A separate plotting workflow reads those results to produce histories, field maps, profiles, and animations, and can compare runs. The mesh reader, material-parameter model, mechanics solver, output manager, and plotting manager are distinct internal layers. Plotting-source excerpts are partial, so the graph shows documented capabilities without inferring their internal call structure.
Main entry points: main_cornea_axi.py Run simulation · mechanical_axisymmetric_framework.py Hyperelastic framework · outputs_manager.py Output manager · plot_cornea.py Plot example run
Components 13
Simulation workflow
- Run simulation
main_cornea_axi.py - Output manager
Simulation_Framework/outputs_manager.py
Mechanical model
- Axisymmetric mesh reader
Simulation_Framework/axisymmetric_mesh_io.py - Material parameters
Simulation_Framework/parameters_class.py - Hyperelastic framework
Simulation_Framework/mechanical_axisymmetric_framework.py
Post-processing
- Plot example run
plot_cornea.py - Plot manager
Simulation_Framework/plots_manager.py
Inputs and results
- Cornea mesh
cornea.msh - Material JSON
mech_params.json - XDMF and HDF5 fields
- Scalar CSV
- Plots and animations
Other components
- Simulation user
Connections 18
- Simulation user → Run simulation: runs
- Simulation user → Plot example run: runs
- Run simulation → Hyperelastic framework: constructs
- Run simulation → Material JSON: selects
- Run simulation → Cornea mesh: selects
- Hyperelastic framework → Axisymmetric mesh reader: loads mesh
- Axisymmetric mesh reader → Cornea mesh: reads
- Hyperelastic framework → Material parameters: loads parameters
- Material parameters → Material JSON: reads
- Run simulation → Hyperelastic framework: sets conditions and solves
- Run simulation → Output manager: writes each step
- Output manager → Hyperelastic framework: evaluates fields and scalars
- Output manager → XDMF and HDF5 fields: writes fields
- Output manager → Scalar CSV: writes scalars
- Plot example run → Plot manager: uses plotting API
- Plot manager → XDMF and HDF5 fields: reads fields
- Plot manager → Scalar CSV: reads scalars
- Plot example run → Plots and animations: saves figures