Section Analysis — Now Programmable.
Beyond the limits of traditional software.
Upgrade your cross-section analysis workflow with ANYSEC — steered in Python, executed in C++.
Any geometry
Any material law
Full control on failure criteria
Batch processing
Zero external dependencies
High-performance C++ backend
Scriptable workflows
python
1 2 import anysec 3 from anysec import Norm, DesignCode, LimitState 4 from anysec import StressStrainCurve 5 from anysec import Concrete, ReinforcementSteel, PrestressingSteel, MaterialType 6 from anysec import Point, Surface, Line, FiberGroup 7 from anysec import SectionOrigin, InteractionSurface, deformedParam, Section 8 9 from anysec_utils import plot_ssc, plot_section, plot_section_3d, plot_nmm, plot_nmm_, moment_curvature, _get_mc_data 10 11 # Define design code 12 EN_199X_200X = DesignCode(Norm.EN_199X_200X, "EN_199X_200X") 13 14 # Define materials 15 conc_45 = Concrete(code=EN_199X_200X, curveType=CurveType.PR, title="Concrete C45", strength_class=45, color='lightgrey') 16 stee_B500B = ReinforcementSteel(code=EN_199X_200X, curveType=CurveType.BLF, title="Reinforcement steel B500B", strength_class=500, color='blue') 17 18 # Define a rectangular section 19 ## Define a concrete surface 20 rec_surf = Surface( 21 points=[ 22 Point(yz=Coordinates(0.0, 0.0)), Point(yz=Coordinates(300.0, 0.0)), 23 Point(yz=Coordinates(300.0, 700.0)), Point(yz=Coordinates(0.0, 700.0)) 24 ], 25 material=conc_45 26 ) 27 28 ## Define reinforcement 29 rec_fg = FiberGroup( 30 points=[ 31 Point(yz=Coordinates(50.0, 50.0), value=25.0, is_circle=True, preload=0.0), 32 Point(yz=Coordinates(250.0, 50.0), value=25.0, is_circle=True, preload=0.0), 33 Point(yz=Coordinates(50.0, 650.0), value=25.0, is_circle=True, preload=0.0), 34 Point(yz=Coordinates(250.0, 650.0), value=25.0, is_circle=True, preload=0.0) 35 ], 36 material=stee_B500B, 37 matrix=rec_surf 38 ) 39 40 ## Create section object 41 beam300x700 = Section(surfaces=[rec_surf], fiber_groups=[rec_fg], lines=[], origin=SectionOrigin.ELASTIC_CENTER) 42 43 # Cache capacity interaction surfaces for given limit states 44 beam300x700.cache_interaction(limitStates=[LimitState.ULS], n_range_size=15, angle_step=45, theta=True) 45 46 # Get capacity for a given applied force vector (NEd, MyEd, MzEd) 47 fEd = FV(0.0, -16000, 500) 48 fRd = beam300x700.get_capacity(LimitState.ULS, fEd) 49 50 # Get moment-curvature data for a given axial force NEd and a Neutral axis orientation θ 51 beam300x700.get_curvature(N=-1000.0, theta=math.radians(30.0), limitState=LimitState.ULS, step=1e-4, until_collapse=True) 52