5#include <meteoio/MeteoIO.h>
7#include <meteoio/dataClasses/Grid2DObject.h>
16 SolarPanel(
const mio::Config& cfg,
const mio::DEMObject &dem_in,
const std::vector<std::vector<double> > &pv_pts);
18 void setSP(
const mio::Date timestamp,
const double solarAzimuth,
const double solarElevation);
19 void setGridRadiation(
const mio::Array2D<double>& in_albedo,
const mio::Array2D<double>& in_direct,
20 const mio::Array2D<double>& in_diffuse,
const mio::Array2D<double>&
21 in_direct_unshaded_horizontal,
const double solarAzimuth,
const double solarElevation);
23 void initTerrain(
size_t N_terrain_in,
size_t M_terrain_in);
24 void setTLists(mio::Array4D<double> TList1, mio::Array4D<double> TList2, mio::Array4D<double> TList3, mio::Array4D<double> TList4);
25 void writeSP(
const unsigned int max_steps);
28 typedef double (
SolarPanel::*minfun)(size_t, size_t, double, std::vector<double>);
35 void initBasicSetHorizontal();
36 void initBasicSetRotated();
37 void initViewListPanel();
38 void initViewListTerrain();
43 size_t vectorToSPixel(std::vector<double> vec_in,
size_t N,
size_t M);
44 size_t vectorToSPixel(std::vector<double> vec_in,
size_t number_pvp,
size_t N,
size_t M);
45 size_t vectorToSPixel(std::vector<double> vec_in,
double inclination_panel,
double azimuth_panel,
size_t N,
size_t M);
46 size_t vectorToSPixel(std::vector<double> vec_in,
size_t ii_dem,
size_t jj_dem,
size_t which_triangle,
size_t N,
size_t M);
48 double IntersectionRayTriangle(std::vector<double> ray,
size_t ii_PVP,
size_t jj_PVP,
double offset_PVP,
size_t ii_dem,
size_t jj_dem,
int which_triangle);
49 bool doesPanelShadowPixel(std::vector<double> v_sun,
size_t number_pvp,
size_t number_solidangle);
50 double getLandViewFactor(
size_t name_pvp);
51 double getSkyViewFactor(
size_t name_pvp);
57 mio::Array2D<double> initSListSumPVP(
size_t ii,
size_t jj,
double height, std::vector<std::vector<double> > SVector_temp);
59 std::vector<double> projectSum(
size_t ii,
size_t jj,
double height,
double azimuth,
double inclination);
61 std::vector<double> projectTracker(
size_t ii,
size_t jj,
double height,
double azimuth,
double inclination);
63 std::vector<double> optimize(
size_t ii,
size_t jj,
double height,
size_t rounds, minfun f_min);
64 double minfun_MonoTracker(
size_t ii,
size_t jj,
double height, std::vector<double> x);
65 double minfun_MonoStatic(
size_t ii,
size_t jj,
double height, std::vector<double> x);
69 std::vector<double> listindexToAngles(
size_t index);
70 std::vector<double> NormalVectorToRotationAngles(std::vector<double> normal);
71 std::vector<double> RotationAnglesToNormalVector(
double azimuth,
double phi);
72 int get_ii(
int number_pvp);
73 int get_jj(
int number_pvp);
74 std::vector<double> TriangleNormal(
size_t ii_dem,
size_t jj_dem,
int which_triangle);
75 std::vector<double> getVectorSun(
const double solarAzimuth,
const double solarElevation);
79 double AngleBetween2Vectors(std::vector<double> vec1, std::vector<double> vec2);
80 double NormOfVector(std::vector<double> vec1);
81 std::vector<double> normalizeVector(std::vector<double> vec1);
82 std::vector<double> ProjectVectorToPlane(std::vector<double> vec1, std::vector<double> plane_normal);
83 double VectorScalarProduct(std::vector<double> vec1, std::vector<double> vec2);
84 std::vector<double> VectorCrossProduct(std::vector<double> vec1, std::vector<double> vec2);
86 std::vector<double> VectorSum(std::vector<double> vec1, std::vector<double> vec2);
87 std::vector<double> VectorDifference(std::vector<double> vec1, std::vector<double> vec2);
88 std::vector<double> VectorStretch(std::vector<double> vec1,
double factor);
90 std::vector<double> RotX(std::vector<double> vec_in,
double rad);
91 std::vector<double> RotY(std::vector<double> vec_in,
double rad);
92 std::vector<double> RotZ(std::vector<double> vec_in,
double rad);
93 std::vector<double> RotN(std::vector<double> axis, std::vector<double> vec_in,
double rad);
97 void PrintVector(std::vector<double> vec1);
98 void RadiationMap(
size_t ii,
size_t jj,
double elevation);
99 void GridRadiationMap(
double offset);
100 void WriteOptimumTrackerRadiation(
size_t number_pvp, std::string filename,
const mio::Date timestamp);
101 void WriteSunTrackerRadiation(
size_t number_pvp, std::string filename,
const mio::Date timestamp);
105 size_t M_epsilon_panel, M_phi_panel;
107 size_t M_epsilon_terrain, M_phi_terrain;
109 bool Terrain_complex_mode=
false;
110 std::vector<double> v_globalsun;
113 std::vector<std::vector<double> > pv_points;
116 mio::Array3D<size_t> Shadelist;
117 bool generate_PVP_sum;
119 bool optimal_tracker;
121 std::vector<std::vector<double> > BasicSet_horizontal;
122 std::vector<std::vector<std::vector<double> > > BasicSet_rotated;
123 std::vector<std::vector<std::vector<double> > > ViewList_panel;
126 std::vector<double> direct, diffuse, terrain_iso, terrain_aniso, terrain_ms, terrain_ms_noshadow, direct_beam;
127 mio::Array4D<double> TList_direct, TList_sky_iso, TList_sky_aniso, TList_ms;
128 mio::Array4D<double> TList_sum;
129 mio::Array3D<double> Direct_sum;
130 mio::Array2D<double> Diffuse_sum;
132 mio::Array2D<double> albedo;
133 mio::Array2D<double> d_direct_A, d_direct_B, d_diffuse, d_direct_unshaded_horizontal;
134 const mio::Date* dateobject;
135 std::vector<std::string> filenames;
137 bool if_shadowing=
true;
138 size_t alpine_steps=0;
Definition: SolarPanel.h:11
void initTerrain(size_t N_terrain_in, size_t M_terrain_in)
Initializing interface between TerrainRadiationComplex and SolarPanel.
Definition: SolarPanel.cc:90
void writeSP(const unsigned int max_steps)
Writes unprojected average radiation to files.
Definition: SolarPanel.cc:377
void setGridRadiation(const mio::Array2D< double > &in_albedo, const mio::Array2D< double > &in_direct, const mio::Array2D< double > &in_diffuse, const mio::Array2D< double > &in_direct_unshaded_horizontal, const double solarAzimuth, const double solarElevation)
Updates grid Radiation (incoming SWR for all grid points): preparing TerrainRadiation if TerrainRadia...
Definition: SolarPanel.cc:113
SolarPanel()
Definition: SolarPanel.h:14
void setTLists(mio::Array4D< double > TList1, mio::Array4D< double > TList2, mio::Array4D< double > TList3, mio::Array4D< double > TList4)
Called by TerrainRadiationComplex, updates Terrain Lists. A Terrain List (TList) stores Radiance in a...
Definition: SolarPanel.cc:74
void setSP(const mio::Date timestamp, const double solarAzimuth, const double solarElevation)
Writes output for SolarPanels (PVP files), and updates the sum if generate_PVP_sum==true.
Definition: SolarPanel.cc:170