How marinamaia2021/fe2_fenicsx works
This repository implements research code for two-dimensional multiscale finite-element (FE²) simulations of nonlinear composite materials. The principal workflow is to define a macroscopic domain and loading, solve its nonlinear equilibrium problem, and use quadrature-point updates to obtain response from periodic representative volume elements (RVEs). RVE variants cover J2 plasticity and fiber–matrix composites; JAX modules provide constitutive updates. The excerpts show the macro solver, mesh and RVE setup, and plotting, but not the full quadrature-to-RVE update path, so uncertain runtime links are omitted.
Main entry points: fe2_refac.py FE² driver · jax_j2.py J2 material model · customnewtonproblem.py Newton solver · rve_j2_linear_clean.py J2 RVE
Components 16
Macro simulation
- Macro domain
macromodel.py - FE² driver
fe2_refac.py - Newton solver
customnewtonproblem.py - Loading and solver utilities
auxFunctions.py
FE² coupling
- Quadrature mapping
quadrature.py - Plotting domain
quadrature.py
RVE models
- J2 RVE
rve_j2_linear_clean.py - J2 RVE variant
rve_j2_linear.py - External JAX RVE
rve_ext_clean.py - Refactored RVE
rve_ext_clean_refac.py - Fiber–matrix RVE
rve_fiber_matrix.py
Constitutive models
- Plane-stress J2
j2_jax.py - J2 material model
jax_j2.py - JAX utilities
utils_jax.py - PRNN model
prnn_jax.py
Other components
- Simulation user
Connections 15
- Simulation user → FE² driver: runs simulation
fe2_refac.py - FE² driver → Macro domain: creates domain
fe2_refac.py - FE² driver → Newton solver: uses solver
fe2_refac.py - Newton solver → Loading and solver utilities: configures solver
customnewtonproblem.py - FE² driver → Quadrature mapping: uses mapping
fe2_refac.py - FE² driver → J2 RVE: loads RVE class
fe2_refac.py - FE² driver → Fiber–matrix RVE: loads RVE class
fe2_refac.py - FE² driver → Refactored RVE: loads RVE class
fe2_refac.py - FE² driver → Plotting domain: updates plots
fe2_refac.py - J2 RVE → Plane-stress J2: uses material model
rve_j2_linear_clean.py - J2 RVE variant → Plane-stress J2: uses material model
rve_j2_linear.py - External JAX RVE → J2 material model: uses material model
rve_ext_clean.py - Refactored RVE → J2 material model: uses material model
rve_ext_clean_refac.py - Fiber–matrix RVE → J2 material model: uses material model
rve_fiber_matrix.py - PRNN model → J2 material model: imports model
prnn_jax.py