-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWIND_calc_PercZeroProd.m
More file actions
48 lines (40 loc) · 2.66 KB
/
WIND_calc_PercZeroProd.m
File metadata and controls
48 lines (40 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function [NoProd_LowWnd_hours,NoProd_LowWnd_frac,NoProd_HighWnd_hours,NoProd_HighWnd_frac,NoProd_Total_hours,NoProd_total_frac] = WIND_calc_PercZeroProd(wndspd_hub,P_turbine)
% PURPOSE
% Calculates the number of hours and fraction of time with no Wnd power
% due to too high (higher than the cut-out Wnd speed) or too low Wnds
% lower than the cut-in Wnd speed) and the power production is zero
%
% INPUT
% wndspd_hub - Wndspeed in hub height [m/s] - wndspd_hub(no_gridpnts,no_times)
% P_tubine - Power production [Watt) - P_tubine(no_gridpnts,no_times)
% u_ci - cut-in wind speed [m/s] - scalar
% u_co - cut-out wind speed [m/s] - scalar
%
% OUTPUT
% NoProd_LowWnd_hours - numbers of hours with no wind power production cause by u < u_ci [hours] - NoProd_LowWnd_hours(no_gridpnts,1)
% NoProd_LowWnd_frac - fraction of the time the wind power production is zero caused by u < u_ci [%] - NoProd_LowWnd_frac(no_gridpnts,1)
% NoProd_HighWnd_hours - numbers of hours with no wind power production cause by u >= u_c0 [hours] - NoProd_HighWnd_hours(no_gridpnts,1)
% NoProd_HighWnd_frac - fraction of the time the wind power production is zero caused by u >= u_co [%] - NoProd_HighWnd_frac(no_gridpnts,1)
% NoProd_Total_hours - numbers of hours with no wind power production cause by u < u_ci and u >= u_c0 [hours] - NoProd_Total_hours(no_gridpnts,1)
% NoProd_total_frac - fraction of the time the wind power production is zero caused by u < u_ci and u < u_ci [%] - NoProd_Total_frac(no_gridpnts,1)
%
% AUTHOR: Ida Marie Solbrekke, modified by Asgeir Sorteberg
% Bergen offshore wind centre, Geophysical institute, University in Bergen
% email: ida.solbrekke@uib.no
% Jan 2021
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp('Wnd_calc_NoProd: Number of hours with no wind power production due to high/low windspeeds')
% Call global variables
global u_ci u_co
% number of timesteps with values for each point
no_stps=sum(~isnan(wndspd_hub),2);
% Hours and fraction with no production due to low (<u_ci) winds
NoProd_LowWnd_hours = nansum((wndspd_hub<u_ci & P_turbine<1E-6),2);
NoProd_LowWnd_frac = nansum(NoProd_LowWnd_hours,2)./no_stps;
% Hours and fraction with no production due to high (>u_co) winds
NoProd_HighWnd_hours = nansum((wndspd_hub>=u_co & P_turbine<1E-6),2);
NoProd_HighWnd_frac = nansum(NoProd_HighWnd_hours,2)./no_stps;
% Total hours and fraction with no production due to low and high winds
NoProd_Total_hours = NoProd_LowWnd_hours+NoProd_HighWnd_hours;
NoProd_total_frac = NoProd_LowWnd_frac+NoProd_HighWnd_frac;
disp('Wnd_calc_NoProd: Finished')