from dynamics import System, ModalElement, Integrator, RigidConnection, rotmat_y, \ RigidBody from blade import Tower #from loading import PointLoading import dynvis from linearisation import LinearisedSystem dynamics.OPT_GRAVITY = False modes_path = '/bladed/simple_tower/point_load/tower_2modes_only' bladed_path = '/bladed/simple_tower/point_load/flextower_rigidblades_2modes' # Modal element using data from Bladed model print "Loading tower from '%s'..." % modes_path tower = Tower(modes_path+'.$pj') modes = tower.modal_rep() # Load Bladed data for comparison import pybladed.data brun = pybladed.data.BladedRun(bladed_path) thrust = brun.get('rotating hub Fx') bladed_defl = np.c_[ brun.get('Nacelle fore-aft displacement'), brun.get('Nacelle nod angle'), ] #loading = PointLoading(blade, wind_table, None) thrust_time = [0, 1, 2, 10 ] thrust_force = [0, 0, 10e3, 10e3] thrust = np.c_[ thrust_force, np.zeros((4,2)) ].T loadfunc = scipy.interpolate.interp1d(thrust_time, thrust)
from dynamics import System, ModalElement, Integrator, RigidConnection, rotmat_y, \ RigidBody from blade import Tower #from loading import PointLoading import dynvis from linearisation import LinearisedSystem dynamics.OPT_GRAVITY = False modes_path = '/bladed/simple_tower/point_load/tower_2modes_only' bladed_path = '/bladed/simple_tower/point_load/flextower_rigidblades_2modes' # Modal element using data from Bladed model print "Loading tower from '%s'..." % modes_path tower = Tower(modes_path + '.$pj') modes = tower.modal_rep() # Load Bladed data for comparison import pybladed.data brun = pybladed.data.BladedRun(bladed_path) thrust = brun.get('rotating hub Fx') bladed_defl = np.c_[brun.get('Nacelle fore-aft displacement'), brun.get('Nacelle nod angle'), ] #loading = PointLoading(blade, wind_table, None) thrust_time = [0, 1, 2, 10] thrust_force = [0, 0, 10e3, 10e3] thrust = np.c_[thrust_force, np.zeros((4, 2))].T loadfunc = scipy.interpolate.interp1d(thrust_time, thrust) # Modal element
RigidBody from blade import Tower #from loading import PointLoading import dynvis from linearisation import LinearisedSystem dynamics.OPT_GRAVITY = False modes_path = '/media/data/bladed/nrel_tower/point_load/tower_7modes_only' bladed_path = '/media/data/bladed/nrel_tower/point_load/flextower_rigidblades_7modes' # Modal element using data from Bladed model print "Loading tower from '%s'..." % modes_path #tower = Tower(modes_path+'.$pj') tower = Tower(bladed_path+'.$PJ') modes = tower.modal_rep(False) # Get combined tower frequencies #tower2 = Tower(bladed_path+'.$pj') #modes2 = tower2.modal_rep() isolated_freqs = 2*np.pi*np.array([1.28, 1.28, 20, 5.75, 5.75, 5.29, 5.29]) combined_freqs = modes.freqs modes.freqs = isolated_freqs # to get correct stiffness # Load Bladed data for comparison import pybladed.data brun = pybladed.data.BladedRun(bladed_path) bladed_defl = np.c_[ brun.get('Nacelle fore-aft displacement'), brun.get('Nacelle nod angle'),
RigidBody from blade import Tower #from loading import PointLoading import dynvis from linearisation import LinearisedSystem dynamics.OPT_GRAVITY = False modes_path = '/media/data/bladed/nrel_tower/point_load/tower_7modes_only' bladed_path = '/media/data/bladed/nrel_tower/point_load/flextower_rigidblades_7modes' # Modal element using data from Bladed model print "Loading tower from '%s'..." % modes_path #tower = Tower(modes_path+'.$pj') tower = Tower(bladed_path + '.$PJ') modes = tower.modal_rep(False) # Get combined tower frequencies #tower2 = Tower(bladed_path+'.$pj') #modes2 = tower2.modal_rep() isolated_freqs = 2 * np.pi * np.array([1.28, 1.28, 20, 5.75, 5.75, 5.29, 5.29]) combined_freqs = modes.freqs modes.freqs = isolated_freqs # to get correct stiffness # Load Bladed data for comparison import pybladed.data brun = pybladed.data.BladedRun(bladed_path) bladed_defl = np.c_[brun.get('Nacelle fore-aft displacement'), brun.get('Nacelle nod angle'), ]
from dynamics import System, ModalElement, Integrator, RigidConnection, rotmat_y, \ RigidBody, DistalModalElement from blade import Tower #from loading import PointLoading import dynvis from linearisation import LinearisedSystem dynamics.OPT_GRAVITY = False modes_path = '/media/data/bladed/simple_tower/point_load/tower_7modes_only' bladed_path = '/media/data/bladed/simple_tower/point_load/flextower_rigidblades_7modes' # Modal element using data from Bladed model print "Loading tower from '%s'..." % modes_path tower = Tower(modes_path + '.$PJ') modes = tower.modal_rep(rejig=True) # Get combined tower frequencies tower2 = Tower(bladed_path + '.$PJ') modes2 = tower2.modal_rep(rejig=True) # Load Bladed data for comparison import pybladed.data brun = pybladed.data.BladedRun(bladed_path) thrust = brun.get('rotating hub Fx') bladed_defl = np.c_[brun.get('Nacelle fore-aft displacement'), brun.get('Nacelle nod angle'), ] #loading = PointLoading(blade, wind_table, None) thrust_time = [0, 1, 2, 10] thrust_force = [0, 0, 10e3, 10e3]
import matplotlib.pylab as plt import matplotlib.gridspec as gridspec import dynamics from dynamics import (ModalElement, System, Integrator, RigidBody) from blade import Tower # Options dynamics.OPT_GRAVITY = True dynamics.OPT_GEOMETRIC_STIFFNESS = False # Create model bladed_file = r'C:\Users\Rick Lupton\Dropbox\phd\Bladed\Models\OC3-Hywind_SparBuoy_NREL5MW.prj' print "Loading modes from '%s'..." % bladed_file towerdef = Tower(bladed_file) modes = towerdef.modal_rep() endmass = 100000 endinertia = 100 el1 = ModalElement('el', modes, distal=False) system1 = System(el1) el2 = ModalElement('el', modes, distal=True) body = RigidBody('body', endmass, inertia=endinertia*np.eye(3)) el2.add_leaf(body) system2 = System(el2) integ1 = Integrator(system1) integ1.add_output(el1.output_positions()) integ2 = Integrator(system2, outputs=('pos','vel','acc'))
import matplotlib.pylab as plt import matplotlib.gridspec as gridspec import dynamics from dynamics import (ModalElement, System, Integrator, RigidBody) from blade import Tower # Options dynamics.OPT_GRAVITY = True dynamics.OPT_GEOMETRIC_STIFFNESS = False # Create model bladed_file = r'C:\Users\Rick Lupton\Dropbox\phd\Bladed\Models\OC3-Hywind_SparBuoy_NREL5MW.prj' print "Loading modes from '%s'..." % bladed_file towerdef = Tower(bladed_file) modes = towerdef.modal_rep() endmass = 100000 endinertia = 100 el1 = ModalElement('el', modes, distal=False) system1 = System(el1) el2 = ModalElement('el', modes, distal=True) body = RigidBody('body', endmass, inertia=endinertia * np.eye(3)) el2.add_leaf(body) system2 = System(el2) integ1 = Integrator(system1) integ1.add_output(el1.output_positions()) integ2 = Integrator(system2, outputs=('pos', 'vel', 'acc'))
from dynamics import System, ModalElement, Integrator, RigidConnection, rotmat_y, RigidBody, DistalModalElement from blade import Tower # from loading import PointLoading import dynvis from linearisation import LinearisedSystem dynamics.OPT_GRAVITY = False modes_path = "/media/data/bladed/simple_tower/point_load/tower_7modes_only" bladed_path = "/media/data/bladed/simple_tower/point_load/flextower_rigidblades_7modes" # Modal element using data from Bladed model print "Loading tower from '%s'..." % modes_path tower = Tower(modes_path + ".$PJ") modes = tower.modal_rep(rejig=True) # Get combined tower frequencies tower2 = Tower(bladed_path + ".$PJ") modes2 = tower2.modal_rep(rejig=True) # Load Bladed data for comparison import pybladed.data brun = pybladed.data.BladedRun(bladed_path) thrust = brun.get("rotating hub Fx") bladed_defl = np.c_[brun.get("Nacelle fore-aft displacement"), brun.get("Nacelle nod angle")] # loading = PointLoading(blade, wind_table, None) thrust_time = [0, 1, 2, 10] thrust_force = [0, 0, 10e3, 10e3]