solstice

Compute collected power and efficiencies of a solar plant
git clone git://git.meso-star.com/solstice.git
Log | Files | Refs | README | LICENSE

commit b95ba6d5b0762af025fe4bfe5992c9d901ef63ce
parent 24e07fad3001124806080eb9f62137aeb34935ca
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 14 Mar 2017 14:11:57 +0100

Handle the update of the solstice-solver API

Diffstat:
Msrc/solstice_solve.c | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/solstice_solve.c b/src/solstice_solve.c @@ -25,13 +25,6 @@ static void write_global_mc(struct solstice* solstice, struct ssol_estimator* estimator) { - #define MC_RECEIVER_NULL { \ - { -1, -1, -1 }, /* integrated_irradiance */ \ - { -1, -1, -1 }, /* absorptivity_loss */ \ - { -1, -1, -1 }, /* reflectivity_loss */ \ - { -1, -1, -1 }, /* coss_loss */ \ - 0, NULL \ - } struct ssol_mc_global mc_global; struct htable_receiver_iterator it, end; const struct solparser_sun* solparser_sun = NULL; @@ -39,6 +32,14 @@ write_global_mc(struct solstice* solstice, struct ssol_estimator* estimator) double irradiance_factor; ASSERT(solstice && estimator); + #define MC_RCV_NONE { \ + { -1, -1, -1 }, /* Integrated irradiance */ \ + { -1, -1, -1 }, /* Absorptivity loss */ \ + { -1, -1, -1 }, /* Reflectivity loss */ \ + { -1, -1, -1 }, /* Cos loss */ \ + 0, NULL, NULL \ + } + /* get global information */ SSOL(estimator_get_mc_global(estimator, &mc_global)); SSOL(estimator_get_count(estimator, &nexperiments)); @@ -56,8 +57,8 @@ write_global_mc(struct solstice* solstice, struct ssol_estimator* estimator) const struct str* name = htable_receiver_iterator_key_get(&it); struct solstice_receiver* rcv = htable_receiver_iterator_data_get(&it); struct ssol_instance* inst = rcv->node->instance; - struct ssol_mc_receiver front = MC_RECEIVER_NULL; - struct ssol_mc_receiver back = MC_RECEIVER_NULL; + struct ssol_mc_receiver front = MC_RCV_NONE; + struct ssol_mc_receiver back = MC_RCV_NONE; double f_eff_E = -1, f_eff_SE = -1; /* Front efficiency */ double b_eff_E = -1, b_eff_SE = -1; /* Back efficiency */ uint32_t id;