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 08b849807dff0083a77670ba980357287b88633d
parent 63df8389e619e1a583fcf28624dd15dccb948ae0
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  8 Sep 2017 11:55:28 +0200

Merge branch 'release_0.3'

Diffstat:
MREADME.md | 7+++++++
Mcmake/CMakeLists.txt | 18+++++++++++-------
Mdoc/solstice-man.css | 19++++++++++++++-----
Mdoc/solstice-output.5.txt | 40++++++++++++++++++++--------------------
Mdoc/solstice-receiver.5.txt | 2+-
Mdoc/solstice.1.txt.in | 11+++++++----
Msrc/solstice_args.c | 15+++++++++++++++
Msrc/solstice_solve.c | 60++++++++++++++++++++++++++++++------------------------------
Asrc/solstice_version.h.in | 24++++++++++++++++++++++++
Msrc/test_solstice_simulation.c | 76++++++++++++++++++++++++++++++++++++----------------------------------------
Myaml/beam_down.ref | 80++++++++++++++++++++++++++++++++++++++++----------------------------------------
11 files changed, 205 insertions(+), 147 deletions(-)

diff --git a/README.md b/README.md @@ -60,6 +60,13 @@ informations on CMake. ## Release notes +### Version 0.3 + +- Fix several issues in the output results. Refer to the Solsice-Solver 0.3 + release notes for more informations. +- Add the `--version` option. +- Update the man pages to fix some issues and improve the output documentation. + ### Version 0.2.3 - Update the solstice-input file format. The anchor and entity name cannot diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -45,7 +45,7 @@ find_package(LibYAML REQUIRED) find_package(RCMake 0.2.3 REQUIRED) find_package(RSys 0.4 REQUIRED) find_package(SolAnim 0.1 REQUIRED) -find_package(SolSolver 0.2 REQUIRED) +find_package(SolSolver 0.3 REQUIRED) find_package(Star3DUT 0.2 REQUIRED) find_package(StarSP 0.4 REQUIRED) find_package(StarSTL 0.3.1 REQUIRED) @@ -95,14 +95,17 @@ configure_file(${SOLSTICE_SOURCE_DIR}/solstice_args.h.in configure_file(${SOLSTICE_SOURCE_DIR}/../doc/solstice.1.txt.in ${CMAKE_CURRENT_BINARY_DIR}/doc/solstice.1.txt @ONLY) -################################################################################ -# Configure and define targets -################################################################################ set(VERSION_MAJOR 0) -set(VERSION_MINOR 2) -set(VERSION_PATCH 3) +set(VERSION_MINOR 3) +set(VERSION_PATCH 0) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +configure_file(${SOLSTICE_SOURCE_DIR}/solstice_version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/solstice_version.h @ONLY) + +################################################################################ +# Configure and define targets +################################################################################ set(SOLSTICE_FILES_SRC solstice.c solstice_args.c @@ -121,7 +124,8 @@ set(SOLSTICE_FILES_INC solstice.h solstice_args.h.in solstice_c.h - solstice_sun_spectrum.h) + solstice_sun_spectrum.h + solstice_version.h.in) set(SOLSTICE_FILES_DOC COPYING README.md) # Prepend each file in the `SOLSTICE_FILES_<SRC|INC>' list by `SOLSTICE_SOURCE_DIR' diff --git a/doc/solstice-man.css b/doc/solstice-man.css @@ -14,8 +14,8 @@ * along with this program. If not, see http://www.gnu.org/licenses/. */ body.manpage { - font-family:monospace; - font-size:2ex; + font-family:"Liberation Sans",sans-serif; + font-size:10pt; text-align: justify; max-width: 55em; margin: 1em; @@ -32,7 +32,7 @@ body.manpage em { } body.manpage div.verseblock > pre.content { - font-family: inherit; + font-family: "Liberation Mono",monospace; } body.manpage h1 { @@ -45,12 +45,16 @@ body.manpage div.sectionbody { margin-left: 3em; } +body.manpage code { + font-family: "Liberation Mono",monospace; +} + body.manpage #footer { display: none; } body.manpage div#toctitle { display: none; } body.manpage div#toc { - display.block ! important; + display: block; position:fixed; top:0; left:60em; @@ -61,11 +65,17 @@ body.manpage div#toc { background: #eeeeee } +body.manpage a { + font-weight: bold; + color: #225588; +} + body.manpage div#toc a, div#toc a:link, div#toc a:visited { margin:0; padding-left: 2em; color:#999999; text-decoration:none; + font-weight: normal; } body.manpage div.toclevel1 { @@ -74,7 +84,6 @@ body.manpage div.toclevel1 { body.manpage div.toclevel2 { margin-left: 2em; - } body.manpage div#toc a:hover { diff --git a/doc/solstice-output.5.txt b/doc/solstice-output.5.txt @@ -94,8 +94,8 @@ _______ <cos-factor> <shadow-loss> <missing-loss> - <reflectivity-loss> - <absorptivity-loss> + <materials-loss> + <atmospheric-loss> ------------------------------------- @@ -113,7 +113,7 @@ _______ <back> ::= <side> <side> ::= "<absorbed-irradiance> <irradiance> - <reflectivity-loss> <absorptivity-loss> + <materials-loss> <atmospheric-loss> <efficiency>" ------------------------------------- @@ -140,7 +140,7 @@ _______ <rcvXprim-back> ::= <rcvXprim-side> <rcvXprim-side> ::= "<absorbed-irradiance> <irradiance> - <reflectivity-loss> <absorptivity-loss>" + <materials-loss> <atmospheric-loss>" ------------------------------------- @@ -162,11 +162,11 @@ _______ <potential-irradiance>::= <estimate> <absorbed-irradiance> ::= <estimate> -<absorptivity-loss> ::= <estimate> +<atmospheric-loss> ::= <estimate> <cos-factor> ::= <estimate> <irradiance> ::= <estimate> <missing-loss> ::= <estimate> -<reflectivity-loss> ::= <estimate> +<materials-loss> ::= <estimate> <shadow-loss> ::= <estimate> <efficiency> ::= <estimate> @@ -174,7 +174,7 @@ _______ <expected-value> ::= REAL <standard-error> ::= REAL # in [0, INF) -<entity-identifier> # Defined in *solstice-input*(1) +<entity-identifier> # Defined in *solstice-input*(5) _______ SIMULATION @@ -212,10 +212,10 @@ standard error. The global results are, in this order: absorbed by a receiver; this irradiance could have been blocked along its path, can have missed the receivers, or can have reach a receiver but without being absorbed; -- *reflectivity-loss*: additional irradiance that could have been absorbed - by receivers if reflections had occurred on materials with reflectivity 1.0; -- *absorptivity-loss*: irradiance that could have been absorbed by - receivers if atmospheric absorption had not been taken into account. +- *materials-loss*: additional irradiance that could have been absorbed + by receivers if no absorption had occurred on non-receivers material until then; +- *atmospheric-loss*: irradiance that could have been absorbed by + receivers if atmospheric extinction had not been taken into account. Per receiver results ~~~~~~~~~~~~~~~~~~~~ @@ -238,10 +238,10 @@ expected value and its standard error. - *absorbed-irradiance*: irradiance absorbed by the receiver side; - *irradiance*: irradiance that reaches the receiver side; -- *reflectivity-loss*: irradiance that could have been absorbed by the - receiver side if reflections had occurred on materials with reflectivity 1.0; -- *absorptivity-loss*: irradiance that could have been absorbed by the - receiver side if atmospheric absorption had not been taken into account; +- *materials-loss*: irradiance that could have been absorbed by the + receiver side if no absorption had occurred on non-receivers material until then; +- *atmospheric-loss*: irradiance that could have been absorbed by the + receiver side if atmospheric extinction had not been taken into account; - *efficiency*: fraction of incoming irradiance absorbed by the receiver side. Both *front* and *back* side estimates are output, even if the receiver has @@ -288,12 +288,12 @@ expected value and its standard error. from the primary geometry; - *irradiance*: irradiance reaching the receiver side coming from the primary geometry; -- *reflectivity-loss*: irradiance that could have been absorbed by the - receiver side coming from the primary geometry if reflections had occurred - on materials with reflectivity 1.0; -- *absorptivity-loss*: irradiance that could have been absorbed by +- *materials-loss*: irradiance that could have been absorbed by the + receiver side coming from the primary geometry if no absorption had occurred + on non-receivers material until then; +- *atmospheric-loss*: irradiance that could have been absorbed by the receiver side coming from the primary geometry if atmospheric - absorption had not been taken into account. + extinction had not been taken into account. Both front and back side estimates are output, even if the receiver has only a single receiving side. In this case, the results of the non-receiving side are diff --git a/doc/solstice-receiver.5.txt b/doc/solstice-receiver.5.txt @@ -68,7 +68,7 @@ _______ | BACK | FRONT_AND_BACK -<entity-identifier> # Defined in *solstice-input*(1) +<entity-identifier> # Defined in *solstice-input*(5) _______ EXAMPLES diff --git a/doc/solstice.1.txt.in b/doc/solstice.1.txt.in @@ -37,8 +37,8 @@ described in the *solstice-input*(5) _file_. If the _file_ argument is not provided, the solar plant is read from standard input. To evaluate various efficiencies for each primary reflector, it computes losses due to cosine effect, shadowing and masking, orientation and surface irregularities, -reflectivity and atmospheric transmission. The efficiency for each one of these -effects is subsequently computed for each reflector. +materials properties and atmospheric extinction. The efficiency for each +one of these effects is subsequently computed for each reflector. The entities on which computations must be performed are listed in the *solstice-receiver*(5) file submitted through the *-R* option. The estimated @@ -177,6 +177,9 @@ OPTIONS *-v*:: Make solstice more verbose. +*--version*:: + Output version information and exit. + EXAMPLES -------- @@ -210,7 +213,7 @@ first line that stores the sun direction from which the radiative paths come from. The remaining data that list the radiative paths geometry are redirected into the *paths.vtk* file: - $ solstice -n 100 -D0,90 -R rcvs.yaml -p default input.yaml | sed '1d' > paths.vtk + $ solstice -n 100 -D0,90 -R rcvs.yaml -p default input.yaml | sed '1d'>paths.vtk Use the path-tracing rendering algorithm to draw the solar plant *solplant.yaml* with respect to the sun direction whose azimuthal and elevation @@ -237,5 +240,5 @@ SEE ALSO *sed*(1), *solstice-input*(5), *solstice-output*(5), -*solstice-receivers*(5) +*solstice-receiver*(5) diff --git a/src/solstice_args.c b/src/solstice_args.c @@ -16,6 +16,7 @@ #define _POSIX_C_SOURCE 2 #include "solstice_args.h" +#include "solstice_version.h" #include <rsys/cstr.h> #include <rsys/double3.h> @@ -69,6 +70,8 @@ print_help(const char* program) " many threads as CPU cores.\n"); printf( " -v make the program more verbose.\n"); + printf( +" --version display version information and exit.\n"); printf("\n"); printf( "Solstice (C) 2016-2017 CNRS. This is a free software released under the GNU GPL\n" @@ -486,11 +489,23 @@ res_T solstice_args_init(struct solstice_args* args, const int argc, char** argv) { int opt; + int i; res_T res = RES_OK; ASSERT(args && argc && argv); *args = SOLSTICE_ARGS_DEFAULT; + FOR_EACH(i, 1, argc) { + if(!strcmp(argv[i], "--version")) { + printf("Solstice %d.%d.%d\n", + SOLSTICE_VERSION_MAJOR, + SOLSTICE_VERSION_MINOR, + SOLSTICE_VERSION_PATCH); + args->quit = 1; + goto exit; + } + } + optind = 0; while((opt = getopt(argc, argv, "D:fg:hn:o:p:qR:r:t:v")) != -1) { switch(opt) { diff --git a/src/solstice_solve.c b/src/solstice_solve.c @@ -55,12 +55,12 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator) #define PRINT_MC_GLOBAL(Name) \ fprintf(solstice->output, "%g %g\n", mc_global.Name.E, mc_global.Name.SE) fprintf(solstice->output, "%g %g\n", potential, 0.); - PRINT_MC_GLOBAL(absorbed); + PRINT_MC_GLOBAL(absorbed_by_receivers); PRINT_MC_GLOBAL(cos_factor); PRINT_MC_GLOBAL(shadowed); PRINT_MC_GLOBAL(missing); - PRINT_MC_GLOBAL(reflectivity); - PRINT_MC_GLOBAL(atmosphere); + PRINT_MC_GLOBAL(other_absorbed); + PRINT_MC_GLOBAL(absorbed_by_atmosphere); #undef PRINT_MC_GLOBAL /* Receivers' data */ @@ -80,21 +80,21 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator) switch(rcv->side) { case SRCVL_FRONT: SSOL(estimator_get_mc_receiver(estimator, inst, SSOL_FRONT, &front)); - f_eff_E = front.integrated_absorbed_irradiance.E * irradiance_factor; - f_eff_SE = front.integrated_absorbed_irradiance.SE * irradiance_factor; + f_eff_E = front.absorbed_flux.E * irradiance_factor; + f_eff_SE = front.absorbed_flux.SE * irradiance_factor; break; case SRCVL_BACK: SSOL(estimator_get_mc_receiver(estimator, inst, SSOL_BACK, &back)); - b_eff_E = back.integrated_absorbed_irradiance.E * irradiance_factor; - b_eff_SE = back.integrated_absorbed_irradiance.SE * irradiance_factor; + b_eff_E = back.absorbed_flux.E * irradiance_factor; + b_eff_SE = back.absorbed_flux.SE * irradiance_factor; break; case SRCVL_FRONT_AND_BACK: SSOL(estimator_get_mc_receiver(estimator, inst, SSOL_FRONT, &front)); SSOL(estimator_get_mc_receiver(estimator, inst, SSOL_BACK, &back)); - f_eff_E = front.integrated_absorbed_irradiance.E * irradiance_factor; - f_eff_SE = front.integrated_absorbed_irradiance.SE * irradiance_factor; - b_eff_E = back.integrated_absorbed_irradiance.E * irradiance_factor; - b_eff_SE = back.integrated_absorbed_irradiance.SE * irradiance_factor; + f_eff_E = front.absorbed_flux.E * irradiance_factor; + f_eff_SE = front.absorbed_flux.SE * irradiance_factor; + b_eff_E = back.absorbed_flux.E * irradiance_factor; + b_eff_SE = back.absorbed_flux.SE * irradiance_factor; break; default: FATAL("Unreachable code.\n"); break; } @@ -105,15 +105,15 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator) "%g %g %g %g %g %g %g %g %g %g " "%g %g %g %g %g %g %g %g %g %g\n", str_cget(name), (unsigned)id, area, - front.integrated_absorbed_irradiance.E, front.integrated_absorbed_irradiance.SE, - front.integrated_irradiance.E, front.integrated_irradiance.SE, - front.reflectivity_loss.E, front.reflectivity_loss.SE, - front.absorptivity_loss.E, front.absorptivity_loss.SE, + front.absorbed_flux.E, front.absorbed_flux.SE, + front.incoming_flux.E, front.incoming_flux.SE, + front.incoming_lost_in_field.E, front.incoming_lost_in_field.SE, + front.incoming_lost_in_atmosphere.E, front.incoming_lost_in_atmosphere.SE, f_eff_E, f_eff_SE, - back.integrated_absorbed_irradiance.E, back.integrated_absorbed_irradiance.SE, - back.integrated_irradiance.E, back.integrated_irradiance.SE, - back.reflectivity_loss.E, back.reflectivity_loss.SE, - back.absorptivity_loss.E, back.absorptivity_loss.SE, + back.absorbed_flux.E, back.absorbed_flux.SE, + back.incoming_flux.E, back.incoming_flux.SE, + back.absorbed_lost_in_field.E, back.absorbed_lost_in_field.SE, + back.absorbed_lost_in_atmosphere.E, back.absorbed_lost_in_atmosphere.SE, b_eff_E, b_eff_SE); } @@ -179,14 +179,14 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator) "%g %g %g %g %g %g %g %g " "%g %g %g %g %g %g %g %g\n", (unsigned) rcv_id, (unsigned) prim_id, - front.integrated_absorbed_irradiance.E, front.integrated_absorbed_irradiance.SE, - front.integrated_irradiance.E, front.integrated_irradiance.SE, - front.reflectivity_loss.E, front.reflectivity_loss.SE, - front.absorptivity_loss.E, front.absorptivity_loss.SE, - back.integrated_absorbed_irradiance.E, back.integrated_absorbed_irradiance.SE, - back.integrated_irradiance.E, back.integrated_irradiance.SE, - back.reflectivity_loss.E, back.reflectivity_loss.SE, - back.absorptivity_loss.E, back.absorptivity_loss.SE); + front.absorbed_flux.E, front.absorbed_flux.SE, + front.incoming_flux.E, front.incoming_flux.SE, + front.incoming_lost_in_field.E, front.incoming_lost_in_field.SE, + front.incoming_lost_in_atmosphere.E, front.incoming_lost_in_atmosphere.SE, + back.absorbed_flux.E, back.absorbed_flux.SE, + back.incoming_flux.E, back.incoming_flux.SE, + back.absorbed_lost_in_field.E, back.absorbed_lost_in_field.SE, + back.absorbed_lost_in_atmosphere.E, back.absorbed_lost_in_atmosphere.SE); htable_primary_iterator_next(&p_it); } htable_receiver_iterator_next(&r_it); @@ -244,8 +244,8 @@ dump_mc_shape struct ssol_mc_primitive mc_prim; SSOL(mc_shape_get_mc_primitive(mc_shape, itri, &mc_prim)); fprintf(solstice->output, "%g %g\n", - mc_prim.integrated_irradiance.E, - mc_prim.integrated_irradiance.SE); + mc_prim.incoming_flux.E, + mc_prim.incoming_flux.SE); } } @@ -479,7 +479,7 @@ solstice_solve(struct solstice* solstice) } res = ssol_solve(solstice->scene, rng, solstice->nexperiments, - solstice->dump_paths ? &solstice->path_tracker : NULL, NULL, &estimator); + solstice->dump_paths ? &solstice->path_tracker : NULL, &estimator); if(res != RES_OK) { fprintf(stderr, "Error in integrating the solar flux.\n"); if(!estimator) goto error; diff --git a/src/solstice_version.h.in b/src/solstice_version.h.in @@ -0,0 +1,24 @@ +/* Copyright (C) CNRS 2016-2017 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef SOLSTICE_VERSION_H +#define SOLSTICE_VERSION_H + +#define SOLSTICE_VERSION_MAJOR @VERSION_MAJOR@ +#define SOLSTICE_VERSION_MINOR @VERSION_MINOR@ +#define SOLSTICE_VERSION_PATCH @VERSION_PATCH@ + +#endif /* SOLSTICE_VERSION_H */ + diff --git a/src/test_solstice_simulation.c b/src/test_solstice_simulation.c @@ -51,22 +51,23 @@ enum global_result_type { enum receiver_result_type { FIRST_RECEIVER_RESULT, - FRONT_INTEGRATED_ABSORBED_IRRADIANCE = FIRST_RECEIVER_RESULT, - FRONT_INTEGRATED_IRRADIANCE, - FRONT_REFLECTIVITY_LOSS, - FRONT_ABSORPTIVITY_LOSS, + FRONT_ABSORBED_FLUX = FIRST_RECEIVER_RESULT, + FRONT_INCOMING_FLUX, + FRONT_ABSORBED_FIELD_GAIN, + FRONT_ABSORBED_ATM_GAIN, FRONT_EFFICIENCY, - BACK_INTEGRATED_ABSORBED_IRRADIANCE, - BACK_INTEGRATED_IRRADIANCE, - BACK_REFLECTIVITY_LOSS, - BACK_ABSORPTIVITY_LOSS, + BACK_ABSORBED_FLUX, + BACK_INCOMING_FLUX, + BACK_ABSORBED_FIELD_GAIN, + BACK_ABSORBED_ATM_GAIN, BACK_EFFICIENCY, RECEIVER_RESULTS_COUNT__ }; enum primary_result_type { FIRST_PRIMARY_RESULT, - PRIMARY_SHADOW = FIRST_PRIMARY_RESULT, + PRIMARY_COS = FIRST_PRIMARY_RESULT, + PRIMARY_SHADOW, PRIMARY_RESULTS_COUNT__ }; @@ -265,30 +266,27 @@ read_recv(FILE* file, char name[], double E[], double SE[]) "%lg %lg %lg %lg %lg %lg %lg %lg %lg %lg " "%lg %lg %lg %lg %lg %lg %lg %lg %lg %lg", name, /* ID, area */ - &E[FRONT_INTEGRATED_ABSORBED_IRRADIANCE], - &SE[FRONT_INTEGRATED_ABSORBED_IRRADIANCE], - &E[FRONT_INTEGRATED_IRRADIANCE], &SE[FRONT_INTEGRATED_IRRADIANCE], - &E[FRONT_REFLECTIVITY_LOSS], &SE[FRONT_REFLECTIVITY_LOSS], - &E[FRONT_ABSORPTIVITY_LOSS], &SE[FRONT_ABSORPTIVITY_LOSS], + &E[FRONT_ABSORBED_FLUX], &SE[FRONT_ABSORBED_FLUX], + &E[FRONT_INCOMING_FLUX], &SE[FRONT_INCOMING_FLUX], + &E[FRONT_ABSORBED_FIELD_GAIN], &SE[FRONT_ABSORBED_FIELD_GAIN], + &E[FRONT_ABSORBED_ATM_GAIN], &SE[FRONT_ABSORBED_ATM_GAIN], &E[FRONT_EFFICIENCY], &SE[FRONT_EFFICIENCY], - &E[BACK_INTEGRATED_ABSORBED_IRRADIANCE], - &SE[BACK_INTEGRATED_ABSORBED_IRRADIANCE], - &E[BACK_INTEGRATED_IRRADIANCE], &SE[BACK_INTEGRATED_IRRADIANCE], - &E[BACK_REFLECTIVITY_LOSS], &SE[BACK_REFLECTIVITY_LOSS], - &E[BACK_ABSORPTIVITY_LOSS], &SE[BACK_ABSORPTIVITY_LOSS], + &E[BACK_ABSORBED_FLUX], &SE[BACK_ABSORBED_FLUX], + &E[BACK_INCOMING_FLUX], &SE[BACK_INCOMING_FLUX], + &E[BACK_ABSORBED_FIELD_GAIN], &SE[BACK_ABSORBED_FIELD_GAIN], + &E[BACK_ABSORBED_ATM_GAIN], &SE[BACK_ABSORBED_ATM_GAIN], &E[BACK_EFFICIENCY], &SE[BACK_EFFICIENCY]), 2 * RECEIVER_RESULTS_COUNT__ + 1); } static void read_primary - (FILE* file, char name[], double* area, double* cos, double E[], double SE[]) + (FILE* file, char name[], double* area, double E[], double SE[]) { char line[MAX_LINE_LEN]; NCHECK(file, NULL); NCHECK(area, NULL); - NCHECK(cos, NULL); NCHECK(E, NULL); NCHECK(SE, NULL); @@ -296,14 +294,16 @@ read_primary CHECK( sscanf(line, "%s %*u " - "%lg %*u %lg " - "%lg %lg\n", + "%lg %*u " + "%lg %lg %lg %lg\n", name, /* ID */ - area, /* count, */ cos, + area, /* count, */ + &E[PRIMARY_COS], &SE[PRIMARY_COS], &E[PRIMARY_SHADOW], &SE[PRIMARY_SHADOW]), - 2 * PRIMARY_RESULTS_COUNT__ + 3); + 2 * PRIMARY_RESULTS_COUNT__ + 2); } + static void read_recvXprim (FILE* file, @@ -327,16 +327,14 @@ read_recvXprim "%lg %lg %lg %lg %lg %lg %lg %lg " "%lg %lg %lg %lg %lg %lg %lg %lg", rcv_id, prim_id, - &E[FRONT_INTEGRATED_ABSORBED_IRRADIANCE], - &SE[FRONT_INTEGRATED_ABSORBED_IRRADIANCE], - &E[FRONT_INTEGRATED_IRRADIANCE], &SE[FRONT_INTEGRATED_IRRADIANCE], - &E[FRONT_REFLECTIVITY_LOSS], &SE[FRONT_REFLECTIVITY_LOSS], - &E[FRONT_ABSORPTIVITY_LOSS], &SE[FRONT_ABSORPTIVITY_LOSS], - &E[BACK_INTEGRATED_ABSORBED_IRRADIANCE], - &SE[BACK_INTEGRATED_ABSORBED_IRRADIANCE], - &E[BACK_INTEGRATED_IRRADIANCE], &SE[BACK_INTEGRATED_IRRADIANCE], - &E[BACK_REFLECTIVITY_LOSS], &SE[BACK_REFLECTIVITY_LOSS], - &E[BACK_ABSORPTIVITY_LOSS], &SE[BACK_ABSORPTIVITY_LOSS]), + &E[FRONT_ABSORBED_FLUX], &SE[FRONT_ABSORBED_FLUX], + &E[FRONT_INCOMING_FLUX], &SE[FRONT_INCOMING_FLUX], + &E[FRONT_ABSORBED_FIELD_GAIN], &SE[FRONT_ABSORBED_FIELD_GAIN], + &E[FRONT_ABSORBED_ATM_GAIN], &SE[FRONT_ABSORBED_ATM_GAIN], + &E[BACK_ABSORBED_FLUX], &SE[BACK_ABSORBED_FLUX], + &E[BACK_INCOMING_FLUX], &SE[BACK_INCOMING_FLUX], + &E[BACK_ABSORBED_FIELD_GAIN], &SE[BACK_ABSORBED_FIELD_GAIN], + &E[BACK_ABSORBED_ATM_GAIN], &SE[BACK_ABSORBED_ATM_GAIN]), 2 * (RECEIVER_RESULTS_COUNT__ - 2 /* efficiencies not read */) + 2); } @@ -423,14 +421,12 @@ check_1_reference double reference_SE[PRIMARY_RESULTS_COUNT__]; double test_E[PRIMARY_RESULTS_COUNT__]; double test_SE[PRIMARY_RESULTS_COUNT__]; - double ref_area, ref_cos; - double test_area, test_cos; + double ref_area, test_area; enum primary_result_type r; - read_primary(ref_file, ref_prim_name, &ref_area, &ref_cos, reference_E, reference_SE); - read_primary(test_file, test_prim_name, &test_area, &test_cos, test_E, test_SE); + read_primary(ref_file, ref_prim_name, &ref_area, reference_E, reference_SE); + read_primary(test_file, test_prim_name, &test_area, test_E, test_SE); check_estimate(ref_area, 0, test_area, 0); - check_estimate(ref_cos, 0, test_cos, 0); CHECK(strcmp(ref_prim_name, test_prim_name), 0); FOR_EACH(r, FIRST_RECEIVER_RESULT, PRIMARY_RESULTS_COUNT__) { check_estimate(reference_E[r], reference_SE[r], test_E[r], test_SE[r]); diff --git a/yaml/beam_down.ref b/yaml/beam_down.ref @@ -1,52 +1,52 @@ #--- Sun direction: 90 90 (-3.7494e-33 -6.12323e-17 -1) 7 2 5 100000 0 500.043 0 -465.462 0.00578398 -0.930838 1.15681e-05 +465.46 0.0057839 +0.930834 1.15684e-05 0 0 0 0 0 0 0 0 -tower.secondary.hyperbol 10 421.957 0 0 465.462 0.00578398 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -tower.receptor 14 25 465.462 0.00578398 465.462 0.00578398 0 0 0 0 0.930843 1.1567e-05 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -heliostat4.temp-heliostat150.pivot.reflector 6 100.009 19934 0.185708 0.00117696 0 0 -heliostat5.temp-heliostat150.pivot.reflector 30 100.009 20264 0.188378 0.00118168 0 0 -heliostat3.temp-heliostat150.pivot.reflector 22 100.009 19746 0.183977 0.0011729 0 0 -heliostat2.temp-heliostat150.pivot.reflector 26 100.009 20054 0.186834 0.00117966 0 0 -heliostat1.temp-heliostat150.pivot.reflector 34 100.009 20002 0.185941 0.00117593 0 0 -10 6 0 0 92.8625 0.588533 0 0 0 0 0 0 0 0 0 0 0 0 -10 30 0 0 94.198 0.590895 0 0 0 0 0 0 0 0 0 0 0 0 -10 22 0 0 91.9969 0.586504 0 0 0 0 0 0 0 0 0 0 0 0 -10 26 0 0 93.4254 0.589884 0 0 0 0 0 0 0 0 0 0 0 0 -10 34 0 0 92.9793 0.588022 0 0 0 0 0 0 0 0 0 0 0 0 -14 6 92.8625 0.588533 92.8625 0.588533 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 30 94.198 0.590895 94.198 0.590895 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 22 91.9969 0.586504 91.9969 0.586504 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 26 93.4254 0.589884 93.4254 0.589884 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 34 92.9793 0.588022 92.9793 0.588022 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +tower.secondary.hyperbol 10 421.957 0 0 465.46 0.0057839 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +tower.receptor 14 25 465.46 0.0057839 465.46 0.0057839 0 0 0 0 0.93084 1.15668e-05 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +heliostat4.temp-heliostat150.pivot.reflector 6 100.009 19915 0.931616 2.47038e-05 0 0 +heliostat5.temp-heliostat150.pivot.reflector 30 100.009 20068 0.929594 2.509e-05 0 0 +heliostat3.temp-heliostat150.pivot.reflector 22 100.009 19919 0.931716 2.47979e-05 0 0 +heliostat2.temp-heliostat150.pivot.reflector 26 100.009 20054 0.93164 2.4549e-05 0 0 +heliostat1.temp-heliostat150.pivot.reflector 34 100.009 20044 0.929616 2.5199e-05 0 0 +10 6 0 0 92.7742 0.588324 0 0 0 0 0 0 0 0 0 0 0 0 +10 30 0 0 93.2842 0.588736 0 0 0 0 0 0 0 0 0 0 0 0 +10 22 0 0 92.8029 0.588432 0 0 0 0 0 0 0 0 0 0 0 0 +10 26 0 0 93.4242 0.589876 0 0 0 0 0 0 0 0 0 0 0 0 +10 34 0 0 93.1748 0.588486 0 0 0 0 0 0 0 0 0 0 0 0 +14 6 92.7742 0.588324 92.7742 0.588324 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 30 93.2842 0.588736 93.2842 0.588736 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 22 92.8029 0.588432 92.8029 0.588432 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 26 93.4242 0.589876 93.4242 0.589876 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 34 93.1748 0.588486 93.1748 0.588486 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 #--- Sun direction: 50 50 (-0.413176 -0.492404 -0.766044) 7 2 5 100000 0 500.043 0 -135.955 0.602452 -0.800093 7.03652e-05 +135.852 0.602426 +0.800261 7.05527e-05 0 0 -244.612 0.615276 +245.21 0.615008 +19.1054 0.268227 0 0 -0 0 -tower.secondary.hyperbol 10 421.957 0 0 400.083 0.0351855 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -tower.receptor 14 25 135.955 0.602452 135.955 0.602452 0 0 0 0 0.271887 0.0012048 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -heliostat4.temp-heliostat150.pivot.reflector 6 100.009 20121 0.157986 0.000995464 0 0 -heliostat5.temp-heliostat150.pivot.reflector 30 100.009 20226 0.155708 0.000977921 0 0 -heliostat3.temp-heliostat150.pivot.reflector 22 100.009 19829 0.15861 0.00100856 0 0 -heliostat2.temp-heliostat150.pivot.reflector 26 100.009 20002 0.163177 0.00103199 0 0 -heliostat1.temp-heliostat150.pivot.reflector 34 100.009 19822 0.164613 0.00104696 0 0 -10 6 0 0 79.0003 0.497778 0 0 0 0 0 0 0 0 0 0 0 0 -10 30 0 0 77.8612 0.489006 0 0 0 0 0 0 0 0 0 0 0 0 -10 22 0 0 79.3121 0.504326 0 0 0 0 0 0 0 0 0 0 0 0 -10 26 0 0 81.5961 0.516042 0 0 0 0 0 0 0 0 0 0 0 0 -10 34 0 0 82.3139 0.523526 0 0 0 0 0 0 0 0 0 0 0 0 -14 6 22.5024 0.288631 22.5024 0.288631 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 30 18.7466 0.26204 18.7466 0.26204 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 22 25.423 0.308639 25.423 0.308639 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 26 31.5382 0.344622 31.5382 0.344622 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -14 34 37.7451 0.377566 37.7451 0.377566 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +tower.secondary.hyperbol 10 421.957 0 0 400.167 0.0352796 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +tower.receptor 14 25 135.852 0.602426 135.852 0.602426 0 0 0 0 0.271681 0.00120475 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +heliostat4.temp-heliostat150.pivot.reflector 6 100.009 20095 0.785227 4.21758e-05 0 0 +heliostat5.temp-heliostat150.pivot.reflector 30 100.009 20027 0.769756 4.33957e-05 0 0 +heliostat3.temp-heliostat150.pivot.reflector 22 100.009 19777 0.799897 4.08915e-05 0 0 +heliostat2.temp-heliostat150.pivot.reflector 26 100.009 19976 0.815845 3.92572e-05 0 0 +heliostat1.temp-heliostat150.pivot.reflector 34 100.009 20125 0.830515 3.78765e-05 0 0 +10 6 0 0 78.903 0.497568 0 0 0 0 0 0 0 0 0 0 0 0 +10 30 0 0 77.0867 0.487147 0 0 0 0 0 0 0 0 0 0 0 0 +10 22 0 0 79.1052 0.503835 0 0 0 0 0 0 0 0 0 0 0 0 +10 26 0 0 81.4942 0.515816 0 0 0 0 0 0 0 0 0 0 0 0 +10 34 0 0 83.5784 0.526554 0 0 0 0 0 0 0 0 0 0 0 0 +14 6 22.1799 0.286704 22.1799 0.286704 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 30 18.6614 0.26147 18.6614 0.26147 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 22 25.3271 0.308097 25.3271 0.308097 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 26 31.6777 0.345324 31.6777 0.345324 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 +14 34 38.0063 0.378737 38.0063 0.378737 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1