Hello everyone,
I am relatively new to Julia and I need help putting the PyDSTool to use. Unfortunately, the PyDSTool-documentation is quite sparse and lacks examples.
I have a system of nonlinear differential equations - defined using the @ode_def-macro - describing the dynamics of a harmonically excited shell structure. I want to find stable, periodic solutions with the excitation force (f_N) and frequency (ome_N) as bifurcation parameters.
Following the instructions at http://docs.juliadiffeq.org/latest/analysis/bifurcation.html, this should perform the computations:
u0 = zeros(18);
tspan = [0;30];
p = [0.0,0.3*2*pi*952.26];`
dsargs = build_ode(EOM_nd_9p,u0,tspan,p)
ode = ds[:Generator][:Vode_ODEsystem](dsargs)
ode[:set](pars = Dict("ome_N"=0.3*2*pi*952.26))
ode[:set](pars = Dict("f_N"=>0.0))
PC = ds[:ContClass](ode)
Everything works fine until here.
bif = bifurcation_curve(PC,"LC-C",["f_N","ome_N"],
max_num_points=450,
max_stepsize=2,min_stepsize=1e-5,
stepsize=2e-2,loc_bif_points="all",
save_eigen=true,name="LC1",
print_info=true,calc_stab=true)
When I try to run this, I get the following error, that I already investigated but could not find a solution to:
ERROR: PyError ($(Expr(:escape, :(ccall(#= C:\Users\Martin\.julia\packages\PyCall\rUul9\src\pyfncall.jl:44 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'OSError'>
OSError(OSError(22, 'Invalid argument'),)
File "C:\Users\Martin\.julia\packages\Conda\hsaaN\deps\usr\lib\site-packages\PyDSTool\PyCont\ContClass.py", line 212, in newCurve
self.loadAutoMod()
File "C:\Users\Martin\.julia\packages\Conda\hsaaN\deps\usr\lib\site-packages\PyDSTool\PyCont\ContClass.py", line 423, in loadAutoMod
self.makeAutoLibSource()
File "C:\Users\Martin\.julia\packages\Conda\hsaaN\deps\usr\lib\site-packages\PyDSTool\PyCont\ContClass.py", line 611, in makeAutoLibSource
raise IOError(e)
If someone has any experience with the usage of PyDSTool to share or knows how to resolve this problem, I would be very grateful.
My equations of motion:
EOM_nd_9p = @ode_def Shell9 begin
du11 = v1;
dv11 = v2;
du13 = v3;
dv13 = v4;
du31 = v5;
dv31 = v6;
du33 = v7;
dv33 = v8;
dw11 = v9;
dv1 = v1*(-2.0e-5)+w11*pi*4.160672128228474e2+(w11^2)*pi*1.678493371387897e2-(pi^2)*u11*4.320697979314184e3-(pi^2)*v11*2.080336064114237e3;
dv2 = v2*(-2.0e-5)+w11*pi*4.160672128228474e2+(w11^2)*pi*1.678493371387897e2-(pi^2)*u11*2.080336064114237e3-(pi^2)*v11*4.320697979314184e3;
dv3 = v3*(-5.410077079789133e-5)-(w11^2)*pi*6.543279244393497e1-(pi^2)*u13*1.328214564011397e4-(pi^2)*v13*6.241008192342711e3;
dv4 = v4*(-5.410077079789133e-5)-(w11^2)*pi*1.007096022832738e2-(pi^2)*u13*6.241008192342711e3-(pi^2)*v13*2.992483415302787e4;
dv5 = v5*(-5.410077079789133e-5)-(w11^2)*pi*1.007096022832738e2-(pi^2)*u31*2.992483415302787e4-(pi^2)*v31*6.241008192342711e3;
dv6 = v6*(-5.410077079789133e-5)-(w11^2)*pi*6.543279244393497e1-(pi^2)*u31*6.241008192342711e3-(pi^2)*v31*1.328214564011397e4;
dv7 = v7*(-9.393022913910067e-5)+(w11^2)*pi*3.925967546636098e1-(pi^2)*u33*3.888628181382766e4-(pi^2)*v33*1.872302457702813e4;
dv8 = v8*(-9.393022913910067e-5)+(w11^2)*pi*3.925967546636098e1-(pi^2)*u33*1.872302457702813e4-(pi^2)*v33*3.888628181382766e4;
dv9 = v9*(-2.0e-5)-(w11^2)*8.876100540220744e1-w11*8.321344256456948e1+u11*pi*4.160672128228474e2+v11*pi*4.160672128228474e2-(pi^4)*w11*1.06683900723807e-1+f_N*cos(ome_N*t*1.050133366937601e-3)*5.655282504388217e-2+u11*w11*pi*3.356986742775794e2+v11*w11*pi*3.356986742775794e2-u13*w11*pi*1.308655848878699e2-v13*w11*pi*2.014192045665477e2-u31*w11*pi*2.014192045665477e2-v31*w11*pi*1.308655848878699e2+u33*w11*pi*7.851935093272197e1+v33*w11*pi*7.851935093272197e1-(w11^2)*(pi^4)*w11*2.480400691828513e-1;
end f_N ome_N