femlabpy.solvers#
Legacy nonlinear driver routines built from the lower-level femlabpy modules.
Workflow role#
Most of the library is organized as reusable kernels and assembly helpers. This module packages those pieces into larger legacy workflows, especially the nonlinear bar and elastoplastic benchmark drivers that reproduce the original teaching scripts.
Public entry points#
solve_nlbarexecutes the nonlinear bar load-stepping procedure and returns the full response history.solve_plasticruns the quadrilateral elastoplastic examples using the updated element kernels, load handling, and reaction extraction helpers.
Functions#
|
Solve the legacy nonlinear bar examples with the orthogonal residual method. |
|
Solve the legacy Q4 elastoplastic examples with orthogonal residual iterations. |
Function Reference#
- femlabpy.solvers.solve_nlbar(X, T, G, C, P, *, no_loadsteps: int, i_max: int, i_d: int, tol: float, plotdof: int)[source]#
Solve the legacy nonlinear bar examples with the orthogonal residual method.
The implementation follows the original
nlbar.mcontrol flow while using vectorized element kernels for bar stiffness and internal-force assembly.- Parameters:
- X, T, G, C, P:
Legacy FemLab node coordinates, topology, material table, prescribed displacements, and nodal loads.
- no_loadsteps, i_max, i_d:
Legacy stepping parameters controlling the outer load increments and the inner equilibrium iterations.
- tol:
Relative residual tolerance used in the orthogonal residual test.
- plotdof:
One-based response degree of freedom stored in the returned load-displacement path.
- Returns:
- dict
Dictionary containing the converged displacement vector, internal force vector, stresses, strains, reactions, final external load vector, and the full load-displacement history.
- femlabpy.solvers.solve_plastic(X, T, G, C, P, *, no_loadsteps: int, i_max: int, i_d: int, tol: float, plotdof: int, plane_strain: bool, material_type: int = 1)[source]#
Solve the legacy Q4 elastoplastic examples with orthogonal residual iterations.
Parameters follow the original FemLab classroom drivers
plastps.mandplastpe.m. The Gauss-point constitutive updates remain in the element routines; this function orchestrates the load stepping and equilibrium loop.- Parameters:
- X, T, G, C, P:
Legacy FemLab node coordinates, topology, material table, prescribed displacements, and nodal loads.
- no_loadsteps, i_max, i_d:
Legacy stepping parameters controlling the outer load increments and the inner equilibrium iterations.
- tol:
Relative residual tolerance used in the orthogonal residual test.
- plotdof:
One-based response degree of freedom stored in the returned load-displacement path.
- plane_strain:
Selects the plane-strain constitutive update when
Trueand the plane-stress update whenFalse. For the small legacy plane-strain classroom systems, the linear solves use a symmetry-aware dense fallback that better reproduces MATLAB’s historical backslash-solver behavior.- material_type:
1for von Mises and2for Drucker-Prager, matching the original FemLab element routines.
- Returns:
- dict
Dictionary containing the converged displacement vector, internal force vector, element stress and plastic-strain state, reactions, final external load vector, and the full load-displacement history.