Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. % EMTH171
  2. % Case Study 2
  3. % North Island
  4. % Frances Power
  5.  
  6. clear
  7. clc
  8. close all
  9.  
  10.  
  11. % Constants
  12. SI_area = 350; % km^2
  13. SI_min_h = 402; % m
  14. SI_max_h = 410; % m
  15. SI_Gen_h = 0; % m
  16. SI_ave_f = 593; % m^3s^-1
  17. SI_MaxGen = 3590; % MW
  18.  
  19. NI_area = 620; % km^2
  20. NI_min_h = 355.85; % m
  21. NI_max_h = 357.25; % m
  22. NI_Gen_h = 80; % m
  23. NI_ave_f = 345; % m^3s^-1
  24. NI_MaxGen = 1870; % MW
  25.  
  26. K = 1.55; % m
  27. L = 300; % m
  28. density = 998; % kgm^-3
  29. g = 9.81; % ms^-2
  30.  
  31.  
  32. % Arrays
  33. tArray = 1:1:8760;
  34. h_NI = [];
  35. h_SI = [];
  36. V_NI_spill = [];
  37. V_SI_spill = [];
  38. %initial variables
  39. h_NI_0 = 356.55; % m, NI middle water height
  40. h_SI_0 = 406; % m, SI middle water height
  41. V_NI_spill_0 = 345; % average spill rate (m^3s^-1)
  42. V_SI_spill_0 = 593; % average spill rate (m^3s^-1)
  43. % assigning first variable
  44. h_NI(1) = h_NI_0;
  45. h_SI(1) = h_SI_0;
  46. V_NI_spill(1) = V_NI_spill_0;
  47. V_SI_spill(1) = V_SI_spill_0;
  48.  
  49. windCapacity = 4130; % MW
  50. P_NI_wind = windCapacity* 2/3;
  51. P_SI_wind = windCapacity* 1/3;
  52.  
  53.  
  54. for ii = 1:1:length(tArray)
  55. mean = 5000; % hours
  56. standardDeviation = 1000; % hours
  57. P_NI_demand = 4065 + 1.4e6*normpdf(tArray(ii), mean, standardDeviation);
  58. P_SI_demand = 1940;
  59. F_NI_in = 345 + 73* sin(2*pi*(tArray(ii) - 3624)./8760);
  60. F_SI_in = 593 - 183* sin(2*pi*(tArray(ii) - 2320)./8760);
  61. F_NI_gen = F_NI_in;
  62. P_NI_hydro = 0.9* F_NI_gen.* density.* g*(h_NI_0 - NI_Gen_h)./10.^6;
  63. CF = 0.41 + 0.12*sin(2*pi*(tArray(ii)-5660)/8760);
  64. P_geo = 1525;
  65. NI_total = P_NI_hydro + P_geo + P_NI_wind;
  66. P_hvdc = P_NI_demand - P_geo - P_NI_wind - P_NI_hydro;
  67. P_SI_hydro = P_SI_demand + P_hvdc - P_SI_wind;
  68. F_SI_gen = P_SI_hydro * 10^6./ (.9* density* g* (h_SI_0 - SI_Gen_h));
  69.  
  70.  
  71.  
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement