Hi everyone,
I’m working on the 5 MW basic model due to an University project. I encounter some errors during Mlife execution and I’m not sure what is going on and why it’s failing.
Here is the error code:
Index exceeds the number of array elements (1).
Error in read_value (line 67)
varargout{1}{i} = cell2mat( temp(i) );
Error in read_settings (line 802)
temp = read_value( ParamFile{1}{PLine+iFile}, ‘string’ , 2, ‘’, ‘’, fidEcho );
Error in mlife (line 246)
[ Statistics, FileInfo, Fatigue ] = read_settings( settingsFile, dataDirectory );
Attached you will find my Mlife file if it helps.
Thank you very much in advance
Martintxo
PS: Seems like there is an error attaching files, here is the transcripted code:
----- MLife version 1.0 Input File -------------------------------------------
MLife_template Test#09
----- Job Options ------------------------------------------------------------
true EchoInp Echo input to .echo as this file is being read.
true StrNames Use channel names following a “$” instead of numbers when specifying channels in this input file.
false OutData Output modified data array after scaling and calculated channels. (currently unavailable)
“%6.2e” RealFmt Format for outputting floating-point values.
“Mlife_template_copia_raiz_pala_torre” RootName Root name for aggregate output files.
----- Input-Data Layout ------------------------------------------------------
5 TitleLine The row with the file title on it (zero if no title is available).
0 NamesLine The row with the channel names on it (zero if no names are available or are specified below).
0 UnitsLine The row with the channel units on it (zero if no units are available or are specified below).
9 FirstDataLine The first row of data.
38 NumChans The number of channels in each input file.
ChanTitle ChanUnits Scale Offset PSFtype NumCols rows of data follow. Title and units strings must be 10 characters or less.
“Time” “(s)” 1 0 0
“Wind1VelX” “(m/s)” 1 0 0
“Wind1VelY” “(m/s)” 1 0 0
“Wind1VelZ” “(m/s)” 1 0 0
“RotSpeed” “(rpm)” 1 0 0
“GenSpeed” “(rpm)” 1 0 0
“Azimuth” “(deg)” 1 0 0
“BldPitch1” “(deg)” 1 0 0
“ldPitch2” “(deg)” 1 0 0
“BldPitch3” “(deg)” 1 0 0
“OoPDefl1” “(m)” 1 0 0
“IPDefl1” “(m)” 1 0 0
“TwstDefl1” “(deg)” 1 0 0
“RootFxb1” “(kN)” 1 0 0
“RootFyb1” “(kN)” 1 0 0
“RootFzb1” “(kN)” 1 0 0
“RootMxb1” “(kN-m)” 1 0 0
“RootMyb1” “(kN-m)” 1 0 0
“RootMzb1” “(kN-m)” 1 0 0
“YawBrFxp” “(kN)” 1 0 0
“YawBrFyp” “(kN)” 1 0 0
“YawBrFzp” “(kN)” 1 0 0
“YawBrMxp” “(kN-m)” 1 0 0
“YawBrMyp” “(kN-m)” 1 0 0
“YawBrMzp” “(kN-m)” 1 0 0
“TwrBsFxt” “(kN)” 1 0 0
“TwrBsFyt” “(kN)” 1 0 0
“TwrBsFzt” “(kN)” 1 0 0
“TwrBsMxt” “(kN-m)” 1 0 0
“TwrBsMyt” “(kN-m)” 1 0 0
“TwrBsMzt” “(kN-m)” 1 0 0
“LSShftFxa” “(kN)” 1 0 0
“LSShftFya” “(kN)” 1 0 0
“LSShftFza” “(kN)” 1 0 0
“RotTorq” “(kN-m)” 1 0 0
“RotPwr” “(kN)” 1 0 0
“GenPwr” “(kW)” 1 0 0
“GenTq” “(kN-m)” 1 0 0
----- Calculated Channels ----------------------------------------------------
0 NumCChan The number calculated channels to generate.
1234567890 Seed The integer seed for the random number generator (-2,147,483,648 to 2,147,483,647)
Col_Title Units Equation Put each field in quotes. Titles and units are limited to 10 characters. NumCChan rows of data follow.
----- Load Roses -------------------------------------------------------------
0 NumRoses The number of load roses to generate.
Rose Name Units Channel1 Channel2 nSectors
----- Time and Wind Speed ----------------------------------------------------
1 TimeChan The channel containing time.
2 WSChan The primary wind-speed channel (used for mean wind speed and turbulence intensity, 0 for none)
----- Statistics and Extreme Events ------------------------------------------
true DoStats Generate statistics of all the channels.
false WrStatsTxt Write the stats to a text file?
true WrStatsXLS Write the stats to an Excel file?
0 NumSFChans Number of channels that will have summary statistics generated for them.
SFChans List of channels that will have summary statistics generated for them. Must number NumSFChans.
----- Distributions -----------------------------------------------------------
false UserDistrib User defined distribution? true = load user-specified distribution, false = only use Weibull wind distribution
2 WeibullShape Weibull shape factor. If WeibullShape=2, enter the mean wind speed for WeibullScale.
8.5 WeibullScale Weibull scale factor. If WeibullShape<>2. Otherwise, enter the mean wind speed.
3 WSin Cut-in wind speed for the turbine.
25 WSout Cut-out wind speed for the turbine.
30 WSmax Maximum wind speed value for the wind-speed bins.
2 WSMaxBinSize Maximum width of a wind-speed bin.
0 nDistribVars Number of independent variables in the user-specified distribution, ignored if UserDistrib = false
“” DistribName Filename of the user-supplied distribution table, ignored if UserDistrib = false
----- Fatigue ----------------------------------------------------------------
12 nFatigueChannels The number of fatigue channels. Next six lines ignored if zero.
0.01 FiltRatio The fraction of the maximum range of each channel used as a cutoff range for the racetrack filter. Use zero for no filter.
630720000 DesignLife Number of seconds in the design lifetime (20 years = 630720000 seconds).
1 Availability Fraction of the design life the turbine is operating when winds are between Vin and Vout
false BinCycles Bin the rainflow cycles?
0.5 UCMult Multiplier for binning unclosed cycles. (0 discards, 1 counts as a full cycle)
true DoShortTerm Compute simple (unweighted) damage-equivalent loads and damage rates.
true DoLife Do lifetime-related calculations?
true DoAggregate Compute a DELs and a damage result based on an aggregate of all the input files (does not use the wind spped distribution)
false WrShortTermTxt Write short-term results to plain-text files?
true WrShortTermXLS Write short-term resultsto an Excel workbook?
false WrLifeTxt Write lifetime results to plain-text files?
true WrLifeXLS Write lifetime results to an Excel workbook?
0.0158 EquivalentFrequency The frequency of the damage equivalent load (Hz)
true DEL_AsRange true = report DELs as a range value, false = report as a one-sided amplitude
3 DEL_Type 1 = fixed mean, 2 = zero mean, 3 = both
2 GoodmanFlag 0 = no Goodman correction, 1 = use Goodman correction, 2 = compute results with and without Goodman correction
Channel# NSlopes SNslopeLst BinFlag BinWidth/Number TypeLMF LUlt BinWidth not used when BinCycles is false. nFatigueChannels rows of data follow. LUlt >> LMF
$RootFxb1$ 1 10 BN 200 WM 699
$RootFyb1$ 1 10 BN 200 WM 367
$RootFzb1$ 1 10 BN 200 WM 1155
$RootMxb1$ 1 10 BN 200 WM 8642
$RootMyb1$ 1 10 BN 200 WM 19349
$RootMzb1$ 1 10 BN 200 WM 752
$TwrBsFxt$ 2 4 7 BN 200 WM 2687
$TwrBsFyt$ 2 4 7 BN 200 WM 380
$TwrBsFzt$ 2 4 7 BN 200 WM 7781
$TwrBsMxt$ 2 4 7 BN 200 WM 31951
$TwrBsMyt$ 2 4 7 BN 200 WM 2
$TwrBsMzt$ 2 4 7 BN 200 WM 11569
2 NumDELGroups
Name NChannels ChannelList
“Blade loads” 6 1 2 3 4 5 6
“Tower loads” 6 7 8 9 10 11 12
----- Input Files ------------------------------------------------------------
2 FileFormat Format of input files. 1 = FAST ascii, 2 = FAST binary
72 1.1 1.3 1.5 1.7 (Weibull-Weighted Normal Operation: NumNormFiles, PSF1, PSF2, PSF3, PSF4)
“1dlc12a.outb”
“1dlc12b.outb”
“1dlc12c.outb”
“1dlc12d.outb”
“1dlc12e.outb”
“1dlc12f.outb”
“1dlc12g.outb”
“1dlc12h.outb”
“1dlc12i.outb”
“1dlc12j.outb”
“1dlc12k.outb”
“1dlc12l.outb”
“2dlc12a.outb”
“2dlc12b.outb”
“2dlc12c.outb”
“2dlc12d.outb”
“2dlc12e.outb”
“2dlc12f.outb”
“2dlc12g.outb”
“2dlc12h.outb”
“2dlc12i.outb”
“2dlc12j.outb”
“2dlc12k.outb”
“2dlc12l.outb”
“3dlc12a.outb”
“3dlc12b.outb”
“3dlc12c.outb”
“3dlc12d.outb”
“3dlc12e.outb”
“3dlc12f.outb”
“3dlc12g.outb”
“3dlc12h.outb”
“3dlc12i.outb”
“3dlc12j.outb”
“3dlc12k.outb”
“3dlc12l.outb”
“4dlc12a.outb”
“4dlc12b.outb”
“4dlc12c.outb”
“4dlc12d.outb”
“4dlc12e.outb”
“4dlc12f.outb”
“4dlc12g.outb”
“4dlc12h.outb”
“4dlc12i.outb”
“4dlc12j.outb”
“4dlc12k.outb”
“4dlc12l.outb”
“5dlc12a.outb”
“5dlc12b.outb”
“5dlc12c.outb”
“5dlc12d.outb”
“5dlc12e.outb”
“5dlc12f.outb”
“5dlc12g.outb”
“5dlc12h.outb”
“5dlc12i.outb”
“5dlc12j.outb”
“5dlc12k.outb”
“5dlc12l.outb”
“6dlc12a.outb”
“6dlc12b.outb”
“6dlc12c.outb”
“6dlc12d.outb”
“6dlc12e.outb”
“6dlc12f.outb”
“6dlc12g.outb”
“6dlc12h.outb”
“6dlc12i.outb”
“6dlc12j.outb”
“6dlc12k.outb”
“6dlc12l.outb”
3 1.1 1.3 1.5 1.7 (Weibull-Weighted Idling: NumIdleFiles, PSF1, PSF2, PSF3, PSF4)
“dlc41a.outb”
“dlc41b.outb”
“dlc41c.outb”
12 1.2 1.3 1.4 1.6 (Discrete Events: NumDiscFiles, PSF1, PSF2, PSF3, PSF4)9 NumFiles The number of input files to read.
“1dlc61_2ms.outb”
“1dlc61_27ms.outb”
“2dlc61_2ms.outb”
“2dlc61_27ms.outb”
“3dlc61_2ms.outb”
“3dlc61_27ms.outb”
“4dlc61_2ms.outb”
“4dlc61_27ms.outb”
“5dlc61_2ms.outb”
“5dlc61_27ms.outb”
“6dlc61_2ms.outb”
“6dlc61_27ms.outb”
==EOF== DO NOT REMOVE OR CHANGE. MUST COME JUST AFTER LAST LINE OF VALID INPUT.