- Notifications
You must be signed in to change notification settings - Fork16
A Julia package for solving nonlinear differential equations using the harmonic balance method.
License
QuantumEngineeredSystems/HarmonicBalance.jl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
HarmonicBalance.jl is a Julia package for solving periodic, nonlinear differential equations using the method of harmonic balance.
To install HarmonicBalance.jl, you can use the github repo or the Julia package manager,
using PkgPkg.add("HarmonicBalance")
For a detailed description of the package and examples, see thedocumentation.
This repo contains a collection of example notebooks.
Let's find the steady states of a driven Duffing resonator with nonlinear damping, with equation of motion:
using HarmonicBalance, Plots@variables α ω ω0 F η tx(t)# declare constant variables and a function x(t)diff_eq=DifferentialEquation(d(x,t,2)+ ω0^2*x+ α*x^3+ η*d(x,t)*x^2~ F*cos(ω*t), x)add_harmonic!(diff_eq, x, ω)# specify the ansatz x = u(T) cos(ωt) + v(T) sin(ωt)# implement ansatz to get harmonic equationsharmonic_eq=get_harmonic_equations(diff_eq)# solve for a range of ωresult=get_steady_states(harmonic_eq, ω=>range(0.9,1.2,100), (α=>1., ω0=>1.0, F=>0.01, η=>0.1))
A steady state result for 100 parameter pointsSolution branches: 3 of which real: 3 of which stable: 2Classes: stable, physical, Hopf, binary_labels
plot(result,"sqrt(u1^2 + v1^2)")
If you use HarmonicBalance.jl in your project, we kindly ask you to citethis paper, namely:
HarmonicBalance.jl: A Julia suite for nonlinear dynamics using harmonic balanceJan Košata, Javier del Pino, Toni L. Heugel, Oded ZilberbergSciPost Phys. Codebases 6 (2022)
@Article{10.21468/SciPostPhysCodeb.6,title={{HarmonicBalance.jl: A Julia suite for nonlinear dynamics using harmonic balance}},author={Jan Košata and Javier del Pino and Toni L. Heugel and Oded Zilberberg},journal={SciPost Phys. Codebases},pages={6},year={2022},publisher={SciPost},doi={10.21468/SciPostPhysCodeb.6},url={https://scipost.org/10.21468/SciPostPhysCodeb.6}}
- JosephsonCircuits.jl: Models superconducting circuits using modified nodal analysis and harmonic balance with an analytic Jacobian.
- Manlab: A similar package in Matlab also using continuation methods and using the Harmonic Balance method for periodic orbits.
About
A Julia package for solving nonlinear differential equations using the harmonic balance method.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.