# Prescribed yaw angle
acc_period = 0.1
yaw_time1 = 3.0
yaw_time2 = 6.0
dvyaw = 10 * np.pi/180
system.prescribe(yaw.istrain,
    acc=lambda t: (t>=yaw_time1 and t<(yaw_time1+acc_period)) and  dvyaw/acc_period or 0 +\
                  (t>yaw_time2 and t<=(yaw_time2+acc_period)) and -dvyaw/acc_period or 0)
system.find_equilibrium()

integ = Integrator(system, ())
integ.add_position_output(yaw.istrain, 'yaw position')
integ.add_velocity_output(yaw.istrain, 'yaw velocity')
integ.add_acceleration_output(yaw.istrain, 'yaw acceleration')
integ.add_acceleration_output(el.imult)
integ.add_force_output(bearing.idist, "root load")
integ.add_custom_output(lambda s: el.station_positions()[-1], 'tip pos')
integ.add_custom_output(lambda s: el.modes.X(el.xstrain)[-1,1:3], 'tip defl')
integ.add_custom_output(lambda s: el.quad_forces, 'quad_forces')
integ.add_custom_output(lambda s: el.quad_stress, 'quad_stress')

# Load Bladed data for comparison
import pybladed.data
brun = pybladed.data.BladedRun(bladedpath)
bladed_defl = np.c_[
    brun.get('blade 1 x-deflection;4'),
    brun.get('blade 1 y-deflection;4'),
    brun.get('blade 1 x-position;4'),
    brun.get('blade 1 y-position;4'),
    brun.get('blade 1 z-position;4'),
    brun.get('rotor azimuth'),
示例#2
0
# Prescribed yaw angle
acc_period = 0.1
yaw_time1 = 3.0
yaw_time2 = 6.0
dvyaw = 10 * np.pi / 180
system.prescribe(yaw.istrain,
    acc=lambda t: (t>=yaw_time1 and t<(yaw_time1+acc_period)) and  dvyaw/acc_period or 0 +\
                  (t>yaw_time2 and t<=(yaw_time2+acc_period)) and -dvyaw/acc_period or 0)
system.find_equilibrium()

integ = Integrator(system, ())
integ.add_position_output(yaw.istrain, 'yaw position')
integ.add_velocity_output(yaw.istrain, 'yaw velocity')
integ.add_acceleration_output(yaw.istrain, 'yaw acceleration')
integ.add_acceleration_output(el.imult)
integ.add_force_output(bearing.idist, "root load")
integ.add_custom_output(lambda s: el.station_positions()[-1], 'tip pos')
integ.add_custom_output(lambda s: el.modes.X(el.xstrain)[-1, 1:3], 'tip defl')
integ.add_custom_output(lambda s: el.quad_forces, 'quad_forces')
integ.add_custom_output(lambda s: el.quad_stress, 'quad_stress')

# Load Bladed data for comparison
import pybladed.data
brun = pybladed.data.BladedRun(bladedpath)
bladed_defl = np.c_[brun.get('blade 1 x-deflection;4'),
                    brun.get('blade 1 y-deflection;4'),
                    brun.get('blade 1 x-position;4'),
                    brun.get('blade 1 y-position;4'),
                    brun.get('blade 1 z-position;4'),
                    brun.get('rotor azimuth'),
                    brun.get('nacelle yaw displacement'),