Example #1
0
# Turn off gravity
dynamics.OPT_GRAVITY = True
dynamics.OPT_GEOMETRIC_STIFFNESS = True

# Parameters
pitch_freq = 0.3  # rad/s
pitch_amp = 0.3  # rad
rotor_speed = 2  # rad/s

# Create model
bladed_file = r'C:\Users\Rick Lupton\Dropbox\phd\Bladed\Models\OC3-Hywind_SparBuoy_NREL5MW.prj'
tb = Turbine(bladed_file)

# Linearise model and simulate
lin = tb.lin(az0=0, rotor_speed=rotor_speed, init=True)
t, yl = lin.integrate(90)

# Convert to MBC and simulate
mbclin = lin.multiblade_transform(
    (0, rotor_speed),
    [range(0, 4), range(4, 8), range(8, 12)])
t, ym = mbclin.integrate(90)

# Simulate original full system
#t,y = tb.simulate(rotor_speed=2, t1=90, dt=0.10, init=True)


def mbc(az, u):
    N = len(az)
    B = array([
# Turn off gravity
dynamics.OPT_GRAVITY = True
dynamics.OPT_GEOMETRIC_STIFFNESS = True

# Parameters
pitch_freq  = 0.3 # rad/s
pitch_amp   = 0.3 # rad
rotor_speed = 2   # rad/s

# Create model
bladed_file = r'C:\Users\Rick Lupton\Dropbox\phd\Bladed\Models\OC3-Hywind_SparBuoy_NREL5MW.prj'
tb = Turbine(bladed_file)

# Linearise model and simulate
lin = tb.lin(az0=0, rotor_speed=rotor_speed, init=True)
t,yl = lin.integrate(90)

# Convert to MBC and simulate
mbclin = lin.multiblade_transform((0, rotor_speed), [range(0,4),range(4,8),range(8,12)])
t,ym = mbclin.integrate(90)

# Simulate original full system
#t,y = tb.simulate(rotor_speed=2, t1=90, dt=0.10, init=True)


def mbc(az, u):
    N = len(az)
    B = array([
        np.ones((3,N)),
        [2*np.cos(az), 2*np.cos(az+2*pi/3), 2*np.cos(az+4*pi/3)],