diff --git a/requirements.txt b/requirements.txt
index ebf1ff5c9c85eb5f24336bdb0d21e0f0ca384d12..4f4ab5838748fa63eb598afca49c3f6cd8148ef6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,5 +7,6 @@ pytest
 xlrd
 h5py
 pandas
+tables
 future
 
diff --git a/wetb/fatigue_tools/fatigue.py b/wetb/fatigue_tools/fatigue.py
index e26089ce4f5c6717651908ac1e35ef918d52fb9b..bde2d087b59a418c8fa6040f5a3c126e9330277b 100644
--- a/wetb/fatigue_tools/fatigue.py
+++ b/wetb/fatigue_tools/fatigue.py
@@ -70,7 +70,6 @@ def eq_load(signals, no_bins=46, m=[3, 4, 6, 8, 10, 12], neq=1, rainflow_func=ra
         return [[np.nan] * len(np.atleast_1d(m))] * len(np.atleast_1d(neq))
 
 
-
 def eq_load_and_cycles(signals, no_bins=46, m=[3, 4, 6, 8, 10, 12], neq=[10 ** 6, 10 ** 7, 10 ** 8], rainflow_func=rainflow_windap):
     """Calculate combined fatigue equivalent load
 
@@ -109,7 +108,6 @@ def eq_load_and_cycles(signals, no_bins=46, m=[3, 4, 6, 8, 10, 12], neq=[10 ** 6
     return eq_loads, cycles, ampl_bin_mean, ampl_bin_edges
 
 
-
 def cycle_matrix(signals, ampl_bins=10, mean_bins=10, rainflow_func=rainflow_windap):
     """Markow load cycle matrix
 
@@ -132,7 +130,8 @@ def cycle_matrix(signals, ampl_bins=10, mean_bins=10, rainflow_func=rainflow_win
     Returns
     -------
     cycles : ndarray, shape(ampl_bins, mean_bins)
-        A bi-dimensional histogram of load cycles(full cycles). Amplitudes are histogrammed along the first dimension and mean values are histogrammed along the second dimension.
+        A bi-dimensional histogram of load cycles(full cycles). Amplitudes are\
+        histogrammed along the first dimension and mean values are histogrammed along the second dimension.
     ampl_bin_mean : ndarray, shape(ampl_bins,)
         The average cycle amplitude of the bins
     ampl_edges : ndarray, shape(ampl_bins+1,)
diff --git a/wetb/fatigue_tools/rainflowcounting/rfc_hist.py b/wetb/fatigue_tools/rainflowcounting/rfc_hist.py
deleted file mode 100644
index 65d3c00945c8f97f731af59972c4a8b2f55a7b25..0000000000000000000000000000000000000000
--- a/wetb/fatigue_tools/rainflowcounting/rfc_hist.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from __future__ import division
-from __future__ import unicode_literals
-from __future__ import print_function
-from __future__ import absolute_import
-from future import standard_library
-standard_library.install_aliases()
-import numpy as np
-def rfc_hist(sig_rf, nrbins=46):
-    """Histogram of rainflow counted cycles
-
-    hist, bin_edges, bin_avg = rfc_hist(sig, nrbins=46)
-
-    Divide the rainflow counted cycles of a signal into equally spaced bins.
-
-    Created on Wed Feb 16 16:53:18 2011
-    @author: David Verelst
-    Modified 10.10.2011 by Mads M Pedersen to elimintate __copy__ and __eq__
-
-    Parameters
-    ----------
-    sig_rf : array-like
-        As output by rfc_astm or rainflow
-
-    nrbins : int, optional
-        Divide the rainflow counted amplitudes in a number of equally spaced
-        bins.
-
-    Returns
-    -------
-    hist : array-like
-        Counted rainflow cycles per bin, has nrbins elements
-
-    bin_edges : array-like
-        Edges of the bins, has nrbins+1 elements.
-
-    bin_avg : array-like
-        Average rainflow cycle amplitude per bin, has nrbins elements.
-    """
-
-    rf_half = sig_rf
-
-    # the Matlab approach is to divide into 46 bins
-    bin_edges = np.linspace(0, 1, num=nrbins + 1) * rf_half.max()
-    hist = np.histogram(rf_half, bins=bin_edges)[0]
-    # calculate the average per bin
-    hist_sum = np.histogram(rf_half, weights=rf_half, bins=bin_edges)[0]
-    # replace zeros with one, to avoid 0/0
-    hist_ = hist.copy()
-    hist_[(hist == 0).nonzero()] = 1.0
-    # since the sum is also 0, the avg remains zero for those whos hist is zero
-    bin_avg = hist_sum / hist_
-
-    return hist, bin_edges, bin_avg
diff --git a/wetb/hawc2/Hawc2io.py b/wetb/hawc2/Hawc2io.py
index 2ec8deff39bf036f1879869ac3121dce1b5ecbb6..ac8d28c8d43327f10373873b4521febfaf041434 100644
--- a/wetb/hawc2/Hawc2io.py
+++ b/wetb/hawc2/Hawc2io.py
@@ -90,8 +90,8 @@ class ReadHawc2(object):
         Name = []; Unit = []; Description = [];
         for i in range(0, self.NrCh):
             temp = str(Lines[i + 12][12:43]); Name.append(temp.strip())
-            temp = str(Lines[i + 12][43:48]); Unit.append(temp.strip())
-            temp = str(Lines[i + 12][49:]); Description.append(temp.strip())
+            temp = str(Lines[i + 12][43:54]); Unit.append(temp.strip())
+            temp = str(Lines[i + 12][54:-1]); Description.append(temp.strip())
         self.ChInfo = [Name, Unit, Description]
         # if binary file format, scaling factors are read
         if Format.lower() == 'binary':
diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index dabfe334c84990e5c682a01f753e021b49df7440..164aa1866638be0fce68b42f14bddeb9f5db2f35 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -795,7 +795,7 @@ def prepare_launch(iter_dict, opt_tags, master, variable_tag_func,
     launch(cases, runmethod=runmethod, verbose=verbose, check_log=check_log,
            copyback_turb=copyback_turb, qsub=qsub, wine_appendix=wine_appendix,
            windows_nr_cpus=windows_nr_cpus, short_job_names=short_job_names,
-           pbs_fname_appendix=pbs_fname_appendix)
+           pbs_fname_appendix=pbs_fname_appendix, silent=silent)
 
     return cases
 
@@ -1030,10 +1030,10 @@ def launch(cases, runmethod='local', verbose=False, copyback_turb=True,
     elif runmethod in ['jess','gorm']:
         # create the pbs object
         pbs = PBS(cases, server=runmethod, short_job_names=short_job_names,
-                  pbs_fname_appendix=pbs_fname_appendix, qsub=qsub)
+                  pbs_fname_appendix=pbs_fname_appendix, qsub=qsub,
+                  verbose=verbose, silent=silent)
         pbs.wine_appendix = wine_appendix
         pbs.copyback_turb = copyback_turb
-        pbs.verbose = verbose
         pbs.pbs_out_dir = pbs_out_dir
         pbs.create()
     elif runmethod == 'local':
@@ -1851,8 +1851,8 @@ class PBS(object):
     such as the turbulence file and folder, htc folder and others
     """
 
-    def __init__(self, cases, server='gorm', qsub='time',
-                 pbs_fname_appendix=True, short_job_names=True):
+    def __init__(self, cases, server='gorm', qsub='time', silent=False,
+                 pbs_fname_appendix=True, short_job_names=True, verbose=False):
         """
         Define the settings here. This should be done outside, but how?
         In a text file, paramters list or first create the object and than set
@@ -1882,7 +1882,8 @@ class PBS(object):
 
         """
         self.server = server
-        self.verbose = True
+        self.verbose = verbose
+        self.silent = silent
 
 #        if server == 'thyra':
 #            self.maxcpu = 4
@@ -2182,7 +2183,8 @@ class PBS(object):
                 ended = True
                 # print progress:
                 replace = ((i/self.maxcpu), (i_tot/self.maxcpu), self.walltime)
-                print('pbs script %3i/%i walltime=%s' % replace)
+                if not self.silent:
+                    print('pbs script %3i/%i walltime=%s' % replace)
 
             count2 += 1
             i += 1
@@ -2196,7 +2198,8 @@ class PBS(object):
             self.ending(pbs_path)
             # progress printing
             replace = ( (i/self.maxcpu), (i_tot/self.maxcpu), self.walltime )
-            print('pbs script %3i/%i walltime=%s, partially loaded' % replace)
+            if not self.silent:
+                print('pbs script %3i/%i walltime=%s, partially loaded' % replace)
 #            print 'pbs progress, script '+format(i/self.maxcpu,'2.0f')\
 #                + '/' + format(i_tot/self.maxcpu, '2.0f') \
 #                + ' partially loaded...'
@@ -2451,7 +2454,8 @@ class PBS(object):
 
         cases_fail = {}
 
-        print('checking if all log and result files are present...', end='')
+        if not self.silent:
+            print('checking if all log and result files are present...', end='')
 
         # check for each case if we have results and a log file
         for cname, case in cases.items():
@@ -2473,7 +2477,8 @@ class PBS(object):
             if size_sel < 5 or size_dat < 5:
                 cases_fail[cname] = copy.copy(cases[cname])
 
-        print('done!')
+        if not self.silent:
+            print('done!')
 
         # length will be zero if there are no failures
         return cases_fail
@@ -3828,7 +3833,7 @@ class Cases(object):
                    save=True, m=[3, 4, 6, 8, 10, 12], neq=None, no_bins=46,
                    ch_fatigue={}, update=False, add_sensor=None,
                    chs_resultant=[], i0=0, i1=-1, saveinterval=1000,
-                   csv=True, suffix=None, fatigue_cycles=False, A=None,
+                   csv=True, suffix=None, A=None,
                    ch_wind=None, save_new_sigs=False, xlsx=False):
         """
         Calculate statistics and save them in a pandas dataframe. Save also
@@ -3851,10 +3856,6 @@ class Cases(object):
             needs to be calculated. When set to None, ch_fatigue = ch_sel,
             and hence all channels will have a fatigue analysis.
 
-        fatigue_cycles : Boolean, default=False
-            If True, the cycle matrix, or sum( n_i*S_i^m ), is calculated. If
-            set to False, the 1Hz equivalent load is calculated.
-
         chs_resultant
 
         add_sensor
@@ -4168,12 +4169,13 @@ class Cases(object):
                 signal = self.sig[:,chi]
                 if neq is None:
                     neq = float(case['[duration]'])
-                if not fatigue_cycles:
-                    eq = self.res.calc_fatigue(signal, no_bins=no_bins,
-                                               neq=neq, m=m)
-                else:
-                    eq = self.res.cycle_matrix(signal, no_bins=no_bins, m=m)
+
+                eq = self.res.calc_fatigue(signal, no_bins=no_bins,
+                                           neq=neq, m=m)
+
+                # save in the fatigue results
                 fatigue[ch_id] = {}
+                fatigue[ch_id]['neq'] = neq
                 # when calc_fatigue succeeds, we should have as many items
                 # as in m
                 if len(eq) == len(m):
@@ -4188,6 +4190,7 @@ class Cases(object):
             for m_ in m:
                 tag = 'm=%2.01f' % m_
                 tags_fatigue.append(tag)
+            tags_fatigue.append('neq')
 
             # -----------------------------------------------------------------
             # define the pandas data frame dict on first run
@@ -4408,10 +4411,10 @@ class Cases(object):
                 raise(e)
         return df_dict2
 
-    def fatigue_lifetime(self, dfs, neq, res_dir='res/', fh_lst=None, years=20.,
+    def fatigue_lifetime(self, dfs, neq_life, res_dir='res/', fh_lst=None,
                          dlc_folder="dlc%s_iec61400-1ed3/", extra_cols=[],
                          save=False, update=False, csv=False, new_sim_id=False,
-                         xlsx=False):
+                         xlsx=False, years=20.0):
         """
         Cacluate the fatigue over a selection of cases and indicate how many
         hours each case contributes to its life time.
@@ -4427,7 +4430,7 @@ class Cases(object):
             should only hold the results of one standard organized DLC (one
             turbine, one inflow case).
 
-        neq : float
+        neq_life : float
             Reference number of cycles. Usually, neq is either set to 10e6,
             10e7 or 10e8.
 
@@ -4543,12 +4546,17 @@ class Cases(object):
                 # values of the identifier columns for each case. We do this
                 # in case the original dfs holds multiple DLC cases.
                 dict_Leq[col].append(sel_sort[col].unique()[0])
+
+            # R_eq is usually expressed as the 1Hz equivalent load
+            neq_1hz = sel_sort['neq'].values
+
             for m in ms:
-                # sel_sort[m] holds the cycle_matrices for each of the DLC
+                # sel_sort[m] holds the equivalent loads for each of the DLC
                 # cases: such all the different wind speeds for dlc1.2
-                R_eq = (sel_sort[m].values*np.array(hours)).sum()
+                R_eq_mod = np.power(sel_sort[m].values, m) * neq_1hz
+                tmp = (R_eq_mod*np.array(hours)).sum()
                 # the effective Leq for each of the material constants
-                dict_Leq[m].append(math.pow(R_eq/neq, 1.0/float(m[2:])))
+                dict_Leq[m].append(math.pow(tmp/neq_life, 1.0/float(m[2:])))
                 # the following is twice as slow:
                 # [i*j for (i,j) in zip(sel_sort[m].values.tolist(),hours)]
 
diff --git a/wetb/prepost/dlcdefs.py b/wetb/prepost/dlcdefs.py
index ce8dbc144de91964c096119bf9f4e63159aa1574..747e775320bb335f4f80eaed9063400ff4c4ca81 100644
--- a/wetb/prepost/dlcdefs.py
+++ b/wetb/prepost/dlcdefs.py
@@ -46,7 +46,7 @@ def configure_dirs(verbose=False):
         raise ValueError('Could not find master file in htc/_master')
     MASTERFILE = master
     P_MASTERFILE = os.path.join(P_SOURCE, 'htc%s_master%s' % (os.sep, os.sep))
-    POST_DIR = os.path.join(p_run_root, PROJECT, 'python-prepost-data%s' % os.sep)
+    POST_DIR = os.path.join(p_run_root, PROJECT, 'prepost-data%s' % os.sep)
 
     if verbose:
         print('='*79)
@@ -240,7 +240,7 @@ def tags_defaults(master):
 
 
 def excel_stabcon(proot, fext='xlsx', pignore=None, sheet=0,
-                  pinclude=None):
+                  pinclude=None, silent=False):
     """
     Read all MS Excel files that hold load case definitions according to
     the team STABCON definitions. Save each case in a list according to the
@@ -272,16 +272,20 @@ def excel_stabcon(proot, fext='xlsx', pignore=None, sheet=0,
         first sheet (index=0) is taken.
 
     """
-    print('looking for DLC spreadsheet definitions at:')
-    print(proot)
+    if not silent:
+        print('looking for DLC spreadsheet definitions at:')
+        print(proot)
     df_list = misc.read_excel_files(proot, fext=fext, pignore=pignore,
-                                    sheet=sheet, pinclude=pinclude)
+                                    sheet=sheet, pinclude=pinclude,
+                                    silent=silent)
 
-    print('found %i Excel file(s), ' % len(df_list), end='')
+    if not silent:
+        print('found %i Excel file(s), ' % len(df_list), end='')
     k = 0
     for df in df_list:
         k += len(df)
-    print('in which a total of %s cases are defined.' % k)
+    if not silent:
+        print('in which a total of %s cases are defined.' % k)
 
     opt_tags = []
 
diff --git a/wetb/prepost/dlctemplate.py b/wetb/prepost/dlctemplate.py
index 39d1b00a850dfd6b11ce3bb95c3ba5a39732c572..b6240f46840503754662d6b80b23c03bee436105 100755
--- a/wetb/prepost/dlctemplate.py
+++ b/wetb/prepost/dlctemplate.py
@@ -164,7 +164,7 @@ def variable_tag_func(master, case_id_short=False):
 ### PRE- POST
 # =============================================================================
 
-def launch_dlcs_excel(sim_id):
+def launch_dlcs_excel(sim_id, silent=False):
     """
     Launch load cases defined in Excel files
     """
@@ -175,9 +175,10 @@ def launch_dlcs_excel(sim_id):
     # see if a htc/DLCs dir exists
     dlcs_dir = os.path.join(P_SOURCE, 'htc', 'DLCs')
     if os.path.exists(dlcs_dir):
-        opt_tags = dlcdefs.excel_stabcon(dlcs_dir)
+        opt_tags = dlcdefs.excel_stabcon(dlcs_dir, silent=silent)
     else:
-        opt_tags = dlcdefs.excel_stabcon(os.path.join(P_SOURCE, 'htc'))
+        opt_tags = dlcdefs.excel_stabcon(os.path.join(P_SOURCE, 'htc'),
+                                         silent=silent)
 
     if len(opt_tags) < 1:
         raise ValueError('There are is not a single case defined. Make sure '
@@ -200,7 +201,8 @@ def launch_dlcs_excel(sim_id):
 #    runmethod = 'local-script'
 #    runmethod = 'windows-script'
 #    runmethod = 'jess'
-    master = master_tags(sim_id, runmethod=runmethod)
+    master = master_tags(sim_id, runmethod=runmethod, silent=silent,
+                         verbose=False)
     master.tags['[sim_id]'] = sim_id
     master.output_dirs.append('[Case folder]')
     master.output_dirs.append('[Case id.]')
@@ -219,7 +221,8 @@ def launch_dlcs_excel(sim_id):
                        write_htc=True, runmethod=runmethod, verbose=False,
                        copyback_turb=True, msg='', update_cases=False,
                        ignore_non_unique=False, run_only_new=False,
-                       pbs_fname_appendix=False, short_job_names=False)
+                       pbs_fname_appendix=False, short_job_names=False,
+                       silent=silent)
 
 
 def launch_param(sim_id):
@@ -264,10 +267,10 @@ def launch_param(sim_id):
 
 def post_launch(sim_id, statistics=True, rem_failed=True, check_logs=True,
                 force_dir=False, update=False, saveinterval=2000, csv=False,
-                fatigue_cycles=False, m=[1, 3, 4, 5, 6, 8, 10, 12, 14],
-                neq=1e6, no_bins=46, years=20.0, fatigue=True, nn_twb=1,
-                nn_twt=20, nn_blr=4, A=None, save_new_sigs=False,
-                envelopeturbine=False, envelopeblade=False, save_iter=False):
+                m=[1, 3, 4, 5, 6, 8, 10, 12, 14], neq=1e6, no_bins=46,
+                years=20.0, fatigue=True, nn_twb=1, nn_twt=20, nn_blr=4, A=None,
+                save_new_sigs=False, envelopeturbine=False, envelopeblade=False,
+                save_iter=False, AEP=False):
 
     # =========================================================================
     # check logfiles, results files, pbs output files
@@ -339,12 +342,12 @@ def post_launch(sim_id, statistics=True, rem_failed=True, check_logs=True,
         df_stats = cc.statistics(calc_mech_power=True, i0=i0, i1=i1,
                                  tags=tags, add_sensor=add, ch_fatigue=None,
                                  update=update, saveinterval=saveinterval,
-                                 suffix=suffix, fatigue_cycles=fatigue_cycles,
+                                 suffix=suffix, save_new_sigs=save_new_sigs,
                                  csv=csv, m=m, neq=neq, no_bins=no_bins,
-                                 chs_resultant=chs_resultant, A=A,
-                                 save_new_sigs=save_new_sigs)
+                                 chs_resultant=chs_resultant, A=A)
         # annual energy production
-        df_AEP = cc.AEP(df_stats, csv=csv, update=update, save=True)
+        if AEP:
+            df_AEP = cc.AEP(df_stats, csv=csv, update=update, save=True)
 
     if envelopeblade:
         ch_list = []
@@ -395,6 +398,9 @@ if __name__ == '__main__':
                         dest='stats', help='calculate statistics')
     parser.add_argument('--fatigue', action='store_true', default=False,
                         dest='fatigue', help='calculate Leq for a full DLC')
+    parser.add_argument('--AEP', action='store_true', default=False,
+                        dest='AEP', help='calculate AEP, requires '
+                        'htc/DLCs/dlc_config.xlsx')
     parser.add_argument('--csv', action='store_true', default=False,
                         dest='csv', help='Save data also as csv file')
     parser.add_argument('--years', type=float, default=20.0, action='store',
@@ -429,24 +435,26 @@ if __name__ == '__main__':
     # --plots, --report, --...
 
     # -------------------------------------------------------------------------
-#    # manually configure all the dirs
-#    p_root_remote = '/mnt/hawc2sim'
-#    p_root_local = '/home/dave/DTU/Projects/AVATAR/'
+#    # manually configure paths, HAWC2 model root path is then constructed as
+#    # p_root_remote/PROJECT/sim_id, and p_root_local/PROJECT/sim_id
+#    # adopt accordingly when you have configured your directories differently
+#    p_root_remote = '/mnt/hawc2sim/'
+#    p_root_local = '/mnt/hawc2sim/'
 #    # project name, sim_id, master file name
-#    PROJECT = 'DTU10MW'
-#    sim_id = 'C0014'
-#    MASTERFILE = 'dtu10mw_master_C0014.htc'
+#    PROJECT = 'demo'
+#    sim_id = 'A0001'
+#    MASTERFILE = 'dtu10mw_avatar_master_A0001.htc'
 #    # MODEL SOURCES, exchanche file sources
 #    P_RUN = os.path.join(p_root_remote, PROJECT, sim_id+'/')
-#    P_SOURCE = os.path.join(p_root_local, PROJECT)
+#    P_SOURCE = os.path.join(p_root_local, PROJECT, sim_id)
 #    # location of the master file
-#    P_MASTERFILE = os.path.join(p_root_local, PROJECT, 'htc', '_master/')
+#    P_MASTERFILE = os.path.join(p_root_local, PROJECT, sim_id, 'htc', '_master/')
 #    # location of the pre and post processing data
-#    POST_DIR = os.path.join(p_root_remote, PROJECT, 'python-prepost-data/')
+#    POST_DIR = os.path.join(p_root_remote, PROJECT, sim_id, 'prepost-data/')
 #    force_dir = P_RUN
 #    launch_dlcs_excel(sim_id)
 #    post_launch(sim_id, check_logs=True, update=False, force_dir=force_dir,
-#                saveinterval=2000, csv=False)
+#                saveinterval=2000, csv=True, fatigue_cycles=True, fatigue=False)
     # -------------------------------------------------------------------------
 
     # create HTC files and PBS launch scripts (*.p)
@@ -458,7 +466,7 @@ if __name__ == '__main__':
         post_launch(sim_id, check_logs=opt.check_logs, update=False,
                     force_dir=P_RUN, saveinterval=2000, csv=opt.csv,
                     statistics=opt.stats, years=opt.years, neq=opt.neq,
-                    fatigue=opt.fatigue, fatigue_cycles=True, A=opt.rotarea,
+                    fatigue=opt.fatigue, A=opt.rotarea, AEP=opt.AEP,
                     no_bins=opt.no_bins, nn_blr=opt.nn_blr, nn_twt=opt.nn_twt,
                     save_new_sigs=opt.save_new_sigs, save_iter=False,
                     envelopeturbine=opt.envelopeturbine,
diff --git a/wetb/prepost/misc.py b/wetb/prepost/misc.py
index 441e20c1c500c7ca879e3eb22e95ec404545e068..0c1ab9b0d9c3b95738847d0c5d7127027d453d43 100644
--- a/wetb/prepost/misc.py
+++ b/wetb/prepost/misc.py
@@ -678,7 +678,7 @@ def to_lower_case(proot):
             os.rename(root, new)
 
 def read_excel_files(proot, fext='xlsx', pignore=None, sheet=0,
-                     pinclude=None):
+                     pinclude=None, silent=False):
     """
     Read recursively all MS Excel files with extension "fext". Only the
     default name for the first sheet (Sheet1) of the Excel file is considered.
@@ -726,14 +726,17 @@ def read_excel_files(proot, fext='xlsx', pignore=None, sheet=0,
             # if it does contain pignore, ingore the dlc
             if pignore is not None and f_target.find(pignore) > -1:
                 continue
-            print(f_target, end='')
+            if not silent:
+                print(f_target, end='')
             try:
                 xl = pd.ExcelFile(f_target)
                 df = xl.parse(sheet)
                 df_list[f_target.replace('.'+fext, '')] = df
-                print(': sucesfully included %i case(s)' % len(df))
+                if not silent:
+                    print(': sucesfully included %i case(s)' % len(df))
             except:
-                print('     XXXXX ERROR COULD NOT READ')
+                if not silent:
+                    print('     XXXXX ERROR COULD NOT READ')
 
     return df_list
 
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/control/minimal_demo_file.txt b/wetb/prepost/tests/data/demo_dlc/ref/control/minimal_demo_file.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8db2621539988442dd84f09006b47d9b6ed08690
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/control/minimal_demo_file.txt
@@ -0,0 +1 @@
+just one demo line
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/data/minimal_demo_file.txt b/wetb/prepost/tests/data/demo_dlc/ref/data/minimal_demo_file.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8db2621539988442dd84f09006b47d9b6ed08690
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/data/minimal_demo_file.txt
@@ -0,0 +1 @@
+just one demo line
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip b/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip
new file mode 100644
index 0000000000000000000000000000000000000000..60fe434ad3dc15cf5e1dd1977c630107c611ac55
Binary files /dev/null and b/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip differ
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx b/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx
new file mode 100755
index 0000000000000000000000000000000000000000..1f4c2311367ccea9d06f57db32793e8948f0e959
Binary files /dev/null and b/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx differ
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc
new file mode 100755
index 0000000000000000000000000000000000000000..6e956f80d62257709ddd129408b8d77305da4339
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc
@@ -0,0 +1,850 @@
+;this version was at some point based on: Avatar_10MW_RWT version 1, 06-08-14, Anyd
+begin simulation;
+  time_stop    [time stop];
+  solvertype   1 ;    (newmark)
+  on_no_convergence continue ;
+;  convergence_limits 1E3 1.0 1E-7 ;
+  logfile ./logfiles/[Case folder]/[Case id.].log ;
+  begin newmark;
+    deltat    0.02;
+  end newmark;
+end simulation;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin new_htc_structure;
+;--------------------------------------------------------------------------------------------------
+[staircase]  beam_output_file_name  ./res_eigen/[Case folder]/[Case id.]/[Case id.]_beam.dat;
+[staircase]  body_output_file_name  ./res_eigen/[Case folder]/[Case id.]/[Case id.]_body.dat;
+[staircase]  struct_inertia_output_file_name ./res_eigen/[Case folder]/[Case id.]/[Case id.]_struct.dat;
+[staircase]  body_eigenanalysis_file_name ./res_eigen/[Case folder]/[Case id.]/[Case id.]_body_eigen.dat;
+[staircase]  structure_eigenanalysis_file_name ./res_eigen/[Case folder]/[Case id.]/[Case id.]_strc_eigen.dat;
+;---------------------------------------------------------------------------------------------------
+  begin main_body;         tower 123.6m
+    name        tower ;
+    type        timoschenko ;
+    nbodies     3 ;
+    node_distribution     c2_def ;
+    damping_posdef   0 0 0 4.7E-03 4.7E-03 4.3E-04 ; tuned by Anyd 12/8/14
+     begin timoschenko_input;
+      filename ./data/AVATAR_10MW_RWT_tower_st.dat;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 20;
+      sec	1	0	0	0.000	0	;  x,y,z,twist
+      sec	2	0	0	-12.293	0	;
+      sec	3	0	0	-12.294	0	;
+      sec	4	0	0	-24.585	0	;
+      sec	5	0	0	-24.586	0	;
+      sec	6	0	0	-36.878	0	;
+      sec	7	0	0	-36.879	0	;
+      sec	8	0	0	-49.171	0	;
+      sec	9	0	0	-49.172	0	 ;
+      sec	10	0	0	-61.463	0	;
+      sec	11	0	0	-61.464	0	;
+      sec	12	0	0	-73.756	0	;
+      sec	13	0	0	-73.757	0	;
+      sec	14	0	0	-86.049	0	;
+      sec	15	0	0	-86.050	0	;
+      sec	16	0	0	-98.341	0	;
+      sec	17	0	0	-98.342	0	;
+      sec	18	0	0	-110.634	0	;
+      sec	19	0	0	-110.635	0	;
+      sec	20	0	0	-123.600	0	;
+     end c2_def ;
+    end main_body;
+;
+  begin main_body;
+    name        towertop ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  7.50E-03  7.40E-03  7.00E-03  7.00E-03  7.00E-03  7.00E-03  ;   "changed by Anyd
+	concentrated_mass	2.0	0.0	2.6870E+00	3.0061E-01	4.4604E+05	4.1060E+06	4.1060E+05	4.1060E+06	;	Nacel
+	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  8.00E-3  8.00E-03  8.00E-02  4.65E-04  4.65E-04  2.38E-02 ; "tuned by Anyd 22/2/13
+	damping_posdef  0.0 0.0 3.983E-03 4.65E-04  4.65E-04  3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 l
+    concentrated_mass	1.0	0.0	0.0	0.0	0.0	0.0	0.0	3.751E+06	;	generator equivalent slow shaft "re_tu
+    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
+	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        shaft_nonrotate ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  0.00E+00 0.00E+00 0.00E+00  1.0E-01  1.0E-01  1.0E-01 ;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 3; dummy light and stiff structure
+    end timoschenko_input;
+    begin c2_def;
+      nsec 2;
+      sec 1 0.0 0.0 0.0    0.0 ;
+      sec 2 0.0 0.0 0.1    0.0 ;
+    end c2_def;
+  end main_body;
+;
+  begin main_body;
+    name        hub1 ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  2.00E-05  2.00E-05  2.00E-04  3.00E-06  3.00E-06  2.00E-05;
+	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           hub3 ;
+    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 2.5e-3 8.9e-4 3.2e-4 ; "Tuned by Anyd"
+;	damping_posdef   0.0 0.0 0.0 1.5e-3 2.45e-3 3.2e-4 ; " 3% damping tuned by Anyd 20/02/12 unable to
+;	damping_posdef   0.0 0.0 0.0 2.1e-3 1.9e-3 1.3e-4 ; " 3% damping tuned by Anyd 15/08/14 rev2
+	damping_posdef   0.0 0.0 0.0 1.68e-3 2.25e-3 1.0e-4 ; " 3% damping tuned by Anyd 16/12/14
+   begin timoschenko_input ;
+      filename ./data/AVATAR_10MW_RWT_Blade_st.dat ;
+      set 1 9 ;
+    end timoschenko_input;
+    begin c2_def;
+      nsec 27 ;
+      sec  1   -0.001   -0.001     0.000   -17.280 ;
+      sec  2   -0.005   -0.001     2.220   -17.280 ;
+      sec  3   -0.006   -0.000     4.440   -17.280 ;
+      sec  4   -0.086    0.022     6.660   -17.280 ;
+      sec  5   -0.231    0.069    11.039   -17.273 ;
+      sec  6   -0.447    0.121    15.418   -16.441 ;
+      sec  7   -0.690    0.161    19.797   -14.613 ;
+      sec  8   -0.812    0.162    24.176   -12.578 ;
+      sec  9   -0.891    0.158    28.555   -10.588 ;
+      sec 10   -0.865    0.124    32.934    -9.070 ;
+      sec 11   -0.833    0.112    37.313    -8.224 ;
+      sec 12   -0.797    0.102    41.692    -7.688 ;
+      sec 13   -0.760    0.093    46.071    -7.205 ;
+      sec 14   -0.721    0.083    50.450    -6.749 ;
+      sec 15   -0.683    0.075    54.829    -6.288 ;
+      sec 16   -0.644    0.066    59.208    -5.838 ;
+      sec 17   -0.606    0.058    63.587    -5.401 ;
+      sec 18   -0.567    0.050    67.966    -4.982 ;
+      sec 19   -0.529    0.044    72.345    -4.640 ;
+      sec 20   -0.492    0.037    76.724    -4.380 ;
+      sec 21   -0.456    0.032    81.103    -4.144 ;
+      sec 22   -0.422    0.026    85.482    -3.914 ;
+      sec 23   -0.392    0.021    89.861    -3.685 ;
+      sec 24   -0.346    0.014    94.240    -3.460 ;
+      sec 25   -0.307    0.010    96.190    -3.350 ;
+      sec 26   -0.249    0.005    98.130    -3.250 ;
+      sec 27   -0.089    0.006   100.080    -3.140 ;
+   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 [Rotor azimuth];
+[Free shaft rot]      mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 [init_wr] ; mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 [init_wr];
+    end relative;
+;
+    begin relative; dummy non rotating hub coordinates
+      body1  towertop last;
+      body2  shaft_nonrotate 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang  5.0 0.0 0.0; same 5 deg tilt angle as real shaft
+    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;
+    end relative;
+;
+    begin relative;
+      body1  hub2 last;
+      body2  blade2 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  hub3 last;
+      body2  blade3 1;
+      body2_eulerang 0.0 0.0 0.0;
+    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;
+;
+[Free shaft rot]    begin bearing1;                       free bearing
+[Free shaft rot]      name  shaft_rot;
+[Free shaft rot]      body1 towertop last;
+[Free shaft rot]      body2 shaft 1;
+[Free shaft rot]      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
+[Free shaft rot]   end bearing1;
+;
+[Rotor locked]    begin bearing3;                       free bearing
+[Rotor locked]      name  shaft_rot;
+[Rotor locked]      body1 towertop last;
+[Rotor locked]      body2 shaft 1;
+[Rotor locked]      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
+[Rotor locked]      omegas 0.0 ;
+[Rotor locked]   end bearing3;
+;
+     begin fix1;
+           body1 tower last ;
+           body2 shaft_nonrotate 1;
+     end fix1;
+;
+     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                     [Windspeed]   ;
+  tint                    [TI]   ;
+  horizontal_input        1     ;
+  windfield_rotations     [wdir] 8.0 0.0 ;    yaw, tilt (positive=upflow=wind coming from below), rotation
+  center_pos0             0.0 0.0 -127 ; hub heigth
+  shear_format            3 [shear_exp] ;
+  turb_format             [tu_model]     ;  0=none, 1=mann,2=flex
+  tower_shadow_method     3     ;  0=none, 1=potential flow, 2=jet
+  scale_time_start       [t0] ;
+  wind_ramp_factor   0.0 [t0] [wsp factor] 1.0 ;
+  [gust] iec_gust [gust_type] [G_A] [G_phi0] [G_t0] [G_T] ;
+;
+[staircase]  wind_ramp_abs  400.0  401.0  0.0   1.0 ;   wsp. after the step:  5.0
+[staircase]  wind_ramp_abs  501.0  502.0  0.0   1.0 ;   wsp. after the step:  6.0
+[staircase]  wind_ramp_abs  602.0  603.0  0.0   1.0 ;   wsp. after the step:  7.0
+[staircase]  wind_ramp_abs  703.0  704.0  0.0   1.0 ;   wsp. after the step:  8.0
+[staircase]  wind_ramp_abs  804.0  805.0  0.0   1.0 ;   wsp. after the step:  9.0
+[staircase]  wind_ramp_abs  905.0  906.0  0.0   1.0 ;   wsp. after the step: 10.0
+[staircase]  wind_ramp_abs  1006.0  1007.0  0.0   1.0 ;   wsp. after the step: 11.0
+[staircase]  wind_ramp_abs  1107.0  1108.0  0.0   1.0 ;   wsp. after the step: 12.0
+[staircase]  wind_ramp_abs  1208.0  1209.0  0.0   1.0 ;   wsp. after the step: 13.0
+[staircase]  wind_ramp_abs  1309.0  1310.0  0.0   1.0 ;   wsp. after the step: 14.0
+[staircase]  wind_ramp_abs  1410.0  1411.0  0.0   1.0 ;   wsp. after the step: 15.0
+[staircase]  wind_ramp_abs  1511.0  1512.0  0.0   1.0 ;   wsp. after the step: 16.0
+[staircase]  wind_ramp_abs  1612.0  1613.0  0.0   1.0 ;   wsp. after the step: 17.0
+[staircase]  wind_ramp_abs  1713.0  1714.0  0.0   1.0 ;   wsp. after the step: 18.0
+[staircase]  wind_ramp_abs  1814.0  1815.0  0.0   1.0 ;   wsp. after the step: 19.0
+[staircase]  wind_ramp_abs  1915.0  1916.0  0.0   1.0 ;   wsp. after the step: 20.0
+[staircase]  wind_ramp_abs  2016.0  2017.0  0.0   1.0 ;   wsp. after the step: 21.0
+[staircase]  wind_ramp_abs  2117.0  2118.0  0.0   1.0 ;   wsp. after the step: 22.0
+[staircase]  wind_ramp_abs  2218.0  2219.0  0.0   1.0 ;   wsp. after the step: 23.0
+[staircase]  wind_ramp_abs  2319.0  2320.0  0.0   1.0 ;   wsp. after the step: 24.0
+[staircase]  wind_ramp_abs  2420.0  2421.0  0.0   1.0 ;   wsp. after the step: 25.0
+  ;
+[windramp]  wind_ramp_abs   400.0  2200.0  0.0   21.0 ;   wsp. after the step: 25.0
+[windramp]  wind_ramp_abs  2400.0  4200.0  0.0  -21.0 ;   wsp. after the step: 25.0
+  ;
+  begin mann ;
+    create_turb_parameters 29.4 1.0 3.9 [tu_seed] 1.0 ;      L, alfaeps, gamma, seed, highfrq compensation
+    filename_u    ./[turb_dir][Turb base name]u.bin ;
+    filename_v    ./[turb_dir][Turb base name]v.bin ;
+    filename_w    ./[turb_dir][Turb base name]w.bin ;
+    box_dim_u    8192 [turb_dx] ;
+    box_dim_v    32 7.5;
+    box_dim_w    32 7.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     123.6 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 123.6 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  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/AVATAR_10MW_RWT_ae.dat ;
+  pc_filename        ./data/AVATAR_10MW_RWT_pc_hama_v1.dat ;
+  induction_method   [Induction] ;     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    [Dyn stall] ;     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  59.5925   85.5023   ./data/Flap_dturwt1_Thk24.ds  ;  Flap Sec: 1
+   ; end dynstall_ateflap;
+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  100.0    	; Minimum pitch angle, theta_min [deg],
+								; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
+								; from a file named 'wpdata.n', where n=int(theta_min)
+      constant   6  90.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   1.64   	; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
+      ; Partial load control parameters
+      constant  11   0.9648030e+07 ; 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   1.047610E+08 ; Proportional gain of torque controller [Nm/(rad/s)]
+      constant  13   0.153367E+08 ; 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   1      	; Generator control switch [1=constant power, 2=constant torque]
+      constant  16   0.762489  ; Proportional gain of pitch controller [rad/(rad/s)]
+      constant  17   0.224086  ; Integral gain of pitch controller [rad/rad]
+      constant  18   0.0    ; Differential gain of pitch controller [rad/(rad/s^2)]
+      constant  19   0.4e-9 ; Proportional power error gain [rad/W]
+      constant  20   0.4e-9 ; Integral power error gain [rad/(Ws)]
+      constant  21  10.6824   ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
+      constant  22 601.25499  ; 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  [Cut-in time]  ; Cut-in time [s]
+      constant  25  1.0   ; Time delay for soft start of torque [1/1P]
+;     Cut-out simulation parameters
+      constant  26  [Cut-out time]  ; Cut-out time [s]
+      constant  27   5.0  ; Time constant for linear torque cut-out [s]
+      constant  28  [Stop type]    ; Stop type [1=normal, 2=emergency]
+      constant  29  1.0  ; Time delay for pitch stop after shut-down signal [s]
+      constant  30  [Pitvel 1]  ; 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  [Pitvel 2]  ; 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  25.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   25.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  205.8  ; 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 pitch3 1 only 1; [rad]
+      wind free_wind 1 0.0 0.0 -127 	 ; 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 [Grid loss time]    ; 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   5225.35 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
+      constant 2    100.0  ; Parameter 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.74 ; 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 [Time pitch runaway]   ; Time for pitch runaway [s]
+	  constant  9 [Time stuck DLC22b]    ; Time for stuck blade 1 [s]
+	  constant 10 [Pitch 1 DLC22b]       ; 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]
+      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  3.87  ; Tower radius close to downward blade tip [m]
+	end init ;
+    begin output;
+	  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+	  mbdy state pos blade1  26 1.0 global  ; [4,5,6]
+	  mbdy state pos blade2  26 1.0 global  ; [7,8,9]
+	  mbdy state pos blade3  26 1.0 global  ; [10,11,12]
+    end output;
+  end type2_dll;
+end dll;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+;
+begin output;
+  filename ./res/[Case folder]/[Case id.] ;
+  time [t0] [time stop] ;
+  data_format  [out_format];
+  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 -127; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
+  ; non rotating coordinates shaft tip: equivalent to stationary hub in BLADED
+  mbdy momentvec shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  mbdy forcevec  shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  ; Moments:
+  mbdy momentvec tower  1 1  tower # tower base ;
+  mbdy momentvec tower  19 2 tower # tower yaw bearing ;
+  mbdy momentvec shaft  4 1  shaft # main bearing ;
+  mbdy momentvec blade1  3  2 blade1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 blade2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 blade3 # blade 3 root ;
+  ; blade 2,3 root section loads
+  mbdy momentvec blade2  3  2 local # blade 2 section root;
+  mbdy momentvec blade3  3  2 local # blade 3 section root;
+  ; blade 1 sectional loads in local coordinates
+  mbdy momentvec blade1  2  2 local # blade 1 section;
+  mbdy momentvec blade1  3  2 local # blade 1 section root;
+  mbdy momentvec blade1  4  2 local # blade 1 section;
+  mbdy momentvec blade1  5  2 local # blade 1 section;
+  mbdy momentvec blade1  6  2 local # blade 1 section;
+  mbdy momentvec blade1  7  2 local # blade 1 section;
+  mbdy momentvec blade1  8  2 local # blade 1 section;
+  mbdy momentvec blade1  9  2 local # blade 1 section;
+  mbdy momentvec blade1 10  2 local # blade 1 section;
+  mbdy momentvec blade1 11  2 local # blade 1 section;
+  mbdy momentvec blade1 12  2 local # blade 1 section;
+  mbdy momentvec blade1 13  2 local # blade 1 section;
+  mbdy momentvec blade1 14  2 local # blade 1 section;
+  mbdy momentvec blade1 15  2 local # blade 1 section;
+  mbdy momentvec blade1 16  2 local # blade 1 section;
+  mbdy momentvec blade1 17  2 local # blade 1 section;
+  mbdy momentvec blade1 18  2 local # blade 1 section;
+  mbdy momentvec blade1 19  2 local # blade 1 section;
+  mbdy momentvec blade1 20  2 local # blade 1 section;
+  mbdy momentvec blade1 21  2 local # blade 1 section;
+  mbdy momentvec blade1 22  2 local # blade 1 section;
+  mbdy momentvec blade1 23  2 local # blade 1 section;
+  mbdy momentvec blade1 24  2 local # blade 1 section;
+  mbdy momentvec blade1 25  2 local # blade 1 section;
+  mbdy momentvec blade1 26  2 local # blade 1 section;
+  ; blade root out and in of plane forces
+  mbdy momentvec blade1 3  2 hub1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 hub2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 hub3 # blade 3 root ;
+;  mbdy momentvec blade1 14 1 local # blade 1 50% local e coo ;
+;  mbdy momentvec blade2 14 1 local # blade 2 50% local e coo ;
+;  mbdy momentvec blade3 14 1 local # blade 3 50% local e coo ;
+  ; Displacements and accellerations
+  mbdy state pos tower 19 1.0 global only 1 # Tower top FA displ;
+  mbdy state pos tower 19 1.0 global only 2 # Tower top SS displ;
+  mbdy state acc tower 19 1.0 global only 1 # Tower top FA acc;
+  mbdy state acc tower 19 1.0 global only 2 # Tower top SS acc;
+;
+  mbdy state pos blade1  26 1.0 global # gl blade 1 tip pos ;
+  mbdy state pos blade2  26 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  26 1.0 blade1 # blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 blade2 # blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 blade3 # blade 3 tip pos ;
+;
+  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+;
+  ; elastic twist (torsional deformation) along the blade
+  aero tors_ang 1  45.56;
+  aero tors_ang 1  59.19;
+  aero tors_ang 1  70.87;
+  aero tors_ang 1  80.61;
+  aero tors_ang 1  84.50;
+  aero tors_ang 1  88.40;
+  aero tors_ang 1  92.29;
+  aero tors_ang 1  96.19;
+  aero tors_ang 1  98.13;
+  aero tors_ang 1 100.08; tip
+;
+; - 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];
+;   general constant 1.0 ;	constant 1.0 - to mesure activity of flap in terms of displacement
+; - 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 -
+	; [dis_setbeta] aero beta 1 1 ;
+	; [dis_setbeta] aero beta 2 1 ;
+	; [dis_setbeta] 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] ;
+end output;
+;
+exit;
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc
new file mode 100644
index 0000000000000000000000000000000000000000..c54c20d0df50daf94a80962feaefcd924123559f
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc
@@ -0,0 +1,850 @@
+;this version was at some point based on: Avatar_10MW_RWT version 1, 06-08-14, Anyd
+begin simulation;
+  time_stop    40;
+  solvertype   1 ;    (newmark)
+  on_no_convergence continue ;
+;  convergence_limits 1E3 1.0 1E-7 ;
+  logfile ./logfiles/dlc01_demos/dlc01_steady_wsp10_noturb.log ;
+  begin newmark;
+    deltat    0.02;
+  end newmark;
+end simulation;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin new_htc_structure;
+;--------------------------------------------------------------------------------------------------
+;  beam_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_beam.dat;
+;  body_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_body.dat;
+;  struct_inertia_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_struct.dat;
+;  body_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_body_eigen.dat;
+;  structure_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_strc_eigen.dat;
+;---------------------------------------------------------------------------------------------------
+  begin main_body;         tower 123.6m
+    name        tower ;
+    type        timoschenko ;
+    nbodies     3 ;
+    node_distribution     c2_def ;
+    damping_posdef   0 0 0 4.7E-03 4.7E-03 4.3E-04 ; tuned by Anyd 12/8/14
+     begin timoschenko_input;
+      filename ./data/AVATAR_10MW_RWT_tower_st.dat;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 20;
+      sec	1	0	0	0.000	0	;  x,y,z,twist
+      sec	2	0	0	-12.293	0	;
+      sec	3	0	0	-12.294	0	;
+      sec	4	0	0	-24.585	0	;
+      sec	5	0	0	-24.586	0	;
+      sec	6	0	0	-36.878	0	;
+      sec	7	0	0	-36.879	0	;
+      sec	8	0	0	-49.171	0	;
+      sec	9	0	0	-49.172	0	 ;
+      sec	10	0	0	-61.463	0	;
+      sec	11	0	0	-61.464	0	;
+      sec	12	0	0	-73.756	0	;
+      sec	13	0	0	-73.757	0	;
+      sec	14	0	0	-86.049	0	;
+      sec	15	0	0	-86.050	0	;
+      sec	16	0	0	-98.341	0	;
+      sec	17	0	0	-98.342	0	;
+      sec	18	0	0	-110.634	0	;
+      sec	19	0	0	-110.635	0	;
+      sec	20	0	0	-123.600	0	;
+     end c2_def ;
+    end main_body;
+;
+  begin main_body;
+    name        towertop ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  7.50E-03  7.40E-03  7.00E-03  7.00E-03  7.00E-03  7.00E-03  ;   "changed by Anyd
+	concentrated_mass	2.0	0.0	2.6870E+00	3.0061E-01	4.4604E+05	4.1060E+06	4.1060E+05	4.1060E+06	;	Nacel
+	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  8.00E-3  8.00E-03  8.00E-02  4.65E-04  4.65E-04  2.38E-02 ; "tuned by Anyd 22/2/13
+	damping_posdef  0.0 0.0 3.983E-03 4.65E-04  4.65E-04  3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 l
+    concentrated_mass	1.0	0.0	0.0	0.0	0.0	0.0	0.0	3.751E+06	;	generator equivalent slow shaft "re_tu
+    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
+	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        shaft_nonrotate ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  0.00E+00 0.00E+00 0.00E+00  1.0E-01  1.0E-01  1.0E-01 ;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 3; dummy light and stiff structure
+    end timoschenko_input;
+    begin c2_def;
+      nsec 2;
+      sec 1 0.0 0.0 0.0    0.0 ;
+      sec 2 0.0 0.0 0.1    0.0 ;
+    end c2_def;
+  end main_body;
+;
+  begin main_body;
+    name        hub1 ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  2.00E-05  2.00E-05  2.00E-04  3.00E-06  3.00E-06  2.00E-05;
+	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           hub3 ;
+    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 2.5e-3 8.9e-4 3.2e-4 ; "Tuned by Anyd"
+;	damping_posdef   0.0 0.0 0.0 1.5e-3 2.45e-3 3.2e-4 ; " 3% damping tuned by Anyd 20/02/12 unable to
+;	damping_posdef   0.0 0.0 0.0 2.1e-3 1.9e-3 1.3e-4 ; " 3% damping tuned by Anyd 15/08/14 rev2
+	damping_posdef   0.0 0.0 0.0 1.68e-3 2.25e-3 1.0e-4 ; " 3% damping tuned by Anyd 16/12/14
+   begin timoschenko_input ;
+      filename ./data/AVATAR_10MW_RWT_Blade_st.dat ;
+      set 1 9 ;
+    end timoschenko_input;
+    begin c2_def;
+      nsec 27 ;
+      sec  1   -0.001   -0.001     0.000   -17.280 ;
+      sec  2   -0.005   -0.001     2.220   -17.280 ;
+      sec  3   -0.006   -0.000     4.440   -17.280 ;
+      sec  4   -0.086    0.022     6.660   -17.280 ;
+      sec  5   -0.231    0.069    11.039   -17.273 ;
+      sec  6   -0.447    0.121    15.418   -16.441 ;
+      sec  7   -0.690    0.161    19.797   -14.613 ;
+      sec  8   -0.812    0.162    24.176   -12.578 ;
+      sec  9   -0.891    0.158    28.555   -10.588 ;
+      sec 10   -0.865    0.124    32.934    -9.070 ;
+      sec 11   -0.833    0.112    37.313    -8.224 ;
+      sec 12   -0.797    0.102    41.692    -7.688 ;
+      sec 13   -0.760    0.093    46.071    -7.205 ;
+      sec 14   -0.721    0.083    50.450    -6.749 ;
+      sec 15   -0.683    0.075    54.829    -6.288 ;
+      sec 16   -0.644    0.066    59.208    -5.838 ;
+      sec 17   -0.606    0.058    63.587    -5.401 ;
+      sec 18   -0.567    0.050    67.966    -4.982 ;
+      sec 19   -0.529    0.044    72.345    -4.640 ;
+      sec 20   -0.492    0.037    76.724    -4.380 ;
+      sec 21   -0.456    0.032    81.103    -4.144 ;
+      sec 22   -0.422    0.026    85.482    -3.914 ;
+      sec 23   -0.392    0.021    89.861    -3.685 ;
+      sec 24   -0.346    0.014    94.240    -3.460 ;
+      sec 25   -0.307    0.010    96.190    -3.350 ;
+      sec 26   -0.249    0.005    98.130    -3.250 ;
+      sec 27   -0.089    0.006   100.080    -3.140 ;
+   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;
+      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; dummy non rotating hub coordinates
+      body1  towertop last;
+      body2  shaft_nonrotate 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang  5.0 0.0 0.0; same 5 deg tilt angle as real shaft
+    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;
+    end relative;
+;
+    begin relative;
+      body1  hub2 last;
+      body2  blade2 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  hub3 last;
+      body2  blade3 1;
+      body2_eulerang 0.0 0.0 0.0;
+    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 tower last ;
+           body2 shaft_nonrotate 1;
+     end fix1;
+;
+     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   ;
+  tint                    0.2096   ;
+  horizontal_input        1     ;
+  windfield_rotations     0 8.0 0.0 ;    yaw, tilt (positive=upflow=wind coming from below), rotation
+  center_pos0             0.0 0.0 -127 ; hub heigth
+  shear_format            3 0 ;
+  turb_format             0     ;  0=none, 1=mann,2=flex
+  tower_shadow_method     3     ;  0=none, 1=potential flow, 2=jet
+  scale_time_start       20 ;
+  wind_ramp_factor   0.0 20 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
+  ;
+;  wind_ramp_abs   400.0  2200.0  0.0   21.0 ;   wsp. after the step: 25.0
+;  wind_ramp_abs  2400.0  4200.0  0.0  -21.0 ;   wsp. after the step: 25.0
+  ;
+  begin mann ;
+    create_turb_parameters 29.4 1.0 3.9 0 1.0 ;      L, alfaeps, gamma, seed, highfrq compensation
+    filename_u    ./turb/noneu.bin ;
+    filename_v    ./turb/nonev.bin ;
+    filename_w    ./turb/nonew.bin ;
+    box_dim_u    8192 0.048828125 ;
+    box_dim_v    32 7.5;
+    box_dim_w    32 7.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     123.6 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 123.6 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  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/AVATAR_10MW_RWT_ae.dat ;
+  pc_filename        ./data/AVATAR_10MW_RWT_pc_hama_v1.dat ;
+  induction_method   1 ;     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    2 ;     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  59.5925   85.5023   ./data/Flap_dturwt1_Thk24.ds  ;  Flap Sec: 1
+   ; end dynstall_ateflap;
+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  100.0    	; Minimum pitch angle, theta_min [deg],
+								; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
+								; from a file named 'wpdata.n', where n=int(theta_min)
+      constant   6  90.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   1.64   	; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
+      ; Partial load control parameters
+      constant  11   0.9648030e+07 ; 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   1.047610E+08 ; Proportional gain of torque controller [Nm/(rad/s)]
+      constant  13   0.153367E+08 ; 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   1      	; Generator control switch [1=constant power, 2=constant torque]
+      constant  16   0.762489  ; Proportional gain of pitch controller [rad/(rad/s)]
+      constant  17   0.224086  ; Integral gain of pitch controller [rad/rad]
+      constant  18   0.0    ; Differential gain of pitch controller [rad/(rad/s^2)]
+      constant  19   0.4e-9 ; Proportional power error gain [rad/W]
+      constant  20   0.4e-9 ; Integral power error gain [rad/(Ws)]
+      constant  21  10.6824   ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
+      constant  22 601.25499  ; 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  25.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   25.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  205.8  ; 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 pitch3 1 only 1; [rad]
+      wind free_wind 1 0.0 0.0 -127 	 ; 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 5000    ; 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   5225.35 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
+      constant 2    100.0  ; Parameter 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.74 ; 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 5000   ; 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]
+      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  3.87  ; Tower radius close to downward blade tip [m]
+	end init ;
+    begin output;
+	  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+	  mbdy state pos blade1  26 1.0 global  ; [4,5,6]
+	  mbdy state pos blade2  26 1.0 global  ; [7,8,9]
+	  mbdy state pos blade3  26 1.0 global  ; [10,11,12]
+    end output;
+  end type2_dll;
+end dll;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+;
+begin output;
+  filename ./res/dlc01_demos/dlc01_steady_wsp10_noturb ;
+  time 20 40 ;
+  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 -127; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
+  ; non rotating coordinates shaft tip: equivalent to stationary hub in BLADED
+  mbdy momentvec shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  mbdy forcevec  shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  ; Moments:
+  mbdy momentvec tower  1 1  tower # tower base ;
+  mbdy momentvec tower  19 2 tower # tower yaw bearing ;
+  mbdy momentvec shaft  4 1  shaft # main bearing ;
+  mbdy momentvec blade1  3  2 blade1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 blade2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 blade3 # blade 3 root ;
+  ; blade 2,3 root section loads
+  mbdy momentvec blade2  3  2 local # blade 2 section root;
+  mbdy momentvec blade3  3  2 local # blade 3 section root;
+  ; blade 1 sectional loads in local coordinates
+  mbdy momentvec blade1  2  2 local # blade 1 section;
+  mbdy momentvec blade1  3  2 local # blade 1 section root;
+  mbdy momentvec blade1  4  2 local # blade 1 section;
+  mbdy momentvec blade1  5  2 local # blade 1 section;
+  mbdy momentvec blade1  6  2 local # blade 1 section;
+  mbdy momentvec blade1  7  2 local # blade 1 section;
+  mbdy momentvec blade1  8  2 local # blade 1 section;
+  mbdy momentvec blade1  9  2 local # blade 1 section;
+  mbdy momentvec blade1 10  2 local # blade 1 section;
+  mbdy momentvec blade1 11  2 local # blade 1 section;
+  mbdy momentvec blade1 12  2 local # blade 1 section;
+  mbdy momentvec blade1 13  2 local # blade 1 section;
+  mbdy momentvec blade1 14  2 local # blade 1 section;
+  mbdy momentvec blade1 15  2 local # blade 1 section;
+  mbdy momentvec blade1 16  2 local # blade 1 section;
+  mbdy momentvec blade1 17  2 local # blade 1 section;
+  mbdy momentvec blade1 18  2 local # blade 1 section;
+  mbdy momentvec blade1 19  2 local # blade 1 section;
+  mbdy momentvec blade1 20  2 local # blade 1 section;
+  mbdy momentvec blade1 21  2 local # blade 1 section;
+  mbdy momentvec blade1 22  2 local # blade 1 section;
+  mbdy momentvec blade1 23  2 local # blade 1 section;
+  mbdy momentvec blade1 24  2 local # blade 1 section;
+  mbdy momentvec blade1 25  2 local # blade 1 section;
+  mbdy momentvec blade1 26  2 local # blade 1 section;
+  ; blade root out and in of plane forces
+  mbdy momentvec blade1 3  2 hub1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 hub2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 hub3 # blade 3 root ;
+;  mbdy momentvec blade1 14 1 local # blade 1 50% local e coo ;
+;  mbdy momentvec blade2 14 1 local # blade 2 50% local e coo ;
+;  mbdy momentvec blade3 14 1 local # blade 3 50% local e coo ;
+  ; Displacements and accellerations
+  mbdy state pos tower 19 1.0 global only 1 # Tower top FA displ;
+  mbdy state pos tower 19 1.0 global only 2 # Tower top SS displ;
+  mbdy state acc tower 19 1.0 global only 1 # Tower top FA acc;
+  mbdy state acc tower 19 1.0 global only 2 # Tower top SS acc;
+;
+  mbdy state pos blade1  26 1.0 global # gl blade 1 tip pos ;
+  mbdy state pos blade2  26 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  26 1.0 blade1 # blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 blade2 # blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 blade3 # blade 3 tip pos ;
+;
+  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+;
+  ; elastic twist (torsional deformation) along the blade
+  aero tors_ang 1  45.56;
+  aero tors_ang 1  59.19;
+  aero tors_ang 1  70.87;
+  aero tors_ang 1  80.61;
+  aero tors_ang 1  84.50;
+  aero tors_ang 1  88.40;
+  aero tors_ang 1  92.29;
+  aero tors_ang 1  96.19;
+  aero tors_ang 1  98.13;
+  aero tors_ang 1 100.08; tip
+;
+; - 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];
+;   general constant 1.0 ;	constant 1.0 - to mesure activity of flap in terms of displacement
+; - 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] ;
+end output;
+;
+exit;
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc
new file mode 100644
index 0000000000000000000000000000000000000000..94abe5e13faf4dbd2ffcf86f0bb95df884a573a8
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc
@@ -0,0 +1,850 @@
+;this version was at some point based on: Avatar_10MW_RWT version 1, 06-08-14, Anyd
+begin simulation;
+  time_stop    40;
+  solvertype   1 ;    (newmark)
+  on_no_convergence continue ;
+;  convergence_limits 1E3 1.0 1E-7 ;
+  logfile ./logfiles/dlc01_demos/dlc01_steady_wsp8_noturb.log ;
+  begin newmark;
+    deltat    0.02;
+  end newmark;
+end simulation;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin new_htc_structure;
+;--------------------------------------------------------------------------------------------------
+;  beam_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp8_noturb/dlc01_steady_wsp8_noturb_beam.dat;
+;  body_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp8_noturb/dlc01_steady_wsp8_noturb_body.dat;
+;  struct_inertia_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp8_noturb/dlc01_steady_wsp8_noturb_struct.dat;
+;  body_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp8_noturb/dlc01_steady_wsp8_noturb_body_eigen.dat;
+;  structure_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp8_noturb/dlc01_steady_wsp8_noturb_strc_eigen.dat;
+;---------------------------------------------------------------------------------------------------
+  begin main_body;         tower 123.6m
+    name        tower ;
+    type        timoschenko ;
+    nbodies     3 ;
+    node_distribution     c2_def ;
+    damping_posdef   0 0 0 4.7E-03 4.7E-03 4.3E-04 ; tuned by Anyd 12/8/14
+     begin timoschenko_input;
+      filename ./data/AVATAR_10MW_RWT_tower_st.dat;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 20;
+      sec	1	0	0	0.000	0	;  x,y,z,twist
+      sec	2	0	0	-12.293	0	;
+      sec	3	0	0	-12.294	0	;
+      sec	4	0	0	-24.585	0	;
+      sec	5	0	0	-24.586	0	;
+      sec	6	0	0	-36.878	0	;
+      sec	7	0	0	-36.879	0	;
+      sec	8	0	0	-49.171	0	;
+      sec	9	0	0	-49.172	0	 ;
+      sec	10	0	0	-61.463	0	;
+      sec	11	0	0	-61.464	0	;
+      sec	12	0	0	-73.756	0	;
+      sec	13	0	0	-73.757	0	;
+      sec	14	0	0	-86.049	0	;
+      sec	15	0	0	-86.050	0	;
+      sec	16	0	0	-98.341	0	;
+      sec	17	0	0	-98.342	0	;
+      sec	18	0	0	-110.634	0	;
+      sec	19	0	0	-110.635	0	;
+      sec	20	0	0	-123.600	0	;
+     end c2_def ;
+    end main_body;
+;
+  begin main_body;
+    name        towertop ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  7.50E-03  7.40E-03  7.00E-03  7.00E-03  7.00E-03  7.00E-03  ;   "changed by Anyd
+	concentrated_mass	2.0	0.0	2.6870E+00	3.0061E-01	4.4604E+05	4.1060E+06	4.1060E+05	4.1060E+06	;	Nacel
+	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  8.00E-3  8.00E-03  8.00E-02  4.65E-04  4.65E-04  2.38E-02 ; "tuned by Anyd 22/2/13
+	damping_posdef  0.0 0.0 3.983E-03 4.65E-04  4.65E-04  3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 l
+    concentrated_mass	1.0	0.0	0.0	0.0	0.0	0.0	0.0	3.751E+06	;	generator equivalent slow shaft "re_tu
+    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
+	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        shaft_nonrotate ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  0.00E+00 0.00E+00 0.00E+00  1.0E-01  1.0E-01  1.0E-01 ;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 3; dummy light and stiff structure
+    end timoschenko_input;
+    begin c2_def;
+      nsec 2;
+      sec 1 0.0 0.0 0.0    0.0 ;
+      sec 2 0.0 0.0 0.1    0.0 ;
+    end c2_def;
+  end main_body;
+;
+  begin main_body;
+    name        hub1 ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  2.00E-05  2.00E-05  2.00E-04  3.00E-06  3.00E-06  2.00E-05;
+	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           hub3 ;
+    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 2.5e-3 8.9e-4 3.2e-4 ; "Tuned by Anyd"
+;	damping_posdef   0.0 0.0 0.0 1.5e-3 2.45e-3 3.2e-4 ; " 3% damping tuned by Anyd 20/02/12 unable to
+;	damping_posdef   0.0 0.0 0.0 2.1e-3 1.9e-3 1.3e-4 ; " 3% damping tuned by Anyd 15/08/14 rev2
+	damping_posdef   0.0 0.0 0.0 1.68e-3 2.25e-3 1.0e-4 ; " 3% damping tuned by Anyd 16/12/14
+   begin timoschenko_input ;
+      filename ./data/AVATAR_10MW_RWT_Blade_st.dat ;
+      set 1 9 ;
+    end timoschenko_input;
+    begin c2_def;
+      nsec 27 ;
+      sec  1   -0.001   -0.001     0.000   -17.280 ;
+      sec  2   -0.005   -0.001     2.220   -17.280 ;
+      sec  3   -0.006   -0.000     4.440   -17.280 ;
+      sec  4   -0.086    0.022     6.660   -17.280 ;
+      sec  5   -0.231    0.069    11.039   -17.273 ;
+      sec  6   -0.447    0.121    15.418   -16.441 ;
+      sec  7   -0.690    0.161    19.797   -14.613 ;
+      sec  8   -0.812    0.162    24.176   -12.578 ;
+      sec  9   -0.891    0.158    28.555   -10.588 ;
+      sec 10   -0.865    0.124    32.934    -9.070 ;
+      sec 11   -0.833    0.112    37.313    -8.224 ;
+      sec 12   -0.797    0.102    41.692    -7.688 ;
+      sec 13   -0.760    0.093    46.071    -7.205 ;
+      sec 14   -0.721    0.083    50.450    -6.749 ;
+      sec 15   -0.683    0.075    54.829    -6.288 ;
+      sec 16   -0.644    0.066    59.208    -5.838 ;
+      sec 17   -0.606    0.058    63.587    -5.401 ;
+      sec 18   -0.567    0.050    67.966    -4.982 ;
+      sec 19   -0.529    0.044    72.345    -4.640 ;
+      sec 20   -0.492    0.037    76.724    -4.380 ;
+      sec 21   -0.456    0.032    81.103    -4.144 ;
+      sec 22   -0.422    0.026    85.482    -3.914 ;
+      sec 23   -0.392    0.021    89.861    -3.685 ;
+      sec 24   -0.346    0.014    94.240    -3.460 ;
+      sec 25   -0.307    0.010    96.190    -3.350 ;
+      sec 26   -0.249    0.005    98.130    -3.250 ;
+      sec 27   -0.089    0.006   100.080    -3.140 ;
+   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;
+      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; dummy non rotating hub coordinates
+      body1  towertop last;
+      body2  shaft_nonrotate 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang  5.0 0.0 0.0; same 5 deg tilt angle as real shaft
+    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;
+    end relative;
+;
+    begin relative;
+      body1  hub2 last;
+      body2  blade2 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  hub3 last;
+      body2  blade3 1;
+      body2_eulerang 0.0 0.0 0.0;
+    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 tower last ;
+           body2 shaft_nonrotate 1;
+     end fix1;
+;
+     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                     8   ;
+  tint                    0.232   ;
+  horizontal_input        1     ;
+  windfield_rotations     0 8.0 0.0 ;    yaw, tilt (positive=upflow=wind coming from below), rotation
+  center_pos0             0.0 0.0 -127 ; hub heigth
+  shear_format            3 0 ;
+  turb_format             0     ;  0=none, 1=mann,2=flex
+  tower_shadow_method     3     ;  0=none, 1=potential flow, 2=jet
+  scale_time_start       20 ;
+  wind_ramp_factor   0.0 20 1.0 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
+  ;
+;  wind_ramp_abs   400.0  2200.0  0.0   21.0 ;   wsp. after the step: 25.0
+;  wind_ramp_abs  2400.0  4200.0  0.0  -21.0 ;   wsp. after the step: 25.0
+  ;
+  begin mann ;
+    create_turb_parameters 29.4 1.0 3.9 0 1.0 ;      L, alfaeps, gamma, seed, highfrq compensation
+    filename_u    ./turb/noneu.bin ;
+    filename_v    ./turb/nonev.bin ;
+    filename_w    ./turb/nonew.bin ;
+    box_dim_u    8192 0.0390625 ;
+    box_dim_v    32 7.5;
+    box_dim_w    32 7.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     123.6 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 123.6 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  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/AVATAR_10MW_RWT_ae.dat ;
+  pc_filename        ./data/AVATAR_10MW_RWT_pc_hama_v1.dat ;
+  induction_method   1 ;     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    2 ;     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  59.5925   85.5023   ./data/Flap_dturwt1_Thk24.ds  ;  Flap Sec: 1
+   ; end dynstall_ateflap;
+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  100.0    	; Minimum pitch angle, theta_min [deg],
+								; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
+								; from a file named 'wpdata.n', where n=int(theta_min)
+      constant   6  90.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   1.64   	; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
+      ; Partial load control parameters
+      constant  11   0.9648030e+07 ; 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   1.047610E+08 ; Proportional gain of torque controller [Nm/(rad/s)]
+      constant  13   0.153367E+08 ; 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   1      	; Generator control switch [1=constant power, 2=constant torque]
+      constant  16   0.762489  ; Proportional gain of pitch controller [rad/(rad/s)]
+      constant  17   0.224086  ; Integral gain of pitch controller [rad/rad]
+      constant  18   0.0    ; Differential gain of pitch controller [rad/(rad/s^2)]
+      constant  19   0.4e-9 ; Proportional power error gain [rad/W]
+      constant  20   0.4e-9 ; Integral power error gain [rad/(Ws)]
+      constant  21  10.6824   ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
+      constant  22 601.25499  ; 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  25.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   25.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  205.8  ; 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 pitch3 1 only 1; [rad]
+      wind free_wind 1 0.0 0.0 -127 	 ; 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 5000    ; 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   5225.35 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
+      constant 2    100.0  ; Parameter 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.74 ; 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 5000   ; 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]
+      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  3.87  ; Tower radius close to downward blade tip [m]
+	end init ;
+    begin output;
+	  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+	  mbdy state pos blade1  26 1.0 global  ; [4,5,6]
+	  mbdy state pos blade2  26 1.0 global  ; [7,8,9]
+	  mbdy state pos blade3  26 1.0 global  ; [10,11,12]
+    end output;
+  end type2_dll;
+end dll;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+;
+begin output;
+  filename ./res/dlc01_demos/dlc01_steady_wsp8_noturb ;
+  time 20 40 ;
+  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 -127; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
+  ; non rotating coordinates shaft tip: equivalent to stationary hub in BLADED
+  mbdy momentvec shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  mbdy forcevec  shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  ; Moments:
+  mbdy momentvec tower  1 1  tower # tower base ;
+  mbdy momentvec tower  19 2 tower # tower yaw bearing ;
+  mbdy momentvec shaft  4 1  shaft # main bearing ;
+  mbdy momentvec blade1  3  2 blade1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 blade2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 blade3 # blade 3 root ;
+  ; blade 2,3 root section loads
+  mbdy momentvec blade2  3  2 local # blade 2 section root;
+  mbdy momentvec blade3  3  2 local # blade 3 section root;
+  ; blade 1 sectional loads in local coordinates
+  mbdy momentvec blade1  2  2 local # blade 1 section;
+  mbdy momentvec blade1  3  2 local # blade 1 section root;
+  mbdy momentvec blade1  4  2 local # blade 1 section;
+  mbdy momentvec blade1  5  2 local # blade 1 section;
+  mbdy momentvec blade1  6  2 local # blade 1 section;
+  mbdy momentvec blade1  7  2 local # blade 1 section;
+  mbdy momentvec blade1  8  2 local # blade 1 section;
+  mbdy momentvec blade1  9  2 local # blade 1 section;
+  mbdy momentvec blade1 10  2 local # blade 1 section;
+  mbdy momentvec blade1 11  2 local # blade 1 section;
+  mbdy momentvec blade1 12  2 local # blade 1 section;
+  mbdy momentvec blade1 13  2 local # blade 1 section;
+  mbdy momentvec blade1 14  2 local # blade 1 section;
+  mbdy momentvec blade1 15  2 local # blade 1 section;
+  mbdy momentvec blade1 16  2 local # blade 1 section;
+  mbdy momentvec blade1 17  2 local # blade 1 section;
+  mbdy momentvec blade1 18  2 local # blade 1 section;
+  mbdy momentvec blade1 19  2 local # blade 1 section;
+  mbdy momentvec blade1 20  2 local # blade 1 section;
+  mbdy momentvec blade1 21  2 local # blade 1 section;
+  mbdy momentvec blade1 22  2 local # blade 1 section;
+  mbdy momentvec blade1 23  2 local # blade 1 section;
+  mbdy momentvec blade1 24  2 local # blade 1 section;
+  mbdy momentvec blade1 25  2 local # blade 1 section;
+  mbdy momentvec blade1 26  2 local # blade 1 section;
+  ; blade root out and in of plane forces
+  mbdy momentvec blade1 3  2 hub1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 hub2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 hub3 # blade 3 root ;
+;  mbdy momentvec blade1 14 1 local # blade 1 50% local e coo ;
+;  mbdy momentvec blade2 14 1 local # blade 2 50% local e coo ;
+;  mbdy momentvec blade3 14 1 local # blade 3 50% local e coo ;
+  ; Displacements and accellerations
+  mbdy state pos tower 19 1.0 global only 1 # Tower top FA displ;
+  mbdy state pos tower 19 1.0 global only 2 # Tower top SS displ;
+  mbdy state acc tower 19 1.0 global only 1 # Tower top FA acc;
+  mbdy state acc tower 19 1.0 global only 2 # Tower top SS acc;
+;
+  mbdy state pos blade1  26 1.0 global # gl blade 1 tip pos ;
+  mbdy state pos blade2  26 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  26 1.0 blade1 # blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 blade2 # blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 blade3 # blade 3 tip pos ;
+;
+  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+;
+  ; elastic twist (torsional deformation) along the blade
+  aero tors_ang 1  45.56;
+  aero tors_ang 1  59.19;
+  aero tors_ang 1  70.87;
+  aero tors_ang 1  80.61;
+  aero tors_ang 1  84.50;
+  aero tors_ang 1  88.40;
+  aero tors_ang 1  92.29;
+  aero tors_ang 1  96.19;
+  aero tors_ang 1  98.13;
+  aero tors_ang 1 100.08; tip
+;
+; - 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];
+;   general constant 1.0 ;	constant 1.0 - to mesure activity of flap in terms of displacement
+; - 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] ;
+end output;
+;
+exit;
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc
new file mode 100644
index 0000000000000000000000000000000000000000..537e8ef73085b26598c46f2986c11fc8ad738464
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc
@@ -0,0 +1,850 @@
+;this version was at some point based on: Avatar_10MW_RWT version 1, 06-08-14, Anyd
+begin simulation;
+  time_stop    40;
+  solvertype   1 ;    (newmark)
+  on_no_convergence continue ;
+;  convergence_limits 1E3 1.0 1E-7 ;
+  logfile ./logfiles/dlc01_demos/dlc01_steady_wsp9_noturb.log ;
+  begin newmark;
+    deltat    0.02;
+  end newmark;
+end simulation;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin new_htc_structure;
+;--------------------------------------------------------------------------------------------------
+;  beam_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp9_noturb/dlc01_steady_wsp9_noturb_beam.dat;
+;  body_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp9_noturb/dlc01_steady_wsp9_noturb_body.dat;
+;  struct_inertia_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp9_noturb/dlc01_steady_wsp9_noturb_struct.dat;
+;  body_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp9_noturb/dlc01_steady_wsp9_noturb_body_eigen.dat;
+;  structure_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp9_noturb/dlc01_steady_wsp9_noturb_strc_eigen.dat;
+;---------------------------------------------------------------------------------------------------
+  begin main_body;         tower 123.6m
+    name        tower ;
+    type        timoschenko ;
+    nbodies     3 ;
+    node_distribution     c2_def ;
+    damping_posdef   0 0 0 4.7E-03 4.7E-03 4.3E-04 ; tuned by Anyd 12/8/14
+     begin timoschenko_input;
+      filename ./data/AVATAR_10MW_RWT_tower_st.dat;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 20;
+      sec	1	0	0	0.000	0	;  x,y,z,twist
+      sec	2	0	0	-12.293	0	;
+      sec	3	0	0	-12.294	0	;
+      sec	4	0	0	-24.585	0	;
+      sec	5	0	0	-24.586	0	;
+      sec	6	0	0	-36.878	0	;
+      sec	7	0	0	-36.879	0	;
+      sec	8	0	0	-49.171	0	;
+      sec	9	0	0	-49.172	0	 ;
+      sec	10	0	0	-61.463	0	;
+      sec	11	0	0	-61.464	0	;
+      sec	12	0	0	-73.756	0	;
+      sec	13	0	0	-73.757	0	;
+      sec	14	0	0	-86.049	0	;
+      sec	15	0	0	-86.050	0	;
+      sec	16	0	0	-98.341	0	;
+      sec	17	0	0	-98.342	0	;
+      sec	18	0	0	-110.634	0	;
+      sec	19	0	0	-110.635	0	;
+      sec	20	0	0	-123.600	0	;
+     end c2_def ;
+    end main_body;
+;
+  begin main_body;
+    name        towertop ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  7.50E-03  7.40E-03  7.00E-03  7.00E-03  7.00E-03  7.00E-03  ;   "changed by Anyd
+	concentrated_mass	2.0	0.0	2.6870E+00	3.0061E-01	4.4604E+05	4.1060E+06	4.1060E+05	4.1060E+06	;	Nacel
+	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  8.00E-3  8.00E-03  8.00E-02  4.65E-04  4.65E-04  2.38E-02 ; "tuned by Anyd 22/2/13
+	damping_posdef  0.0 0.0 3.983E-03 4.65E-04  4.65E-04  3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 l
+    concentrated_mass	1.0	0.0	0.0	0.0	0.0	0.0	0.0	3.751E+06	;	generator equivalent slow shaft "re_tu
+    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
+	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        shaft_nonrotate ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  0.00E+00 0.00E+00 0.00E+00  1.0E-01  1.0E-01  1.0E-01 ;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 3; dummy light and stiff structure
+    end timoschenko_input;
+    begin c2_def;
+      nsec 2;
+      sec 1 0.0 0.0 0.0    0.0 ;
+      sec 2 0.0 0.0 0.1    0.0 ;
+    end c2_def;
+  end main_body;
+;
+  begin main_body;
+    name        hub1 ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  2.00E-05  2.00E-05  2.00E-04  3.00E-06  3.00E-06  2.00E-05;
+	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           hub3 ;
+    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 2.5e-3 8.9e-4 3.2e-4 ; "Tuned by Anyd"
+;	damping_posdef   0.0 0.0 0.0 1.5e-3 2.45e-3 3.2e-4 ; " 3% damping tuned by Anyd 20/02/12 unable to
+;	damping_posdef   0.0 0.0 0.0 2.1e-3 1.9e-3 1.3e-4 ; " 3% damping tuned by Anyd 15/08/14 rev2
+	damping_posdef   0.0 0.0 0.0 1.68e-3 2.25e-3 1.0e-4 ; " 3% damping tuned by Anyd 16/12/14
+   begin timoschenko_input ;
+      filename ./data/AVATAR_10MW_RWT_Blade_st.dat ;
+      set 1 9 ;
+    end timoschenko_input;
+    begin c2_def;
+      nsec 27 ;
+      sec  1   -0.001   -0.001     0.000   -17.280 ;
+      sec  2   -0.005   -0.001     2.220   -17.280 ;
+      sec  3   -0.006   -0.000     4.440   -17.280 ;
+      sec  4   -0.086    0.022     6.660   -17.280 ;
+      sec  5   -0.231    0.069    11.039   -17.273 ;
+      sec  6   -0.447    0.121    15.418   -16.441 ;
+      sec  7   -0.690    0.161    19.797   -14.613 ;
+      sec  8   -0.812    0.162    24.176   -12.578 ;
+      sec  9   -0.891    0.158    28.555   -10.588 ;
+      sec 10   -0.865    0.124    32.934    -9.070 ;
+      sec 11   -0.833    0.112    37.313    -8.224 ;
+      sec 12   -0.797    0.102    41.692    -7.688 ;
+      sec 13   -0.760    0.093    46.071    -7.205 ;
+      sec 14   -0.721    0.083    50.450    -6.749 ;
+      sec 15   -0.683    0.075    54.829    -6.288 ;
+      sec 16   -0.644    0.066    59.208    -5.838 ;
+      sec 17   -0.606    0.058    63.587    -5.401 ;
+      sec 18   -0.567    0.050    67.966    -4.982 ;
+      sec 19   -0.529    0.044    72.345    -4.640 ;
+      sec 20   -0.492    0.037    76.724    -4.380 ;
+      sec 21   -0.456    0.032    81.103    -4.144 ;
+      sec 22   -0.422    0.026    85.482    -3.914 ;
+      sec 23   -0.392    0.021    89.861    -3.685 ;
+      sec 24   -0.346    0.014    94.240    -3.460 ;
+      sec 25   -0.307    0.010    96.190    -3.350 ;
+      sec 26   -0.249    0.005    98.130    -3.250 ;
+      sec 27   -0.089    0.006   100.080    -3.140 ;
+   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;
+      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; dummy non rotating hub coordinates
+      body1  towertop last;
+      body2  shaft_nonrotate 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang  5.0 0.0 0.0; same 5 deg tilt angle as real shaft
+    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;
+    end relative;
+;
+    begin relative;
+      body1  hub2 last;
+      body2  blade2 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  hub3 last;
+      body2  blade3 1;
+      body2_eulerang 0.0 0.0 0.0;
+    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 tower last ;
+           body2 shaft_nonrotate 1;
+     end fix1;
+;
+     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                     9   ;
+  tint                    0.219555555556   ;
+  horizontal_input        1     ;
+  windfield_rotations     0 8.0 0.0 ;    yaw, tilt (positive=upflow=wind coming from below), rotation
+  center_pos0             0.0 0.0 -127 ; hub heigth
+  shear_format            3 0 ;
+  turb_format             0     ;  0=none, 1=mann,2=flex
+  tower_shadow_method     3     ;  0=none, 1=potential flow, 2=jet
+  scale_time_start       20 ;
+  wind_ramp_factor   0.0 20 0.888888888889 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
+  ;
+;  wind_ramp_abs   400.0  2200.0  0.0   21.0 ;   wsp. after the step: 25.0
+;  wind_ramp_abs  2400.0  4200.0  0.0  -21.0 ;   wsp. after the step: 25.0
+  ;
+  begin mann ;
+    create_turb_parameters 29.4 1.0 3.9 0 1.0 ;      L, alfaeps, gamma, seed, highfrq compensation
+    filename_u    ./turb/noneu.bin ;
+    filename_v    ./turb/nonev.bin ;
+    filename_w    ./turb/nonew.bin ;
+    box_dim_u    8192 0.0439453125 ;
+    box_dim_v    32 7.5;
+    box_dim_w    32 7.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     123.6 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 123.6 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  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/AVATAR_10MW_RWT_ae.dat ;
+  pc_filename        ./data/AVATAR_10MW_RWT_pc_hama_v1.dat ;
+  induction_method   1 ;     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    2 ;     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  59.5925   85.5023   ./data/Flap_dturwt1_Thk24.ds  ;  Flap Sec: 1
+   ; end dynstall_ateflap;
+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  100.0    	; Minimum pitch angle, theta_min [deg],
+								; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
+								; from a file named 'wpdata.n', where n=int(theta_min)
+      constant   6  90.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   1.64   	; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
+      ; Partial load control parameters
+      constant  11   0.9648030e+07 ; 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   1.047610E+08 ; Proportional gain of torque controller [Nm/(rad/s)]
+      constant  13   0.153367E+08 ; 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   1      	; Generator control switch [1=constant power, 2=constant torque]
+      constant  16   0.762489  ; Proportional gain of pitch controller [rad/(rad/s)]
+      constant  17   0.224086  ; Integral gain of pitch controller [rad/rad]
+      constant  18   0.0    ; Differential gain of pitch controller [rad/(rad/s^2)]
+      constant  19   0.4e-9 ; Proportional power error gain [rad/W]
+      constant  20   0.4e-9 ; Integral power error gain [rad/(Ws)]
+      constant  21  10.6824   ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
+      constant  22 601.25499  ; 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  25.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   25.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  205.8  ; 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 pitch3 1 only 1; [rad]
+      wind free_wind 1 0.0 0.0 -127 	 ; 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 5000    ; 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   5225.35 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
+      constant 2    100.0  ; Parameter 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.74 ; 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 5000   ; 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]
+      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  3.87  ; Tower radius close to downward blade tip [m]
+	end init ;
+    begin output;
+	  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+	  mbdy state pos blade1  26 1.0 global  ; [4,5,6]
+	  mbdy state pos blade2  26 1.0 global  ; [7,8,9]
+	  mbdy state pos blade3  26 1.0 global  ; [10,11,12]
+    end output;
+  end type2_dll;
+end dll;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+;
+begin output;
+  filename ./res/dlc01_demos/dlc01_steady_wsp9_noturb ;
+  time 20 40 ;
+  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 -127; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
+  ; non rotating coordinates shaft tip: equivalent to stationary hub in BLADED
+  mbdy momentvec shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  mbdy forcevec  shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  ; Moments:
+  mbdy momentvec tower  1 1  tower # tower base ;
+  mbdy momentvec tower  19 2 tower # tower yaw bearing ;
+  mbdy momentvec shaft  4 1  shaft # main bearing ;
+  mbdy momentvec blade1  3  2 blade1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 blade2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 blade3 # blade 3 root ;
+  ; blade 2,3 root section loads
+  mbdy momentvec blade2  3  2 local # blade 2 section root;
+  mbdy momentvec blade3  3  2 local # blade 3 section root;
+  ; blade 1 sectional loads in local coordinates
+  mbdy momentvec blade1  2  2 local # blade 1 section;
+  mbdy momentvec blade1  3  2 local # blade 1 section root;
+  mbdy momentvec blade1  4  2 local # blade 1 section;
+  mbdy momentvec blade1  5  2 local # blade 1 section;
+  mbdy momentvec blade1  6  2 local # blade 1 section;
+  mbdy momentvec blade1  7  2 local # blade 1 section;
+  mbdy momentvec blade1  8  2 local # blade 1 section;
+  mbdy momentvec blade1  9  2 local # blade 1 section;
+  mbdy momentvec blade1 10  2 local # blade 1 section;
+  mbdy momentvec blade1 11  2 local # blade 1 section;
+  mbdy momentvec blade1 12  2 local # blade 1 section;
+  mbdy momentvec blade1 13  2 local # blade 1 section;
+  mbdy momentvec blade1 14  2 local # blade 1 section;
+  mbdy momentvec blade1 15  2 local # blade 1 section;
+  mbdy momentvec blade1 16  2 local # blade 1 section;
+  mbdy momentvec blade1 17  2 local # blade 1 section;
+  mbdy momentvec blade1 18  2 local # blade 1 section;
+  mbdy momentvec blade1 19  2 local # blade 1 section;
+  mbdy momentvec blade1 20  2 local # blade 1 section;
+  mbdy momentvec blade1 21  2 local # blade 1 section;
+  mbdy momentvec blade1 22  2 local # blade 1 section;
+  mbdy momentvec blade1 23  2 local # blade 1 section;
+  mbdy momentvec blade1 24  2 local # blade 1 section;
+  mbdy momentvec blade1 25  2 local # blade 1 section;
+  mbdy momentvec blade1 26  2 local # blade 1 section;
+  ; blade root out and in of plane forces
+  mbdy momentvec blade1 3  2 hub1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 hub2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 hub3 # blade 3 root ;
+;  mbdy momentvec blade1 14 1 local # blade 1 50% local e coo ;
+;  mbdy momentvec blade2 14 1 local # blade 2 50% local e coo ;
+;  mbdy momentvec blade3 14 1 local # blade 3 50% local e coo ;
+  ; Displacements and accellerations
+  mbdy state pos tower 19 1.0 global only 1 # Tower top FA displ;
+  mbdy state pos tower 19 1.0 global only 2 # Tower top SS displ;
+  mbdy state acc tower 19 1.0 global only 1 # Tower top FA acc;
+  mbdy state acc tower 19 1.0 global only 2 # Tower top SS acc;
+;
+  mbdy state pos blade1  26 1.0 global # gl blade 1 tip pos ;
+  mbdy state pos blade2  26 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  26 1.0 blade1 # blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 blade2 # blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 blade3 # blade 3 tip pos ;
+;
+  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+;
+  ; elastic twist (torsional deformation) along the blade
+  aero tors_ang 1  45.56;
+  aero tors_ang 1  59.19;
+  aero tors_ang 1  70.87;
+  aero tors_ang 1  80.61;
+  aero tors_ang 1  84.50;
+  aero tors_ang 1  88.40;
+  aero tors_ang 1  92.29;
+  aero tors_ang 1  96.19;
+  aero tors_ang 1  98.13;
+  aero tors_ang 1 100.08; tip
+;
+; - 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];
+;   general constant 1.0 ;	constant 1.0 - to mesure activity of flap in terms of displacement
+; - 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] ;
+end output;
+;
+exit;
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_noturb.p
new file mode 100644
index 0000000000000000000000000000000000000000..1bc115f781b7821f729e97bddcf49683bb623c20
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_noturb.p
@@ -0,0 +1,55 @@
+### Standard Output 
+#PBS -N dlc01_steady_wsp10_noturb 
+#PBS -o ./pbs_out/dlc01_demos/dlc01_steady_wsp10_noturb.out
+### Standard Error 
+#PBS -e ./pbs_out/dlc01_demos/dlc01_steady_wsp10_noturb.err
+#PBS -W umask=003
+### Maximum wallclock time format HOURS:MINUTES:SECONDS
+#PBS -l walltime=04:00:00
+#PBS -l nodes=1:ppn=1
+### Queue name
+#PBS -q workq
+### Create scratch directory and copy data to it 
+cd $PBS_O_WORKDIR
+echo "current working dir (pwd):"
+pwd 
+cp -R ./demo_dlc_remote.zip /scratch/$USER/$PBS_JOBID
+
+
+echo ""
+echo "Execute commands on scratch nodes"
+cd /scratch/$USER/$PBS_JOBID
+pwd
+/usr/bin/unzip demo_dlc_remote.zip
+mkdir -p htc/dlc01_demos/
+mkdir -p res/dlc01_demos/
+mkdir -p logfiles/dlc01_demos/
+mkdir -p turb/
+cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc ./htc/dlc01_demos/
+cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ 
+time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc  &
+### wait for jobs to finish 
+wait
+echo ""
+echo "Copy back from scratch directory" 
+cd /scratch/$USER/$PBS_JOBID
+mkdir -p $PBS_O_WORKDIR/res/dlc01_demos/
+mkdir -p $PBS_O_WORKDIR/logfiles/dlc01_demos/
+mkdir -p $PBS_O_WORKDIR/animation/
+mkdir -p $PBS_O_WORKDIR/../turb/
+cp -R res/dlc01_demos/. $PBS_O_WORKDIR/res/dlc01_demos/.
+cp -R logfiles/dlc01_demos/. $PBS_O_WORKDIR/logfiles/dlc01_demos/.
+cp -R animation/. $PBS_O_WORKDIR/animation/.
+
+echo ""
+echo "COPY BACK TURB IF APPLICABLE"
+cd turb/
+for i in `ls *.bin`; do  if [ -e $PBS_O_WORKDIR/../turb/$i ]; then echo "$i exists no copyback"; else echo "$i copyback"; cp $i $PBS_O_WORKDIR/../turb/; fi; done
+cd /scratch/$USER/$PBS_JOBID
+echo "END COPY BACK TURB"
+echo ""
+
+echo ""
+echo "following files are on the node (find .):"
+find .
+exit
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p
new file mode 100644
index 0000000000000000000000000000000000000000..640e5c20ec09f6f50b5a6002586bd030b96604c9
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p
@@ -0,0 +1,55 @@
+### Standard Output 
+#PBS -N dlc01_steady_wsp8_noturb 
+#PBS -o ./pbs_out/dlc01_demos/dlc01_steady_wsp8_noturb.out
+### Standard Error 
+#PBS -e ./pbs_out/dlc01_demos/dlc01_steady_wsp8_noturb.err
+#PBS -W umask=003
+### Maximum wallclock time format HOURS:MINUTES:SECONDS
+#PBS -l walltime=04:00:00
+#PBS -l nodes=1:ppn=1
+### Queue name
+#PBS -q workq
+### Create scratch directory and copy data to it 
+cd $PBS_O_WORKDIR
+echo "current working dir (pwd):"
+pwd 
+cp -R ./demo_dlc_remote.zip /scratch/$USER/$PBS_JOBID
+
+
+echo ""
+echo "Execute commands on scratch nodes"
+cd /scratch/$USER/$PBS_JOBID
+pwd
+/usr/bin/unzip demo_dlc_remote.zip
+mkdir -p htc/dlc01_demos/
+mkdir -p res/dlc01_demos/
+mkdir -p logfiles/dlc01_demos/
+mkdir -p turb/
+cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc ./htc/dlc01_demos/
+cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ 
+time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc  &
+### wait for jobs to finish 
+wait
+echo ""
+echo "Copy back from scratch directory" 
+cd /scratch/$USER/$PBS_JOBID
+mkdir -p $PBS_O_WORKDIR/res/dlc01_demos/
+mkdir -p $PBS_O_WORKDIR/logfiles/dlc01_demos/
+mkdir -p $PBS_O_WORKDIR/animation/
+mkdir -p $PBS_O_WORKDIR/../turb/
+cp -R res/dlc01_demos/. $PBS_O_WORKDIR/res/dlc01_demos/.
+cp -R logfiles/dlc01_demos/. $PBS_O_WORKDIR/logfiles/dlc01_demos/.
+cp -R animation/. $PBS_O_WORKDIR/animation/.
+
+echo ""
+echo "COPY BACK TURB IF APPLICABLE"
+cd turb/
+for i in `ls *.bin`; do  if [ -e $PBS_O_WORKDIR/../turb/$i ]; then echo "$i exists no copyback"; else echo "$i copyback"; cp $i $PBS_O_WORKDIR/../turb/; fi; done
+cd /scratch/$USER/$PBS_JOBID
+echo "END COPY BACK TURB"
+echo ""
+
+echo ""
+echo "following files are on the node (find .):"
+find .
+exit
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p
new file mode 100644
index 0000000000000000000000000000000000000000..a9d5ef524b9feddbadd7df3e08d7873cc39fe96d
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p
@@ -0,0 +1,55 @@
+### Standard Output 
+#PBS -N dlc01_steady_wsp9_noturb 
+#PBS -o ./pbs_out/dlc01_demos/dlc01_steady_wsp9_noturb.out
+### Standard Error 
+#PBS -e ./pbs_out/dlc01_demos/dlc01_steady_wsp9_noturb.err
+#PBS -W umask=003
+### Maximum wallclock time format HOURS:MINUTES:SECONDS
+#PBS -l walltime=04:00:00
+#PBS -l nodes=1:ppn=1
+### Queue name
+#PBS -q workq
+### Create scratch directory and copy data to it 
+cd $PBS_O_WORKDIR
+echo "current working dir (pwd):"
+pwd 
+cp -R ./demo_dlc_remote.zip /scratch/$USER/$PBS_JOBID
+
+
+echo ""
+echo "Execute commands on scratch nodes"
+cd /scratch/$USER/$PBS_JOBID
+pwd
+/usr/bin/unzip demo_dlc_remote.zip
+mkdir -p htc/dlc01_demos/
+mkdir -p res/dlc01_demos/
+mkdir -p logfiles/dlc01_demos/
+mkdir -p turb/
+cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc ./htc/dlc01_demos/
+cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ 
+time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc  &
+### wait for jobs to finish 
+wait
+echo ""
+echo "Copy back from scratch directory" 
+cd /scratch/$USER/$PBS_JOBID
+mkdir -p $PBS_O_WORKDIR/res/dlc01_demos/
+mkdir -p $PBS_O_WORKDIR/logfiles/dlc01_demos/
+mkdir -p $PBS_O_WORKDIR/animation/
+mkdir -p $PBS_O_WORKDIR/../turb/
+cp -R res/dlc01_demos/. $PBS_O_WORKDIR/res/dlc01_demos/.
+cp -R logfiles/dlc01_demos/. $PBS_O_WORKDIR/logfiles/dlc01_demos/.
+cp -R animation/. $PBS_O_WORKDIR/animation/.
+
+echo ""
+echo "COPY BACK TURB IF APPLICABLE"
+cd turb/
+for i in `ls *.bin`; do  if [ -e $PBS_O_WORKDIR/../turb/$i ]; then echo "$i exists no copyback"; else echo "$i copyback"; cp $i $PBS_O_WORKDIR/../turb/; fi; done
+cd /scratch/$USER/$PBS_JOBID
+echo "END COPY BACK TURB"
+echo ""
+
+echo ""
+echo "following files are on the node (find .):"
+find .
+exit
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote.pkl b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote.pkl
new file mode 100644
index 0000000000000000000000000000000000000000..424870abe4d235d40b0bc86884127247ace71cde
Binary files /dev/null and b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote.pkl differ
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt
new file mode 100644
index 0000000000000000000000000000000000000000..21c9f3dd8e9452763faab41e0e8920e87c22a63d
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt
@@ -0,0 +1,178 @@
+
+
+===============================================================================
+                    iter_dict
+===============================================================================
+                       [empty] : [False]             
+
+===============================================================================
+                     opt_tags
+===============================================================================
+
+-------------------------------------------------------------------------------
+                 opt_tags set
+-------------------------------------------------------------------------------
+                 [Case folder] : dlc01_demos         
+                    [Case id.] : dlc01_steady_wsp8_noturb
+                 [Cut-in time] : -1                  
+                [Cut-out time] : -1                  
+                         [DLC] : 01                  
+                   [Dyn stall] : 2                   
+              [Free shaft rot] : True                
+                         [G_A] : True                
+                         [G_T] : True                
+                      [G_phi0] : True                
+                        [G_t0] : True                
+              [Grid loss time] : 5000                
+                   [Induction] : 1                   
+              [Pitch 1 DLC22b] : 0                   
+                    [Pitvel 1] : 3                   
+                    [Pitvel 2] : 4                   
+               [Rotor azimuth] : 0                   
+                [Rotor locked] : False               
+                   [Stop type] : 1                   
+                          [TI] : 0.232               
+          [Time pitch runaway] : 5000                
+           [Time stuck DLC22b] : -1                  
+              [Turb base name] : none                
+                   [Windspeed] : 8                   
+                     [case_id] : dlc01_steady_wsp8_noturb
+                    [data_dir] : data/               
+                 [dis_setbeta] : True                
+                    [duration] : 20.0                
+                        [gust] : False               
+                   [gust_type] : True                
+                     [htc_dir] : htc/dlc01_demos/    
+                     [init_wr] : 0.5                 
+                    [iter_dir] : iter/dlc01_demos/   
+                     [log_dir] : logfiles/dlc01_demos/
+                  [out_format] : hawc_binary         
+                  [pbs_in_dir] : pbs_in/dlc01_demos/ 
+                 [pbs_out_dir] : pbs_out/dlc01_demos/
+                     [res_dir] : res/dlc01_demos/    
+                   [shear_exp] : 0                   
+                   [staircase] : False               
+                   [t flap on] : -1                  
+                          [t0] : 20                  
+                   [time stop] : 40                  
+                   [time_stop] : 40                  
+                    [tu_model] : 0                   
+                     [tu_seed] : 0                   
+              [turb_base_name] : none                
+                     [turb_dx] : 0.0390625           
+                        [wdir] : 0                   
+                    [windramp] : False               
+                  [wsp factor] : 1.0                 
+              [zip_root_files] : []                  
+
+-------------------------------------------------------------------------------
+                 opt_tags set
+-------------------------------------------------------------------------------
+                 [Case folder] : dlc01_demos         
+                    [Case id.] : dlc01_steady_wsp9_noturb
+                 [Cut-in time] : -1                  
+                [Cut-out time] : -1                  
+                         [DLC] : 01                  
+                   [Dyn stall] : 2                   
+              [Free shaft rot] : True                
+                         [G_A] : True                
+                         [G_T] : True                
+                      [G_phi0] : True                
+                        [G_t0] : True                
+              [Grid loss time] : 5000                
+                   [Induction] : 1                   
+              [Pitch 1 DLC22b] : 0                   
+                    [Pitvel 1] : 3                   
+                    [Pitvel 2] : 4                   
+               [Rotor azimuth] : 0                   
+                [Rotor locked] : False               
+                   [Stop type] : 1                   
+                          [TI] : 0.219555555556      
+          [Time pitch runaway] : 5000                
+           [Time stuck DLC22b] : -1                  
+              [Turb base name] : none                
+                   [Windspeed] : 9                   
+                     [case_id] : dlc01_steady_wsp9_noturb
+                    [data_dir] : data/               
+                 [dis_setbeta] : True                
+                    [duration] : 20.0                
+                        [gust] : False               
+                   [gust_type] : True                
+                     [htc_dir] : htc/dlc01_demos/    
+                     [init_wr] : 0.5                 
+                    [iter_dir] : iter/dlc01_demos/   
+                     [log_dir] : logfiles/dlc01_demos/
+                  [out_format] : hawc_binary         
+                  [pbs_in_dir] : pbs_in/dlc01_demos/ 
+                 [pbs_out_dir] : pbs_out/dlc01_demos/
+                     [res_dir] : res/dlc01_demos/    
+                   [shear_exp] : 0                   
+                   [staircase] : False               
+                   [t flap on] : -1                  
+                          [t0] : 20                  
+                   [time stop] : 40                  
+                   [time_stop] : 40                  
+                    [tu_model] : 0                   
+                     [tu_seed] : 0                   
+              [turb_base_name] : none                
+                     [turb_dx] : 0.0439453125        
+                        [wdir] : 0                   
+                    [windramp] : False               
+                  [wsp factor] : 0.888888888889      
+              [zip_root_files] : []                  
+
+-------------------------------------------------------------------------------
+                 opt_tags set
+-------------------------------------------------------------------------------
+                 [Case folder] : dlc01_demos         
+                    [Case id.] : dlc01_steady_wsp10_noturb
+                 [Cut-in time] : -1                  
+                [Cut-out time] : -1                  
+                         [DLC] : 01                  
+                   [Dyn stall] : 2                   
+              [Free shaft rot] : True                
+                         [G_A] : True                
+                         [G_T] : True                
+                      [G_phi0] : True                
+                        [G_t0] : True                
+              [Grid loss time] : 5000                
+                   [Induction] : 1                   
+              [Pitch 1 DLC22b] : 0                   
+                    [Pitvel 1] : 3                   
+                    [Pitvel 2] : 4                   
+               [Rotor azimuth] : 0                   
+                [Rotor locked] : False               
+                   [Stop type] : 1                   
+                          [TI] : 0.2096              
+          [Time pitch runaway] : 5000                
+           [Time stuck DLC22b] : -1                  
+              [Turb base name] : none                
+                   [Windspeed] : 10                  
+                     [case_id] : dlc01_steady_wsp10_noturb
+                    [data_dir] : data/               
+                 [dis_setbeta] : True                
+                    [duration] : 20.0                
+                        [gust] : False               
+                   [gust_type] : True                
+                     [htc_dir] : htc/dlc01_demos/    
+                     [init_wr] : 0.5                 
+                    [iter_dir] : iter/dlc01_demos/   
+                     [log_dir] : logfiles/dlc01_demos/
+                  [out_format] : hawc_binary         
+                  [pbs_in_dir] : pbs_in/dlc01_demos/ 
+                 [pbs_out_dir] : pbs_out/dlc01_demos/
+                     [res_dir] : res/dlc01_demos/    
+                   [shear_exp] : 0                   
+                   [staircase] : False               
+                   [t flap on] : -1                  
+                          [t0] : 20                  
+                   [time stop] : 40                  
+                   [time_stop] : 40                  
+                    [tu_model] : 0                   
+                     [tu_seed] : 0                   
+              [turb_base_name] : none                
+                     [turb_dx] : 0.048828125         
+                        [wdir] : 0                   
+                    [windramp] : False               
+                  [wsp factor] : 0.8                 
+              [zip_root_files] : []                  
diff --git a/wetb/prepost/tests/data/demo_dlc/source/control/minimal_demo_file.txt b/wetb/prepost/tests/data/demo_dlc/source/control/minimal_demo_file.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8db2621539988442dd84f09006b47d9b6ed08690
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/source/control/minimal_demo_file.txt
@@ -0,0 +1 @@
+just one demo line
diff --git a/wetb/prepost/tests/data/demo_dlc/source/data/minimal_demo_file.txt b/wetb/prepost/tests/data/demo_dlc/source/data/minimal_demo_file.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8db2621539988442dd84f09006b47d9b6ed08690
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/source/data/minimal_demo_file.txt
@@ -0,0 +1 @@
+just one demo line
diff --git a/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip b/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip
new file mode 100644
index 0000000000000000000000000000000000000000..60fe434ad3dc15cf5e1dd1977c630107c611ac55
Binary files /dev/null and b/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip differ
diff --git a/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx b/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx
new file mode 100755
index 0000000000000000000000000000000000000000..1f4c2311367ccea9d06f57db32793e8948f0e959
Binary files /dev/null and b/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx differ
diff --git a/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc b/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc
new file mode 100755
index 0000000000000000000000000000000000000000..6e956f80d62257709ddd129408b8d77305da4339
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc
@@ -0,0 +1,850 @@
+;this version was at some point based on: Avatar_10MW_RWT version 1, 06-08-14, Anyd
+begin simulation;
+  time_stop    [time stop];
+  solvertype   1 ;    (newmark)
+  on_no_convergence continue ;
+;  convergence_limits 1E3 1.0 1E-7 ;
+  logfile ./logfiles/[Case folder]/[Case id.].log ;
+  begin newmark;
+    deltat    0.02;
+  end newmark;
+end simulation;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin new_htc_structure;
+;--------------------------------------------------------------------------------------------------
+[staircase]  beam_output_file_name  ./res_eigen/[Case folder]/[Case id.]/[Case id.]_beam.dat;
+[staircase]  body_output_file_name  ./res_eigen/[Case folder]/[Case id.]/[Case id.]_body.dat;
+[staircase]  struct_inertia_output_file_name ./res_eigen/[Case folder]/[Case id.]/[Case id.]_struct.dat;
+[staircase]  body_eigenanalysis_file_name ./res_eigen/[Case folder]/[Case id.]/[Case id.]_body_eigen.dat;
+[staircase]  structure_eigenanalysis_file_name ./res_eigen/[Case folder]/[Case id.]/[Case id.]_strc_eigen.dat;
+;---------------------------------------------------------------------------------------------------
+  begin main_body;         tower 123.6m
+    name        tower ;
+    type        timoschenko ;
+    nbodies     3 ;
+    node_distribution     c2_def ;
+    damping_posdef   0 0 0 4.7E-03 4.7E-03 4.3E-04 ; tuned by Anyd 12/8/14
+     begin timoschenko_input;
+      filename ./data/AVATAR_10MW_RWT_tower_st.dat;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 20;
+      sec	1	0	0	0.000	0	;  x,y,z,twist
+      sec	2	0	0	-12.293	0	;
+      sec	3	0	0	-12.294	0	;
+      sec	4	0	0	-24.585	0	;
+      sec	5	0	0	-24.586	0	;
+      sec	6	0	0	-36.878	0	;
+      sec	7	0	0	-36.879	0	;
+      sec	8	0	0	-49.171	0	;
+      sec	9	0	0	-49.172	0	 ;
+      sec	10	0	0	-61.463	0	;
+      sec	11	0	0	-61.464	0	;
+      sec	12	0	0	-73.756	0	;
+      sec	13	0	0	-73.757	0	;
+      sec	14	0	0	-86.049	0	;
+      sec	15	0	0	-86.050	0	;
+      sec	16	0	0	-98.341	0	;
+      sec	17	0	0	-98.342	0	;
+      sec	18	0	0	-110.634	0	;
+      sec	19	0	0	-110.635	0	;
+      sec	20	0	0	-123.600	0	;
+     end c2_def ;
+    end main_body;
+;
+  begin main_body;
+    name        towertop ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  7.50E-03  7.40E-03  7.00E-03  7.00E-03  7.00E-03  7.00E-03  ;   "changed by Anyd
+	concentrated_mass	2.0	0.0	2.6870E+00	3.0061E-01	4.4604E+05	4.1060E+06	4.1060E+05	4.1060E+06	;	Nacel
+	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  8.00E-3  8.00E-03  8.00E-02  4.65E-04  4.65E-04  2.38E-02 ; "tuned by Anyd 22/2/13
+	damping_posdef  0.0 0.0 3.983E-03 4.65E-04  4.65E-04  3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 l
+    concentrated_mass	1.0	0.0	0.0	0.0	0.0	0.0	0.0	3.751E+06	;	generator equivalent slow shaft "re_tu
+    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
+	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        shaft_nonrotate ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  0.00E+00 0.00E+00 0.00E+00  1.0E-01  1.0E-01  1.0E-01 ;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 3; dummy light and stiff structure
+    end timoschenko_input;
+    begin c2_def;
+      nsec 2;
+      sec 1 0.0 0.0 0.0    0.0 ;
+      sec 2 0.0 0.0 0.1    0.0 ;
+    end c2_def;
+  end main_body;
+;
+  begin main_body;
+    name        hub1 ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  2.00E-05  2.00E-05  2.00E-04  3.00E-06  3.00E-06  2.00E-05;
+	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           hub3 ;
+    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 2.5e-3 8.9e-4 3.2e-4 ; "Tuned by Anyd"
+;	damping_posdef   0.0 0.0 0.0 1.5e-3 2.45e-3 3.2e-4 ; " 3% damping tuned by Anyd 20/02/12 unable to
+;	damping_posdef   0.0 0.0 0.0 2.1e-3 1.9e-3 1.3e-4 ; " 3% damping tuned by Anyd 15/08/14 rev2
+	damping_posdef   0.0 0.0 0.0 1.68e-3 2.25e-3 1.0e-4 ; " 3% damping tuned by Anyd 16/12/14
+   begin timoschenko_input ;
+      filename ./data/AVATAR_10MW_RWT_Blade_st.dat ;
+      set 1 9 ;
+    end timoschenko_input;
+    begin c2_def;
+      nsec 27 ;
+      sec  1   -0.001   -0.001     0.000   -17.280 ;
+      sec  2   -0.005   -0.001     2.220   -17.280 ;
+      sec  3   -0.006   -0.000     4.440   -17.280 ;
+      sec  4   -0.086    0.022     6.660   -17.280 ;
+      sec  5   -0.231    0.069    11.039   -17.273 ;
+      sec  6   -0.447    0.121    15.418   -16.441 ;
+      sec  7   -0.690    0.161    19.797   -14.613 ;
+      sec  8   -0.812    0.162    24.176   -12.578 ;
+      sec  9   -0.891    0.158    28.555   -10.588 ;
+      sec 10   -0.865    0.124    32.934    -9.070 ;
+      sec 11   -0.833    0.112    37.313    -8.224 ;
+      sec 12   -0.797    0.102    41.692    -7.688 ;
+      sec 13   -0.760    0.093    46.071    -7.205 ;
+      sec 14   -0.721    0.083    50.450    -6.749 ;
+      sec 15   -0.683    0.075    54.829    -6.288 ;
+      sec 16   -0.644    0.066    59.208    -5.838 ;
+      sec 17   -0.606    0.058    63.587    -5.401 ;
+      sec 18   -0.567    0.050    67.966    -4.982 ;
+      sec 19   -0.529    0.044    72.345    -4.640 ;
+      sec 20   -0.492    0.037    76.724    -4.380 ;
+      sec 21   -0.456    0.032    81.103    -4.144 ;
+      sec 22   -0.422    0.026    85.482    -3.914 ;
+      sec 23   -0.392    0.021    89.861    -3.685 ;
+      sec 24   -0.346    0.014    94.240    -3.460 ;
+      sec 25   -0.307    0.010    96.190    -3.350 ;
+      sec 26   -0.249    0.005    98.130    -3.250 ;
+      sec 27   -0.089    0.006   100.080    -3.140 ;
+   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 [Rotor azimuth];
+[Free shaft rot]      mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 [init_wr] ; mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 [init_wr];
+    end relative;
+;
+    begin relative; dummy non rotating hub coordinates
+      body1  towertop last;
+      body2  shaft_nonrotate 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang  5.0 0.0 0.0; same 5 deg tilt angle as real shaft
+    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;
+    end relative;
+;
+    begin relative;
+      body1  hub2 last;
+      body2  blade2 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  hub3 last;
+      body2  blade3 1;
+      body2_eulerang 0.0 0.0 0.0;
+    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;
+;
+[Free shaft rot]    begin bearing1;                       free bearing
+[Free shaft rot]      name  shaft_rot;
+[Free shaft rot]      body1 towertop last;
+[Free shaft rot]      body2 shaft 1;
+[Free shaft rot]      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
+[Free shaft rot]   end bearing1;
+;
+[Rotor locked]    begin bearing3;                       free bearing
+[Rotor locked]      name  shaft_rot;
+[Rotor locked]      body1 towertop last;
+[Rotor locked]      body2 shaft 1;
+[Rotor locked]      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
+[Rotor locked]      omegas 0.0 ;
+[Rotor locked]   end bearing3;
+;
+     begin fix1;
+           body1 tower last ;
+           body2 shaft_nonrotate 1;
+     end fix1;
+;
+     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                     [Windspeed]   ;
+  tint                    [TI]   ;
+  horizontal_input        1     ;
+  windfield_rotations     [wdir] 8.0 0.0 ;    yaw, tilt (positive=upflow=wind coming from below), rotation
+  center_pos0             0.0 0.0 -127 ; hub heigth
+  shear_format            3 [shear_exp] ;
+  turb_format             [tu_model]     ;  0=none, 1=mann,2=flex
+  tower_shadow_method     3     ;  0=none, 1=potential flow, 2=jet
+  scale_time_start       [t0] ;
+  wind_ramp_factor   0.0 [t0] [wsp factor] 1.0 ;
+  [gust] iec_gust [gust_type] [G_A] [G_phi0] [G_t0] [G_T] ;
+;
+[staircase]  wind_ramp_abs  400.0  401.0  0.0   1.0 ;   wsp. after the step:  5.0
+[staircase]  wind_ramp_abs  501.0  502.0  0.0   1.0 ;   wsp. after the step:  6.0
+[staircase]  wind_ramp_abs  602.0  603.0  0.0   1.0 ;   wsp. after the step:  7.0
+[staircase]  wind_ramp_abs  703.0  704.0  0.0   1.0 ;   wsp. after the step:  8.0
+[staircase]  wind_ramp_abs  804.0  805.0  0.0   1.0 ;   wsp. after the step:  9.0
+[staircase]  wind_ramp_abs  905.0  906.0  0.0   1.0 ;   wsp. after the step: 10.0
+[staircase]  wind_ramp_abs  1006.0  1007.0  0.0   1.0 ;   wsp. after the step: 11.0
+[staircase]  wind_ramp_abs  1107.0  1108.0  0.0   1.0 ;   wsp. after the step: 12.0
+[staircase]  wind_ramp_abs  1208.0  1209.0  0.0   1.0 ;   wsp. after the step: 13.0
+[staircase]  wind_ramp_abs  1309.0  1310.0  0.0   1.0 ;   wsp. after the step: 14.0
+[staircase]  wind_ramp_abs  1410.0  1411.0  0.0   1.0 ;   wsp. after the step: 15.0
+[staircase]  wind_ramp_abs  1511.0  1512.0  0.0   1.0 ;   wsp. after the step: 16.0
+[staircase]  wind_ramp_abs  1612.0  1613.0  0.0   1.0 ;   wsp. after the step: 17.0
+[staircase]  wind_ramp_abs  1713.0  1714.0  0.0   1.0 ;   wsp. after the step: 18.0
+[staircase]  wind_ramp_abs  1814.0  1815.0  0.0   1.0 ;   wsp. after the step: 19.0
+[staircase]  wind_ramp_abs  1915.0  1916.0  0.0   1.0 ;   wsp. after the step: 20.0
+[staircase]  wind_ramp_abs  2016.0  2017.0  0.0   1.0 ;   wsp. after the step: 21.0
+[staircase]  wind_ramp_abs  2117.0  2118.0  0.0   1.0 ;   wsp. after the step: 22.0
+[staircase]  wind_ramp_abs  2218.0  2219.0  0.0   1.0 ;   wsp. after the step: 23.0
+[staircase]  wind_ramp_abs  2319.0  2320.0  0.0   1.0 ;   wsp. after the step: 24.0
+[staircase]  wind_ramp_abs  2420.0  2421.0  0.0   1.0 ;   wsp. after the step: 25.0
+  ;
+[windramp]  wind_ramp_abs   400.0  2200.0  0.0   21.0 ;   wsp. after the step: 25.0
+[windramp]  wind_ramp_abs  2400.0  4200.0  0.0  -21.0 ;   wsp. after the step: 25.0
+  ;
+  begin mann ;
+    create_turb_parameters 29.4 1.0 3.9 [tu_seed] 1.0 ;      L, alfaeps, gamma, seed, highfrq compensation
+    filename_u    ./[turb_dir][Turb base name]u.bin ;
+    filename_v    ./[turb_dir][Turb base name]v.bin ;
+    filename_w    ./[turb_dir][Turb base name]w.bin ;
+    box_dim_u    8192 [turb_dx] ;
+    box_dim_v    32 7.5;
+    box_dim_w    32 7.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     123.6 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 123.6 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  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/AVATAR_10MW_RWT_ae.dat ;
+  pc_filename        ./data/AVATAR_10MW_RWT_pc_hama_v1.dat ;
+  induction_method   [Induction] ;     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    [Dyn stall] ;     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  59.5925   85.5023   ./data/Flap_dturwt1_Thk24.ds  ;  Flap Sec: 1
+   ; end dynstall_ateflap;
+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  100.0    	; Minimum pitch angle, theta_min [deg],
+								; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
+								; from a file named 'wpdata.n', where n=int(theta_min)
+      constant   6  90.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   1.64   	; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
+      ; Partial load control parameters
+      constant  11   0.9648030e+07 ; 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   1.047610E+08 ; Proportional gain of torque controller [Nm/(rad/s)]
+      constant  13   0.153367E+08 ; 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   1      	; Generator control switch [1=constant power, 2=constant torque]
+      constant  16   0.762489  ; Proportional gain of pitch controller [rad/(rad/s)]
+      constant  17   0.224086  ; Integral gain of pitch controller [rad/rad]
+      constant  18   0.0    ; Differential gain of pitch controller [rad/(rad/s^2)]
+      constant  19   0.4e-9 ; Proportional power error gain [rad/W]
+      constant  20   0.4e-9 ; Integral power error gain [rad/(Ws)]
+      constant  21  10.6824   ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
+      constant  22 601.25499  ; 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  [Cut-in time]  ; Cut-in time [s]
+      constant  25  1.0   ; Time delay for soft start of torque [1/1P]
+;     Cut-out simulation parameters
+      constant  26  [Cut-out time]  ; Cut-out time [s]
+      constant  27   5.0  ; Time constant for linear torque cut-out [s]
+      constant  28  [Stop type]    ; Stop type [1=normal, 2=emergency]
+      constant  29  1.0  ; Time delay for pitch stop after shut-down signal [s]
+      constant  30  [Pitvel 1]  ; 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  [Pitvel 2]  ; 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  25.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   25.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  205.8  ; 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 pitch3 1 only 1; [rad]
+      wind free_wind 1 0.0 0.0 -127 	 ; 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 [Grid loss time]    ; 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   5225.35 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
+      constant 2    100.0  ; Parameter 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.74 ; 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 [Time pitch runaway]   ; Time for pitch runaway [s]
+	  constant  9 [Time stuck DLC22b]    ; Time for stuck blade 1 [s]
+	  constant 10 [Pitch 1 DLC22b]       ; 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]
+      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  3.87  ; Tower radius close to downward blade tip [m]
+	end init ;
+    begin output;
+	  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+	  mbdy state pos blade1  26 1.0 global  ; [4,5,6]
+	  mbdy state pos blade2  26 1.0 global  ; [7,8,9]
+	  mbdy state pos blade3  26 1.0 global  ; [10,11,12]
+    end output;
+  end type2_dll;
+end dll;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+;
+begin output;
+  filename ./res/[Case folder]/[Case id.] ;
+  time [t0] [time stop] ;
+  data_format  [out_format];
+  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 -127; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
+  ; non rotating coordinates shaft tip: equivalent to stationary hub in BLADED
+  mbdy momentvec shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  mbdy forcevec  shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  ; Moments:
+  mbdy momentvec tower  1 1  tower # tower base ;
+  mbdy momentvec tower  19 2 tower # tower yaw bearing ;
+  mbdy momentvec shaft  4 1  shaft # main bearing ;
+  mbdy momentvec blade1  3  2 blade1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 blade2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 blade3 # blade 3 root ;
+  ; blade 2,3 root section loads
+  mbdy momentvec blade2  3  2 local # blade 2 section root;
+  mbdy momentvec blade3  3  2 local # blade 3 section root;
+  ; blade 1 sectional loads in local coordinates
+  mbdy momentvec blade1  2  2 local # blade 1 section;
+  mbdy momentvec blade1  3  2 local # blade 1 section root;
+  mbdy momentvec blade1  4  2 local # blade 1 section;
+  mbdy momentvec blade1  5  2 local # blade 1 section;
+  mbdy momentvec blade1  6  2 local # blade 1 section;
+  mbdy momentvec blade1  7  2 local # blade 1 section;
+  mbdy momentvec blade1  8  2 local # blade 1 section;
+  mbdy momentvec blade1  9  2 local # blade 1 section;
+  mbdy momentvec blade1 10  2 local # blade 1 section;
+  mbdy momentvec blade1 11  2 local # blade 1 section;
+  mbdy momentvec blade1 12  2 local # blade 1 section;
+  mbdy momentvec blade1 13  2 local # blade 1 section;
+  mbdy momentvec blade1 14  2 local # blade 1 section;
+  mbdy momentvec blade1 15  2 local # blade 1 section;
+  mbdy momentvec blade1 16  2 local # blade 1 section;
+  mbdy momentvec blade1 17  2 local # blade 1 section;
+  mbdy momentvec blade1 18  2 local # blade 1 section;
+  mbdy momentvec blade1 19  2 local # blade 1 section;
+  mbdy momentvec blade1 20  2 local # blade 1 section;
+  mbdy momentvec blade1 21  2 local # blade 1 section;
+  mbdy momentvec blade1 22  2 local # blade 1 section;
+  mbdy momentvec blade1 23  2 local # blade 1 section;
+  mbdy momentvec blade1 24  2 local # blade 1 section;
+  mbdy momentvec blade1 25  2 local # blade 1 section;
+  mbdy momentvec blade1 26  2 local # blade 1 section;
+  ; blade root out and in of plane forces
+  mbdy momentvec blade1 3  2 hub1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 hub2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 hub3 # blade 3 root ;
+;  mbdy momentvec blade1 14 1 local # blade 1 50% local e coo ;
+;  mbdy momentvec blade2 14 1 local # blade 2 50% local e coo ;
+;  mbdy momentvec blade3 14 1 local # blade 3 50% local e coo ;
+  ; Displacements and accellerations
+  mbdy state pos tower 19 1.0 global only 1 # Tower top FA displ;
+  mbdy state pos tower 19 1.0 global only 2 # Tower top SS displ;
+  mbdy state acc tower 19 1.0 global only 1 # Tower top FA acc;
+  mbdy state acc tower 19 1.0 global only 2 # Tower top SS acc;
+;
+  mbdy state pos blade1  26 1.0 global # gl blade 1 tip pos ;
+  mbdy state pos blade2  26 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  26 1.0 blade1 # blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 blade2 # blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 blade3 # blade 3 tip pos ;
+;
+  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+;
+  ; elastic twist (torsional deformation) along the blade
+  aero tors_ang 1  45.56;
+  aero tors_ang 1  59.19;
+  aero tors_ang 1  70.87;
+  aero tors_ang 1  80.61;
+  aero tors_ang 1  84.50;
+  aero tors_ang 1  88.40;
+  aero tors_ang 1  92.29;
+  aero tors_ang 1  96.19;
+  aero tors_ang 1  98.13;
+  aero tors_ang 1 100.08; tip
+;
+; - 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];
+;   general constant 1.0 ;	constant 1.0 - to mesure activity of flap in terms of displacement
+; - 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 -
+	; [dis_setbeta] aero beta 1 1 ;
+	; [dis_setbeta] aero beta 2 1 ;
+	; [dis_setbeta] 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] ;
+end output;
+;
+exit;
diff --git a/wetb/prepost/tests/test_Simulations.py b/wetb/prepost/tests/test_Simulations.py
new file mode 100644
index 0000000000000000000000000000000000000000..61628546afc1110717316b1ec79f6269a2926fc5
--- /dev/null
+++ b/wetb/prepost/tests/test_Simulations.py
@@ -0,0 +1,69 @@
+'''
+Created on 05/11/2015
+
+@author: MMPE
+'''
+from __future__ import unicode_literals
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+from future import standard_library
+standard_library.install_aliases()
+
+import unittest
+import os
+import filecmp
+import pickle
+
+from wetb.prepost import dlctemplate as tmpl
+
+
+class TestGenerateInputs(unittest.TestCase):
+
+    def setUp(self):
+        self.basepath = os.path.dirname(__file__)
+
+    def test_launch_dlcs_excel(self):
+        # manually configure paths, HAWC2 model root path is then constructed as
+        # p_root_remote/PROJECT/sim_id, and p_root_local/PROJECT/sim_id
+        # adopt accordingly when you have configured your directories differently
+        p_root = os.path.join(self.basepath, 'data/')
+        # project name, sim_id, master file name
+        tmpl.PROJECT = 'demo_dlc'
+        tmpl.MASTERFILE = 'demo_dlc_master_A0001.htc'
+        # MODEL SOURCES, exchanche file sources
+        tmpl.P_RUN = os.path.join(p_root, tmpl.PROJECT, 'remote/')
+        tmpl.P_SOURCE = os.path.join(p_root, tmpl.PROJECT, 'source/')
+        # location of the master file
+        tmpl.P_MASTERFILE = os.path.join(p_root, tmpl.PROJECT,
+                                         'source', 'htc', '_master/')
+        # location of the pre and post processing data
+        tmpl.POST_DIR = os.path.join(p_root, tmpl.PROJECT, 'remote',
+                                     'prepost/')
+        tmpl.force_dir = tmpl.P_RUN
+        tmpl.launch_dlcs_excel('remote', silent=True)
+
+        # we can not check-in empty dirs in git
+        for subdir in ['control', 'data', 'htc', 'pbs_in']:
+            remote = os.path.join(p_root, tmpl.PROJECT, 'remote', subdir)
+            ref = os.path.join(p_root, tmpl.PROJECT, 'ref', subdir)
+            cmp = filecmp.dircmp(remote, ref)
+            self.assertTrue(len(cmp.diff_files)==0)
+            self.assertTrue(len(cmp.right_only)==0)
+            self.assertTrue(len(cmp.left_only)==0)
+
+        # for the pickled file we can just read it
+        remote = os.path.join(p_root, tmpl.PROJECT, 'remote', 'prepost')
+        ref = os.path.join(p_root, tmpl.PROJECT, 'ref', 'prepost')
+        cmp = filecmp.cmp(os.path.join(remote, 'remote_tags.txt'),
+                          os.path.join(ref, 'remote_tags.txt'), shallow=False)
+        self.assertTrue(cmp)
+#        with open(os.path.join(remote, 'remote.pkl'), 'rb') as FILE:
+#            pkl_remote = pickle.load(FILE)
+#        with open(os.path.join(ref, 'remote.pkl'), 'rb') as FILE:
+#            pkl_ref = pickle.load(FILE)
+#        self.assertTrue(pkl_remote == pkl_ref)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/wetb/prepost/windIO.py b/wetb/prepost/windIO.py
index 5c38c195d772b9eb74eba2f86c53c504060572ae..170e6e1d8f943ec3fa02b87556b3cb3774b65774 100755
--- a/wetb/prepost/windIO.py
+++ b/wetb/prepost/windIO.py
@@ -17,10 +17,6 @@ from future import standard_library
 standard_library.install_aliases()
 from builtins import object
 
- # always devide as floats
-
-#print(*objects, sep=' ', end='\n', file=sys.stdout)
-
 __author__ = 'David Verelst'
 __license__ = 'GPL'
 __version__ = '0.5'
@@ -32,24 +28,20 @@ import math
 from time import time
 import codecs
 
-import scipy
 import scipy.integrate as integrate
-import array
 import numpy as np
 import pandas as pd
 
-#import sympy
-
 # misc is part of prepost, which is available on the dtu wind gitlab server:
 # https://gitlab.windenergy.dtu.dk/dave/prepost
 from wetb.prepost import misc
 # wind energy python toolbox, available on the dtu wind redmine server:
 # http://vind-redmine.win.dtu.dk/projects/pythontoolbox/repository/show/fatigue_tools
-from wetb.fatigue_tools.rainflowcounting.rainflowcount import rainflow_astm as rainflow_astm
-from wetb.fatigue_tools.rainflowcounting.rfc_hist import rfc_hist as rfc_hist
+from wetb.hawc2.Hawc2io import ReadHawc2
+from wetb.fatigue_tools.fatigue import eq_load
 
 
-class LoadResults(object):
+class LoadResults(ReadHawc2):
     """Read a HAWC2 result data file
 
     Usage:
@@ -126,215 +118,34 @@ class LoadResults(object):
 
         self.file_path = file_path
         # remove .log, .dat, .sel extensions who might be accedental left
-        if file_name[-4:] in ['.htc','.sel','.dat','.log']:
+        if file_name[-4:] in ['.htc', '.sel', '.dat', '.log']:
             file_name = file_name[:-4]
-
+        # FIXME: since HAWC2 will always have lower case output files, convert
+        # any wrongly used upper case letters to lower case here
         self.file_name = file_name
-        self.read_sel()
-        # create for any supported channel the
-        # continue if the file has been succesfully read
-        if self.error_msg == 'none':
-            # load the channel id's and scale factors
-            self.scale_factors = self.data_sel()
-            # with the sel file loaded, we have all the channel names to
-            # squeeze into a more consistant naming scheme
-            self._unified_channel_names()
-            # only read when asked for
-            if readdata:
-                # if there is sel file but it is empty or whatever else
-                # FilType will not exists
-                try:
-                    # read the binary file
-                    if self.FileType == 'BINARY':
-                        self.read_bin(self.scale_factors, usecols=usecols)
-                    # read the ASCII file
-                    elif self.FileType == 'ASCII':
-                        self.read_ascii(usecols=usecols)
-                    else:
-                        print('='*79)
-                        print('unknown file type: ' + self.FileType)
-                        print('='*79)
-                        self.error_msg = 'error: unknown file type'
-                        self.sig = []
-                except:
-                    print('='*79)
-                    print('couldn\'t determine FileType')
-                    print('='*79)
-                    self.error_msg = 'error: no file type'
-                    self.sig = []
+        FileName = os.path.join(self.file_path, self.file_name)
 
-        if self.debug:
-            stop = time() - start
-            print('time to load HAWC2 file:', stop, 's')
+        ReadOnly = 0 if readdata else 1
+        super(LoadResults, self).__init__(FileName, ReadOnly=ReadOnly)
+        self.FileType = self.FileFormat[6:]
+        self.N = int(self.NrSc)
+        self.Nch = int(self.NrCh)
+        self.ch_details = np.ndarray(shape=(self.Nch, 3), dtype='<U100')
+        for ic in range(self.Nch):
+            self.ch_details[ic, 0] = self.ChInfo[0][ic]
+            self.ch_details[ic, 1] = self.ChInfo[1][ic]
+            self.ch_details[ic, 2] = self.ChInfo[2][ic]
 
-    def read_sel(self):
-        # anticipate error on file reading
-        try:
-            # open file, read and close
-            go_sel = os.path.join(self.file_path, self.file_name + '.sel')
-            FILE = opent(go_sel, "r")
-            self.lines = FILE.readlines()
-            FILE.close()
-            self.error_msg = 'none'
-
-        # error message if the file does not exists
-        except:
-            # print(26*' ' + 'ERROR'
-            print(50*'=')
-            print(self.file_path)
-            print(self.file_name + '.sel could not be found')
-            print(50*'=')
-            self.error_msg = 'error: file not found'
-
-    def data_sel(self):
-
-        # scan through all the lines in the file
-        line_nr = 1
-        # channel counter for ch_details
-        ch = 0
-        for line in self.lines:
-            # on line 9 we can read following paramaters:
-            if line_nr == 9:
-                # remove the end of line character
-                line = line.replace('\n','').replace('\r', '')
-
-                settings = line.split(' ')
-                # delete all empty string values
-                for k in range(settings.count('')):
-                    settings.remove('')
-
-                # and assign proper values with correct data type
-                self.N = int(settings[0])
-                self.Nch = int(settings[1])
-                self.Time = float(settings[2])
-                self.FileType = settings[3]
-                self.Freq = self.N/self.Time
-
-                # prepare list variables
-                self.ch_details = np.ndarray(shape=(self.Nch,3),dtype='<U100')
-                # it seems that float64 reeds the data correctly from the file
-                scale_factors = scipy.zeros(self.Nch, dtype='Float64')
-                #self.scale_factors_dec = scipy.zeros(self.Nch, dtype='f8')
-                i = 0
-
-            # starting from line 13, we have the channels info
-            if line_nr > 12:
-                # read the signal details
-                if line_nr < 13 + self.Nch:
-                    # remove leading and trailing whitespaces from line parts
-                    self.ch_details[ch,0] = str(line[12:43]).strip() # chID
-                    self.ch_details[ch,1] = str(line[43:54]).strip() # chUnits
-                    self.ch_details[ch,2] = str(line[54:-1]).strip() # chDescr
-                    ch += 1
-                # read the signal scale parameters for binary format
-                elif line_nr > 14 + self.Nch:
-                    scale_factors[i] = line
-                    # print(scale_factors[i]
-                    #self.scale_factors_dec[i] = D.Decimal(line)
-                    i = i + 1
-                # stop going through the lines if at the end of the file
-                if line_nr == 2*self.Nch + 14:
-                    self.scale_factors = scale_factors
-
-                    if self.debug:
-                        print('N       ', self.N)
-                        print('Nch     ', self.Nch)
-                        print('Time    ', self.Time)
-                        print('FileType', self.FileType)
-                        print('Freq    ', self.Freq)
-                        print('scale_factors', scale_factors.shape)
-
-                    return scale_factors
-                    break
+        ChVec = [] if usecols is None else usecols
 
-            # counting the line numbers
-            line_nr = line_nr + 1
+        self._unified_channel_names()
+        if readdata:
+            self.sig = super(LoadResults, self).__call__(ChVec=ChVec)
 
-    def read(self, usecols=False):
-        """
-        This whole LoadResults needs to be refactered because it is crap.
-        Keep the old ones for backwards compatibility
-        """
-
-        if self.FileType == 'ASCII':
-            self.read_ascii(usecols=usecols)
-        elif self.FileType == 'BINARY':
-            self.read_bin(self.scale_factors, usecols=usecols)
-
-    def read_bin(self, scale_factors, usecols=False):
-        if not usecols:
-            usecols = list(range(0, self.Nch))
-        fid = open(os.path.join(self.file_path, self.file_name) + '.dat', 'rb')
-        self.sig = np.zeros( (self.N, len(usecols)) )
-        for j, i in enumerate(usecols):
-            fid.seek(i*self.N*2,0)
-            self.sig[:,j] = np.fromfile(fid, 'int16', self.N)*scale_factors[i]
-
-    def read_bin_old(self, scale_factors):
-        # if there is an error reading the binary file (for instance if empty)
-        try:
-            # read the binary file
-            go_binary = os.path.join(self.file_path, self.file_name) + '.dat'
-            FILE = open(go_binary, mode='rb')
-
-            # create array, put all the binary elements as one long chain in it
-            binvalues = array.array('h')
-            binvalues.fromfile(FILE, self.N * self.Nch)
-            FILE.close()
-            # convert now to a structured numpy array
-            # sig = np.array(binvalues, np.float)
-#            sig = np.array(binvalues)
-            # this is faster! the saved bin values are only of type int16
-            sig = np.array(binvalues, dtype='int16')
-
-            if self.debug: print(self.N, self.Nch, sig.shape)
-
-#            sig = np.reshape(sig, (self.Nch, self.N))
-#            # apperently Nch and N had to be reversed to read it correctly
-#            # is this because we are reading a Fortran array with Python C
-#            # code? so now transpose again so we have sig(time, channel)
-#            sig = np.transpose(sig)
-
-            # reshape the array to 2D and transpose (Fortran to C array)
-            sig = sig.reshape((self.Nch, self.N)).T
-
-            # create diagonal vector of size (Nch,Nch)
-            dig = np.diag(scale_factors)
-            # now all rows of column 1 are multiplied with dig(1,1)
-            sig = np.dot(sig,dig)
-            self.sig = sig
-            # 'file name;' + 'lnr;msg;'*(len(MsgList)) + '\n'
-        except:
-            self.sig = []
-            self.error_msg = 'error: reading binary file failed'
-            print('========================================================')
-            print(self.error_msg)
-            print(self.file_path)
-            print(self.file_name)
-            print('========================================================')
-
-    def read_ascii(self, usecols=None):
+        if self.debug:
+            stop = time() - start
+            print('time to load HAWC2 file:', stop, 's')
 
-        try:
-            go_ascii = os.path.join(self.file_path, self.file_name) + '.dat'
-#            self.sig = np.genfromtxt(go_ascii)
-            self.sig = np.loadtxt(go_ascii, usecols=usecols)
-#            self.sig = np.fromfile(go_ascii, dtype=np.float32, sep='  ')
-#            self.sig = self.sig.reshape((self.N, self.Nch))
-        except:
-            self.sig = []
-            self.error_msg = 'error: reading ascii file failed'
-            print('========================================================')
-            print(self.error_msg)
-            print(self.file_path)
-            print(self.file_name)
-            print('========================================================')
-
-#        print '========================================================'
-#        print 'ASCII reading not implemented yet'
-#        print '========================================================'
-#        self.sig = []
-#        self.error_msg = 'error: ASCII reading not implemented yet'
 
     def reformat_sig_details(self):
         """Change HAWC2 output description of the channels short descriptive
@@ -345,7 +156,7 @@ class LoadResults(object):
 
         # CONFIGURATION: mappings between HAWC2 and short good output:
         change_list = []
-        change_list.append( ['original','new improved'] )
+        change_list.append( ['original', 'new improved'] )
 
 #        change_list.append( ['Mx coo: hub1','blade1 root bending: flap'] )
 #        change_list.append( ['My coo: hub1','blade1 root bending: edge'] )
@@ -359,41 +170,41 @@ class LoadResults(object):
 #        change_list.append( ['My coo: hub3','blade3 root bending: edge'] )
 #        change_list.append( ['Mz coo: hub3','blade3 root bending: torsion'] )
 
-        change_list.append( ['Mx coo: blade1','blade1 flap'] )
-        change_list.append( ['My coo: blade1','blade1 edge'] )
-        change_list.append( ['Mz coo: blade1','blade1 torsion'] )
+        change_list.append(['Mx coo: blade1', 'blade1 flap'])
+        change_list.append(['My coo: blade1', 'blade1 edge'])
+        change_list.append(['Mz coo: blade1', 'blade1 torsion'])
 
-        change_list.append( ['Mx coo: blade2','blade2 flap'] )
-        change_list.append( ['My coo: blade2','blade2 edge'] )
-        change_list.append( ['Mz coo: blade2','blade2 torsion'] )
+        change_list.append(['Mx coo: blade2', 'blade2 flap'])
+        change_list.append(['My coo: blade2', 'blade2 edge'])
+        change_list.append(['Mz coo: blade2', 'blade2 torsion'])
 
-        change_list.append( ['Mx coo: blade3','blade3 flap'] )
-        change_list.append( ['My coo: blade3','blade3 edeg'] )
-        change_list.append( ['Mz coo: blade3','blade3 torsion'] )
+        change_list.append(['Mx coo: blade3', 'blade3 flap'])
+        change_list.append(['My coo: blade3', 'blade3 edeg'])
+        change_list.append(['Mz coo: blade3', 'blade3 torsion'])
 
-        change_list.append( ['Mx coo: hub1','blade1 out-of-plane'] )
-        change_list.append( ['My coo: hub1','blade1 in-plane'] )
-        change_list.append( ['Mz coo: hub1','blade1 torsion'] )
+        change_list.append(['Mx coo: hub1', 'blade1 out-of-plane'])
+        change_list.append(['My coo: hub1', 'blade1 in-plane'])
+        change_list.append(['Mz coo: hub1', 'blade1 torsion'])
 
-        change_list.append( ['Mx coo: hub2','blade2 out-of-plane'] )
-        change_list.append( ['My coo: hub2','blade2 in-plane'] )
-        change_list.append( ['Mz coo: hub2','blade2 torsion'] )
+        change_list.append(['Mx coo: hub2', 'blade2 out-of-plane'])
+        change_list.append(['My coo: hub2', 'blade2 in-plane'])
+        change_list.append(['Mz coo: hub2', 'blade2 torsion'])
 
-        change_list.append( ['Mx coo: hub3','blade3 out-of-plane'] )
-        change_list.append( ['My coo: hub3','blade3 in-plane'] )
-        change_list.append( ['Mz coo: hub3','blade3 torsion'] )
+        change_list.append(['Mx coo: hub3', 'blade3 out-of-plane'])
+        change_list.append(['My coo: hub3', 'blade3 in-plane'])
+        change_list.append(['Mz coo: hub3', 'blade3 torsion'])
         # this one will create a false positive for tower node nr1
-        change_list.append( ['Mx coo: tower','tower top momemt FA'] )
-        change_list.append( ['My coo: tower','tower top momemt SS'] )
-        change_list.append( ['Mz coo: tower','yaw-moment'] )
+        change_list.append(['Mx coo: tower', 'tower top momemt FA'])
+        change_list.append(['My coo: tower', 'tower top momemt SS'])
+        change_list.append(['Mz coo: tower', 'yaw-moment'])
 
-        change_list.append( ['Mx coo: chasis','chasis momemt FA'] )
-        change_list.append( ['My coo: chasis','yaw-moment chasis'] )
-        change_list.append( ['Mz coo: chasis','chasis moment SS'] )
+        change_list.append(['Mx coo: chasis', 'chasis momemt FA'])
+        change_list.append(['My coo: chasis', 'yaw-moment chasis'])
+        change_list.append(['Mz coo: chasis', 'chasis moment SS'])
 
-        change_list.append( ['DLL inp  2:  2','tower clearance'] )
+        change_list.append(['DLL inp  2:  2', 'tower clearance'])
 
-        self.ch_details_new = np.ndarray(shape=(self.Nch,3),dtype='<U100')
+        self.ch_details_new = np.ndarray(shape=(self.Nch, 3), dtype='<U100')
 
         # approach: look for a specific description and change it.
         # This approach is slow, but will not fail if the channel numbers change
@@ -401,10 +212,10 @@ class LoadResults(object):
         for ch in range(self.Nch):
             # the change_list will always be slower, so this loop will be
             # inside the bigger loop of all channels
-            self.ch_details_new[ch,:] = self.ch_details[ch,:]
+            self.ch_details_new[ch, :] = self.ch_details[ch, :]
             for k in range(len(change_list)):
-                if change_list[k][0] == self.ch_details[ch,0]:
-                    self.ch_details_new[ch,0] =  change_list[k][1]
+                if change_list[k][0] == self.ch_details[ch, 0]:
+                    self.ch_details_new[ch, 0] = change_list[k][1]
                     # channel description should be unique, so delete current
                     # entry and stop looking in the change list
                     del change_list[k]
@@ -483,7 +294,7 @@ class LoadResults(object):
 
         # some channel ID's are unique, use them
         ch_unique = set(['Omega', 'Ae rot. torque', 'Ae rot. power',
-                     'Ae rot. thrust', 'Time', 'Azi  1'])
+                         'Ae rot. thrust', 'Time', 'Azi  1'])
         ch_aero = set(['Cl', 'Cd', 'Alfa', 'Vrel', 'Tors_e', 'Alfa'])
         ch_aerogrid = set(['a_grid', 'am_grid'])
 
@@ -492,13 +303,13 @@ class LoadResults(object):
 #                    'component', 'pos', 'coord', 'sensortype', 'radius',
 #                    'blade_nr', 'units', 'output_type', 'io_nr', 'io', 'dll',
 #                    'azimuth', 'flap_nr'])
-        df_dict = {col:[] for col in self.cols}
+        df_dict = {col: [] for col in self.cols}
         df_dict['ch_name'] = []
 
         # scan through all channels and see which can be converted
         # to sensible unified name
         for ch in range(self.Nch):
-            items = self.ch_details[ch,2].split(' ')
+            items = self.ch_details[ch, 2].split(' ')
             # remove empty values in the list
             items = misc.remove_items(items, '')
 
@@ -511,24 +322,24 @@ class LoadResults(object):
             # -----------------------------------------------------------------
             # check for all the unique channel descriptions
             if self.ch_details[ch,0].strip() in ch_unique:
-                tag = self.ch_details[ch,0].strip()
+                tag = self.ch_details[ch, 0].strip()
                 channelinfo = {}
-                channelinfo['units'] = self.ch_details[ch,1]
-                channelinfo['sensortag'] = self.ch_details[ch,2]
+                channelinfo['units'] = self.ch_details[ch, 1]
+                channelinfo['sensortag'] = self.ch_details[ch, 2]
                 channelinfo['chi'] = ch
 
             # -----------------------------------------------------------------
             # or in the long description:
             #    0          1        2      3  4    5     6 and up
             # MomentMz Mbdy:blade nodenr:   5 coo: blade  TAG TEXT
-            elif self.ch_details[ch,2].startswith('MomentM'):
+            elif self.ch_details[ch, 2].startswith('MomentM'):
                 coord = items[5]
                 bodyname = items[1].replace('Mbdy:', '')
                 # set nodenr to sortable way, include leading zeros
                 # node numbers start with 0 at the root
                 nodenr = '%03i' % int(items[3])
                 # skip the attached the component
-                #sensortype = items[0][:-2]
+                # sensortype = items[0][:-2]
                 # or give the sensor type the same name as in HAWC2
                 sensortype = 'momentvec'
                 component = items[0][-1:len(items[0])]
@@ -540,7 +351,7 @@ class LoadResults(object):
 
                 # and tag it
                 pos = 'node-%s' % nodenr
-                tagitems = (coord,bodyname,pos,sensortype,component)
+                tagitems = (coord, bodyname, pos, sensortype, component)
                 tag = '%s-%s-%s-%s-%s' % tagitems
                 # save all info in the dict
                 channelinfo = {}
@@ -551,17 +362,17 @@ class LoadResults(object):
                 channelinfo['component'] = component
                 channelinfo['chi'] = ch
                 channelinfo['sensortag'] = sensortag
-                channelinfo['units'] = self.ch_details[ch,1]
+                channelinfo['units'] = self.ch_details[ch, 1]
 
             # -----------------------------------------------------------------
             #   0    1      2        3       4  5     6     7 and up
             # Force  Fx Mbdy:blade nodenr:   2 coo: blade  TAG TEXT
-            elif self.ch_details[ch,2].startswith('Force'):
+            elif self.ch_details[ch, 2].startswith('Force'):
                 coord = items[6]
                 bodyname = items[2].replace('Mbdy:', '')
                 nodenr = '%03i' % int(items[4])
                 # skipe the attached the component
-                #sensortype = items[0]
+                # sensortype = items[0]
                 # or give the sensor type the same name as in HAWC2
                 sensortype = 'forcevec'
                 component = items[1][1]
@@ -572,7 +383,7 @@ class LoadResults(object):
 
                 # and tag it
                 pos = 'node-%s' % nodenr
-                tagitems = (coord,bodyname,pos,sensortype,component)
+                tagitems = (coord, bodyname, pos, sensortype, component)
                 tag = '%s-%s-%s-%s-%s' % tagitems
                 # save all info in the dict
                 channelinfo = {}
@@ -583,7 +394,7 @@ class LoadResults(object):
                 channelinfo['component'] = component
                 channelinfo['chi'] = ch
                 channelinfo['sensortag'] = sensortag
-                channelinfo['units'] = self.ch_details[ch,1]
+                channelinfo['units'] = self.ch_details[ch, 1]
 
             # -----------------------------------------------------------------
             #   0    1  2      3       4      5   6         7    8
@@ -604,7 +415,7 @@ class LoadResults(object):
                 # skip the attached the component
                 #sensortype = ''.join(items[0:2])
                 # or give the sensor type the same name as in HAWC2
-                tmp = self.ch_details[ch,0].split(' ')
+                tmp = self.ch_details[ch, 0].split(' ')
                 sensortype = tmp[0]
                 if sensortype.startswith('State'):
                     sensortype += ' ' + tmp[1]
@@ -616,7 +427,7 @@ class LoadResults(object):
 
                 # and tag it
                 pos = 'elem-%s-zrel-%s' % (elementnr, zrel)
-                tagitems = (coord,bodyname,pos,sensortype,component)
+                tagitems = (coord, bodyname, pos, sensortype, component)
                 tag = '%s-%s-%s-%s-%s' % tagitems
                 # save all info in the dict
                 channelinfo = {}
@@ -627,7 +438,7 @@ class LoadResults(object):
                 channelinfo['component'] = component
                 channelinfo['chi'] = ch
                 channelinfo['sensortag'] = sensortag
-                channelinfo['units'] = self.ch_details[ch,1]
+                channelinfo['units'] = self.ch_details[ch, 1]
 
             # -----------------------------------------------------------------
             # DLL CONTROL I/O
@@ -645,17 +456,17 @@ class LoadResults(object):
             # description case 3
             #           0         1     2       4
             #          hawc_dll :echo outvec :  1
-            elif self.ch_details[ch,0].startswith('DLL'):
+            elif self.ch_details[ch, 0].startswith('DLL'):
                 # case 3
                 if items[1][0] == ':echo':
                     # hawc_dll named case (case 3) is polluted with colons
-                    items = self.ch_details[ch,2].replace(':','')
+                    items = self.ch_details[ch,2].replace(':', '')
                     items = items.split(' ')
                     items = misc.remove_items(items, '')
                     dll = items[1]
                     io = items[2]
                     io_nr = items[3]
-                    tag = 'DLL-%s-%s-%s' % (dll,io,io_nr)
+                    tag = 'DLL-%s-%s-%s' % (dll, io, io_nr)
                     sensortag = ''
                 # case 2: no reference to dll name
                 elif self.ch_details[ch,2].startswith('DLL'):
@@ -671,7 +482,7 @@ class LoadResults(object):
                     io = items[1]
                     io_nr = items[2]
                     sensortag = ' '.join(items[3:])
-                    tag = 'DLL-%s-%s-%s' % (dll,io,io_nr)
+                    tag = 'DLL-%s-%s-%s' % (dll, io, io_nr)
 
                 # save all info in the dict
                 channelinfo = {}
@@ -680,19 +491,19 @@ class LoadResults(object):
                 channelinfo['io_nr'] = io_nr
                 channelinfo['chi'] = ch
                 channelinfo['sensortag'] = sensortag
-                channelinfo['units'] = self.ch_details[ch,1]
+                channelinfo['units'] = self.ch_details[ch, 1]
 
             # -----------------------------------------------------------------
             # BEARING OUTPUS
             # bea1 angle_speed       rpm      shaft_nacelle angle speed
-            elif self.ch_details[ch,0].startswith('bea'):
-                output_type = self.ch_details[ch,0].split(' ')[1]
+            elif self.ch_details[ch, 0].startswith('bea'):
+                output_type = self.ch_details[ch, 0].split(' ')[1]
                 bearing_name = items[0]
-                units = self.ch_details[ch,1]
+                units = self.ch_details[ch, 1]
                 # there is no label option for the bearing output
 
                 # and tag it
-                tag = 'bearing-%s-%s-%s' % (bearing_name,output_type,units)
+                tag = 'bearing-%s-%s-%s' % (bearing_name, output_type, units)
                 # save all info in the dict
                 channelinfo = {}
                 channelinfo['bearing_name'] = bearing_name
@@ -704,20 +515,20 @@ class LoadResults(object):
             # AERO CL, CD, CM, VREL, ALFA, LIFT, DRAG, etc
             # Cl, R=  0.5     deg      Cl of blade  1 at radius   0.49
             # Azi  1          deg      Azimuth of blade  1
-            elif self.ch_details[ch,0].split(',')[0] in ch_aero:
-                dscr_list = self.ch_details[ch,2].split(' ')
+            elif self.ch_details[ch, 0].split(',')[0] in ch_aero:
+                dscr_list = self.ch_details[ch, 2].split(' ')
                 dscr_list = misc.remove_items(dscr_list, '')
 
-                sensortype = self.ch_details[ch,0].split(',')[0]
+                sensortype = self.ch_details[ch, 0].split(',')[0]
                 radius = dscr_list[-1]
                 # is this always valid?
-                blade_nr = self.ch_details[ch,2].split('blade  ')[1][0]
+                blade_nr = self.ch_details[ch, 2].split('blade  ')[1][0]
                 # sometimes the units for aero sensors are wrong!
-                units = self.ch_details[ch,1]
+                units = self.ch_details[ch, 1]
                 # there is no label option
 
                 # and tag it
-                tag = '%s-%s-%s' % (sensortype,blade_nr,radius)
+                tag = '%s-%s-%s' % (sensortype, blade_nr, radius)
                 # save all info in the dict
                 channelinfo = {}
                 channelinfo['sensortype'] = sensortype
@@ -729,14 +540,14 @@ class LoadResults(object):
             # -----------------------------------------------------------------
             # for the induction grid over the rotor
             # a_grid, azi    0.00 r   1.74
-            elif self.ch_details[ch,0].split(',')[0] in ch_aerogrid:
-                items = self.ch_details[ch,0].split(',')
+            elif self.ch_details[ch, 0].split(',')[0] in ch_aerogrid:
+                items = self.ch_details[ch, 0].split(',')
                 sensortype = items[0]
                 items2 = items[1].split(' ')
                 items2 = misc.remove_items(items2, '')
                 azi = items2[1]
                 radius = items2[3]
-                units = self.ch_details[ch,1]
+                units = self.ch_details[ch, 1]
                 # and tag it
                 tag = '%s-azi-%s-r-%s' % (sensortype,azi,radius)
                 # save all info in the dict
@@ -756,15 +567,15 @@ class LoadResults(object):
 # Induc. Vy, blco, R=  1.4 // Induced wsp Vy of blade  1 at radius   1.37, local bl coo.
 # Induc. Vz, glco, R=  1.4 // Induced wsp Vz of blade  1 at radius   1.37, global coo.
 # Induc. Vx, rpco, R=  8.4 // Induced wsp Vx of blade  1 at radius   8.43, RP. coo.
-            elif self.ch_details[ch,0].strip()[:5] == 'Induc':
-                items = self.ch_details[ch,2].split(' ')
+            elif self.ch_details[ch, 0].strip()[:5] == 'Induc':
+                items = self.ch_details[ch, 2].split(' ')
                 items = misc.remove_items(items, '')
                 blade_nr = int(items[5])
                 radius = float(items[8].replace(',', ''))
-                items = self.ch_details[ch,0].split(',')
+                items = self.ch_details[ch, 0].split(',')
                 coord = items[1].strip()
                 component = items[0][-2:]
-                units = self.ch_details[ch,1]
+                units = self.ch_details[ch, 1]
                 # and tag it
                 rpl = (coord, blade_nr, component, radius)
                 tag = 'induc-%s-blade-%1i-%s-r-%03.02f' % rpl
@@ -787,8 +598,8 @@ class LoadResults(object):
 
             # -----------------------------------------------------------------
             # WATER SURFACE gl. coo, at gl. coo, x,y=   0.00,   0.00
-            elif self.ch_details[ch,2].startswith('Water'):
-                units = self.ch_details[ch,1]
+            elif self.ch_details[ch, 2].startswith('Water'):
+                units = self.ch_details[ch, 1]
 
                 # but remove the comma
                 x = items[-2][:-1]
@@ -806,10 +617,10 @@ class LoadResults(object):
             # -----------------------------------------------------------------
             # WIND SPEED
             # WSP gl. coo.,Vx
-            elif self.ch_details[ch,0].startswith('WSP gl.'):
-                units = self.ch_details[ch,1]
-                direction = self.ch_details[ch,0].split(',')[1]
-                tmp = self.ch_details[ch,2].split('pos')[1]
+            elif self.ch_details[ch, 0].startswith('WSP gl.'):
+                units = self.ch_details[ch, 1]
+                direction = self.ch_details[ch, 0].split(',')[1]
+                tmp = self.ch_details[ch, 2].split('pos')[1]
                 x, y, z = tmp.split(',')
                 x, y, z = x.strip(), y.strip(), z.strip()
 
@@ -821,18 +632,16 @@ class LoadResults(object):
                 channelinfo['pos'] = (x, y, z)
                 channelinfo['units'] = units
                 channelinfo['chi'] = ch
-                channelinfo['sensortype'] = 'windspeed'
-                channelinfo['component'] = direction[1:]
 
             # WIND SPEED AT BLADE
             # 0: WSP Vx, glco, R= 61.5
             # 2: Wind speed Vx of blade  1 at radius  61.52, global coo.
-            elif self.ch_details[ch,0].startswith('WSP V'):
-                units = self.ch_details[ch,1].strip()
-                direction = self.ch_details[ch,0].split(' ')[1].strip()
-                blade_nr = self.ch_details[ch,2].split('blade')[1].strip()[:2]
-                radius = self.ch_details[ch,2].split('radius')[1].split(',')[0]
-                coord = self.ch_details[ch,2].split(',')[1].strip()
+            elif self.ch_details[ch, 0].startswith('WSP V'):
+                units = self.ch_details[ch, 1].strip()
+                direction = self.ch_details[ch, 0].split(' ')[1].strip()
+                blade_nr = self.ch_details[ch, 2].split('blade')[1].strip()[:2]
+                radius = self.ch_details[ch, 2].split('radius')[1].split(',')[0]
+                coord = self.ch_details[ch, 2].split(',')[1].strip()
 
                 radius = radius.strip()
                 blade_nr = blade_nr.strip()
@@ -851,11 +660,11 @@ class LoadResults(object):
 
             # FLAP ANGLE
             # 2: Flap angle for blade  3 flap number  1
-            elif self.ch_details[ch,0][:7] == 'setbeta':
-                units = self.ch_details[ch,1].strip()
-                blade_nr = self.ch_details[ch,2].split('blade')[1].strip()
+            elif self.ch_details[ch, 0][:7] == 'setbeta':
+                units = self.ch_details[ch, 1].strip()
+                blade_nr = self.ch_details[ch, 2].split('blade')[1].strip()
                 blade_nr = blade_nr.split(' ')[0].strip()
-                flap_nr = self.ch_details[ch,2].split(' ')[-1].strip()
+                flap_nr = self.ch_details[ch, 2].split(' ')[-1].strip()
 
                 radius = radius.strip()
                 blade_nr = blade_nr.strip()
@@ -917,7 +726,7 @@ class LoadResults(object):
         for ch_name, channelinfo in self.ch_dict.items():
             cols.update(set(channelinfo.keys()))
 
-        df_dict = {col:[] for col in cols}
+        df_dict = {col: [] for col in cols}
         df_dict['ch_name'] = []
         for ch_name, channelinfo in self.ch_dict.items():
             cols_ch = set(channelinfo.keys())
@@ -931,7 +740,6 @@ class LoadResults(object):
         self.ch_df = pd.DataFrame(df_dict)
         self.ch_df.set_index('chi', inplace=True)
 
-
     def _data_window(self, nr_rev=None, time=None):
         """
         Based on a time interval, create a proper slice object
@@ -977,7 +785,7 @@ class LoadResults(object):
             i_range = int(self.Freq*time_range)
             window = [0, time_range]
             # in case the first datapoint is not at 0 seconds
-            i_zero = int(self.sig[0,0]*self.Freq)
+            i_zero = int(self.sig[0, 0]*self.Freq)
             slice_ = np.r_[i_zero:i_range+i_zero]
 
             zoomtype = '_nrrev_' + format(nr_rev, '1.0f') + 'rev'
@@ -990,23 +798,23 @@ class LoadResults(object):
             slice_ = np.r_[i_start:i_end]
             window = [time[0], time[1]]
 
-            zoomtype = '_zoom_%1.1f-%1.1fsec' %  (time[0], time[1])
+            zoomtype = '_zoom_%1.1f-%1.1fsec' % (time[0], time[1])
 
         return slice_, window, zoomtype, time_range
 
     # TODO: general signal method, this is not HAWC2 specific, move out
-    def calc_stats(self, sig, i0=0, i1=-1):
+    def calc_stats(self, sig, i0=0, i1=None):
 
         stats = {}
         # calculate the statistics values:
-        stats['max'] = sig[i0:i1,:].max(axis=0)
-        stats['min'] = sig[i0:i1,:].min(axis=0)
-        stats['mean'] = sig[i0:i1,:].mean(axis=0)
-        stats['std'] = sig[i0:i1,:].std(axis=0)
+        stats['max'] = sig[i0:i1, :].max(axis=0)
+        stats['min'] = sig[i0:i1, :].min(axis=0)
+        stats['mean'] = sig[i0:i1, :].mean(axis=0)
+        stats['std'] = sig[i0:i1, :].std(axis=0)
         stats['range'] = stats['max'] - stats['min']
-        stats['absmax'] = np.absolute(sig[i0:i1,:]).max(axis=0)
-        stats['rms'] = np.sqrt(np.mean(sig[i0:i1,:]*sig[i0:i1,:], axis=0))
-        stats['int'] = integrate.trapz(sig[i0:i1,:], x=sig[i0:i1,0], axis=0)
+        stats['absmax'] = np.absolute(sig[i0:i1, :]).max(axis=0)
+        stats['rms'] = np.sqrt(np.mean(sig[i0:i1, :]*sig[i0:i1, :], axis=0))
+        stats['int'] = integrate.trapz(sig[i0:i1, :], x=sig[i0:i1, 0], axis=0)
         return stats
 
     # TODO: general signal method, this is not HAWC2 specific, move out
@@ -1030,45 +838,7 @@ class LoadResults(object):
             Damage equivalent loads for each m value.
         """
 
-        try:
-            sig_rf = rainflow_astm(signal)
-        except (TypeError) as e:
-            print(e)
-            return []
-
-        if len(sig_rf) < 1 and not sig_rf:
-            return []
-
-        hist_data, x, bin_avg =  rfc_hist(sig_rf, no_bins)
-        m = np.atleast_1d(m)
-
-        eq = []
-        for i in range(len(m)):
-            eq.append(np.power(np.sum(0.5 * hist_data *\
-                                    np.power(bin_avg, m[i])) / neq, 1. / m[i]))
-        return eq
-
-    # TODO: general signal method, this is not HAWC2 specific, move out
-    def cycle_matrix(self, signal, no_bins=46, m=[3, 4, 6, 8, 10, 12]):
-
-#        import fatigue_tools.fatigue as ft
-#        cycles, ampl_bin_mean, ampl_bin_edges, mean_bin_mean, mean_edges \
-#            = ft.cycle_matrix(signal, ampl_bins=no_bins, mean_bins=1,
-#                              rainflow_func=ft.rainflow_windap)
-#        # in this case eq = sum( n_i*S_i^m )
-#        return [np.sum(cycles * ampl_bin_mean ** _m) for _m in m]
-
-        try:
-            sig_rf = rainflow_astm(signal)
-        except:
-            return []
-
-        if len(sig_rf) < 1 and not sig_rf:
-            return []
-
-        hist_data, x, bin_avg =  rfc_hist(sig_rf, no_bins)
-        m = np.atleast_1d(m)
-        return [np.sum(0.5 * hist_data * bin_avg ** _m) for _m in m]
+        return eq_load(signal, no_bins=no_bins, m=m, neq=neq)[0]
 
     def blade_deflection(self):
         """
@@ -1077,18 +847,18 @@ class LoadResults(object):
         # select all the y deflection channels
         db = misc.DictDB(self.ch_dict)
 
-        db.search({'sensortype' : 'state pos', 'component' : 'z'})
+        db.search({'sensortype': 'state pos', 'component': 'z'})
         # sort the keys and save the mean values to an array/list
         chiz, zvals = [], []
         for key in sorted(db.dict_sel.keys()):
-            zvals.append(-self.sig[:,db.dict_sel[key]['chi']].mean())
+            zvals.append(-self.sig[:, db.dict_sel[key]['chi']].mean())
             chiz.append(db.dict_sel[key]['chi'])
 
-        db.search({'sensortype' : 'state pos', 'component' : 'y'})
+        db.search({'sensortype': 'state pos', 'component': 'y'})
         # sort the keys and save the mean values to an array/list
         chiy, yvals = [], []
         for key in sorted(db.dict_sel.keys()):
-            yvals.append(self.sig[:,db.dict_sel[key]['chi']].mean())
+            yvals.append(self.sig[:, db.dict_sel[key]['chi']].mean())
             chiy.append(db.dict_sel[key]['chi'])
 
         return np.array(zvals), np.array(yvals)
@@ -1113,7 +883,7 @@ class LoadResults(object):
 
         # and save
         print('saving...', end='')
-        np.savetxt(fname, self.sig[:,list(map_sorting.keys())], fmt=fmt,
+        np.savetxt(fname, self.sig[:, list(map_sorting.keys())], fmt=fmt,
                    delimiter=delimiter, header=delimiter.join(header))
         print(fname)
 
@@ -1170,26 +940,26 @@ def ReadEigenBody(fname, debug=False):
 
     """
 
-    #Body data for body number : 3 with the name :nacelle
-    #Results:         fd [Hz]       fn [Hz]       log.decr [%]
-    #Mode nr:  1:   1.45388E-21    1.74896E-03    6.28319E+02
+    # Body data for body number : 3 with the name :nacelle
+    # Results:         fd [Hz]       fn [Hz]       log.decr [%]
+    # Mode nr:  1:   1.45388E-21    1.74896E-03    6.28319E+02
     FILE = opent(fname)
     lines = FILE.readlines()
     FILE.close()
 
-    df_dict = {'Fd_hz':[], 'Fn_hz':[], 'log_decr_pct':[], 'body':[]}
+    df_dict = {'Fd_hz': [], 'Fn_hz': [], 'log_decr_pct': [], 'body': []}
     for i, line in enumerate(lines):
         if debug: print('line nr: %5i' % i)
         # identify for which body we will read the data
         if line[:25] == 'Body data for body number':
             body = line.split(':')[2].rstrip().lstrip()
             # remove any annoying characters
-            body = body.replace('\n','').replace('\r','')
+            body = body.replace('\n', '').replace('\r', '')
             if debug: print('modes for body: %s' % body)
         # identify mode number and read the eigenfrequencies
         elif line[:8] == 'Mode nr:':
-            linelist = line.replace('\n','').replace('\r','').split(':')
-            #modenr = linelist[1].rstrip().lstrip()
+            linelist = line.replace('\n', '').replace('\r', '').split(':')
+            # modenr = linelist[1].rstrip().lstrip()
             # text after Mode nr can be empty
             try:
                 eigenmodes = linelist[2].rstrip().lstrip().split('   ')
@@ -1205,12 +975,12 @@ def ReadEigenBody(fname, debug=False):
                 for k in eigenmodes:
                     if len(k) > 1:
                         eigmod.append(k)
-                #eigenmodes = eigmod
+                # eigenmodes = eigmod
             else:
                 eigmod = eigenmodes
             # remove any trailing spaces for each element
             for k in range(len(eigmod)):
-                eigmod[k] = float(eigmod[k])#.lstrip().rstrip()
+                eigmod[k] = float(eigmod[k])  #.lstrip().rstrip()
 
             df_dict['body'].append(body)
             df_dict['Fd_hz'].append(eigmod[0])
@@ -1260,16 +1030,16 @@ def ReadEigenStructure(file_path, file_name, debug=False, max_modes=500):
 
     """
 
-    #0 Version ID : HAWC2MB 11.3
-    #1 ___________________________________________________________________
-    #2 Structure eigenanalysis output
-    #3 ___________________________________________________________________
-    #4 Time : 13:46:59
-    #5 Date : 28:11.2012
-    #6 ___________________________________________________________________
-    #7 Results:         fd [Hz]       fn [Hz]       log.decr [%]
-    #8 Mode nr:  1:   3.58673E+00    3.58688E+00    5.81231E+00
-    #  Mode nr:294:   0.00000E+00    6.72419E+09    6.28319E+02
+    # 0 Version ID : HAWC2MB 11.3
+    # 1 ___________________________________________________________________
+    # 2 Structure eigenanalysis output
+    # 3 ___________________________________________________________________
+    # 4 Time : 13:46:59
+    # 5 Date : 28:11.2012
+    # 6 ___________________________________________________________________
+    # 7 Results:         fd [Hz]       fn [Hz]       log.decr [%]
+    # 8 Mode nr:  1:   3.58673E+00    3.58688E+00    5.81231E+00
+    #   Mode nr:294:   0.00000E+00    6.72419E+09    6.28319E+02
 
     FILE = opent(os.path.join(file_path, file_name))
     lines = FILE.readlines()
@@ -1280,12 +1050,12 @@ def ReadEigenStructure(file_path, file_name, debug=False, max_modes=500):
     # we now the number of modes by having the number of lines
     nrofmodes = len(lines) - header_lines
 
-    modes_arr = np.ndarray((3,nrofmodes))
+    modes_arr = np.ndarray((3, nrofmodes))
 
     for i, line in enumerate(lines):
         if i > max_modes:
             # cut off the unused rest
-            modes_arr = modes_arr[:,:i]
+            modes_arr = modes_arr[:, :i]
             break
 
         # ignore the header
@@ -1294,9 +1064,9 @@ def ReadEigenStructure(file_path, file_name, debug=False, max_modes=500):
 
         # split up mode nr from the rest
         parts = line.split(':')
-        #modenr = int(parts[1])
+        # modenr = int(parts[1])
         # get fd, fn and damping, but remove all empty items on the list
-        modes_arr[:,i-header_lines]=misc.remove_items(parts[2].split(' '),'')
+        modes_arr[:, i-header_lines]=misc.remove_items(parts[2].split(' '), '')
 
     return modes_arr
 
@@ -1430,7 +1200,7 @@ class UserWind(object):
 
         t1 = np.exp(-math.sqrt(z_h / h_ME))
         t2 = (z - z_h) / math.sqrt(z_h * h_ME)
-        t3 = ( 1.0 - (z-z_h)/(2.0*math.sqrt(z_h*h_ME)) - (z-z_h)/(4.0*z_h) )
+        t3 = (1.0 - (z-z_h)/(2.0*math.sqrt(z_h*h_ME)) - (z-z_h)/(4.0*z_h))
 
         return a_phi * t1 * t2 * t3
 
@@ -1479,9 +1249,9 @@ class UserWind(object):
 #        assert np.allclose(np.abs(u), np.abs(u2))
 #        assert np.allclose(np.abs(v), np.abs(v2))
 
-        u_full = u[:,np.newaxis] + np.zeros((3,))[np.newaxis,:]
-        v_full = v[:,np.newaxis] + np.zeros((3,))[np.newaxis,:]
-        w_full = np.zeros((nr_vert,nr_hor))
+        u_full = u[:, np.newaxis] + np.zeros((3,))[np.newaxis, :]
+        v_full = v[:, np.newaxis] + np.zeros((3,))[np.newaxis, :]
+        w_full = np.zeros((nr_vert, nr_hor))
 
         return u_full, v_full, w_full, x, z
 
@@ -1517,10 +1287,10 @@ class UserWind(object):
         w_comp = np.genfromtxt(fname, skiprows=3+2+nr_vert*2,
                                skip_footer=i-3-3-nr_vert*3)
         v_coord = np.genfromtxt(fname, skiprows=3+3+nr_vert*3,
-                               skip_footer=i-3-3-nr_vert*3-3)
+                                skip_footer=i-3-3-nr_vert*3-3)
         w_coord = np.genfromtxt(fname, skiprows=3+3+nr_vert*3+4,
-                               skip_footer=i-k)
-        phi_deg = np.arctan(v_comp[:,0]/u_comp[:,0])*180.0/np.pi
+                                skip_footer=i-k)
+        phi_deg = np.arctan(v_comp[:, 0]/u_comp[:, 0])*180.0/np.pi
 
         return u_comp, v_comp, w_comp, v_coord, w_coord, phi_deg
 
@@ -1554,10 +1324,10 @@ class UserWind(object):
             np.savetxt(fid, w, fmt=fmt_uvw, delimiter='  ')
             h2 = b'# v coordinates (along the horizontal, nr_hor, 0 rotor center)'
             fid.write(b'%s\n' % h2)
-            np.savetxt(fid, v_coord.reshape((v_coord.size,1)), fmt=fmt_coord)
+            np.savetxt(fid, v_coord.reshape((v_coord.size, 1)), fmt=fmt_coord)
             h3 = b'# w coordinates (zero is at ground level, height, nr_hor)'
             fid.write(b'%s\n' % h3)
-            np.savetxt(fid, w_coord.reshape((w_coord.size,1)), fmt=fmt_coord)
+            np.savetxt(fid, w_coord.reshape((w_coord.size, 1)), fmt=fmt_coord)
 
 
 class WindProfiles(object):
@@ -1679,9 +1449,9 @@ class Turbulence(object):
         # mean velocity components at the center of the box
         v1, v2 = (shape[1]/2)-1, shape[1]/2
         w1, w2 = (shape[2]/2)-1, shape[2]/2
-        ucent = (u[:,v1,w1] + u[:,v1,w2] + u[:,v2,w1] + u[:,v2,w2]) / 4.0
-        vcent = (v[:,v1,w1] + v[:,v1,w2] + v[:,v2,w1] + v[:,v2,w2]) / 4.0
-        wcent = (w[:,v1,w1] + w[:,v1,w2] + w[:,v2,w1] + w[:,v2,w2]) / 4.0
+        ucent = (u[:, v1, w1] + u[:, v1, w2] + u[:, v2, w1] + u[:, v2, w2]) / 4.0
+        vcent = (v[:, v1, w1] + v[:, v1, w2] + v[:, v2, w1] + v[:, v2, w2]) / 4.0
+        wcent = (w[:, v1, w1] + w[:, v1, w2] + w[:, v2, w1] + w[:, v2, w2]) / 4.0
 
         # FIXME: where is this range 351:7374 coming from?? The original script
         # considered a box of lenght 8192
@@ -1707,9 +1477,9 @@ class Turbulence(object):
         iv = np.zeros(shape)
         iw = np.zeros(shape)
 
-        iu[:,:,:] = (u - umean)/ustd*1000.0
-        iv[:,:,:] = (v - vmean)/vstd*1000.0
-        iw[:,:,:] = (w - wmean)/wstd*1000.0
+        iu[:, :, :] = (u - umean)/ustd*1000.0
+        iv[:, :, :] = (v - vmean)/vstd*1000.0
+        iw[:, :, :] = (w - wmean)/wstd*1000.0
 
         # because MATLAB and Octave do a round when casting from float to int,
         # and Python does a floor, we have to round first
@@ -1741,33 +1511,33 @@ class Turbulence(object):
         iu, iv, iw = self.convert2bladed(fpath, basename, shape=shape)
 
         fid = open(fpath + basename + '.wnd', 'wb')
-        fid.write(struct.pack('h', R1)) # R1
-        fid.write(struct.pack('h', R2)) # R2
-        fid.write(struct.pack('i', turb)) # Turb
-        fid.write(struct.pack('f', 999)) # Lat
-        fid.write(struct.pack('f', 999)) # rough
-        fid.write(struct.pack('f', 999)) # refh
-        fid.write(struct.pack('f', longti)) # LongTi
-        fid.write(struct.pack('f', latti)) # LatTi
-        fid.write(struct.pack('f', vertti)) # VertTi
-        fid.write(struct.pack('f', dv)) # VertGpSpace
-        fid.write(struct.pack('f', dw)) # LatGpSpace
-        fid.write(struct.pack('f', du)) # LongGpSpace
-        fid.write(struct.pack('i', shape[0]/2)) # HalfAlong
-        fid.write(struct.pack('f', mean_ws)) # meanWS
-        fid.write(struct.pack('f', 999.)) # VertLongComp
-        fid.write(struct.pack('f', 999.)) # LatLongComp
-        fid.write(struct.pack('f', 999.)) # LongLongComp
-        fid.write(struct.pack('i', 999)) # Int
-        fid.write(struct.pack('i', seed)) # Seed
-        fid.write(struct.pack('i', shape[1])) # VertGpNum
-        fid.write(struct.pack('i', shape[2])) # LatGpNum
-        fid.write(struct.pack('f', 999)) # VertLatComp
-        fid.write(struct.pack('f', 999)) # LatLatComp
-        fid.write(struct.pack('f', 999)) # LongLatComp
-        fid.write(struct.pack('f', 999)) # VertVertComp
-        fid.write(struct.pack('f', 999)) # LatVertComp
-        fid.write(struct.pack('f', 999)) # LongVertComp
+        fid.write(struct.pack('h', R1))  # R1
+        fid.write(struct.pack('h', R2))  # R2
+        fid.write(struct.pack('i', turb))  # Turb
+        fid.write(struct.pack('f', 999))  # Lat
+        fid.write(struct.pack('f', 999))  # rough
+        fid.write(struct.pack('f', 999))  # refh
+        fid.write(struct.pack('f', longti))  # LongTi
+        fid.write(struct.pack('f', latti))  # LatTi
+        fid.write(struct.pack('f', vertti))  # VertTi
+        fid.write(struct.pack('f', dv))  # VertGpSpace
+        fid.write(struct.pack('f', dw))  # LatGpSpace
+        fid.write(struct.pack('f', du))  # LongGpSpace
+        fid.write(struct.pack('i', shape[0]/2))  # HalfAlong
+        fid.write(struct.pack('f', mean_ws))  # meanWS
+        fid.write(struct.pack('f', 999.))  # VertLongComp
+        fid.write(struct.pack('f', 999.))  # LatLongComp
+        fid.write(struct.pack('f', 999.))  # LongLongComp
+        fid.write(struct.pack('i', 999))  # Int
+        fid.write(struct.pack('i', seed))  # Seed
+        fid.write(struct.pack('i', shape[1]))  # VertGpNum
+        fid.write(struct.pack('i', shape[2]))  # LatGpNum
+        fid.write(struct.pack('f', 999))  # VertLatComp
+        fid.write(struct.pack('f', 999))  # LatLatComp
+        fid.write(struct.pack('f', 999))  # LongLatComp
+        fid.write(struct.pack('f', 999))  # VertVertComp
+        fid.write(struct.pack('f', 999))  # LatVertComp
+        fid.write(struct.pack('f', 999))  # LongVertComp
 #        fid.flush()
 
 #        bladed2 = np.ndarray((shape[0], shape[2], shape[1], 3), dtype=np.int16)
@@ -1783,9 +1553,9 @@ class Turbulence(object):
 
         # re-arrange array for bladed format
         bladed = np.ndarray((shape[0], shape[2], shape[1], 3), dtype=np.int16)
-        bladed[:,:,:,0] = iu[:,::-1,:]
-        bladed[:,:,:,1] = iv[:,::-1,:]
-        bladed[:,:,:,2] = iw[:,::-1,:]
+        bladed[:, :, :, 0] = iu[:, ::-1, :]
+        bladed[:, :, :, 1] = iv[:, ::-1, :]
+        bladed[:, :, :, 2] = iw[:, ::-1, :]
         bladed_swap_view = bladed.swapaxes(1,2)
         bladed_swap_view.tofile(fid, format='%int16')