{"id":19076,"date":"2022-01-26T09:58:56","date_gmt":"2022-01-26T04:28:56","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=19076"},"modified":"2022-01-26T09:58:58","modified_gmt":"2022-01-26T04:28:58","slug":"pywake-library","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/pywake-library\/","title":{"rendered":"Working With Python Pywake Library"},"content":{"rendered":"\n<p>With the vast amount of python libraries, python does a lot of easy work. Some of its work even automate the calculation and is convenient to use. However, we also need to set our environment as such to get better performance. Some of them are providing good datasets or using good models. These all decide the overall performance of our application. Today, in this article, we will discuss one such library that is the python pywake library. First, we will start with the use of the library. And then, we will set the environment for it and see the demonstration over it. So, let&#8217;s begin.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#What_is_Pywake\" >What is Pywake?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Installation\" >Installation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Setting_Up_the_Environment_for_Pywake\" >Setting Up the Environment for Pywake<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Calculating_AEP\" >Calculating AEP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Plotting_AEP\" >Plotting AEP<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#AEP_vs_Turbines_Plot\" >AEP vs Turbines Plot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#AEP_vs_Wind_Speed_Plot\" >AEP vs Wind Speed Plot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#AEP_vs_Wind_Direction_Plot\" >AEP vs Wind Direction Plot<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Setting_Up_Wind_Turbine_Object\" >Setting Up Wind Turbine Object<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Import_from_WAsP_wtg_files\" >Import from WAsP wtg files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#User_Defined_WindTurbine\" >User Defined WindTurbine<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Multi-type_Wind_Turbines\" >Multi-type Wind Turbines<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Engineering_Wind_Farm_Models\" >Engineering Wind Farm Models<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Run_Wind_Farm_Simulation\" >Run Wind Farm Simulation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#Trending_Now\" >Trending Now<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-pywake\"><span class=\"ez-toc-section\" id=\"What_is_Pywake\"><\/span>What is Pywake?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pywake is a python library used as an AEP <a href=\"http:\/\/www.pythonpool.com\/python-gpa-calculator\/\" target=\"_blank\" rel=\"noopener\">calculator<\/a> for wind farms. It is a simulation tool capable of calculating flow fields or power production for wind farms. Despite being a unified interface of different engineering models, it is very fast in terms of performance. The reason is that developers make heavy use of vectorization and numerical libraries to perform the calculations. Now, once you understand this, let&#8217;s go with installation and setting up the environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installation\"><span class=\"ez-toc-section\" id=\"Installation\"><\/span>Installation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To install the library, we will use the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install py-wake<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-the-environment-for-pywake\"><span class=\"ez-toc-section\" id=\"Setting_Up_the_Environment_for_Pywake\"><\/span>Setting Up the Environment for Pywake<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once we are done with the installation, we will set the <span style=\"text-decoration: underline;\"><strong><a href=\"http:\/\/www.pythonpool.com\/default-python-path\/\" target=\"_blank\" rel=\"noreferrer noopener\">environment <\/a><\/strong><\/span>for AEP calculation. For that, we will first import the required <a href=\"http:\/\/www.pythonpool.com\/pyathena-library\/\" target=\"_blank\" rel=\"noopener\">libraries<\/a>. Then, we set up wind turbines, site, and flow model. We will do that in the following way.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport py_wake\nfrom py_wake.examples.data.hornsrev1 import Hornsrev1Site,V80, wt_x, wt_y, wt16_x, wt16_y\nfrom py_wake import NOJ\n\nwindTurbines = V80()\nsite=Hornsrev1Site()\nnoj = NOJ(site,windTurbines)\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-calculating-aep\"><span class=\"ez-toc-section\" id=\"Calculating_AEP\"><\/span>Calculating AEP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now, once we initialize the required object, let&#8217;s run the model and calculate AEP.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# Running the model\nsimulationResult = noj(wt16_x,wt16_y)\n\n# Calculating AEP\nprint (&quot;Total AEP: %f GWh&quot;%simulationResult.aep().sum())\nsimulationResult.aep()\n<\/pre><\/div>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"451\" height=\"620\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/aep.jpg\" alt=\"Calculating AEP\" class=\"wp-image-19078\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/aep.jpg 451w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/aep-218x300.jpg 218w\" sizes=\"(max-width: 451px) 100vw, 451px\" \/><\/figure><\/div>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-lima monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\">[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-plotting-aep\"><span class=\"ez-toc-section\" id=\"Plotting_AEP\"><\/span>Plotting AEP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the above section of the article, we have calculated AEP. Now, it&#8217;s time to visualize it on the graph. So, in this section, we will plot the graph of AEP depending on different factors. These factors are wind turbines, wind speed, and wind directions. Let&#8217;s plot it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-aep-vs-turbines-plot\"><span class=\"ez-toc-section\" id=\"AEP_vs_Turbines_Plot\"><\/span>AEP vs Turbines Plot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt\n%matplotlib inline\n\nplt.figure()\naep = simulationResult.aep()\nwindTurbines.plot(wt16_x,wt16_y)\nc =plt.scatter(wt16_x, wt16_y, c=aep.sum(&#x5B;'wd','ws']))\nplt.colorbar(c, label='AEP &#x5B;GWh]')\n<\/pre><\/div>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/turbine.jpg\" alt=\"AEP vs Turbines Plot\" class=\"wp-image-19080\" width=\"394\" height=\"262\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/turbine.jpg 512w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/turbine-300x200.jpg 300w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/figure><\/div>\n\n\n\n<p>In the above image, we have plotted the scattered graph for turbines on the <span style=\"text-decoration: underline;\"><strong><a href=\"http:\/\/www.pythonpool.com\/numpy-axis\/\" target=\"_blank\" rel=\"noreferrer noopener\">x-axis and AEP on the y-axis<\/a><\/strong><\/span>. For that, we used the scatter() function, and for the color bar representing AEP, we used the color bar function.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-aep-vs-wind-speed-plot\"><span class=\"ez-toc-section\" id=\"AEP_vs_Wind_Speed_Plot\"><\/span>AEP vs Wind Speed Plot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now, let&#8217;s see how AEP varies based on wind speed. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nplt.figure()\naep.sum(&#x5B;'wt','wd']).plot()\nplt.xlabel(&quot;Wind speed &#x5B;m\/s]&quot;)\nplt.ylabel(&quot;AEP &#x5B;GWh]&quot;)\n<\/pre><\/div>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/ws.jpg\" alt=\"AEP vs Wind Speed Plot\" class=\"wp-image-19081\" width=\"316\" height=\"212\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/ws.jpg 492w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/ws-300x201.jpg 300w\" sizes=\"(max-width: 316px) 100vw, 316px\" \/><\/figure><\/div>\n\n\n\n<p>So, in the above example, we can see that the graph&#8217;s distribution varies typically along the x-axis. When the wind speed is low or high, the AEP is low. On the other hand, power production is high if it is between 8 to 15. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-aep-vs-wind-direction-plot\"><span class=\"ez-toc-section\" id=\"AEP_vs_Wind_Direction_Plot\"><\/span>AEP vs Wind Direction Plot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now, let&#8217;s see how AEP varies depending on the wind direction. We measure direction as the angle here. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nplt.figure()\naep.sum(&#x5B;'wt','ws']).plot()\nplt.xlabel(&quot;Wind direction &#x5B;deg]&quot;)\nplt.ylabel(&quot;AEP &#x5B;GWh]&quot;)\n<\/pre><\/div>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/wd.jpg\" alt=\"AEP vs Wind Direction Plot\" class=\"wp-image-19082\" width=\"326\" height=\"221\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/wd.jpg 482w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/wd-300x204.jpg 300w\" sizes=\"(max-width: 326px) 100vw, 326px\" \/><\/figure><\/div>\n\n\n\n<p>So, as you can see, AEP is highest when the wind direction is somewhat between 250 to 300 degrees.<\/p>\n\n\n\n<p>So, in this way, we can visualize the energy production in a wind farm using the Pywake library in python. <\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-mike monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\">[Fixed] nameerror: name Unicode is not defined<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-wind-turbine-object\"><span class=\"ez-toc-section\" id=\"Setting_Up_Wind_Turbine_Object\"><\/span>Setting Up Wind Turbine Object<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the above example, we have seen that we set the wind turbine object using V80 from Hornsrev1, 3.35MW from IEA task 37, and the DTU10MW, a predefined Wind Turbine available in the module. Let&#8217;s recap it once.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport os\nimprt py_wake\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom py_wake.wind_turbines import WindTurbines\nfrom py_wake.examples.data.hornsrev1 import V80\nfrom py_wake.examples.data.iea37 import IEA37_WindTurbines, IEA37Site\nfrom py_wake.examples.data.dtu10mw import DTU10MW\n\nv80 = V80()\niea37 = IEA37_WindTurbines()\ndtu10mw = DTU10MW()\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-import-from-wasp-wtg-files\"><span class=\"ez-toc-section\" id=\"Import_from_WAsP_wtg_files\"><\/span>Import from WAsP wtg files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>However, we can also import other predefined turbines using WAsP wtg files. After that, we can initialize the wind turbine&#8217;s object.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom py_wake.examples.data import wtg_path\n\nwtg = os.path.join(wtg_path, 'NEG-Micon-2750.wtg')\nneg2750 = WindTurbines.from_WAsP_wtg(wtg)\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-user-defined-windturbine\"><span class=\"ez-toc-section\" id=\"User_Defined_WindTurbine\"><\/span>User Defined WindTurbine<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Besides these predefined classes of wind turbines, we can also create a user-defined wind turbine using the WindTurbine() class. Let&#8217;s see how we can do it.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom py_wake.wind_turbines.power_ct_functions import PowerCtTabular\nfrom py_wake.wind_turbines import WindTurbine\n\ninitialu = &#x5B;0,4,12,24,36]\nthrust_coeff = &#x5B;0,0.9,0.8,.3, 0]\npower = &#x5B;0,0,3000,3000,0]\n\nwindturbine_obj = WindTurbine(name='MyWT',\n                    diameter=124,\n                    hub_height=320,\n                    powerCtFunction=PowerCtTabular(initialu, power, 'kW', thrust_coeff))\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-multi-type-wind-turbines\"><span class=\"ez-toc-section\" id=\"Multi-type_Wind_Turbines\"><\/span>Multi-type Wind Turbines<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>However, we can also collect a list of different types of wind turbines into a single WindTurbine() object. To do that, we need to pass that list of wind turbines to the constructor of WindTurbine() class as the argument while initializing its object. Let&#8217;s see it.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport os\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom py_wake.wind_turbines import WindTurbines\nfrom py_wake.examples.data.hornsrev1 import V80\nfrom py_wake.examples.data.iea37 import IEA37_WindTurbines, IEA37Site\nfrom py_wake.examples.data.dtu10mw import DTU10MW\nfrom py_wake.wind_turbines.generic_wind_turbines import GenericWindTurbine\nfrom py_wake.examples.data import wtg_path\n\nv80 = V80()\niea37 = IEA37_WindTurbines()\ndtu10mw = DTU10MW()\n\nu = &#x5B;0,4,12,24,36]\nthrust_coeff = &#x5B;0,0.9,0.8,.3, 0]\npower = &#x5B;0,0,3000,3000,0]\nwindturbine_obj = WindTurbine(name='MyWT',\n                    diameter=124,\n                    hub_height=320,\n                    powerCtFunction=PowerCtTabular(u,power,'kW',thrust_coeff))\ngen_wt = GenericWindTurbine('G10MW', 180, 120, power_norm=10000, turbulence_intensity=.1)\n\nwts = WindTurbines.from_WindTurbine_lst(&#x5B;v80,iea37,dtu10mw,windturbine_obj,gen_wt])\n\n# To check it\ntypes = wts.types()\nprint (&quot;Name:\\t\\t%s&quot; % &quot;\\t&quot;.join(wts.name(types)))\nprint('Diameter&#x5B;m]\\t%s' % &quot;\\t&quot;.join(map(str,wts.diameter(type=types))))\nprint('Hubheigt&#x5B;m]\\t%s' % &quot;\\t&quot;.join(map(str,wts.hub_height(type=types))))\n<\/pre><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Name:\t\tV80\t3.35MW\tDTU10MW\tMyWT\tG10MW\nDiameter&#91;m]\t80.0\t130.0\t178.3\t124.0\t180.0\nHubheigt&#91;m]\t70.0\t110.0\t119.0\t320.0\t120.0<\/code><\/pre>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-juliett monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\">[Solved] runtimeerror: cuda error: invalid device ordinal<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-engineering-wind-farm-models\"><span class=\"ez-toc-section\" id=\"Engineering_Wind_Farm_Models\"><\/span>Engineering Wind Farm Models<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>While initializing win farm models object, it is necessary to pass a site and a turbine objects as the argument. The engineering windfarm model comprises one wind farm model and one superposition model. One more optional model can be there as blockage deficit and a turbulence model.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>WindFarmModel<\/strong><\/li><\/ul>\n\n\n\n<p><em>This model defines the procedure of how the wake and the blockage deficits propagate in the wind farm.<\/em> Two wind farm models are available for inclusion, i.e., PropagateDownwind and All2Alllternative.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Wake DeficitModel<\/strong><\/li><\/ul>\n\n\n\n<p>This is used to calculate the wake deficit from one wind turbine to downstream wind turbines in the wind farm. Several models are available, such as NOJDeficit, TurboNOJDeficit, FugaDeficit, e.t.c.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>SuperpositionModel<\/strong><\/li><\/ul>\n\n\n\n<p>This model is used, to sum up the deficit from different sources. Available superposition models are LinearSum, SquaredSum, MaxSum.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>RotorAvgModel<\/strong><\/li><\/ul>\n\n\n\n<p>This model is used to calculate the average rotor deficit from RotorCenter, GridRotorAvg, EqGridRotorAvg e.t.c<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>DeflectionModel<\/strong><\/li><\/ul>\n\n\n\n<p>This model calculates deflected downwind and crosswind distance due to yaw misalignment, shear, e.t.c. JimenezWakeDeflection, FugaDeflection, GCLHillDeflection are available deflection models.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>TurbulenceModel<\/strong><\/li><\/ul>\n\n\n\n<p>This model is used to calculate added turbulence in the wake.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>GroundModel<\/strong><\/li><\/ul>\n\n\n\n<p>This models the effects of ground while calculating AEP.<\/p>\n\n\n\n<p>Now, let&#8217;s see how we can create a model and combine it with other models. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom py_wake import NOJ, Fuga, FugaBlockage, BastankhahGaussian, IEA37SimpleBastankhahGaussian\n\n# Path to Fuga look-up tables\nlut_path = os.path.dirname(py_wake.__file__)+'\/tests\/test_files\/fuga\/2MW\/Z0=0.03000000Zi=00401Zeta0=0.00E+00\/'\n\nmodels = {'NOJ': NOJ(site,windTurbines),\n          'FugaBlockage': FugaBlockage(lut_path,site,windTurbines),\n          'Fuga': Fuga(lut_path,site,windTurbines),\n          'IEA37BGaus': IEA37SimpleBastankhahGaussian(site,windTurbines)\n          'BGaus': BastankhahGaussian(site,windTurbines),\n         }\n<\/pre><\/div>\n\n\n<p>We are combining the above model with NOJ using LinearSum Superposition.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom py_wake.superposition_models import LinearSum\nmodels&#x5B;'NOJLinear'] = NOJ(site,windTurbines,superpositionModel=LinearSum())\n<\/pre><\/div>\n\n\n<p><strong>However, we can also customize the models before superposition. Let&#8217;s see that.<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom py_wake.wind_farm_models import All2AllIterative\nfrom py_wake.deficit_models import NOJDeficit, SelfSimilarityDeficit\nmodels&#x5B;'NOJ_ss'] = All2AllIterative(site,windTurbines,\n                                          wake_deficitModel=NOJDeficit(),\n                                          superpositionModel=LinearSum(),\n                                          blockage_deficitModel=SelfSimilarityDeficit() )\n<\/pre><\/div>\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-alpha monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\">[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-run-wind-farm-simulation\"><span class=\"ez-toc-section\" id=\"Run_Wind_Farm_Simulation\"><\/span>Run Wind Farm Simulation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We can run the wind farm simulation by calling the wind farm model. It runs for all the wind directions for default configuration, and speed is also the default. This returns the simulation result, a xarray dataset with additional methods and attributes. Let&#8217;s see the example.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport py_wake\n# import and setup site and windTurbines\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom py_wake.examples.data.iea37 import IEA37Site, IEA37_WindTurbines\nfrom py_wake import IEA37SimpleBastankhahGaussian\n\nsite = IEA37Site(16)\nx, y = site.initial_position.T\nwindTurbines = IEA37_WindTurbines()\n\nwf_model = IEA37SimpleBastankhahGaussian(site, windTurbines)\n\nprint(wf_model)\n\n# run wind farm simulation\nsim_res = wf_model(x, y, # wind turbine positions\n                   h=None, # wind turbine heights (defaults to the heights defined in windTurbines)\n                   type=0, # Wind turbine types\n                   wd=None, # Wind direction (defaults to site.default_wd (0,1,...,360 if not overriden))\n                   ws=None, # Wind speed (defaults to site.default_ws (3,4,...,25m\/s if not overriden))\n                  )\nsim_res\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"860\" height=\"641\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/simulation.jpg\" alt=\"\" class=\"wp-image-19387\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/simulation.jpg 860w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/simulation-300x224.jpg 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/simulation-768x572.jpg 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/figure>\n\n\n\n<p>As you can see, the dataset returned by the simulation result has some co-ordinates such as :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>wt: <\/strong><em>Wind Turbine Number.<\/em><\/li><li><strong>wd: <\/strong><em>Ambient reference wind direction.<\/em><\/li><li><strong>ws: <\/strong><em>Ambi<\/em>ent <em>reference wind speed<\/em><\/li><li><strong>x, y, h : <\/strong><em>Represents position and hub height of wind turbines.<\/em><\/li><\/ul>\n\n\n\n<p>Besides that, it returns some of the data variables such as.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Wd:<\/strong> <em>Local free-stream wind direction<\/em><\/li><li><code><strong>Ws:<\/strong><\/code> Local free-stream wind speed<\/li><li><strong>TI:<\/strong> Local free-stream turbulence intensity<\/li><li><strong>P:<\/strong> Probability of flow case (wind direction and wind speed) <\/li><li><strong>WS_eff<\/strong>: Effetive local wind speed [m\/s] i.e. including wake effects.<\/li><li><strong>TI_eff<\/strong>: Effective local turbulence intensity i.e. including wake effects.<\/li><li><strong>power<\/strong>: Effective power production [W] i.e. including wake effects.<\/li><li><strong>ct<\/strong>: Thrust <a href=\"http:\/\/www.pythonpool.com\/python-binomial-coefficient\/\" target=\"_blank\" rel=\"noopener\">coefficient<\/a><\/li><li><strong>Yaw<\/strong>: Yaw misalignment [deg]<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Today in this article, we have seen what AEP is and how to calculate it for a wind farm using Pywake Library in python. We have also seen how different factors affect the farm&#8217;s actual production. Then, we visualized the whole data using some plots. I hope this article has helped you. Thank you.<\/p>\n\n\n<div class=\"monsterinsights-widget-popular-posts monsterinsights-widget-popular-posts-delta monsterinsights-popular-posts-styled monsterinsights-widget-popular-posts-columns-2\"><h2 class=\"monsterinsights-widget-popular-posts-widget-title\"><span class=\"ez-toc-section\" id=\"Trending_Now\"><\/span>Trending Now<span class=\"ez-toc-section-end\"><\/span><\/h2><ul class=\"monsterinsights-widget-popular-posts-list\"><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" color:#9A57DD;><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 11, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] nameerror: name Unicode is not defined<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" color:#9A57DD;><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Solved] runtimeerror: cuda error: invalid device ordinal<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" color:#9A57DD;><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method.webp 1200w \" alt=\"[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" color:#9A57DD;><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><\/ul><\/div><p><\/p>","protected":false},"excerpt":{"rendered":"<p>With the vast amount of python libraries, python does a lot of easy work. Some of its work even automate the calculation and is convenient &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Working With Python Pywake Library\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/#more-19076\" aria-label=\"More on Working With Python Pywake Library\">Read more<\/a><\/p>\n","protected":false},"author":25,"featured_media":19402,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4345],"tags":[4768,4767,4766],"class_list":["post-19076","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-module","tag-plotting-aep-pywake","tag-pywake-library-python","tag-pywake-python","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Working With Python Pywake Library - Python Pool<\/title>\n<meta name=\"description\" content=\"Today in this article we will see what is AEP and how can we calculate it using python Pywake Library and how different factors affect it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/pywake-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working With Python Pywake Library\" \/>\n<meta property=\"og:description\" content=\"With the vast amount of python libraries, python does a lot of easy work. Some of its work even automate the calculation and is convenient to use.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/pywake-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-26T04:28:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-26T04:28:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Rishav Raj\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rishav Raj\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/\"},\"author\":{\"name\":\"Rishav Raj\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/025222e28182ecbb97e17f9f1bf15ac4\"},\"headline\":\"Working With Python Pywake Library\",\"datePublished\":\"2022-01-26T04:28:56+00:00\",\"dateModified\":\"2022-01-26T04:28:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/\"},\"wordCount\":1086,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp\",\"keywords\":[\"Plotting AEP pywake\",\"pywake library python\",\"pywake python\"],\"articleSection\":[\"Module\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/pywake-library\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/\",\"url\":\"https:\/\/www.pythonpool.com\/pywake-library\/\",\"name\":\"Working With Python Pywake Library - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp\",\"datePublished\":\"2022-01-26T04:28:56+00:00\",\"dateModified\":\"2022-01-26T04:28:58+00:00\",\"description\":\"Today in this article we will see what is AEP and how can we calculate it using python Pywake Library and how different factors affect it.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/pywake-library\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp\",\"width\":1200,\"height\":628,\"caption\":\"Pywake\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/pywake-library\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working With Python Pywake Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/025222e28182ecbb97e17f9f1bf15ac4\",\"name\":\"Rishav Raj\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/77d441cf39fc8183322bfc1dcaf04be5c1fd429574820606cccac81fd8e8749a?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/77d441cf39fc8183322bfc1dcaf04be5c1fd429574820606cccac81fd8e8749a?s=96&d=wavatar&r=g\",\"caption\":\"Rishav Raj\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Working With Python Pywake Library - Python Pool","description":"Today in this article we will see what is AEP and how can we calculate it using python Pywake Library and how different factors affect it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pythonpool.com\/pywake-library\/","og_locale":"en_US","og_type":"article","og_title":"Working With Python Pywake Library","og_description":"With the vast amount of python libraries, python does a lot of easy work. Some of its work even automate the calculation and is convenient to use.","og_url":"https:\/\/www.pythonpool.com\/pywake-library\/","og_site_name":"Python Pool","article_published_time":"2022-01-26T04:28:56+00:00","article_modified_time":"2022-01-26T04:28:58+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp","type":"image\/webp"}],"author":"Rishav Raj","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Rishav Raj","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/pywake-library\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/pywake-library\/"},"author":{"name":"Rishav Raj","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/025222e28182ecbb97e17f9f1bf15ac4"},"headline":"Working With Python Pywake Library","datePublished":"2022-01-26T04:28:56+00:00","dateModified":"2022-01-26T04:28:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/pywake-library\/"},"wordCount":1086,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp","keywords":["Plotting AEP pywake","pywake library python","pywake python"],"articleSection":["Module"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/pywake-library\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/pywake-library\/","url":"https:\/\/www.pythonpool.com\/pywake-library\/","name":"Working With Python Pywake Library - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp","datePublished":"2022-01-26T04:28:56+00:00","dateModified":"2022-01-26T04:28:58+00:00","description":"Today in this article we will see what is AEP and how can we calculate it using python Pywake Library and how different factors affect it.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/pywake-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/pywake-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/pywake-library\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/01\/Pywake.webp","width":1200,"height":628,"caption":"Pywake"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/pywake-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Working With Python Pywake Library"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/025222e28182ecbb97e17f9f1bf15ac4","name":"Rishav Raj","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/77d441cf39fc8183322bfc1dcaf04be5c1fd429574820606cccac81fd8e8749a?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/77d441cf39fc8183322bfc1dcaf04be5c1fd429574820606cccac81fd8e8749a?s=96&d=wavatar&r=g","caption":"Rishav Raj"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/19076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=19076"}],"version-history":[{"count":23,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/19076\/revisions"}],"predecessor-version":[{"id":19455,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/19076\/revisions\/19455"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/19402"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=19076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=19076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=19076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}