from dtk import bicycle # local dependencies try: f = open('Whipple.py', 'r') except IOError: from altk import alparse alparse.alparse('Whipple', 'Whipple', code='Python') else: f.close() del f from Whipple import LinearWhipple # create the Whipple model (with my parameters) whip = LinearWhipple() # load the benchmark parameters pathToData = '/media/Data/Documents/School/UC Davis/Bicycle Mechanics/BicycleParameters/data/' benchmark = bp.Bicycle('Benchmark', pathToData) benchmarkPar = bp.io.remove_uncertainties(benchmark.parameters['Benchmark']) # convert to my parameter set moorePar = bicycle.benchmark_to_moore(benchmarkPar, oldMassCenter=False) whip.set_parameters(moorePar) # set the initial conditions to match Meijaard2007 speedNaught = 4.6 u6Naught = -speedNaught / moorePar['rr'] rollRateNaught = 0.5 pitchAngle = bicycle.pitch_from_roll_and_steer(0., 0., moorePar['rf'], moorePar['rr'], moorePar['d1'],
from dtk import bicycle # create the Whipple model (with my parameters) try: f = open('Whipple.py', 'r') except IOError: from altk import alparse alparse.alparse('Whipple', 'Whipple', code='Python') else: f.close() del f # local dependencies from Whipple import LinearWhipple whip = LinearWhipple() # load the benchmark parameters pathToData='/media/Data/Documents/School/UC Davis/Bicycle Mechanics/BicycleParameters/data/' crescendo = bp.Bicycle('Crescendo', pathToData=pathToData, forceRawCalc=True) benchmarkPar = bp.io.remove_uncertainties(crescendo.parameters['Benchmark']) # convert to my parameter set moorePar = bicycle.benchmark_to_moore(benchmarkPar, oldMassCenter=False) whip.set_parameters(moorePar) # linearize about the nominal configuration equilibrium = np.zeros(len(whip.stateNames)) pitchAngle = bicycle.pitch_from_roll_and_steer(0., 0., moorePar['rf'], moorePar['rr'], moorePar['d1'], moorePar['d2'], moorePar['d3']) equilibrium[whip.stateNames.index('q5')] = pitchAngle speedNaught = 1.5
'xtick.labelsize': 8, 'ytick.labelsize': 8, 'text.usetex': True, 'figure.figsize': fig_size, 'figure.dpi': 300 } plt.rcParams.update(params) # load the benchmark parameters pathToData = '/media/Data/Documents/School/UC Davis/Bicycle Mechanics/BicycleParameters/data/' benchmark = bp.Bicycle('Benchmark', pathToData) benchmarkPar = bp.io.remove_uncertainties(benchmark.parameters['Benchmark']) # convert to my parameter set moorePar = bicycle.benchmark_to_moore(benchmarkPar, oldMassCenter=False) whip = LinearWhipple() whip.set_parameters(moorePar) # linearize about the nominal configuration equilibrium = np.zeros(len(whip.stateNames)) pitchAngle = bicycle.pitch_from_roll_and_steer(0., 0., moorePar['rf'], moorePar['rr'], moorePar['d1'], moorePar['d2'], moorePar['d3']) equilibrium[whip.stateNames.index('q5')] = pitchAngle # below the weave bifurcation speedNaught = 0.5 u6Naught = -speedNaught / moorePar['rr'] equilibrium[whip.stateNames.index('u6')] = u6Naught whip.linear(equilibrium)
'legend.fontsize': 8, 'xtick.labelsize': 8, 'ytick.labelsize': 8, 'text.usetex': True, 'figure.figsize': fig_size, 'figure.dpi': 300} plt.rcParams.update(params) # load the benchmark parameters pathToData='/media/Data/Documents/School/UC Davis/Bicycle Mechanics/BicycleParameters/data/' benchmark = bp.Bicycle('Benchmark', pathToData) benchmarkPar = bp.io.remove_uncertainties(benchmark.parameters['Benchmark']) # convert to my parameter set moorePar = bicycle.benchmark_to_moore(benchmarkPar, oldMassCenter=False) whip = LinearWhipple() whip.set_parameters(moorePar) # linearize about the nominal configuration equilibrium = np.zeros(len(whip.stateNames)) pitchAngle = bicycle.pitch_from_roll_and_steer(0., 0., moorePar['rf'], moorePar['rr'], moorePar['d1'], moorePar['d2'], moorePar['d3']) equilibrium[whip.stateNames.index('q5')] = pitchAngle # below the weave bifurcation speedNaught = 0.5 u6Naught = -speedNaught / moorePar['rr'] equilibrium[whip.stateNames.index('u6')] = u6Naught whip.linear(equilibrium) figs = whip.plot_eigenvectors(states=('q4', 'q7'))
from dtk import bicycle # local dependencies try: f = open('Whipple.py', 'r') except IOError: from altk import alparse alparse.alparse('Whipple', 'Whipple', code='Python') else: f.close() del f from Whipple import LinearWhipple # create the Whipple model (with my parameters) whip = LinearWhipple() # load the benchmark parameters pathToData='/media/Data/Documents/School/UC Davis/Bicycle Mechanics/BicycleParameters/data/' benchmark = bp.Bicycle('Benchmark', pathToData) benchmarkPar = bp.io.remove_uncertainties(benchmark.parameters['Benchmark']) # convert to my parameter set moorePar = bicycle.benchmark_to_moore(benchmarkPar, oldMassCenter=False) whip.set_parameters(moorePar) # set the initial conditions to match Meijaard2007 speedNaught = 4.6 u6Naught = -speedNaught / moorePar['rr'] rollRateNaught = 0.5 pitchAngle = bicycle.pitch_from_roll_and_steer(0., 0., moorePar['rf'], moorePar['rr'], moorePar['d1'], moorePar['d2'], moorePar['d3'])