How miriamalina/duffing-hb works
Project Type and Purpose
• This is an open-source scientific computation toolbox written in MATLAB.
• Its goal is to reproduce and extend analyses of nonlinear vibration problems (specifically the Duffing oscillator) using the Harmonic Balance Method (HB), leveraging the external NLvib library.
High-Level File Structure
• Top-Level
• MATLAB driver scripts (Duffing.m, HB_analysis.m, HB_residual_Duffing.m, Going_around_turning_points.m, P_Comparison.m)
• README.md, LICENSE
• figures/ (output data visualizations)
• NLvib-Basic (embedded external library)
• DOC/ (manuals and PDFs)
• SRC/ (core MATLAB functions for HB, shooting, continuation, mechanical system definitions)
• EXAMPLES/ (numerical examples illustrating usage)
• README.md, LICENSE
Key Architectural Insights from README
• Scripts at the root orchestrate experiments by calling into NLvib-Basic/SRC.
• The NLvib-Basic library provides:
a. Mechanical system constructors (single-mass, chain, beam, etc.)
b. Residual and solver routines (HB_residual, shooting_residual, solve_and_continue)
c. A plugin-style pattern for adding new system definitions.
• Output flows into figures/.