Skip to content

app_a_file_listing.md

nathan-carmichael edited this page Mar 11, 2026 · 1 revision

Appendix A: File Listing

Complete File Manifest

Root

File Description
README.md Project overview and quick start.
LICENSE MIT licence.

feaopt/ — Core Package

File Description
__init__.py Package initialisation; exports all public classes and functions.
structure_geometry.py StructureGeometry class — topology, material properties, DOF mappings.
element_matrices.py ElementMatrices class — stiffness and transformation matrix cache.
analysis_state.py AnalysisState class — displacement, force, and residual vectors.
fea_analysis.py FEAAnalysis class — linear and Newton–Raphson solvers.
load_case.py LoadCase class — nodal load definition and scaling.
structure_plotter.py StructurePlotter class and batch drawing functions — visualisation utilities.
optimize_thickness.py optimize_thickness function — stress-ratio thickness optimiser.
subdivide_truss.py subdivide_truss function — split truss members into sub-elements.
importers.py import_csv_curve and import_igs_curve — geometry import from CSV and IGES files.
export_profile.py export_profile — rasterise, trace, and export boundary profiles.

examples/ — Demos

File Description
demo_beam.py Curved beam import from IGES, FEA, optimisation, and profile export.
demo_truss.py Warren truss subdivision, optimisation, and profile export with plotting.

profiles/ — Output (auto-created)

File Description
*.txt Exported spline point files for SolidWorks CAD import.
*.npz NumPy data archives for post-processing.

docs/ — Documentation

File Description
Home.md Wiki home page with links to all chapters.
ch1_introduction.md Introduction, installation, project layout.
ch2_theory.md Element formulation, solvers, stress recovery, optimisation theory.
ch3_api_reference.md Full API documentation for all public classes and functions.
ch4_examples.md Worked examples: curved beam, truss, and minimal custom problem.
ch5_export.md Profile export pipeline: rasterisation through SolidWorks import.
app_a_file_listing.md This file listing and error reference.

Dependencies

Package Version Required Used for
NumPy ≥ 1.20 Yes Array operations, linear algebra, vectorised element computations.
SciPy ≥ 1.7 Yes Sparse matrix assembly (csr_matrix), sparse solves (spsolve), interpolation (interp1d).
matplotlib ≥ 3.4 No (recommended) All visualisation: beam rendering, stress plots, diagnostic figures.
scikit-image ≥ 0.19 For export only Rasterisation (draw.polygon), morphology (closing, remove_small_objects), contour tracing (find_contours).

Error and Warning Reference

The Python port uses standard Python exceptions (ValueError, IndexError, ImportError) and warnings.warn rather than MATLAB-style error IDs. The table below lists the key error conditions and where they originate.

Exceptions

Exception Module Condition
ValueError structure_geometry Connectivity references invalid node.
ValueError structure_geometry Zero-length element detected.
ValueError structure_geometry Non-positive material or section property.
ValueError structure_geometry Constraint references invalid node or DOF.
ValueError structure_geometry Thickness not positive (in update_thickness).
ValueError analysis_state Free-DOF vector size mismatch.
ValueError load_case Node ID out of range.
ValueError optimize_thickness No non-rigid elements to optimise.
ValueError export_profile No elements remain after filtering.
ValueError importers Fewer than 2 points in CSV file.
ValueError importers No supported entities in IGES file.
ValueError importers Could not chain IGES entities.
IndexError structure_geometry Element or node ID out of range.
ImportError export_profile scikit-image not installed.
ImportError structure_plotter matplotlib not installed.

Warnings

Warning Module Condition
No constraints applied structure_geometry Structure has no boundary conditions — rigid-body motion possible.
Non-convergence fea_analysis Newton–Raphson did not converge within iteration limit.
NaN/Inf in increment fea_analysis Numerical failure in displacement increment.
Negative load factor load_case Negative λ applied (may be intentional).
Chain gap importers Gap detected between IGES entities during chaining.
Incomplete chain importers Could not chain all IGES entities.

Clone this wiki locally