Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lack of initial guess causes fail: try with fewer points and fewer harmonics to initiate. #13

Open
josephcslater opened this issue Jul 15, 2018 · 0 comments

Comments

@josephcslater
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant