josephcslater / mousai Goto Github PK
View Code? Open in Web Editor NEWHarmonic balance solvers
License: BSD 3-Clause "New" or "Revised" License
Harmonic balance solvers
License: BSD 3-Clause "New" or "Revised" License
single harmonic works. With higher, it breaks down. Unknown cause at this time.
Calculate Jacobian and use eigen solution for guess?
Initial guess is a challenge. Not feasible to be very accurate for hard nonlinearities.
Form of derivative function should be state space by default. Defaulting fails.
I've started adding an implementation of pseudo-arc length continuation to the code. I've checked it to be working for the SDOF Duffing oscillator. You can have a look at the code in the branch "Nidish" in my fork of the project (https://github.com/Nidish96/mousai/tree/Nidish).
I'll raise a pull request once I'm done qualifying the rest. I'm raising this issue here for any suggestions you may give me. I'm having the following things on my agenda:
def duff_osc_ss(x, params):
omega = params['omega']
t = params['cur_time']
xdot = np.array([[x[1]],[-x[0]-.1*x[0]**3-.1*x[1]+1*sin(omega*t)]])
return xdot
t, x, e, amps, phases = ms.hb_freq(duff_osc_ss, num_variables = 2, omega = 0.1,
eqform='first_order', num_harmonics=5, num_time_steps=51,
mask_constant=True, f_rtol = 1e-8)#, f_rtol=1e-8)
time, xc = ms.time_history(t, x)
plt.plot(time, xc.T, label='5 harmonics')
Results in failed start.
num_harmonics =1
works fine. This would be a good fall-back call should convergence fail.
https://hgomersall.github.io/pyFFTW/pyfftw/builders/builders.html
FFTW is much faster, but license restricted. The code should allow the user to optionally call fftw, but not rely on it.
Further, speedups can be obtained with SciPy as seen at https://blog.mide.com/matlab-vs-python-speed-for-vibration-analysis-free-download
In https://josephcslater.github.io/mousai/tutorial/demos/Theory_and_Examples.html
Do you use \ddot{z} or \dot{z} ?
VS
Automated initial guess of proper size (of zeros).
Provide details and explanation for structure of function to be called.
Need to raise exception and create working demo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.