diff --git a/examples/data/data_loads_dfmaxs.csv b/examples/data/data_loads_maxs.csv
similarity index 100%
rename from examples/data/data_loads_dfmaxs.csv
rename to examples/data/data_loads_maxs.csv
diff --git a/examples/data/data_loads_dfmeans.csv b/examples/data/data_loads_means.csv
similarity index 100%
rename from examples/data/data_loads_dfmeans.csv
rename to examples/data/data_loads_means.csv
diff --git a/examples/data/data_loads_dfmins.csv b/examples/data/data_loads_mins.csv
similarity index 100%
rename from examples/data/data_loads_dfmins.csv
rename to examples/data/data_loads_mins.csv
diff --git a/examples/data/data_loads_dfstd.csv b/examples/data/data_loads_std.csv
similarity index 100%
rename from examples/data/data_loads_dfstd.csv
rename to examples/data/data_loads_std.csv
diff --git a/examples/loads_example.ipynb b/examples/loads_example.ipynb
index 8f86126c6..49eaf5ba1 100644
--- a/examples/loads_example.ipynb
+++ b/examples/loads_example.ipynb
@@ -22,7 +22,7 @@
"from mhkit import utils\n",
"from mhkit import loads \n",
"import matplotlib.pyplot as plt \n",
- "import os"
+ "from os.path import join"
]
},
{
@@ -40,20 +40,208 @@
"metadata": {},
"outputs": [
{
- "output_type": "execute_result",
"data": {
- "text/plain": " Timestamp Time uWind_80m WD_ModActive WD_Nacelle WD_NacelleMod \\\n0 42795.061586 0.00 3.226754 1.0 157.302829 157.279582 \n1 42795.061586 0.02 3.221099 1.0 157.302829 157.279582 \n2 42795.061586 0.04 3.223492 1.0 157.302829 157.279582 \n3 42795.061586 0.06 3.223274 1.0 157.302829 157.279582 \n4 42795.061587 0.08 3.223927 1.0 157.302829 157.279582 \n\n LSSDW_Tq LSSDW_My LSSDW_Mz TTTq TT_ForeAft TT_SideSide \\\n0 -41.380694 -234.487436 -6.207381 -70.130726 -936.247028 -12.605151 \n1 -38.614459 -233.715870 -8.886200 -66.916338 -942.675906 -24.350452 \n2 -39.717967 -234.341966 -7.970862 -67.860011 -922.971018 -22.485796 \n3 -41.415143 -235.645598 -10.451794 -72.371951 -939.515265 -33.030892 \n4 -38.614459 -234.755991 -8.648988 -76.530014 -924.771486 -29.228398 \n\n TB_ForeAft TB_SideSide BL3_FlapMom BL3_EdgeMom BL1_FlapMom \\\n0 -330.410779 1024.816867 470.774738 -165.541786 33.427748 \n1 -315.445562 873.214212 469.244736 -163.588005 32.697822 \n2 -292.252115 876.299461 468.736474 -166.018111 35.495810 \n3 -274.812769 763.833828 467.373452 -164.645639 37.952455 \n4 -310.213400 704.537757 466.318754 -161.233863 37.430668 \n\n BL1_EdgeMom ActivePower yawoffset \n0 -59.452360 -5.279680 0.023247 \n1 -62.300637 -5.671178 0.023247 \n2 -61.733604 -5.551847 0.023247 \n3 -64.390050 -4.626557 0.023247 \n4 -65.974766 -4.708621 0.023247 ",
- "text/html": "
\n\n
\n \n \n | \n Timestamp | \n Time | \n uWind_80m | \n WD_ModActive | \n WD_Nacelle | \n WD_NacelleMod | \n LSSDW_Tq | \n LSSDW_My | \n LSSDW_Mz | \n TTTq | \n TT_ForeAft | \n TT_SideSide | \n TB_ForeAft | \n TB_SideSide | \n BL3_FlapMom | \n BL3_EdgeMom | \n BL1_FlapMom | \n BL1_EdgeMom | \n ActivePower | \n yawoffset | \n
\n \n \n \n 0 | \n 42795.061586 | \n 0.00 | \n 3.226754 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -41.380694 | \n -234.487436 | \n -6.207381 | \n -70.130726 | \n -936.247028 | \n -12.605151 | \n -330.410779 | \n 1024.816867 | \n 470.774738 | \n -165.541786 | \n 33.427748 | \n -59.452360 | \n -5.279680 | \n 0.023247 | \n
\n \n 1 | \n 42795.061586 | \n 0.02 | \n 3.221099 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -38.614459 | \n -233.715870 | \n -8.886200 | \n -66.916338 | \n -942.675906 | \n -24.350452 | \n -315.445562 | \n 873.214212 | \n 469.244736 | \n -163.588005 | \n 32.697822 | \n -62.300637 | \n -5.671178 | \n 0.023247 | \n
\n \n 2 | \n 42795.061586 | \n 0.04 | \n 3.223492 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -39.717967 | \n -234.341966 | \n -7.970862 | \n -67.860011 | \n -922.971018 | \n -22.485796 | \n -292.252115 | \n 876.299461 | \n 468.736474 | \n -166.018111 | \n 35.495810 | \n -61.733604 | \n -5.551847 | \n 0.023247 | \n
\n \n 3 | \n 42795.061586 | \n 0.06 | \n 3.223274 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -41.415143 | \n -235.645598 | \n -10.451794 | \n -72.371951 | \n -939.515265 | \n -33.030892 | \n -274.812769 | \n 763.833828 | \n 467.373452 | \n -164.645639 | \n 37.952455 | \n -64.390050 | \n -4.626557 | \n 0.023247 | \n
\n \n 4 | \n 42795.061587 | \n 0.08 | \n 3.223927 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -38.614459 | \n -234.755991 | \n -8.648988 | \n -76.530014 | \n -924.771486 | \n -29.228398 | \n -310.213400 | \n 704.537757 | \n 466.318754 | \n -161.233863 | \n 37.430668 | \n -65.974766 | \n -4.708621 | \n 0.023247 | \n
\n \n
\n
"
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Timestamp | \n",
+ " Time | \n",
+ " uWind_80m | \n",
+ " WD_ModActive | \n",
+ " WD_Nacelle | \n",
+ " WD_NacelleMod | \n",
+ " LSSDW_Tq | \n",
+ " LSSDW_My | \n",
+ " LSSDW_Mz | \n",
+ " TTTq | \n",
+ " TT_ForeAft | \n",
+ " TT_SideSide | \n",
+ " TB_ForeAft | \n",
+ " TB_SideSide | \n",
+ " BL3_FlapMom | \n",
+ " BL3_EdgeMom | \n",
+ " BL1_FlapMom | \n",
+ " BL1_EdgeMom | \n",
+ " ActivePower | \n",
+ " yawoffset | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 42795.061586 | \n",
+ " 0.00 | \n",
+ " 3.226754 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -41.380694 | \n",
+ " -234.487436 | \n",
+ " -6.207381 | \n",
+ " -70.130726 | \n",
+ " -936.247028 | \n",
+ " -12.605151 | \n",
+ " -330.410779 | \n",
+ " 1024.816867 | \n",
+ " 470.774738 | \n",
+ " -165.541786 | \n",
+ " 33.427748 | \n",
+ " -59.452360 | \n",
+ " -5.279680 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 42795.061586 | \n",
+ " 0.02 | \n",
+ " 3.221099 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -38.614459 | \n",
+ " -233.715870 | \n",
+ " -8.886200 | \n",
+ " -66.916338 | \n",
+ " -942.675906 | \n",
+ " -24.350452 | \n",
+ " -315.445562 | \n",
+ " 873.214212 | \n",
+ " 469.244736 | \n",
+ " -163.588005 | \n",
+ " 32.697822 | \n",
+ " -62.300637 | \n",
+ " -5.671178 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 42795.061586 | \n",
+ " 0.04 | \n",
+ " 3.223492 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -39.717967 | \n",
+ " -234.341966 | \n",
+ " -7.970862 | \n",
+ " -67.860011 | \n",
+ " -922.971018 | \n",
+ " -22.485796 | \n",
+ " -292.252115 | \n",
+ " 876.299461 | \n",
+ " 468.736474 | \n",
+ " -166.018111 | \n",
+ " 35.495810 | \n",
+ " -61.733604 | \n",
+ " -5.551847 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 42795.061586 | \n",
+ " 0.06 | \n",
+ " 3.223274 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -41.415143 | \n",
+ " -235.645598 | \n",
+ " -10.451794 | \n",
+ " -72.371951 | \n",
+ " -939.515265 | \n",
+ " -33.030892 | \n",
+ " -274.812769 | \n",
+ " 763.833828 | \n",
+ " 467.373452 | \n",
+ " -164.645639 | \n",
+ " 37.952455 | \n",
+ " -64.390050 | \n",
+ " -4.626557 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 42795.061587 | \n",
+ " 0.08 | \n",
+ " 3.223927 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -38.614459 | \n",
+ " -234.755991 | \n",
+ " -8.648988 | \n",
+ " -76.530014 | \n",
+ " -924.771486 | \n",
+ " -29.228398 | \n",
+ " -310.213400 | \n",
+ " 704.537757 | \n",
+ " 466.318754 | \n",
+ " -161.233863 | \n",
+ " 37.430668 | \n",
+ " -65.974766 | \n",
+ " -4.708621 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Timestamp Time uWind_80m WD_ModActive WD_Nacelle WD_NacelleMod \\\n",
+ "0 42795.061586 0.00 3.226754 1.0 157.302829 157.279582 \n",
+ "1 42795.061586 0.02 3.221099 1.0 157.302829 157.279582 \n",
+ "2 42795.061586 0.04 3.223492 1.0 157.302829 157.279582 \n",
+ "3 42795.061586 0.06 3.223274 1.0 157.302829 157.279582 \n",
+ "4 42795.061587 0.08 3.223927 1.0 157.302829 157.279582 \n",
+ "\n",
+ " LSSDW_Tq LSSDW_My LSSDW_Mz TTTq TT_ForeAft TT_SideSide \\\n",
+ "0 -41.380694 -234.487436 -6.207381 -70.130726 -936.247028 -12.605151 \n",
+ "1 -38.614459 -233.715870 -8.886200 -66.916338 -942.675906 -24.350452 \n",
+ "2 -39.717967 -234.341966 -7.970862 -67.860011 -922.971018 -22.485796 \n",
+ "3 -41.415143 -235.645598 -10.451794 -72.371951 -939.515265 -33.030892 \n",
+ "4 -38.614459 -234.755991 -8.648988 -76.530014 -924.771486 -29.228398 \n",
+ "\n",
+ " TB_ForeAft TB_SideSide BL3_FlapMom BL3_EdgeMom BL1_FlapMom \\\n",
+ "0 -330.410779 1024.816867 470.774738 -165.541786 33.427748 \n",
+ "1 -315.445562 873.214212 469.244736 -163.588005 32.697822 \n",
+ "2 -292.252115 876.299461 468.736474 -166.018111 35.495810 \n",
+ "3 -274.812769 763.833828 467.373452 -164.645639 37.952455 \n",
+ "4 -310.213400 704.537757 466.318754 -161.233863 37.430668 \n",
+ "\n",
+ " BL1_EdgeMom ActivePower yawoffset \n",
+ "0 -59.452360 -5.279680 0.023247 \n",
+ "1 -62.300637 -5.671178 0.023247 \n",
+ "2 -61.733604 -5.551847 0.023247 \n",
+ "3 -64.390050 -4.626557 0.023247 \n",
+ "4 -65.974766 -4.708621 0.023247 "
+ ]
},
+ "execution_count": 2,
"metadata": {},
- "execution_count": 2
+ "output_type": "execute_result"
}
],
"source": [
- "# import csv file\n",
- "filepath = 'data/data_loads_example.csv'\n",
- "df_example = pd.read_csv(filepath)\n",
- "df_example.head()"
+ "# Import csv file\n",
+ "filepath = join('data','data_loads_example.csv')\n",
+ "loads_data = pd.read_csv(filepath)\n",
+ "loads_data.head()"
]
},
{
@@ -69,25 +257,242 @@
"metadata": {},
"outputs": [
{
- "output_type": "execute_result",
"data": {
- "text/plain": " uWind_80m WD_ModActive WD_Nacelle \\\nTimestamp \n2017-03-01 01:28:40.999987200 3.226754 1.0 157.302829 \n2017-03-01 01:28:41.020032000 3.221099 1.0 157.302829 \n2017-03-01 01:28:41.039990400 3.223492 1.0 157.302829 \n2017-03-01 01:28:41.060035200 3.223274 1.0 157.302829 \n2017-03-01 01:28:41.079993600 3.223927 1.0 157.302829 \n\n WD_NacelleMod LSSDW_Tq LSSDW_My \\\nTimestamp \n2017-03-01 01:28:40.999987200 157.279582 -41.380694 -234.487436 \n2017-03-01 01:28:41.020032000 157.279582 -38.614459 -233.715870 \n2017-03-01 01:28:41.039990400 157.279582 -39.717967 -234.341966 \n2017-03-01 01:28:41.060035200 157.279582 -41.415143 -235.645598 \n2017-03-01 01:28:41.079993600 157.279582 -38.614459 -234.755991 \n\n LSSDW_Mz TTTq TT_ForeAft TT_SideSide \\\nTimestamp \n2017-03-01 01:28:40.999987200 -6.207381 -70.130726 -936.247028 -12.605151 \n2017-03-01 01:28:41.020032000 -8.886200 -66.916338 -942.675906 -24.350452 \n2017-03-01 01:28:41.039990400 -7.970862 -67.860011 -922.971018 -22.485796 \n2017-03-01 01:28:41.060035200 -10.451794 -72.371951 -939.515265 -33.030892 \n2017-03-01 01:28:41.079993600 -8.648988 -76.530014 -924.771486 -29.228398 \n\n TB_ForeAft TB_SideSide BL3_FlapMom \\\nTimestamp \n2017-03-01 01:28:40.999987200 -330.410779 1024.816867 470.774738 \n2017-03-01 01:28:41.020032000 -315.445562 873.214212 469.244736 \n2017-03-01 01:28:41.039990400 -292.252115 876.299461 468.736474 \n2017-03-01 01:28:41.060035200 -274.812769 763.833828 467.373452 \n2017-03-01 01:28:41.079993600 -310.213400 704.537757 466.318754 \n\n BL3_EdgeMom BL1_FlapMom BL1_EdgeMom \\\nTimestamp \n2017-03-01 01:28:40.999987200 -165.541786 33.427748 -59.452360 \n2017-03-01 01:28:41.020032000 -163.588005 32.697822 -62.300637 \n2017-03-01 01:28:41.039990400 -166.018111 35.495810 -61.733604 \n2017-03-01 01:28:41.060035200 -164.645639 37.952455 -64.390050 \n2017-03-01 01:28:41.079993600 -161.233863 37.430668 -65.974766 \n\n ActivePower yawoffset \nTimestamp \n2017-03-01 01:28:40.999987200 -5.279680 0.023247 \n2017-03-01 01:28:41.020032000 -5.671178 0.023247 \n2017-03-01 01:28:41.039990400 -5.551847 0.023247 \n2017-03-01 01:28:41.060035200 -4.626557 0.023247 \n2017-03-01 01:28:41.079993600 -4.708621 0.023247 ",
- "text/html": "\n\n
\n \n \n | \n uWind_80m | \n WD_ModActive | \n WD_Nacelle | \n WD_NacelleMod | \n LSSDW_Tq | \n LSSDW_My | \n LSSDW_Mz | \n TTTq | \n TT_ForeAft | \n TT_SideSide | \n TB_ForeAft | \n TB_SideSide | \n BL3_FlapMom | \n BL3_EdgeMom | \n BL1_FlapMom | \n BL1_EdgeMom | \n ActivePower | \n yawoffset | \n
\n \n Timestamp | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n
\n \n \n \n 2017-03-01 01:28:40.999987200 | \n 3.226754 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -41.380694 | \n -234.487436 | \n -6.207381 | \n -70.130726 | \n -936.247028 | \n -12.605151 | \n -330.410779 | \n 1024.816867 | \n 470.774738 | \n -165.541786 | \n 33.427748 | \n -59.452360 | \n -5.279680 | \n 0.023247 | \n
\n \n 2017-03-01 01:28:41.020032000 | \n 3.221099 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -38.614459 | \n -233.715870 | \n -8.886200 | \n -66.916338 | \n -942.675906 | \n -24.350452 | \n -315.445562 | \n 873.214212 | \n 469.244736 | \n -163.588005 | \n 32.697822 | \n -62.300637 | \n -5.671178 | \n 0.023247 | \n
\n \n 2017-03-01 01:28:41.039990400 | \n 3.223492 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -39.717967 | \n -234.341966 | \n -7.970862 | \n -67.860011 | \n -922.971018 | \n -22.485796 | \n -292.252115 | \n 876.299461 | \n 468.736474 | \n -166.018111 | \n 35.495810 | \n -61.733604 | \n -5.551847 | \n 0.023247 | \n
\n \n 2017-03-01 01:28:41.060035200 | \n 3.223274 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -41.415143 | \n -235.645598 | \n -10.451794 | \n -72.371951 | \n -939.515265 | \n -33.030892 | \n -274.812769 | \n 763.833828 | \n 467.373452 | \n -164.645639 | \n 37.952455 | \n -64.390050 | \n -4.626557 | \n 0.023247 | \n
\n \n 2017-03-01 01:28:41.079993600 | \n 3.223927 | \n 1.0 | \n 157.302829 | \n 157.279582 | \n -38.614459 | \n -234.755991 | \n -8.648988 | \n -76.530014 | \n -924.771486 | \n -29.228398 | \n -310.213400 | \n 704.537757 | \n 466.318754 | \n -161.233863 | \n 37.430668 | \n -65.974766 | \n -4.708621 | \n 0.023247 | \n
\n \n
\n
"
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " uWind_80m | \n",
+ " WD_ModActive | \n",
+ " WD_Nacelle | \n",
+ " WD_NacelleMod | \n",
+ " LSSDW_Tq | \n",
+ " LSSDW_My | \n",
+ " LSSDW_Mz | \n",
+ " TTTq | \n",
+ " TT_ForeAft | \n",
+ " TT_SideSide | \n",
+ " TB_ForeAft | \n",
+ " TB_SideSide | \n",
+ " BL3_FlapMom | \n",
+ " BL3_EdgeMom | \n",
+ " BL1_FlapMom | \n",
+ " BL1_EdgeMom | \n",
+ " ActivePower | \n",
+ " yawoffset | \n",
+ "
\n",
+ " \n",
+ " Timestamp | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 2017-03-01 01:28:40.999987200 | \n",
+ " 3.226754 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -41.380694 | \n",
+ " -234.487436 | \n",
+ " -6.207381 | \n",
+ " -70.130726 | \n",
+ " -936.247028 | \n",
+ " -12.605151 | \n",
+ " -330.410779 | \n",
+ " 1024.816867 | \n",
+ " 470.774738 | \n",
+ " -165.541786 | \n",
+ " 33.427748 | \n",
+ " -59.452360 | \n",
+ " -5.279680 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 2017-03-01 01:28:41.020032000 | \n",
+ " 3.221099 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -38.614459 | \n",
+ " -233.715870 | \n",
+ " -8.886200 | \n",
+ " -66.916338 | \n",
+ " -942.675906 | \n",
+ " -24.350452 | \n",
+ " -315.445562 | \n",
+ " 873.214212 | \n",
+ " 469.244736 | \n",
+ " -163.588005 | \n",
+ " 32.697822 | \n",
+ " -62.300637 | \n",
+ " -5.671178 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 2017-03-01 01:28:41.039990400 | \n",
+ " 3.223492 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -39.717967 | \n",
+ " -234.341966 | \n",
+ " -7.970862 | \n",
+ " -67.860011 | \n",
+ " -922.971018 | \n",
+ " -22.485796 | \n",
+ " -292.252115 | \n",
+ " 876.299461 | \n",
+ " 468.736474 | \n",
+ " -166.018111 | \n",
+ " 35.495810 | \n",
+ " -61.733604 | \n",
+ " -5.551847 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 2017-03-01 01:28:41.060035200 | \n",
+ " 3.223274 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -41.415143 | \n",
+ " -235.645598 | \n",
+ " -10.451794 | \n",
+ " -72.371951 | \n",
+ " -939.515265 | \n",
+ " -33.030892 | \n",
+ " -274.812769 | \n",
+ " 763.833828 | \n",
+ " 467.373452 | \n",
+ " -164.645639 | \n",
+ " 37.952455 | \n",
+ " -64.390050 | \n",
+ " -4.626557 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ " 2017-03-01 01:28:41.079993600 | \n",
+ " 3.223927 | \n",
+ " 1.0 | \n",
+ " 157.302829 | \n",
+ " 157.279582 | \n",
+ " -38.614459 | \n",
+ " -234.755991 | \n",
+ " -8.648988 | \n",
+ " -76.530014 | \n",
+ " -924.771486 | \n",
+ " -29.228398 | \n",
+ " -310.213400 | \n",
+ " 704.537757 | \n",
+ " 466.318754 | \n",
+ " -161.233863 | \n",
+ " 37.430668 | \n",
+ " -65.974766 | \n",
+ " -4.708621 | \n",
+ " 0.023247 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " uWind_80m WD_ModActive WD_Nacelle \\\n",
+ "Timestamp \n",
+ "2017-03-01 01:28:40.999987200 3.226754 1.0 157.302829 \n",
+ "2017-03-01 01:28:41.020032000 3.221099 1.0 157.302829 \n",
+ "2017-03-01 01:28:41.039990400 3.223492 1.0 157.302829 \n",
+ "2017-03-01 01:28:41.060035200 3.223274 1.0 157.302829 \n",
+ "2017-03-01 01:28:41.079993600 3.223927 1.0 157.302829 \n",
+ "\n",
+ " WD_NacelleMod LSSDW_Tq LSSDW_My \\\n",
+ "Timestamp \n",
+ "2017-03-01 01:28:40.999987200 157.279582 -41.380694 -234.487436 \n",
+ "2017-03-01 01:28:41.020032000 157.279582 -38.614459 -233.715870 \n",
+ "2017-03-01 01:28:41.039990400 157.279582 -39.717967 -234.341966 \n",
+ "2017-03-01 01:28:41.060035200 157.279582 -41.415143 -235.645598 \n",
+ "2017-03-01 01:28:41.079993600 157.279582 -38.614459 -234.755991 \n",
+ "\n",
+ " LSSDW_Mz TTTq TT_ForeAft TT_SideSide \\\n",
+ "Timestamp \n",
+ "2017-03-01 01:28:40.999987200 -6.207381 -70.130726 -936.247028 -12.605151 \n",
+ "2017-03-01 01:28:41.020032000 -8.886200 -66.916338 -942.675906 -24.350452 \n",
+ "2017-03-01 01:28:41.039990400 -7.970862 -67.860011 -922.971018 -22.485796 \n",
+ "2017-03-01 01:28:41.060035200 -10.451794 -72.371951 -939.515265 -33.030892 \n",
+ "2017-03-01 01:28:41.079993600 -8.648988 -76.530014 -924.771486 -29.228398 \n",
+ "\n",
+ " TB_ForeAft TB_SideSide BL3_FlapMom \\\n",
+ "Timestamp \n",
+ "2017-03-01 01:28:40.999987200 -330.410779 1024.816867 470.774738 \n",
+ "2017-03-01 01:28:41.020032000 -315.445562 873.214212 469.244736 \n",
+ "2017-03-01 01:28:41.039990400 -292.252115 876.299461 468.736474 \n",
+ "2017-03-01 01:28:41.060035200 -274.812769 763.833828 467.373452 \n",
+ "2017-03-01 01:28:41.079993600 -310.213400 704.537757 466.318754 \n",
+ "\n",
+ " BL3_EdgeMom BL1_FlapMom BL1_EdgeMom \\\n",
+ "Timestamp \n",
+ "2017-03-01 01:28:40.999987200 -165.541786 33.427748 -59.452360 \n",
+ "2017-03-01 01:28:41.020032000 -163.588005 32.697822 -62.300637 \n",
+ "2017-03-01 01:28:41.039990400 -166.018111 35.495810 -61.733604 \n",
+ "2017-03-01 01:28:41.060035200 -164.645639 37.952455 -64.390050 \n",
+ "2017-03-01 01:28:41.079993600 -161.233863 37.430668 -65.974766 \n",
+ "\n",
+ " ActivePower yawoffset \n",
+ "Timestamp \n",
+ "2017-03-01 01:28:40.999987200 -5.279680 0.023247 \n",
+ "2017-03-01 01:28:41.020032000 -5.671178 0.023247 \n",
+ "2017-03-01 01:28:41.039990400 -5.551847 0.023247 \n",
+ "2017-03-01 01:28:41.060035200 -4.626557 0.023247 \n",
+ "2017-03-01 01:28:41.079993600 -4.708621 0.023247 "
+ ]
},
+ "execution_count": 3,
"metadata": {},
- "execution_count": 3
+ "output_type": "execute_result"
}
],
"source": [
"# use the datetime conversion function from the utils module\n",
- "newtime = utils.excel2datetime(df_example['Timestamp'])\n",
+ "newtime = utils.excel2datetime(loads_data['Timestamp'])\n",
"# replace the timestamp column with our newly formatted datetime\n",
- "df_example['Timestamp'] = newtime \n",
+ "loads_data['Timestamp'] = newtime \n",
"# set this as our index for our dataframe\n",
- "df_example = df_example.set_index('Timestamp')\n",
+ "loads_data = loads_data.set_index('Timestamp')\n",
"# remove the \"time\" column as its unnecessary \n",
- "df_example.drop(columns='Time',inplace=True)\n",
- "df_example.head()"
+ "loads_data.drop(columns='Time',inplace=True)\n",
+ "loads_data.head()"
]
},
{
@@ -101,21 +506,24 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
- "output_type": "stream",
"name": "stdout",
- "text": "DEL_tower: 3914.3955392796324\nDEL_blade: 1435.906825651158\n"
+ "output_type": "stream",
+ "text": [
+ "DEL_tower: 3914.3955392796324\n",
+ "DEL_blade: 1435.906825651158\n"
+ ]
}
],
"source": [
"# use the fatigue function to calculate the damage equivalent load for this file\n",
- "DEL_tower = loads.damage_equivalent_load(df_example['TB_ForeAft'],4,binNum=100,t=600)\n",
- "DEL_blade = loads.damage_equivalent_load(df_example['BL1_FlapMom'],10,binNum=100,t=600)\n",
+ "DEL_tower = loads.damage_equivalent_load(loads_data['TB_ForeAft'],4,bin_num=100,t=600)\n",
+ "DEL_blade = loads.damage_equivalent_load(loads_data['BL1_FlapMom'],10,bin_num=100,t=600)\n",
"print('DEL_tower: '+ str(DEL_tower))\n",
"print('DEL_blade: '+ str(DEL_blade))"
]
@@ -135,18 +543,97 @@
"metadata": {},
"outputs": [
{
- "output_type": "execute_result",
"data": {
- "text/plain": " uWind_80m WD_ModActive WD_Nacelle WD_NacelleMod \\\n2017-03-01 01:28:41 7.773325 1.0 178.612256 178.602595 \n\n LSSDW_Tq LSSDW_My LSSDW_Mz TTTq TT_ForeAft \\\n2017-03-01 01:28:41 127.244191 -252.23813 3.50322 7.032573 -846.663367 \n\n TT_SideSide TB_ForeAft TB_SideSide BL3_FlapMom \\\n2017-03-01 01:28:41 271.446574 3785.034515 7.199176 -494.858287 \n\n BL3_EdgeMom BL1_FlapMom BL1_EdgeMom ActivePower \\\n2017-03-01 01:28:41 266.790368 -452.652744 21.259999 234.578289 \n\n yawoffset \n2017-03-01 01:28:41 0.009661 ",
- "text/html": "\n\n
\n \n \n | \n uWind_80m | \n WD_ModActive | \n WD_Nacelle | \n WD_NacelleMod | \n LSSDW_Tq | \n LSSDW_My | \n LSSDW_Mz | \n TTTq | \n TT_ForeAft | \n TT_SideSide | \n TB_ForeAft | \n TB_SideSide | \n BL3_FlapMom | \n BL3_EdgeMom | \n BL1_FlapMom | \n BL1_EdgeMom | \n ActivePower | \n yawoffset | \n
\n \n \n \n 2017-03-01 01:28:41 | \n 7.773325 | \n 1.0 | \n 178.612256 | \n 178.602595 | \n 127.244191 | \n -252.23813 | \n 3.50322 | \n 7.032573 | \n -846.663367 | \n 271.446574 | \n 3785.034515 | \n 7.199176 | \n -494.858287 | \n 266.790368 | \n -452.652744 | \n 21.259999 | \n 234.578289 | \n 0.009661 | \n
\n \n
\n
"
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " uWind_80m | \n",
+ " WD_ModActive | \n",
+ " WD_Nacelle | \n",
+ " WD_NacelleMod | \n",
+ " LSSDW_Tq | \n",
+ " LSSDW_My | \n",
+ " LSSDW_Mz | \n",
+ " TTTq | \n",
+ " TT_ForeAft | \n",
+ " TT_SideSide | \n",
+ " TB_ForeAft | \n",
+ " TB_SideSide | \n",
+ " BL3_FlapMom | \n",
+ " BL3_EdgeMom | \n",
+ " BL1_FlapMom | \n",
+ " BL1_EdgeMom | \n",
+ " ActivePower | \n",
+ " yawoffset | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 2017-03-01 01:28:41 | \n",
+ " 7.773325 | \n",
+ " 1.0 | \n",
+ " 178.612256 | \n",
+ " 178.602595 | \n",
+ " 127.244191 | \n",
+ " -252.23813 | \n",
+ " 3.50322 | \n",
+ " 7.032573 | \n",
+ " -846.663367 | \n",
+ " 271.446574 | \n",
+ " 3785.034515 | \n",
+ " 7.199176 | \n",
+ " -494.858287 | \n",
+ " 266.790368 | \n",
+ " -452.652744 | \n",
+ " 21.259999 | \n",
+ " 234.578289 | \n",
+ " 0.009661 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " uWind_80m WD_ModActive WD_Nacelle WD_NacelleMod \\\n",
+ "2017-03-01 01:28:41 7.773325 1.0 178.612256 178.602595 \n",
+ "\n",
+ " LSSDW_Tq LSSDW_My LSSDW_Mz TTTq TT_ForeAft \\\n",
+ "2017-03-01 01:28:41 127.244191 -252.23813 3.50322 7.032573 -846.663367 \n",
+ "\n",
+ " TT_SideSide TB_ForeAft TB_SideSide BL3_FlapMom \\\n",
+ "2017-03-01 01:28:41 271.446574 3785.034515 7.199176 -494.858287 \n",
+ "\n",
+ " BL3_EdgeMom BL1_FlapMom BL1_EdgeMom ActivePower \\\n",
+ "2017-03-01 01:28:41 266.790368 -452.652744 21.259999 234.578289 \n",
+ "\n",
+ " yawoffset \n",
+ "2017-03-01 01:28:41 0.009661 "
+ ]
},
+ "execution_count": 5,
"metadata": {},
- "execution_count": 5
+ "output_type": "execute_result"
}
],
"source": [
"# calculate the means, maxs, mins, and stdevs of this file\n",
- "means,maxs,mins,stdevs = utils.get_stats(df_example,50,period=600)\n",
+ "means,maxs,mins,stdevs = utils.get_stats(loads_data,50,period=600)\n",
"# show the results which is indexed by the first timestamp of the corresponding statistical window\n",
"means"
]
@@ -165,10 +652,10 @@
"outputs": [],
"source": [
"# load in dataframes\n",
- "dfmeans = pd.read_csv('data/data_loads_dfmeans.csv')\n",
- "dfmaxs = pd.read_csv('data/data_loads_dfmaxs.csv')\n",
- "dfmins = pd.read_csv('data/data_loads_dfmins.csv')\n",
- "dfstd = pd.read_csv('data/data_loads_dfstd.csv')"
+ "means = pd.read_csv(join('data','data_loads_means.csv'))\n",
+ "maxs = pd.read_csv(join('data','data_loads_maxs.csv'))\n",
+ "mins = pd.read_csv(join('data','data_loads_mins.csv'))\n",
+ "std = pd.read_csv(join('data','data_loads_std.csv'))"
]
},
{
@@ -184,31 +671,46 @@
"metadata": {},
"outputs": [
{
- "output_type": "display_data",
"data": {
- "text/plain": "