Skip to content
Snippets Groups Projects
Commit e42fe597 authored by mads's avatar mads
Browse files

stuff for HTC file + test files

parent ce31cb2d
No related branches found
No related tags found
No related merge requests found
'''
Created on 20/01/2014
@author: MMPE
See documentation of HTCFile below
'''
from collections import OrderedDict
import collections
class OrderedDict(collections.OrderedDict):
pass
def __str__(self):
return "\n".join(["%-30s\t %s" % ((str(k) + ":"), str(v)) for k, v in self.items()])
def parse_next_line(lines):
line, *comments = lines.pop(0).split(";")
comments = ";".join(comments).rstrip()
while lines and lines[0].lstrip().startswith(";"):
comments += "\n%s" % lines.pop(0).rstrip()
return line.strip(), comments
class HTCContents(object):
lines = []
contents = None
name_ = ""
def __setitem__(self, key, value):
self.contents[key] = value
def __getitem__(self, key):
if isinstance(key, str):
key = key.replace(".", "/")
if "/" in key:
keys = key.split('/')
val = self.contents[keys[0]]
for k in keys[1:]:
val = val[k]
return val
return self.contents[key]
else:
return self.values[key]
def __getattribute__(self, *args, **kwargs):
try:
return object.__getattribute__(self, *args, **kwargs)
except:
return self.contents[args[0]]
def __setattr__(self, *args, **kwargs):
k, *v = args
if k in dir(self): # in ['section', 'filename', 'lines']:
return object.__setattr__(self, *args, **kwargs)
self.contents[k] = HTCLine(k, v, "")
def __delattr__(self, *args, **kwargs):
k, = args
if k in self:
del self.contents[k]
def __iter__(self):
return iter(self.contents.values())
def __contains__(self, key):
return key in self.contents
def get(self, section, default=None):
try:
return self[section]
except KeyError:
return default
def keys(self):
return list(self.contents.keys())
def _add_contents(self, contents):
if contents.name_ not in self:
self[contents.name_] = contents
else:
ending = "__2"
while contents.name_ + ending in self:
ending = "__%d" % (1 + float("0%s" % ending.replace("__", "")))
self[contents.name_ + ending] = contents
def add_section(self, name, allow_duplicate_section=False):
if name in self and allow_duplicate_section is False:
return self[name]
section = HTCSection(name)
self._add_contents(section)
return section
def add_line(self, name, values, comments):
self._add_contents(HTCLine(name, values, comments))
class HTCSection(HTCContents):
end_comments = ""
begin_comments = ""
def __init__(self, name, begin_comments="", end_comments=""):
self.name_ = name
self.begin_comments = begin_comments
self.end_comments = end_comments
self.contents = OrderedDict()
@staticmethod
def from_lines(lines):
line, begin_comments = parse_next_line(lines)
name = line[6:].lower()
if name == "output":
section = HTCOutputSection(name, begin_comments)
elif name.startswith("output_at_time"):
section = HTCOutputAtTimeSection(name, begin_comments)
else:
section = HTCSection(name, begin_comments)
while lines:
if lines[0].lower().startswith("begin"):
section._add_contents(HTCSection.from_lines(lines))
elif lines[0].lower().startswith("end"):
line, section.end_comments = parse_next_line(lines)
break
else:
section._add_contents(section.line_from_line(lines))
return section
def line_from_line(self, lines):
return HTCLine.from_lines(lines)
def __str__(self, level=0):
s = "%sbegin %s;%s\n" % (" "*level, self.name_, ("", "\t" + self.begin_comments)[bool(self.begin_comments.strip())])
s += "".join([c.__str__(level + 1) for c in self])
s += "%send %s;%s\n" % (" "*level, self.name_, ("", "\t" + self.end_comments)[self.end_comments.strip() != ""])
return s
class HTCLine(HTCContents):
values = None
comments = ""
def __init__(self, name, values, comments):
self.name_ = name
self.values = values
self.comments = comments
def __repr__(self):
return str(self)
def __str__(self, level=0):
return "%s%s%s;%s\n" % (" "*(level), self.name_,
("", "\t" + self.str_values())[bool(self.values)],
("", "\t" + self.comments)[bool(self.comments.strip())])
def str_values(self):
return " ".join([str(v) for v in self.values])
def __getitem__(self, key):
return self.values[key]
@staticmethod
def from_lines(lines):
line, end_comments = parse_next_line(lines)
if len(line.split()) > 0:
name, *values = line.split()
else:
name = line
values = []
def fmt(v):
try:
if int(float(v)) == float(v):
return int(float(v))
return float(v)
except ValueError:
return v
values = [fmt(v) for v in values]
return HTCLine(name, values, end_comments)
class HTCOutputSection(HTCSection):
sensors = None
def __init__(self, name, begin_comments="", end_comments=""):
HTCSection.__init__(self, name, begin_comments=begin_comments, end_comments=end_comments)
self.sensors = []
def add_sensor(self, type, sensor, values=[], comment="", nr=None):
self._add_sensor(HTCSensor(type, sensor, values, comment), nr)
def _add_sensor(self, htcSensor, nr=None):
if nr is None:
nr = len(self.sensors)
self.sensors.insert(nr, htcSensor)
def line_from_line(self, lines):
name = lines[0].split()[0].strip()
if name in ['filename', 'data_format', 'buffer', 'time']:
return HTCLine.from_lines(lines)
else:
return HTCSensor.from_lines(lines)
def _add_contents(self, contents):
if isinstance(contents, HTCSensor):
self._add_sensor(contents)
else:
return HTCSection._add_contents(self, contents)
def __str__(self, level=0):
s = "%sbegin %s;%s\n" % (" "*level, self.name_, ("", "\t" + self.begin_comments)[len(self.begin_comments.strip())])
s += "".join([c.__str__(level + 1) for c in self])
s += "".join([s.__str__(level + 1) for s in self.sensors])
s += "%send %s;%s\n" % (" "*level, self.name_, ("", "\t" + self.end_comments)[self.end_comments.strip() != ""])
return s
class HTCOutputAtTimeSection(HTCOutputSection):
type = None
time = None
def __init__(self, name, begin_comments="", end_comments=""):
name, self.type, time = name.split()
self.time = float(time)
HTCOutputSection.__init__(self, name, begin_comments=begin_comments, end_comments=end_comments)
def __str__(self, level=0):
s = "%sbegin %s %s %s;%s\n" % (" "*level, self.name_, self.type, self.time, ("", "\t" + self.begin_comments)[len(self.begin_comments.strip())])
s += "".join([c.__str__(level + 1) for c in self])
s += "".join([s.__str__(level + 1) for s in self.sensors])
s += "%send %s;%s\n" % (" "*level, self.name_, ("", "\t" + self.end_comments)[self.end_comments.strip() != ""])
return s
class HTCSensor(HTCLine):
type = ""
sensor = ""
values = []
def __init__(self, type, sensor, values, comments):
self.type = type
self.sensor = sensor
self.values = values
self.comments = comments
@staticmethod
def from_lines(lines):
line, comments = parse_next_line(lines)
if len(line.split()) > 2:
type, sensor, *values = line.split()
else:
type, sensor = line.split()
values = []
def fmt(v):
try:
if int(float(v)) == float(v):
return int(float(v))
return float(v)
except ValueError:
return v
values = [fmt(v) for v in values]
return HTCSensor(type, sensor, values, comments)
def __str__(self, level=0):
return "%s%s %s%s;%s\n" % (" "*(level),
self.type,
self.sensor,
("", "\t" + self.str_values())[bool(self.values)],
("", "\t" + self.comments)[bool(self.comments.strip())])
class HTCDefaults(object):
empty_htc = """begin simulation;
time_stop 600;
solvertype 1; (newmark)
on_no_convergence continue;
convergence_limits 1E3 1.0 1E-7; ; . to run again, changed 07/11
begin newmark;
deltat 0.02;
end newmark;
end simulation;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin new_htc_structure;
begin orientation;
end orientation;
begin constraint;
end constraint;
end new_htc_structure;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin wind ;
density 1.225 ;
wsp 10 ;
tint 1;
horizontal_input 1 ; 0=false, 1=true
windfield_rotations 0 0.0 0.0 ; yaw, tilt, rotation
center_pos0 0 0 -30 ; hub heigth
shear_format 1 0;0=none,1=constant,2=log,3=power,4=linear
turb_format 0 ; 0=none, 1=mann,2=flex
tower_shadow_method 0 ; 0=none, 1=potential flow, 2=jet
end wind;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin dll;
end dll;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin output;
general time;
end output;
exit;"""
def add_mann_turbulence(self, L=29.4, ae23=1, Gamma=3.9, seed=1001, high_frq_compensation=True,
filenames=None,
no_grid_points=(4096, 32, 32), box_dimension=(6000, 100, 100),
std_scaling=(1, .8, .5)):
wind = self.add_section('wind')
wind.turb_format = (1, "0=none, 1=mann,2=flex")
mann = wind.add_section('mann')
mann.add_line('create_turb_parameters', [L, ae23, Gamma, seed, int(high_frq_compensation)], "L, alfaeps, gamma, seed, highfrq compensation")
if filenames is None:
filenames = ["./turb/turb_wsp%d_s%04d%s.bin" % (self.wind.wsp[0], seed, c) for c in ['u', 'v', 'w']]
if isinstance(filenames, str):
filenames = ["./turb/%s_s%04d%s.bin" % (filenames, seed, c) for c in ['u', 'v', 'w']]
for filename, c in zip(filenames, ['u', 'v', 'w']):
setattr(mann, 'filename_%s' % c, filename)
for c, n, dim in zip(['u', 'v', 'w'], no_grid_points, box_dimension):
setattr(mann, 'box_dim_%s' % c, "%d %.4f" % (n, dim / (n - 1)))
if std_scaling is None:
mann.dont_scale = 1
else:
try:
del mann.dont_scale
except KeyError:
pass
mann.std_scaling = "%f %f %f" % std_scaling
begin simulation;
time_stop 200.0;
solvertype 1 ;
on_no_convergence continue ;
convergence_limits 1E3 1.0 1E-7 ;
logfile ./logfiles/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000.log ;
;
begin newmark;
deltat 0.02;
end newmark;
end simulation;
;
begin new_htc_structure;
;-------------------------------------------------------------------------------------------------------------------------------
begin main_body; tower 90m
name tower ;
type timoschenko ;
nbodies 1 ;
node_distribution c2_def ;
damping_posdef 0.0 0.0 0.0 3.62e-03 3.62e-03 3.30e-03 ; Mx My Mz Kx Ky Kz , M΄s raises overall level, K΄s raises high freguency level
begin timoschenko_input;
filename ./data/NREL_5MW_st.txt ;
set 1 1 ;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 8;
sec 1 0.0 0.0 0.0 0.0 ; x,y,z,twist
sec 2 0.0 0.0 -10.0 0.0 ;
sec 3 0.0 0.0 -20.0 0.0 ;
sec 4 0.0 0.0 -30.0 0.0 ;
sec 5 0.0 0.0 -45.0 0.0 ;
sec 6 0.0 0.0 -60.0 0.0 ;
sec 7 0.0 0.0 -70.0 0.0 ;
sec 8 0.0 0.0 -87.6 0.0 ;
end c2_def ;
end main_body;
;
begin main_body;
name towertop ;
type timoschenko ;
nbodies 1 ;
node_distribution c2_def ;
damping_posdef 0.0 0.0 0.0 3.00E-05 3.00E-05 2.00E-04 ;
concentrated_mass 2 0.0 1.9 0.21256 2.4E5 1741490.0 1.7E5 1741490.0 ; Nacelle mass and inertia
begin timoschenko_input;
filename ./data/NREL_5MW_st.txt ;
set 2 1 ;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 2;
sec 1 0.0 0.0 0.0 0.0 ; x,y,z,twist
sec 2 0.0 0.0 -1.96256 0.0 ;
end c2_def ;
end main_body;
;
begin main_body;
name shaft ;
type timoschenko ;
nbodies 1 ;
node_distribution c2_def ;
damping_posdef 0.0 0.0 0.0 4.65E-04 4.65E-04 7.0725E-03 ; "tuned by Anyd 23/5/13 to 31.45 log decr. damping for free free with stiff rotor and tower"
concentrated_mass 1 0.0 0.0 0.0 0.0 0.0 0.0 5025497.444 ;generator equivalent slow shaft
concentrated_mass 5 0.0 0.0 0.0 56780 0.0 0.0 115926 ; hub mass and inertia;
begin timoschenko_input;
filename ./data/NREL_5MW_st.txt ;
set 3 1 ;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 5;
sec 1 0.0 0.0 0.0 0.0 ; Tower top x,y,z,twist
sec 2 0.0 0.0 1.0 0.0 ;
sec 3 0.0 0.0 2.0 0.0 ;
sec 4 0.0 0.0 3.1071 0.0 ; Main bearing
sec 5 0.0 0.0 5.0191 0.0 ; Rotor centre
end c2_def ;
end main_body;
;
begin main_body;
name hub1 ;
type timoschenko ;
nbodies 1 ;
node_distribution c2_def ;
damping_posdef 0.0 0.0 0.0 3.00E-06 3.00E-06 2.00E-05;
begin timoschenko_input;
filename ./data/NREL_5MW_st.txt ;
set 4 1 ;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 2;
sec 1 0.0 0.0 0.0 0.0 ; x,y,z,twist
sec 2 0.0 0.0 1.5 0.0 ;
end c2_def ;
end main_body;
;
begin main_body;
name hub2 ;
copy_main_body hub1;
end main_body;
;
begin main_body;
name hub3 ;
copy_main_body hub1 ;
end main_body;
;
begin main_body;
name blade1 ;
type timoschenko ;
nbodies 9 ;
node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 1.41E-03 2.39E-03 4.5E-05 ;
begin timoschenko_input ;
filename ./data/NREL_5MW_st.txt ;
set 5 1 ; set subset
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 19 ;
sec 1 0.0000 0.0000 0.000 0.000 ; x.y.z. twist
sec 2 -0.0027 0.0006 1.367 -13.308 ;
sec 3 -0.1057 0.0250 4.100 -13.308 ;
sec 4 -0.2501 0.0592 6.833 -13.308 ;
sec 5 -0.4592 0.1086 10.250 -13.308 ;
sec 6 -0.5699 0.1157 14.350 -11.480 ;
sec 7 -0.5485 0.0983 18.450 -10.162 ;
sec 8 -0.5246 0.0832 22.550 -9.011 ;
sec 9 -0.4962 0.0679 26.650 -7.795 ;
sec 10 -0.4654 0.0534 30.750 -6.544 ; 50% blade radius
sec 11 -0.4358 0.0409 34.850 -5.361 ;
sec 12 -0.4059 0.0297 38.950 -4.188 ;
sec 13 -0.3757 0.0205 43.050 -3.125 ;
sec 14 -0.3452 0.0140 47.150 -2.319 ;
sec 15 -0.3146 0.0084 51.250 -1.526 ;
sec 16 -0.2891 0.0044 54.667 -0.863 ;
sec 17 -0.2607 0.0017 57.400 -0.370 ;
sec 18 -0.1774 0.0003 60.133 -0.106 ;
sec 19 -0.1201 0.0000 61.500 -0.000 ;
end c2_def ;
end main_body;
;
begin main_body;
name blade2 ;
copy_main_body blade1;
end main_body;
;
begin main_body;
name blade3 ;
copy_main_body blade1 ;
end main_body;
;-------------------------------------------------------------------------------------------------------------------------------
;
begin orientation;
begin base;
body tower;
inipos 0.0 0.0 0.0 ; initial position of node 1
body_eulerang 0.0 0.0 0.0;
end base;
;
begin relative;
body1 tower last;
body2 towertop 1;
body2_eulerang 0.0 0.0 0.0;
end relative;
;
begin relative;
body1 towertop last;
body2 shaft 1;
body2_eulerang 90.0 0.0 0.0;
body2_eulerang 5.0 0.0 0.0; 5 deg tilt angle
body2_eulerang 0.0 0.0 0.0;
mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.2 ; mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.7;
end relative;
;
begin relative;
body1 shaft last;
body2 hub1 1;
body2_eulerang -90.0 0.0 0.0;
body2_eulerang 0.0 180.0 0.0;
body2_eulerang 2.5 0.0 0.0; 2.5deg cone angle
end relative;
;
begin relative;
body1 shaft last;
body2 hub2 1;
body2_eulerang -90.0 0.0 0.0;
body2_eulerang 0.0 60.0 0.0;
body2_eulerang 2.5 0.0 0.0; 2.5deg cone angle
end relative;
;
begin relative;
body1 shaft last;
body2 hub3 1;
body2_eulerang -90.0 0.0 0.0;
body2_eulerang 0.0 -60.0 0.0;
body2_eulerang 2.5 0.0 0.0; 2.5deg cone angle
end relative;
;
begin relative;
body1 hub1 last;
body2 blade1 1;
body2_eulerang 0.0 0.0 0.0 ;
end relative;
;
begin relative;
body1 hub2 last;
body2 blade2 1;
body2_eulerang 0.0 0.0 0.5 ;
end relative;
;
begin relative;
body1 hub3 last;
body2 blade3 1;
body2_eulerang 0.0 0.0 -0.5 ;
end relative;
;
end orientation;
;-------------------------------------------------------------------------------------------------------------------------------
begin constraint;
;
begin fix0; fixed to ground in translation and rotation of node 1
body tower;
end fix0;
;
begin fix1;
body1 tower last ;
body2 towertop 1;
end fix1;
;
begin bearing1; free bearing
name shaft_rot;
body1 towertop last;
body2 shaft 1;
bearing_vector 2 0.0 0.0 -1.0; x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
end bearing1;
;
; begin bearing3; free bearing
; name shaft_rot;
; body1 towertop last;
; body2 shaft 1;
; bearing_vector 2 0.0 0.0 -1.0; x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
; omegas 0.0 ;
; end bearing3;
;
begin fix1;
body1 shaft last ;
body2 hub1 1;
end fix1;
;
begin fix1;
body1 shaft last ;
body2 hub2 1;
end fix1;
;
begin fix1;
body1 shaft last ;
body2 hub3 1;
end fix1;
;
begin bearing2;
name pitch1;
body1 hub1 last;
body2 blade1 1;
bearing_vector 2 0.0 0.0 -1.0;
end bearing2;
;
begin bearing2;
name pitch2;
body1 hub2 last;
body2 blade2 1;
bearing_vector 2 0.0 0.0 -1.0;
end bearing2;
;
begin bearing2;
name pitch3;
body1 hub3 last;
body2 blade3 1;
bearing_vector 2 0.0 0.0 -1.0;
end bearing2;
end constraint;
;
end new_htc_structure;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
begin wind ;
density 1.225 ;
wsp 10.0 ;
tint 0.338432 ;
horizontal_input 1 ;
windfield_rotations 0.0 0.0 0.0 ; yaw, tilt, rotation
center_pos0 0.0 0.0 -90 ; hub heigth
shear_format 3 0.2 ;
turb_format 0.0 ; 0=none, 1=mann,2=flex
tower_shadow_method 3 ; 0=none, 1=potential flow, 2=jet
scale_time_start 100.0 ;
wind_ramp_factor 0.0 100.0 0.8 1.0 ;
iec_gust ecd 15.0 72.0 100.0 10.0 ;
;
begin mann ;
create_turb_parameters 29.4 1.0 3.7 0.0 1.0 ; L, alfaeps, gamma, seed, highfrq compensation
filename_u ./turb/turb_wsp10_s0000u.bin ;
filename_v ./turb/turb_wsp10_s0000v.bin ;
filename_w ./turb/turb_wsp10_s0000w.bin ;
box_dim_u 8192 0.244140625 ;
box_dim_v 32 4.0 ;
box_dim_w 32 4.0 ;
std_scaling 1.0 0.7 0.5 ;
end mann ;
;
begin tower_shadow_potential_2;
tower_mbdy_link tower;
nsec 2;
radius 0.0 3.0 ;
radius 87.6 1.935 ;
end tower_shadow_potential_2;
end wind;
;
begin aero ;
nblades 3;
hub_vec shaft -3 ; rotor rotation vector (normally shaft composant directed from pressure to sustion side)
link 1 mbdy_c2_def blade1;
link 2 mbdy_c2_def blade2;
link 3 mbdy_c2_def blade3;
ae_filename ./data/AeDist_Flap_01.dat ; Distribute points to preserve effective flap length, use same setup for baseline
pc_filename ./data/NREL_5MW_pc.txt;
induction_method 1.0 ; 0=none, 1=normal
aerocalc_method 1 ; 0=ingen aerodynamic, 1=med aerodynamic
aero_distribution ae_file 1 ;
ae_sets 1 1 1;
tiploss_method 1 ; 0=none, 1=prandtl
dynstall_method 3.0 ; 0=none, 1=stig øye method,2=mhh method
; --- Flaps --- ;
begin dynstall_ateflap ;
Ais 0.165 0.335 0.0 ;
Bis 0.0455 0.30 0.30 ;
flap 43.05 60.885 ./data/FlapInp_NacaThk17.ds ; Flap Sec: 1
end dynstall_ateflap;
end aero ;
;
begin aerodrag ;
begin aerodrag_element ;
mbdy_name tower;
aerodrag_sections uniform 10 ;
nsec 2 ;
sec 0.0 0.6 6.0 ; tower bottom
sec 87.6 0.6 3.87 ; tower top
end aerodrag_element;
;
begin aerodrag_element ; Nacelle drag side
mbdy_name shaft;
aerodrag_sections uniform 2 ;
nsec 2 ;
sec 0.0 0.8 10.0 ;
sec 5.02 0.8 10.0 ;
end aerodrag_element;
end aerodrag;
;
;-------------------------------------------------------------------------------------------------
begin dll;
;
begin type2_dll;
name risoe_controller ;
filename ./control/risoe_controller.dll ;
dll_subroutine_init init_regulation ;
dll_subroutine_update update_regulation ;
arraysizes_init 52 1 ;
arraysizes_update 12 100 ;
begin init ;
; Overall parameters
constant 1 5000.0 ; Rated power [kW]
constant 2 0.72257 ; Minimum rotor speed [rad/s] - NREL report
constant 3 1.2671 ; Rated rotor speed [rad/s] - NREL report
constant 4 4.6e6 ; Maximum allowable generator torque [Nm] - NREL rep.
constant 5 0.0 ; Minimum pitch angle, theta_min [deg], - NREL rep. keeps to 0.0
; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
; from a file named 'wptable.n', where n=int(theta_min)
constant 6 84.0 ; Maximum pitch angle [deg]
constant 7 8.0 ; Maximum pitch velocity operation [deg/s] - NREL rep.
constant 8 0.4 ; Frequency of generator speed filter [Hz] - NREL rep.
constant 9 0.7 ; Damping ratio of speed filter [-] - NREL rep.
constant 10 0.0 ; Frequency of free-free DT torsion mode [Hz], 0.0 no notch filter used
; Partial load control parameters
constant 11 0.216828E+07 ; Optimal Cp tracking K factor [kNm/(rad/s)^2], ; - HS2 tune, lambda opt. 7.55
; Qg=K*Omega^2, K=eta*0.5*rho*A*Cp_opt*R^3/lambda_opt^3
constant 12 0.193160E+08 ; Proportional gain of torque controller [Nm/(rad/s)] - HS2 tune
constant 13 0.433451E+07 ; Integral gain of torque controller [Nm/rad] - HS2 tune
constant 14 0.0 ; Differential gain of torque controller [Nm/(rad/s^2)]
; Full load control parameters
constant 15 1 ; Generator control switch [1=constant power, 2=constant torque]
constant 16 0.81 ; Proportional gain of pitch controller [rad/(rad/s)]
constant 17 0.16 ; Integral gain of pitch controller [rad/rad]
constant 18 0.0 ; Differential gain of pitch controller [rad/(rad/s^2)]
constant 19 0.4e-8 ; Proportional power error gain [rad/W]
constant 20 0.4e-8 ; Integral power error gain [rad/(Ws)]
constant 21 10.6 ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg] - HS2 tune
constant 22 583.4 ; Coefficient of quadratic term in aerodynamic gain scheduling, KK2 [deg^2] &
; (if zero, KK1 = pitch angle at double gain) - HS2 tune
constant 23 1.3 ; Relative speed for double nonlinear gain [-]
; Cut-in simulation parameters
constant 24 -1.0 ; Cut-in time [s]
constant 25 1.0 ; Time delay for soft start of torque [1/1P]
; Cut-out simulation parameters
constant 26 -1.0 ; Cut-out time [s]
constant 27 5.0 ; Time constant for linear torque cut-out [s]
constant 28 1.0 ; Stop type [1=normal, 2=emergency]
constant 29 0.0 ; Time delay for pitch stop after shut-down commenced [s]
constant 30 4.0 ; Maximum pitch velocity during initial period of stop [deg/s]
constant 31 3.0 ; Time period of initial pitch stop phase [s]
constant 32 6.0 ; Maximum pitch velocity during final phase of stop [deg/s]
; Expert parameters (keep default values unless otherwise given)
constant 33 2.0 ; Lower angle above lowest minimum pitch angle for switch [deg]
constant 34 2.0 ; Upper angle above lowest minimum pitch angle for switch [deg], if equal then hard switch
constant 35 95.0 ; Ratio between filtered speed and reference speed for fully open torque limits [%]
constant 36 5.0 ; Time constant of 1st order filter on wind speed used for minimum pitch [1/1P]
constant 37 5.0 ; Time constant of 1st order filter on pitch angle used for gain scheduling [1/1P]
; Drivetrain damper
constant 38 0.0 ; Proportional gain of active DT damper [Nm/(rad/s)], requires frequency in input 10
; Over speed
constant 39 25.0 ; Over speed percentage before initiating shut-down
; Additional non-linear pitch control term (not used when all zero)
constant 40 25.0 ; Err0 [rad/s]
constant 41 10.0 ; ErrDot0 [rad/s^2]
constant 42 0.15 ; PitNonLin1 [rad/s]
; Storm control command (from MHHA ctrl rev.)
constant 43 28.0 ; Wind speed 'Vstorm' above which derating of rotor speed is used [m/s]
constant 44 28.0 ; Cut-out wind speed (only used for derating of rotor speed in storm) [m/s]
; Safety system parameters
constant 45 30.0 ; Percent maximum overspeed of generator speed before emergency pitch stop [%]
constant 46 1.5 ; Max low-pass filtered tower top acceleration level [m/s^2]
constant 47 126.0 ; Nominal rotor diameter [m]
; Parameters for rotor inertia reduction in variable speed region
constant 48 0.0 ; Proportional gain on rotor acceleration in variable speed region [Nm/(rad/s^2)]
; Parameters for alternative partial load controller with PI regulated TSR tracking
constant 49 0.0 ; Optimal tip speed ratio [-]
; Parameters for adding aerodynamic drivetrain damping on gain scheduling
constant 50 0.0 ; Proportional gain of aerodynamic DT damping [Nm/(rad/s)]
constant 51 5.0 ; Coefficient of linear term in aerodynamic DT damping scheduling, KK1 [deg]
constant 52 5.0 ; Coefficient of quadratic term in aerodynamic DT damping scheduling, KK2 [deg^2]
end init ;
;
begin output ;
general time ; [s]
constraint bearing1 shaft_rot 1 only 2 ; Drivetrain speed [rad/s]
constraint bearing2 pitch1 1 only 1; [rad]
constraint bearing2 pitch2 1 only 1; [rad]
constraint bearing2 pitch3 1 only 1; [rad]
wind free_wind 1 0.0 0.0 -90 ; global coords at hub height
dll inpvec 3 2 ; Elec. power
dll inpvec 3 8 ; Grid flag
mbdy state acc towertop 1 1.0 global only 1 ;
mbdy state acc towertop 1 1.0 global only 2 ;
end output;
end type2_dll;
;
begin type2_dll;
name cyclic_pitch_controller ;
filename ./control/cyclic_pitch_controller.dll ;
dll_subroutine_init init_cyclic_pitch_controller ;
dll_subroutine_update update_cyclic_pitch_controller ;
arraysizes_init 11 1 ;
arraysizes_update 11 10 ;
begin init ;
constant 1 47.2 ; Lead angle [deg]
constant 2 1.26 ; Proportional gain at zero pitch [deg/MNm]
constant 3 0.28 ; Integral gain at zero pitch [deg/(MNm*s)]
constant 4 0.0 ; Differential gain at zero pitch [deg*s/MNm]
constant 5 10.6 ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
constant 6 583.4 ; Coefficient of quadratic term in aerodynamic gain scheduling, KK2 [deg^2]
constant 7 0.2 ; Low-pass filter frequency [Hz]
constant 8 0.7 ; Low-pass filter damping ratio [-]
constant 9 10.0 ; Low-pass filter time constant for gain scheduling [s]
constant 10 4.0 ; Maximum amplitude on cyclic pitch [deg]
constant 11 0.99 ; Thresshold for full power switch [-]
end init ;
;
begin output;
general time ; 1: general time [s]
constraint bearing1 shaft_rot 1 ; 2-3: Azimuth angle and speed of blade 1 (zero = blade up) [rad]
mbdy momentvec blade1 3 1 blade1 only 1 ; 4: Flap BRM of blade 1 (pos. bend. forward) [kNm]
mbdy momentvec blade2 3 1 blade2 only 1 ; 5: Flap BRM of blade 2 (pos. bend. forward) [kNm]
mbdy momentvec blade3 3 1 blade3 only 1 ; 6: Flap BRM of blade 3 (pos. bend. forward) [kNm]
dll inpvec 1 2 ; 7: Pitch angle reference of blade 1 from collective pitch controller [rad]
dll inpvec 1 3 ; 8: Pitch angle reference of blade 2 from collective pitch controller [rad]
dll inpvec 1 4 ; 9: Pitch angle reference of blade 3 from collective pitch controller [rad]
dll inpvec 1 22 ; 10: Status flag from collective pitch controller [0=normal operation]
dll inpvec 1 14 ; 11: Torque limit switch based on pitch [-]
end output;
end type2_dll;
;
begin type2_dll;
name generator_servo ;
filename ./control/generator_servo.dll ;
dll_subroutine_init init_generator_servo ;
dll_subroutine_update update_generator_servo ;
arraysizes_init 7 1 ;
arraysizes_update 4 8 ;
begin init ;
constant 1 20.0 ; Frequency of genertor 2nd order control model [Hz]
constant 2 0.9 ; Damping ratio of genertor 2nd order control model [-]
constant 3 4.6e6 ; Maximum allowable LSS torque (pull-out torque) [Nm]
constant 4 0.944 ; Generator efficiency [-]
constant 5 97.0 ; Gearratio [-]
constant 6 0.0 ; Time for half value in softstart of torque [s]
constant 7 1000.0 ; Time for grid loss
end init ;
;
begin output;
general time ; Time [s]
dll inpvec 1 1 ; Electrical torque reference [Nm]
constraint bearing1 shaft_rot 1 only 2; Generator LSS speed [rad/s]
mbdy momentvec shaft 1 1 shaft only 3 ; Shaft moment [kNm] (Qshaft)
end output;
;
begin actions;
mbdy moment_int shaft 1 -3 shaft towertop 2 ; Generator LSS torque [Nm]
end actions;
end type2_dll;
;
begin type2_dll;
name mech_brake ;
filename ./control/mech_brake.dll ;
dll_subroutine_init init_mech_brake ;
dll_subroutine_update update_mech_brake ;
arraysizes_init 4 1 ;
arraysizes_update 3 6 ;
begin init ;
constant 1 2727252.0 ; Fully deployed maximum brake torque [Nm]
constant 2 100.0 ; alpha, used in Q = tanh(omega*alpha), typically 1e2/Omega_nom
constant 3 0.5 ; Delay time for before brake starts to deploy [s]
constant 4 0.6 ; Time for brake to become fully deployed [s]
end init ;
;
begin output;
general time ; Time [s]
constraint bearing1 shaft_rot 1 only 2 ; Generator LSS speed [rad/s]
dll inpvec 1 25 ; Command to deploy mechanical disc brake [0,1]
end output;
;
begin actions;
mbdy moment_int shaft 1 -3 shaft towertop 2 ; Generator LSS torque [Nm]
end actions;
end type2_dll;
;
begin type2_dll;
name servo_with_limits ;
filename ./control/servo_with_limits.dll ;
dll_subroutine_init init_servo_with_limits ;
dll_subroutine_update update_servo_with_limits ;
arraysizes_init 10 1 ;
arraysizes_update 5 9 ;
begin init ;
constant 1 3 ; Number of blades [-]
constant 2 1.0 ; Filter frequency [Hz]
constant 3 0.7 ; Filter damping ratio [-]
constant 4 8.0 ; Max. pitch speed [deg/s]
constant 5 8.0 ; Max. pitch acceleration [deg/s^2]
constant 6 0.0 ; Min. pitch angle [deg]
constant 7 84.0 ; Max. pitch angle [deg]
constant 8 1000.0 ; Time for pitch runaway [s]
constant 9 -1.0 ; Time for stuck blade 1 [s]
constant 10 0.0 ; Angle of stuck blade 1 [deg]
end init ;
begin output;
general time ; Time [s]
; ; - For Cyclic Pitch: - ;
; dll inpvec 2 1 ; Pitch1 demand angle [rad]
; dll inpvec 2 2 ; Pitch2 demand angle [rad]
; dll inpvec 2 3 ; Pitch3 demand angle [rad]
; - For Collective Pitch Only: - ;
dll inpvec 1 2 ; Pitch1 demand angle [rad]
dll inpvec 1 3 ; Pitch2 demand angle [rad]
dll inpvec 1 4 ; Pitch3 demand angle [rad]
dll inpvec 1 26 ; Flag for emergency pitch stop [0=off/1=on]
end output;
;
begin actions;
constraint bearing2 angle pitch1 ; Angle pitch1 bearing [rad]
constraint bearing2 angle pitch2 ; Angle pitch2 bearing [rad]
constraint bearing2 angle pitch3 ; Angle pitch3 bearing [rad]
end actions;
end type2_dll;
; --- DLL for tower-blade tip distance -- ;
begin type2_dll;
name disttowtip ;
filename ./control/towclearsens.dll ;
dll_subroutine_init initialize ;
dll_subroutine_update update ;
arraysizes_init 1 1 ;
arraysizes_update 12 4 ;
begin init ;
constant 1 2.66 ; Tower radius close to downward blade tip [m]
end init ;
begin output;
mbdy state pos tower 3 0.75 global ; [1,2,3]. Tower position: 27.5 m
mbdy state pos blade1 18 1.0 global ; [4,5,6]
mbdy state pos blade2 18 1.0 global ; [7,8,9]
mbdy state pos blade3 18 1.0 global ; [10,11,12]
end output;
end type2_dll;
;
; ------------------------------------- Flap Control ------------------------------------------------------------------------------------------------------------
; 1 individual flap per blade with PID on HPF Mx with rate and range limits
begin type2_dll;
name flap_ctrl ;
filename ./control/flap_dll_type2.dll ;
dll_subroutine_init initialize ;
dll_subroutine_update update ;
arraysizes_init 15 1 ;
arraysizes_update 15 15 ;
begin init ;
constant 1 1 ; Case 1: PID , Case 0: All shut to 0.0
constant 2 1.9374E-3 ; [2] linear factor for P gain scheduling [-]
constant 3 0 ; [3] linear factor for I gain scheduling [-]
constant 4 1.1029E-4 ; [4] linear factor for D gain scheduling [-]
constant 5 6.6017E-2 ; [5] reference pitch angle for gain scheduling [rad]
constant 6 0.01745 ; [6] Min. pitch angle, below min gain is kept [rad]
constant 7 0.419 ; [7] Max. pitch angle, above max gain is kept [rad]
constant 8 0.1 ; [8] Threshold of "rated power indicator" above which flaps are fully on [-]
; - Operating Times:
constant 9 90.0 ; [9] time for controller to be active [s]
constant 10 1000.0; [10] time for flap to run away: each flap follows given prescribed signals [s]
; - Flap angle when overspeed is detected
constant 11 0.0 ; [11] Flap angle to take when over-speed is detected [deg]
; - Flap servo Parameters: - ;
constant 12 10 ; [12] max flap angle [deg]
constant 13 -10 ; [13] min flap angle [deg]
constant 14 100 ; [14] max flap angle rate [deg/s]
constant 15 0.1 ; [15] flap actuator dynamics time constant [s]
end init ;
begin output;
; - Time - ;
general time ; [1] current simulation time [s]
general deltat ; [2] time step [s]
; - Blade root moments - ;
mbdy momentvec blade1 3 1 blade1 only 1 ; # blade 1 root ; [3] Blade 1 flapwise root moment [kNm]
mbdy momentvec blade2 3 1 blade2 only 1 ; # blade 2 root ; [4] Blade 2 flapwise root moment [kNm]
mbdy momentvec blade3 3 1 blade3 only 1 ; # blade 3 root ; [5] Blade 3 flapwise root moment [kNm]
; - Input from main controller ;
dll inpvec 1 24 ; [6] filtered mean pitch angle [rad]
dll inpvec 1 22 ; [7] Main power control status: 0. normal operation [-]
dll inpvec 1 14 ; [8] Power rating status: 0. below rated power operation 1. above rated power operation[-]
; - Filter setup and PID gains - ;
general constant 0.05 ; [9] corner frequency for blade flapwise moments high-pass filter [rad/s]
general constant 0.00375 ; [10] Proportional gain
general constant 0.0 ; [11] Integral gain
general constant 0.00027688 ; [12] Derivative gain
; -Prescribed signals - ;
general constant 0.0 ; [13] Blade 1 prescribed fixed flap angle [deg]
general constant 0.0 ; [14] Blade 2 prescribed fixed flap angle [deg]
general constant 0.0 ; [15] Blade 3 prescribed fixed flap angle [deg]
end output;
begin actions;
aero beta 1 1 ; [1]
aero beta 2 1 ; [2]
aero beta 3 1 ; [3]
end actions ;
end type2_dll;
end dll;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin output ;
filename ./res/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000 ;
time 100.0 200.0 ;
data_format hawc_binary;
buffer 1 ;
general time;
;
constraint bearing1 shaft_rot 2; angle and angle velocity
constraint bearing2 pitch1 5; angle and angle velocity
constraint bearing2 pitch2 5; angle and angle velocity
constraint bearing2 pitch3 5; angle and angle velocity
aero omega ;
aero torque;
aero power;
aero thrust;
wind free_wind 1 0.0 0.0 -90.0; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
;
mbdy momentvec tower 1 1 tower # tower base ;
mbdy momentvec tower 7 2 tower # yaw bearing ;
mbdy momentvec shaft 4 1 shaft # main bearing ;
mbdy momentvec blade1 2 2 blade1 # blade 1 root ;
mbdy momentvec blade1 9 2 local # blade 1 50% local e coo ;
mbdy momentvec blade2 2 2 blade2 # blade 2 root ;
mbdy momentvec blade2 9 2 local # blade 2 50% local e coo ;
mbdy momentvec blade3 2 2 blade3 # blade 3 root ;
mbdy momentvec blade3 9 2 local # blade 3 50% local e coo ;
mbdy state pos tower 7 1.0 global # tower top flange position ;
mbdy state acc tower 7 1.0 global # tower top flange position ;
mbdy state pos tower 3 1.0 global # tower approx tip height ;
mbdy state pos blade1 18 1.0 blade1 # blade 1 tip pos ;
mbdy state pos blade2 18 1.0 blade2 # blade 2 tip pos ;
mbdy state pos blade3 18 1.0 blade3 # blade 3 tip pos ;
mbdy state pos blade1 18 1.0 global # blade 1 tip pos ;
mbdy state pos blade2 18 1.0 global # blade 2 tip pos ;
mbdy state pos blade3 18 1.0 global # blade 3 tip pos ;
;
aero windspeed 3 1 1 63.0; wind seen from the blade: coo(1=local ae,2=blade,3=global,4=rotor polar), blade number, component xyz, blade radius
aero windspeed 3 1 2 63.0;
aero windspeed 3 1 3 63.0;
aero alfa 1 45.0;
aero alfa 2 45.0;
aero alfa 3 45.0;
aero cl 1 45.0 ;
aero cl 2 45.0 ;
aero cl 3 45.0 ;
;
; Input to controller
; dll outvec 1 1 # time;
; dll outvec 1 2 # slow speed shaft rad/s;
; dll outvec 1 3 # pitch angle 1;
; dll outvec 1 4 # pitch angle 2;
; dll outvec 1 5 # pitch angle 3;
; dll outvec 1 6 # WSP_x_global;
; dll outvec 1 7 # WSP_y_global;
; dll outvec 1 8 # WSP_z_global;
; dll outvec 1 9 # Elec. pwr ;
; dll outvec 1 10 # Grid flag ;
; Output from controller
dll inpvec 1 1 # Generator torque reference [Nm] ;
dll inpvec 1 2 # Pitch angle reference of blade 1 [rad] ;
dll inpvec 1 3 # Pitch angle reference of blade 2 [rad] ;
dll inpvec 1 4 # Pitch angle reference of blade 3 [rad] ;
; dll inpvec 1 5 # Power reference [W] ;
; dll inpvec 1 6 # Filtered wind speed [m/s] ;
; dll inpvec 1 7 # Filtered rotor speed [rad/s];
; dll inpvec 1 8 # Filtered rotor speed error for torque [rad/s];
; dll inpvec 1 9 # Bandpass filtered rotor speed [rad/s];
; dll inpvec 1 10 # Proportional term of torque contr. [Nm] ;
; dll inpvec 1 11 # Integral term of torque controller [Nm] ;
; dll inpvec 1 12 # Minimum limit of torque [Nm] ;
; dll inpvec 1 13 # Maximum limit of torque [Nm] ;
dll inpvec 1 14 # Torque limit switch based on pitch [-] ;
; dll inpvec 1 15 # Filtered rotor speed error for pitch [rad/s];
; dll inpvec 1 16 # Power error for pitch [W] ;
; dll inpvec 1 17 # Proportional term of pitch controller [rad] ;
; dll inpvec 1 18 # Integral term of pitch controller [rad] ;
; dll inpvec 1 19 # Minimum limit of pitch [rad] ;
; dll inpvec 1 20 # Maximum limit of pitch [rad] ;
dll inpvec 1 21 # Torque reference from DT dammper [Nm] ;
dll inpvec 1 22 # Status signal [-] ;
; dll inpvec 1 23 # Total added pitch rate [rad/s] ;
dll inpvec 1 25 # Flag for mechnical brake [0=off/1=on] ;
dll inpvec 1 26 # Flag for emergency pitch stop [0=off/1=on] ;
; ; Output to generator model
; dll outvec 2 1 # time ;
; dll outvec 2 2 # Electrical torque reference [Nm] ;
; dll outvec 2 3 # omega LSS ;
; Input from generator model
dll inpvec 3 1 # Mgen LSS [Nm];
dll inpvec 3 2 # Pelec W ;
dll inpvec 3 3 # Mframe ;
dll inpvec 3 4 # Mgen HSS ;
dll inpvec 3 5 # Generator Pmech kW ;
dll inpvec 3 6 # Filtered Gen speed ;
dll inpvec 3 7 # Elec. pwr ;
dll inpvec 3 8 # Grid flag ;
; Output to mechanical brake
dll inpvec 4 1 # Brake torque [Nm] ;
; ; Input to mechanical brake
; dll outvec 3 1 # Time [s] ;
; dll outvec 3 2 # Generator LSS speed [rad/s] ;
; dll outvec 3 3 # Deploy brake ;
; ; Output to pitch servo
; dll outvec 4 1 # time;
; dll outvec 4 2 # pitchref 1;
; dll outvec 4 3 # pitchref 2;
; dll outvec 4 4 # pitchref 3;
; dll outvec 4 5 # Emerg. stop;
; Input from pitch servo
dll inpvec 5 1 # pitch 1;
dll inpvec 5 2 # pitch 2;
dll inpvec 5 3 # pitch 3;
; Check tower clearence
dll inpvec 6 1 # Bltip tow min d [m];
; - Check on flap control:
aero beta 1 1 ;
aero beta 2 1 ;
aero beta 3 1 ;
end output;
;
exit;
\ No newline at end of file
; DTU_10MW_RWT, cpav, 17th Friday 2015
;
begin simulation;
time_stop 100;
solvertype 1; (newmark)
on_no_convergence continue;
convergence_limits 1E3 1.0 1E-7; ; . to run again, changed 07/11
logfile ./logfiles/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004.log;
visualization ./visualization/dlc12_wsp10_wdir000_s1004.hdf5;
animation ./animation/structure_aero_control_turb.dat;
begin newmark;
deltat 0.02;
end newmark;
end simulation;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
begin new_htc_structure;
;--------------------------------------------------------------------------------------------------
beam_output_file_name ./res_eigen/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_wsp10_wdir000_s1004_beam.dat;
body_output_file_name ./res_eigen/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_wsp10_wdir000_s1004_body.dat;
struct_inertia_output_file_name ./res_eigen/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_wsp10_wdir000_s1004_struct.dat;
body_eigenanalysis_file_name ./res_eigen/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_wsp10_wdir000_s1004_body_eigen.dat;
structure_eigenanalysis_file_name ./res_eigen/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004/dlc12_wsp10_wdir000_s1004_strc_eigen.dat;
;---------------------------------------------------------------------------------------------------
begin main_body; tower 115m
name tower;
type timoschenko;
nbodies 1;
node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 4.12E-03 4.12E-03 4.5E-04; Mx My Mz Kx Ky Kz , M´s raises overall level, K´s raises high freguency level "tuned by Larh"
begin timoschenko_input;
filename ./data/DTU_10MW_RWT_Tower_st.dat;
set 1 2;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 11;
sec 1 0 0 0.00 0; x,y,z,twist
sec 2 0 0 -11.50 0;
sec 3 0 0 -23.00 0;
sec 4 0 0 -34.50 0;
sec 5 0 0 -46.00 0;
sec 6 0 0 -57.50 0;
sec 7 0 0 -69.00 0;
sec 8 0 0 -80.50 0;
sec 9 0 0 -92.00 0;
sec 10 0 0 -103.50 0;
sec 11 0 0 -115.63 0;
end c2_def;
end main_body;
;
begin main_body;
name towertop;
type timoschenko;
nbodies 1;
node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 7.00E-03 7.00E-03 7.00E-03; "changed by Larh"
concentrated_mass 2.0 0.0 2.6870E+00 3.0061E-01 4.4604E+05 4.1060E+06 4.1060E+05 4.1060E+06; Nacelle mass and inertia "corrected by Anyd 25/4/13"
begin timoschenko_input;
filename ./data/DTU_10MW_RWT_Towertop_st.dat;
set 1 2;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 2;
sec 1 0.0 0.0 0.0 0.0; x,y,z,twist
sec 2 0.0 0.0 -2.75 0.0;
end c2_def;
end main_body;
;
begin main_body;
name shaft;
type timoschenko;
nbodies 1;
node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 4.65E-04 4.65E-04 3.983E-03; "tuned by Anyd 23/5/13 to 31.45 log decr. damping for free free with stiff rotor and tower"
concentrated_mass 1.0 0.0 0.0 0.0 0.0 0.0 0.0 3.751E+06; generator equivalent slow shaft "re_tuned by Anyd 20/2/13"
concentrated_mass 5.0 0.0 0.0 0.0 1.0552E+05 0.0 0.0 3.257E+05; hub mass and inertia; "re_tuned by Anyd 20/2/13"
begin timoschenko_input;
filename ./data/DTU_10MW_RWT_Shaft_st.dat;
set 1 1;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 5;
sec 1 0.0 0.0 0.0 0.0; Tower top x,y,z,twist
sec 2 0.0 0.0 -1.5 0.0;
sec 3 0.0 0.0 -3.0 0.0;
sec 4 0.0 0.0 -4.4 0.0; Main bearing
sec 5 0.0 0.0 -7.1 0.0; Rotor centre
end c2_def;
end main_body;
;
begin main_body;
name hub1;
type timoschenko;
nbodies 1;
node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 3.00E-06 3.00E-06 2.00E-05; "changed by Larh"
begin timoschenko_input;
filename ./data/DTU_10MW_RWT_Hub_st.dat;
set 1 2;
end timoschenko_input;
begin c2_def; Definition of centerline (main_body coordinates)
nsec 2;
sec 1 0.0 0.0 0.0 0.0; x,y,z,twist
sec 2 0.0 0.0 2.8 0.0;
end c2_def;
end main_body;
;
begin main_body;
name hub2;
copy_main_body hub1;
end main_body;
;
begin main_body;
name blade1;
type timoschenko;
nbodies 10;
node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 0.00153 0.00255 0.00033;
begin timoschenko_input;
filename data/2Bdown-rR1.08_blade_st.dat;
set 1 1;
end timoschenko_input;
begin c2_def;
nsec 20;
sec 1 -6.48506643395348917053e-16 5.04432273032044074237e-05 2.39808173319033927116e-16 -1.02444066874147825530e+01;
sec 2 -1.77803489746453341307e-03 1.40884010924257948444e-02 4.94005896339658523431e+00 -1.03091808614494873098e+01;
sec 3 -1.29212241029686869531e-01 5.79344574853726257402e-02 1.04152655253544850211e+01 -1.03512581325657002651e+01;
sec 4 -6.50220227984423693179e-01 1.59254321735797399473e-01 1.63759726688984237342e+01 -8.39274960342848785899e+00;
sec 5 -1.10016152136135403339e+00 2.09976513503588618770e-01 2.27401393284814510309e+01 -5.29939281517982863079e+00;
sec 6 -1.27609842156438824112e+00 2.52497605662293733708e-01 2.93954065626978966463e+01 -3.67457815074469085204e+00;
sec 7 -1.26200198053285372879e+00 3.08809307184219228315e-01 3.62056325665537315217e+01 -2.38384593727400062591e+00;
sec 8 -1.12902484623288623666e+00 3.89613109385942235630e-01 4.30213648789366942538e+01 -1.07640254791781408983e+00;
sec 9 -9.75642487443318273677e-01 5.00517978918732286964e-01 4.96926697536713462000e+01 3.99910621631581308932e-01;
sec 10 -8.30703689432845115981e-01 6.43627562673231068402e-01 5.60820487321786202983e+01 1.90120197901677179253e+00;
sec 11 -7.03732321571815977457e-01 8.14873082490295441715e-01 6.20751462106500326854e+01 3.28366369604164543006e+00;
sec 12 -5.97896788566067871606e-01 1.00643157409663430712e+00 6.75876008339258476099e+01 4.46194140922395110493e+00;
sec 13 -5.12851158579595400866e-01 1.20836579160246815334e+00 7.25674388984144798087e+01 5.41647291969291710956e+00;
sec 14 -4.46215476488487916562e-01 1.41156599583795405728e+00 7.69934419594975452128e+01 6.17190016755864956366e+00;
sec 15 -3.94337497995550290142e-01 1.60817569136336380176e+00 8.08706180936091385547e+01 6.77035476874162256422e+00;
sec 16 -3.51792123394631617295e-01 1.79298858887296819198e+00 8.42241469170983663162e+01 7.23511092753480955508e+00;
sec 17 -3.07790697631454057692e-01 1.96360524492743881986e+00 8.70930265569473078813e+01 7.57092772105627531687e+00;
sec 18 -2.56218346285707054832e-01 2.11879327890513113886e+00 8.95242977444024887745e+01 7.76961278403044897090e+00;
sec 19 -1.94041837542441558684e-01 2.25830640717902486614e+00 9.15683243220642566484e+01 7.83441475282797217261e+00;
sec 20 -1.24300073691619730742e-01 2.38167115113771243884e+00 9.32752800000000092950e+01 7.79502842679776009049e+00;
end c2_def;
end main_body;
begin main_body;
name blade2;
copy_main_body blade1;
end main_body;
;-------------------------------------------------------------------------------------------------------------------------------
;
begin orientation;
begin base;
body tower;
inipos 0.0 0.0 0.0; initial position of node 1
body_eulerang 0.0 0.0 0.0;
end base;
;
begin relative;
body1 tower last;
body2 towertop 1;
body2_eulerang 0.0 0.0 0.0;
end relative;
;
begin relative;
body1 towertop last;
body2 shaft 1;
body2_eulerang 90.0 0.0 0.0;
body2_eulerang -5.0 0.0 0.0; 5 deg tilt angle
body2_eulerang 0.0 0.0 0;
mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.5; mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.5;
end relative;
;
begin relative;
body1 shaft last;
body2 hub1 1;
body2_eulerang -90.000000 0.000000 0.000000;
;body2_eulerang 0.000000 0.000000 0.000000;
; body2_eulerang 2.500000 0.000000 0.000000;
end relative;
begin relative;
body1 shaft last;
body2 hub2 1;
body2_eulerang -90.000000 0.000000 0.000000;
body2_eulerang 0.000000 180.000000 0.000000;
; body2_eulerang 2.500000 0.000000 0.000000;
end relative;
begin relative;
body1 hub1 last;
body2 blade1 1;
body2_eulerang 0.000000 0.000000 0.000000;
end relative;
begin relative;
body1 hub2 last;
body2 blade2 1;
body2_eulerang 0.000000 0.000000 0.000000;
end relative;
end orientation;
;-------------------------------------------------------------------------------------------------------------------------------
begin constraint;
;
begin fix0; fixed to ground in translation and rotation of node 1
body tower;
end fix0;
;
begin fix1; tower towertop
body1 tower last;
body2 towertop 1;
end fix1;
begin fix1; shaft hub
body1 shaft last;
body2 hub1 1;
end fix1;
begin fix1;
body1 shaft last;
body2 hub2 1;
end fix1;
;
begin bearing1; free bearing
name shaft_rot;
body1 towertop last;
body2 shaft 1;
bearing_vector 2 0.0 0.0 -1.0; x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
end bearing1;
;
; begin bearing3; free bearing
; name shaft_rot;
; body1 towertop last;
; body2 shaft 1;
; bearing_vector 2 0.0 0.0 -1.0; x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
; omegas 0.0;
; end bearing3;
;
begin bearing2;
name pitch1;
body1 hub1 last;
body2 blade1 1;
bearing_vector 2 0.000 0.000 -1.000;
end bearing2;
begin bearing2;
name pitch2;
body1 hub2 last;
body2 blade2 1;
bearing_vector 2 0.000 0.000 -1.000;
end bearing2;
end constraint;
end new_htc_structure;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
begin wind;
density 1.225;
wsp 10;
tint 0.2096;
horizontal_input 1;
windfield_rotations 0 0.0 0.0; yaw, tilt, rotation
center_pos0 0.0 0.0 -119; hub heigth
shear_format 3 0.2;
turb_format 1; 0=none, 1=mann,2=flex
tower_shadow_method 3; 0=none, 1=potential flow, 2=jet
scale_time_start 0;
wind_ramp_factor 0.0 100 0.8 1.0;
; iec_gust;
;
; wind_ramp_abs 400.0 401.0 0.0 1.0; wsp. after the step: 5.0
; wind_ramp_abs 501.0 502.0 0.0 1.0; wsp. after the step: 6.0
; wind_ramp_abs 602.0 603.0 0.0 1.0; wsp. after the step: 7.0
; wind_ramp_abs 703.0 704.0 0.0 1.0; wsp. after the step: 8.0
; wind_ramp_abs 804.0 805.0 0.0 1.0; wsp. after the step: 9.0
; wind_ramp_abs 905.0 906.0 0.0 1.0; wsp. after the step: 10.0
; wind_ramp_abs 1006.0 1007.0 0.0 1.0; wsp. after the step: 11.0
; wind_ramp_abs 1107.0 1108.0 0.0 1.0; wsp. after the step: 12.0
; wind_ramp_abs 1208.0 1209.0 0.0 1.0; wsp. after the step: 13.0
; wind_ramp_abs 1309.0 1310.0 0.0 1.0; wsp. after the step: 14.0
; wind_ramp_abs 1410.0 1411.0 0.0 1.0; wsp. after the step: 15.0
; wind_ramp_abs 1511.0 1512.0 0.0 1.0; wsp. after the step: 16.0
; wind_ramp_abs 1612.0 1613.0 0.0 1.0; wsp. after the step: 17.0
; wind_ramp_abs 1713.0 1714.0 0.0 1.0; wsp. after the step: 18.0
; wind_ramp_abs 1814.0 1815.0 0.0 1.0; wsp. after the step: 19.0
; wind_ramp_abs 1915.0 1916.0 0.0 1.0; wsp. after the step: 20.0
; wind_ramp_abs 2016.0 2017.0 0.0 1.0; wsp. after the step: 21.0
; wind_ramp_abs 2117.0 2118.0 0.0 1.0; wsp. after the step: 22.0
; wind_ramp_abs 2218.0 2219.0 0.0 1.0; wsp. after the step: 23.0
; wind_ramp_abs 2319.0 2320.0 0.0 1.0; wsp. after the step: 24.0
; wind_ramp_abs 2420.0 2421.0 0.0 1.0; wsp. after the step: 25.0
;
begin mann;
create_turb_parameters 29.4 1.0 3.9 1004 1.0; L, alfaeps, gamma, seed, highfrq compensation
filename_u ./turb/turb_wsp10_s1004u.bin;
filename_v ./turb/turb_wsp10_s1004v.bin;
filename_w ./turb/turb_wsp10_s1004w.bin;
box_dim_u 1024 0.8544921875;
box_dim_v 32 6.5;
box_dim_w 32 6.5;
std_scaling 1.0 0.7 0.5;
end mann;
;
begin tower_shadow_potential_2;
tower_mbdy_link tower;
nsec 2;
radius 0.0 4.15;
radius 115.63 2.75; (radius)
end tower_shadow_potential_2;
end wind;
;
begin aerodrag;
begin aerodrag_element;
mbdy_name tower;
aerodrag_sections uniform 10;
nsec 2;
sec 0.0 0.6 8.3; tower bottom
sec 115.63 0.6 5.5; tower top (diameter)
end aerodrag_element;
;
begin aerodrag_element; Nacelle drag side
mbdy_name shaft;
aerodrag_sections uniform 2;
nsec 2;
sec 0.0 0.8 10.0;
sec 7.01 0.8 10.0;
end aerodrag_element;
end aerodrag;
;
begin aero;
nblades 2;
hub_vec shaft -3; rotor rotation vector (normally shaft composant directed from pressure to sustion side)
link 1 mbdy_c2_def blade1;
link 2 mbdy_c2_def blade2;
; link 3 mbdy_c2_def blade3;
ae_filename ./data/2Bdown-rR1.08_ae.dat;
pc_filename ./data/2Bup_AEP095_pc.dat;
induction_method 1; 0=none, 1=normal
aerocalc_method 1; 0=ingen aerodynamic, 1=med aerodynamic
aerosections 50; def. 50
ae_sets 1 1 1;
tiploss_method 1; 0=none, 1=prandtl
dynstall_method 2; 0=none, 1=stig øye method,2=mhh method
;
end aero;
;-------------------------------------------------------------------------------------------------
begin dll;
;
begin type2_dll;
name risoe_controller;
filename ./control/risoe_controller.dll;
dll_subroutine_init init_regulation;
dll_subroutine_update update_regulation;
arraysizes_init 52 1;
arraysizes_update 12 100;
begin init;
; Overall parameters
constant 1 10000.0; Rated power [kW]
constant 2 0.628; Minimum rotor speed [rad/s]
constant 3 1.005; Rated rotor speed [rad/s]
constant 4 15.6E+06; Maximum allowable generator torque [Nm]
constant 5 110.0; Minimum pitch angle, theta_min [deg],
; if |theta_min|>90, then a table of <wsp,theta_min> is read;
; from a file named 'wptable.n', where n=int(theta_min)
constant 6 82.0; Maximum pitch angle [deg]
constant 7 10.0; Maximum pitch velocity operation [deg/s]
constant 8 0.4; Frequency of generator speed filter [Hz]
constant 9 0.7; Damping ratio of speed filter [-]
constant 10 2.42; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
; Partial load control parameters
constant 11 0.108212E+08; Optimal Cp tracking K factor [Nm/(rad/s)^2],;
; Qg=K*Omega^2, K=eta*0.5*rho*A*Cp_opt*R^3/lambda_opt^3
constant 12 3.237E+07; Proportional gain of torque controller [Nm/(rad/s)]
constant 13 7.263E+06; Integral gain of torque controller [Nm/rad]
constant 14 0.0; Differential gain of torque controller [Nm/(rad/s^2)]
; Full load control parameters
constant 15 2; Generator control switch [1=constant power, 2=constant torque]
constant 16 5.525E-01; Proportional gain of pitch controller [rad/(rad/s)]
constant 17 1.817E-01; Integral gain of pitch controller [rad/rad]
constant 18 0.0; Differential gain of pitch controller [rad/(rad/s^2)]
constant 19 0.4e-8; Proportional power error gain [rad/W]
constant 20 0.4e-8; Integral power error gain [rad/(Ws)]
constant 21 1.113E+01; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
constant 22 4.791E+02; Coefficient of quadratic term in aerodynamic gain scheduling, KK2 [deg^2] &
; (if zero, KK1 = pitch angle at double gain)
constant 23 1.3; Relative speed for double nonlinear gain [-]
; Cut-in simulation parameters
constant 24 -1; Cut-in time [s]
constant 25 1.0; Time delay for soft start of torque [1/1P]
; Cut-out simulation parameters
constant 26 -1; Cut-out time [s]
constant 27 5.0; Time constant for linear torque cut-out [s]
constant 28 1; Stop type [1=normal, 2=emergency]
constant 29 1.0; Time delay for pitch stop after shut-down signal [s]
constant 30 3; Maximum pitch velocity during initial period of stop [deg/s]
constant 31 3.0; Time period of initial pitch stop phase [s] (maintains pitch speed specified in constant 30)
constant 32 4; Maximum pitch velocity during final phase of stop [deg/s]
; Expert parameters (keep default values unless otherwise given)
constant 33 2.0; Lower angle above lowest minimum pitch angle for switch [deg]
constant 34 2.0; Upper angle above lowest minimum pitch angle for switch [deg], if equal then hard switch
constant 35 95.0; Ratio between filtered speed and reference speed for fully open torque limits [%]
constant 36 2.0; Time constant of 1st order filter on wind speed used for minimum pitch [1/1P]
constant 37 1.0; Time constant of 1st order filter on pitch angle used for gain scheduling [1/1P]
; Drivetrain damper
constant 38 0.0; Proportional gain of active DT damper [Nm/(rad/s)], requires frequency in input 10
; Over speed
constant 39 250.0; Overspeed percentage before initiating turbine controller alarm (shut-down) [%]
; Additional non-linear pitch control term (not used when all zero)
constant 40 0.0; Err0 [rad/s]
constant 41 0.0; ErrDot0 [rad/s^2]
constant 42 0.0; PitNonLin1 [rad/s]
; Storm control command
constant 43 28.0; Wind speed 'Vstorm' above which derating of rotor speed is used [m/s]
constant 44 28.0; Cut-out wind speed (only used for derating of rotor speed in storm) [m/s]
; Safety system parameters
constant 45 300.0; Overspeed percentage before initiating safety system alarm (shut-down) [%]
constant 46 1.5; Max low-pass filtered tower top acceleration level [m/s^2] - max in DLC 1.3=1.1 m/s^2
; Turbine parameter
constant 47 192.19808; Nominal rotor diameter [m]
; Parameters for rotor inertia reduction in variable speed region
constant 48 0.0; Proportional gain on rotor acceleration in variable speed region [Nm/(rad/s^2)] (not used when zero)
; Parameters for alternative partial load controller with PI regulated TSR tracking
constant 49 0.0; Optimal tip speed ratio [-] (only used when K=constant 11 = 0 otherwise Qg=K*Omega^2 is used)
; Parameters for adding aerodynamic drivetrain damping on gain scheduling
constant 50 0.0; Proportional gain of aerodynamic DT damping [Nm/(rad/s)]
constant 51 0.0; Coefficient of linear term in aerodynamic DT damping scheduling, KK1 [deg]
constant 52 0.0; Coefficient of quadratic term in aerodynamic DT damping scheduling, KK2 [deg^2]
end init;
;
begin output;
general time; [s]
constraint bearing1 shaft_rot 1 only 2; Drivetrain speed [rad/s]
constraint bearing2 pitch1 1 only 1; [rad]
constraint bearing2 pitch2 1 only 1; [rad]
constraint bearing2 pitch2 1 only 1; [rad] ! Changed from pitch 3 - Keep the line for the output order
wind free_wind 1 0.0 0.0 -119; Global coordinates at hub height
dll inpvec 2 2; Elec. power from generator servo .dll
dll inpvec 2 8; Grid state flag from generator servo .dll
mbdy state acc tower 10 1.0 global only 1; Tower top x-acceleration [m/s^2]
mbdy state acc tower 10 1.0 global only 2; Tower top y-acceleration [m/s^2]
end output;
end type2_dll;
;
begin type2_dll;
name generator_servo;
filename ./control/generator_servo.dll;
dll_subroutine_init init_generator_servo;
dll_subroutine_update update_generator_servo;
arraysizes_init 7 1;
arraysizes_update 4 8;
begin init;
constant 1 20.0; Frequency of 2nd order servo model of generator-converter system [Hz]
constant 2 0.9; Damping ratio 2nd order servo model of generator-converter system [-]
constant 3 15.6E+06; Maximum allowable LSS torque (pull-out torque) [Nm]
constant 4 0.94; Generator efficiency [-]
constant 5 1.0; Gearratio [-]
constant 6 0.0; Time for half value in softstart of torque [s]
constant 7 1000; Time for grid loss [s]
end init;
;
begin output;
general time; Time [s]
dll inpvec 1 1; Electrical torque reference [Nm]
constraint bearing1 shaft_rot 1 only 2; Generator LSS speed [rad/s]
mbdy momentvec shaft 1 1 shaft only 3; Shaft moment [kNm] (Qshaft)
end output;
;
begin actions;
mbdy moment_int shaft 1 -3 shaft towertop 2; Generator LSS torque [Nm]
end actions;
end type2_dll;
;
begin type2_dll;
name mech_brake;
filename ./control/mech_brake.dll;
dll_subroutine_init init_mech_brake;
dll_subroutine_update update_mech_brake;
arraysizes_init 7 1;
arraysizes_update 4 6;
begin init;
constant 1 2727252.0; Fully deployed maximum brake torque [Nm]
constant 2 100.0; Parameter alpha used in Q = tanh(omega*alpha), typically 1e2/Omega_nom
constant 3 0.625; Delay time for before brake starts to deploy [s] - from 5MW*1P_5/1P_10
constant 4 0.75; Time for brake to become fully deployed [s]
end init;
;
begin output;
general time; Time [s]
constraint bearing1 shaft_rot 1 only 2; Generator LSS speed [rad/s]
dll inpvec 1 25; Command to deploy mechanical disc brake [0,1]
end output;
;
begin actions;
mbdy moment_int shaft 1 3 shaft towertop 2; Generator LSS torque [Nm]
end actions;
end type2_dll;
;
begin type2_dll;
name servo_with_limits;
filename ./control/servo_with_limits.dll;
dll_subroutine_init init_servo_with_limits;
dll_subroutine_update update_servo_with_limits;
arraysizes_init 10 1;
arraysizes_update 5 9;
begin init;
constant 1 3; Number of blades [-]
constant 2 1.0; Frequency of 2nd order servo model of pitch system [Hz]
constant 3 0.7; Damping ratio 2nd order servo model of pitch system [-]
constant 4 10.0; Max. pitch speed [deg/s]
constant 5 15.0; Max. pitch acceleration [deg/s^2]
constant 6 -5.0; Min. pitch angle [deg]
constant 7 90.0; Max. pitch angle [deg]
constant 8 1000; Time for pitch runaway [s]
constant 9 -1; Time for stuck blade 1 [s]
constant 10 0; Angle of stuck blade 1 [deg]
end init;
begin output;
general time; Time [s]
dll inpvec 1 2; Pitch1 demand angle [rad]
dll inpvec 1 3; Pitch2 demand angle [rad]
dll inpvec 1 4; Pitch3 demand angle [rad]
dll inpvec 1 26; Flag for emergency pitch stop [0=off/1=on]
end output;
;
begin actions;
constraint bearing2 angle pitch1; Angle pitch1 bearing [rad]
constraint bearing2 angle pitch2; Angle pitch2 bearing [rad]
general ignore 1;
end actions;
end type2_dll;
;
; --- DLL for tower-blade tip distance --;
begin type2_dll;
name disttowtip;
filename ./control/towclearsens.dll;
dll_subroutine_init initialize;
dll_subroutine_update update;
arraysizes_init 1 1;
arraysizes_update 12 4;
begin init;
constant 1 3.79; Tower radius close to downward blade tip [m]
end init;
begin output;
mbdy state pos tower 3 0.62 global; [1,2,3]. Tower position: 30.18 m
mbdy state pos blade1 19 1.0 global; [4,5,6]
mbdy state pos blade2 19 1.0 global; [7,8,9]
mbdy state pos blade2 19 1.0 global; [10,11,12]
end output;
end type2_dll;
end dll;
;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin output;
filename ./res/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004;
;time 100 700;
data_format hawc_binary;
buffer 1;
;
general time;
general constant 1.0; constant 1.0 - to mesure activity of flap in terms of displacement
constraint bearing1 shaft_rot 2; angle and angle velocity
constraint bearing2 pitch1 5; angle and angle velocity
constraint bearing2 pitch2 5; angle and angle velocity
; constraint bearing2 pitch3 5; angle and angle velocity
aero omega;
aero torque;
aero power;
aero thrust;
wind free_wind 1 0.0 0.0 -119; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
; Moments:
mbdy momentvec tower 1 1 tower # tower base;
mbdy momentvec tower 10 2 tower # tower yaw bearing;
mbdy momentvec shaft 4 1 shaft # main bearing;
; Displacements and accellerations
mbdy state pos tower 10 1.0 global only 1 # Tower top FA displ;
mbdy state pos tower 10 1.0 global only 2 # Tower top SS displ;
mbdy state acc tower 10 1.0 global only 1 # Tower top FA acc;
mbdy state acc tower 10 1.0 global only 2 # Tower top SS acc;
;
mbdy state pos blade1 19 1.0 global # gl blade 1 tip pos;
mbdy state pos blade2 19 1.0 global # gl blade 2 tip pos;
; mbdy state pos blade3 26 1.0 global # gl blade 3 tip pos;
mbdy state pos blade1 19 1.0 blade1 # blade 1 tip pos;
;
mbdy state pos tower 3 0.62 global; [1,2,3]. Tower position: 30.18 m
; - Monitor Aerodynamics -;
aero windspeed 3 1 1 72.5;
aero alfa 1 72.5;
aero alfa 2 72.5;
aero alfa 3 72.5;
aero cl 1 72.5;
aero cl 2 72.5;
aero cl 3 72.5;
aero cd 1 72.5;
aero cd 2 72.5;
aero cd 3 72.5;
; - Main Controller -
; Output to controller
; dll outvec 1 1 # time;
; dll outvec 1 2 # slow speed shaft rad/s;
; dll outvec 1 3 # pitch angle 1;
; dll outvec 1 4 # pitch angle 2;
; dll outvec 1 5 # pitch angle 3;
; dll outvec 1 6 # WSP_x_global;
; dll outvec 1 7 # WSP_y_global;
; dll outvec 1 8 # WSP_z_global;
; dll outvec 1 9 # Elec. pwr;
; dll outvec 1 10 # Grid flag;
; Input from controller
dll inpvec 1 1 # Generator torque reference [Nm];
dll inpvec 1 2 # Pitch angle reference of blade 1 [rad];
dll inpvec 1 3 # Pitch angle reference of blade 2 [rad];
; dll inpvec 1 4 # Pitch angle reference of blade 3 [rad];
; dll inpvec 1 5 # Power reference [W];
; dll inpvec 1 6 # Filtered wind speed [m/s];
; dll inpvec 1 7 # Filtered rotor speed [rad/s];
; dll inpvec 1 8 # Filtered rotor speed error for torque [rad/s];
; dll inpvec 1 9 # Bandpass filtered rotor speed [rad/s];
; dll inpvec 1 10 # Proportional term of torque contr. [Nm];
; dll inpvec 1 11 # Integral term of torque controller [Nm];
; dll inpvec 1 12 # Minimum limit of torque [Nm];
; dll inpvec 1 13 # Maximum limit of torque [Nm];
dll inpvec 1 14 # Torque limit switch based on pitch [-];
; dll inpvec 1 15 # Filtered rotor speed error for pitch [rad/s];
; dll inpvec 1 16 # Power error for pitch [W];
; dll inpvec 1 17 # Proportional term of pitch controller [rad];
; dll inpvec 1 18 # Integral term of pitch controller [rad];
; dll inpvec 1 19 # Minimum limit of pitch [rad];
; dll inpvec 1 20 # Maximum limit of pitch [rad];
dll inpvec 1 21 # Torque reference from DT dammper [Nm];
dll inpvec 1 22 # Status signal [-];
; dll inpvec 1 23 # Total added pitch rate [rad/s];
dll inpvec 1 24 # Filtered Mean pitch for gain sch [rad];
dll inpvec 1 25 # Flag for mechnical brake [0=off/1=on];
dll inpvec 1 26 # Flag for emergency pitch stop [0=off/1=on];
dll inpvec 1 27 # LP filtered acceleration level [m/s^2];
;; Output to generator model
; dll outvec 2 1 # time;
; dll outvec 2 2 # Electrical torque reference [Nm];
; dll outvec 2 3 # omega LSS;
; Input from generator model
dll inpvec 2 1 # Mgen LSS [Nm];
dll inpvec 2 2 # Pelec W;
dll inpvec 2 3 # Mframe;
dll inpvec 2 4 # Mgen HSS;
dll inpvec 2 5 # Generator Pmech kW;
dll inpvec 2 6 # Filtered Gen speed;
dll inpvec 2 7 # Resulting Eff;
dll inpvec 2 8 # Grid flag;
; Output to mechanical brake
dll inpvec 3 1 # Brake torque [Nm];
;; Input from mechanical brake
; dll outvec 3 1 # Time [s];
; dll outvec 3 2 # Generator LSS speed [rad/s];
; dll outvec 3 3 # Deploy brake;
;; Output to pitch servo
; dll outvec 4 1 # time;
; dll outvec 4 2 # pitchref 1;
; dll outvec 4 3 # pitchref 2;
; dll outvec 4 4 # pitchref 3;
; dll outvec 4 5 # Emerg. stop;
; Input from pitch servo
dll inpvec 4 1 # pitch 1;
dll inpvec 4 2 # pitch 2;
; dll inpvec 4 3 # pitch 3;
; Check tower clearence
dll inpvec 5 1 # Bltip tow min d [m];
; - Check on flap control:
;; - From flap controller: -
; dll type2_dll cyclic_flap_controller inpvec 1 # Ref flap signal bl 1 [deg];
; dll type2_dll cyclic_flap_controller inpvec 2 # Ref flap signal bl 2 [deg];
; dll type2_dll cyclic_flap_controller inpvec 3 # Ref flap signal bl 3 [deg];
;; - Mbc values
; dll type2_dll cyclic_flap_controller inpvec 4 # momvec mbc cos [kNm];
; dll type2_dll cyclic_flap_controller inpvec 5 # momvec mbc sin [kNm];
; dll type2_dll cyclic_flap_controller inpvec 6 # momvec mbc filt cos [kNm];
; dll type2_dll cyclic_flap_controller inpvec 7 # momvec mbc filt sin [kNm];
; dll type2_dll cyclic_flap_controller inpvec 8 # flap mbc cos [deg];
; dll type2_dll cyclic_flap_controller inpvec 9 # flap mbc sin [deg];
;; - Check Gains -;
; dll type2_dll cyclic_flap_controller inpvec 10 # lead angle [deg];
; dll type2_dll cyclic_flap_controller inpvec 11 # scaling on rat pow [-];
; dll type2_dll cyclic_flap_controller inpvec 12 # actual kp [deg/kNm];
; dll type2_dll cyclic_flap_controller inpvec 13 # actual ki [deg/kNms];
; dll type2_dll cyclic_flap_controller inpvec 14 # actual kd [deg s/kNm];
;; - Actual deflections -
; aero beta 1 1;
; aero beta 2 1;
; aero beta 3 1;
;; - Mbc values
; dll type2_dll cyclic_flap_controller inpvec 4 # momvec mbc cos [kNm];
; dll type2_dll cyclic_flap_controller inpvec 5 # momvec mbc sin [kNm];
; dll type2_dll cyclic_flap_controller inpvec 6 # momvec mbc filt cos [kNm];
; dll type2_dll cyclic_flap_controller inpvec 7 # momvec mbc filt sin [kNm];
; dll type2_dll cyclic_flap_controller inpvec 8 # flap mbc cos [deg];
; dll type2_dll cyclic_flap_controller inpvec 9 # flap mbc sin [deg];
; sectional blade loads
mbdy forcevec blade1 1 1 local # blade 1 local e coo;
mbdy forcevec blade1 2 1 local # blade 1 local e coo;
mbdy forcevec blade1 3 1 local # blade 1 local e coo;
mbdy forcevec blade1 4 1 local # blade 1 local e coo;
mbdy forcevec blade1 5 1 local # blade 1 local e coo;
mbdy forcevec blade1 6 1 local # blade 1 local e coo;
mbdy forcevec blade1 7 1 local # blade 1 local e coo;
mbdy forcevec blade1 8 1 local # blade 1 local e coo;
mbdy forcevec blade1 9 1 local # blade 1 local e coo;
mbdy forcevec blade1 10 1 local # blade 1 local e coo;
mbdy forcevec blade1 11 1 local # blade 1 local e coo;
mbdy forcevec blade1 12 1 local # blade 1 local e coo;
mbdy forcevec blade1 13 1 local # blade 1 local e coo;
mbdy forcevec blade1 14 1 local # blade 1 local e coo;
mbdy forcevec blade1 15 1 local # blade 1 local e coo;
mbdy forcevec blade1 16 1 local # blade 1 local e coo;
mbdy forcevec blade1 17 1 local # blade 1 local e coo;
mbdy forcevec blade1 18 1 local # blade 1 local e coo;
mbdy forcevec blade1 19 1 local # blade 1 local e coo;
mbdy forcevec blade1 19 2 local # blade 1 local e coo;
mbdy momentvec blade1 1 1 local # blade 1 local e coo;
mbdy momentvec blade1 2 1 local # blade 1 local e coo;
mbdy momentvec blade1 3 1 local # blade 1 local e coo;
mbdy momentvec blade1 4 1 local # blade 1 local e coo;
mbdy momentvec blade1 5 1 local # blade 1 local e coo;
mbdy momentvec blade1 6 1 local # blade 1 local e coo;
mbdy momentvec blade1 7 1 local # blade 1 local e coo;
mbdy momentvec blade1 8 1 local # blade 1 local e coo;
mbdy momentvec blade1 9 1 local # blade 1 local e coo;
mbdy momentvec blade1 10 1 local # blade 1 local e coo;
mbdy momentvec blade1 11 1 local # blade 1 local e coo;
mbdy momentvec blade1 12 1 local # blade 1 local e coo;
mbdy momentvec blade1 13 1 local # blade 1 local e coo;
mbdy momentvec blade1 14 1 local # blade 1 local e coo;
mbdy momentvec blade1 15 1 local # blade 1 local e coo;
mbdy momentvec blade1 16 1 local # blade 1 local e coo;
mbdy momentvec blade1 17 1 local # blade 1 local e coo;
mbdy momentvec blade1 18 1 local # blade 1 local e coo;
mbdy momentvec blade1 19 1 local # blade 1 local e coo;
mbdy momentvec blade1 19 2 local # blade 1 local e coo;
mbdy forcevec blade1 1 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 2 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 3 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 4 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 5 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 6 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 7 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 8 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 9 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 10 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 11 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 12 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 13 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 14 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 15 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 16 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 17 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 18 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 19 1 blade1 # blade 1 blade1 e coo;
mbdy forcevec blade1 19 2 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 1 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 2 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 3 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 4 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 5 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 6 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 7 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 8 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 9 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 10 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 11 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 12 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 13 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 14 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 15 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 16 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 17 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 18 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 19 1 blade1 # blade 1 blade1 e coo;
mbdy momentvec blade1 19 2 blade1 # blade 1 blade1 e coo;
end output;
begin output_at_time aero 15;
filename ./res/rotor_check_inipos;
alfa 1;
end output_at_time;
begin output_at_time aero 15;
filename ./res/rotor_check_inipos2;
alfa 1;
end output_at_time;
;
exit;
\ No newline at end of file
; DTU_10MW_RWT, cpav, 17th Friday 2015
;
begin simulation;
time_stop 100;
solvertype 1; (newmark)
on_no_convergence continue;
convergence_limits 1E3 1.0 1E-7; ; . to run again, changed 07/11
logfile ./logfiles/dlc12_iec61400-1ed3/dlc12_wsp10_wdir000_s1004.log;
visualization ./visualization/dlc12_wsp10_wdir000_s1004.hdf5;
animation ./animation/structure_aero_control_turb.dat;
begin newmark;
deltat 0.02;
end newmark;
end simulation;
;
begin output_at_time aero 15;
filename ./res/rotor_check_inipos;
alfa 1;
end output_at_time;
;
exit;
\ No newline at end of file
begin simulation;
time_stop 200;
end simulation;
begin dll;
;
begin type2_dll;
name risoe_controller;
begin output;
general time; [s]
constraint bearing1 shaft_rot 1 only 2; Drivetrain speed [rad/s]
end output;
end type2_dll;
begin type2_dll;
name risoe_controller2;
begin output;
general time; [s]
constraint bearing1 shaft_rot 1 only 2; Drivetrain speed [rad/s]
end output;
end type2_dll;
end dll;
begin output;
filename ./res/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000;
time 100 200;
general time;
end output;
exit;
begin simulation;
time_stop 200;
end simulation;
begin dll;
;
begin type2_dll;
name risoe_controller;
begin output;
general time; [s]
constraint bearing1 shaft_rot 1 only 2; Drivetrain speed [rad/s]
end output;
end type2_dll;
begin type2_dll;
name risoe_controller2;
begin output;
general time; [s]
constraint bearing1 shaft_rot 1 only 2; Drivetrain speed [rad/s]
end output;
end type2_dll;
end dll;
begin output;
filename ./res/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000;
time 100 200;
general time;
end output;
exit;
...@@ -143,7 +143,7 @@ def stability_term(z, z0, L): ...@@ -143,7 +143,7 @@ def stability_term(z, z0, L):
return psi return psi
def fit_log_shear(z_u_lst): def fit_log_shear(z_u_lst, include_R=False):
"""Estimate log shear parameter, u_star and z0 """Estimate log shear parameter, u_star and z0
Parameters Parameters
...@@ -173,5 +173,7 @@ def fit_log_shear(z_u_lst): ...@@ -173,5 +173,7 @@ def fit_log_shear(z_u_lst):
z, U = _z_u(z_u_lst) z, U = _z_u(z_u_lst)
a, b = np.polyfit(np.log(z), U, 1) a, b = np.polyfit(np.log(z), U, 1)
kappa = 0.4 kappa = 0.4
return a * kappa, np.exp(-b / a) #, sum((U - (a * np.log(z) + b)) ** 2) if include_R:
return a * kappa, np.exp(-b / a), sum((U - (a * np.log(z) + b)) ** 2)
return a * kappa, np.exp(-b / a)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment