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 901f7dcda1e41ba0901b29b1b972e0152e8a2298
parent c70b4ba330d4410aaabd205dae4d063885877884
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri, 31 Mar 2017 10:55:20 +0200

Remove additional (non-numerical) information on global outputs.

Diffstat:
Msrc/solstice_solve.c | 14+++++++-------
Msrc/test_solstice_simulation.c | 13+++++--------
Myaml/beam_down.ref | 26+++++++++++++-------------
Myaml/test01.ref | 14+++++++-------
Myaml/test02.ref | 14+++++++-------
Myaml/test03.ref | 14+++++++-------
Myaml/test04.ref | 14+++++++-------
Myaml/test05.ref | 14+++++++-------
Myaml/test06.ref | 14+++++++-------
9 files changed, 67 insertions(+), 70 deletions(-)

diff --git a/src/solstice_solve.c b/src/solstice_solve.c @@ -60,19 +60,19 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator) (unsigned long)nfailed); /* Global data */ - fprintf(solstice->output, "%g %g # Potential\n", + fprintf(solstice->output, "%g %g\n", potential, 0.); - fprintf(solstice->output, "%g %g # Absorbed\n", + fprintf(solstice->output, "%g %g\n", mc_global.absorbed.E, mc_global.absorbed.SE); - fprintf(solstice->output, "%g %g # Cos\n", + fprintf(solstice->output, "%g %g\n", mc_global.cos_factor.E, mc_global.cos_factor.SE); - fprintf(solstice->output, "%g %g # Shadowing\n", + fprintf(solstice->output, "%g %g\n", mc_global.shadowed.E, mc_global.shadowed.SE); - fprintf(solstice->output, "%g %g # Missing\n", + fprintf(solstice->output, "%g %g\n", mc_global.missing.E, mc_global.missing.SE); - fprintf(solstice->output, "%g %g # Atmosphere\n", + fprintf(solstice->output, "%g %g\n", mc_global.atmosphere.E, mc_global.atmosphere.SE); - fprintf(solstice->output, "%g %g # Reflectivity\n", + fprintf(solstice->output, "%g %g\n", mc_global.reflectivity.E, mc_global.reflectivity.SE); /* Receivers' data */ diff --git a/src/test_solstice_simulation.c b/src/test_solstice_simulation.c @@ -239,13 +239,13 @@ get_angles_and_counts } static void -read_global(FILE* file, char name [], double* E, double* SE) +read_global(FILE* file, double* E, double* SE) { char line[MAX_LINE_LEN]; CHECK(read_line(line, sizeof(line), file), 1); CHECK( - sscanf(line, "%lg %lg # %s", E, SE, name), - 3); + sscanf(line, "%lg %lg", E, SE), + 2); } static void @@ -381,12 +381,9 @@ check_1_reference /* both files' pointer are just past the new bloc header */ for (n = 0; n < counts->global; n++) { - char ref_global_name[MAX_LINE_LEN], test_global_name[MAX_LINE_LEN]; double reference_E, reference_SE, test_E, test_SE; - - read_global(ref_file, ref_global_name, &reference_E, &reference_SE); - read_global(test_file, test_global_name, &test_E, &test_SE); - CHECK(strcmp(ref_global_name, test_global_name), 0); + read_global(ref_file, &reference_E, &reference_SE); + read_global(test_file, &test_E, &test_SE); CHECK(is_compatible_with(reference_E, reference_SE, test_E, test_SE), 1); } for (n = 0; n < counts->receiver; n++) { diff --git a/yaml/beam_down.ref b/yaml/beam_down.ref @@ -1,12 +1,12 @@ #--- Sun direction: 90 90 (-3.7494e-33 -6.12323e-17 -1) 7 2 5 10000 0 500.043 0 # Potential -465.484 0.0183212 # Absorbed -0.930883 3.66351e-05 # Cos -0 0 # Shadowing -0 0 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +465.484 0.0183212 +0.930883 3.66351e-05 +0 0 +0 0 +0 0 +0 0 tower.secondary.hyperbol 10 421.957 FRONT: 0 0 465.484 0.0183212 0 0 0 0 0 0 BACK: 0 0 0 0 0 0 0 0 0 0 tower.receptor 14 25 FRONT: 465.484 0.0183212 465.484 0.0183212 0 0 0 0 0.930888 3.66392e-05 BACK: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 heliostat4.temp-heliostat150.pivot.reflector 6 100.009 1999 0 0 0 0 @@ -26,13 +26,13 @@ heliostat1.temp-heliostat150.pivot.reflector 34 100.009 2024 0 0 0 0 14 34 FRONT: 94.0913 1.86784 94.0913 1.86784 0 0 0 0 BACK: -1 -1 -1 -1 -1 -1 -1 -1 #--- Sun direction: 50 50 (-0.413176 -0.492404 -0.766044) 7 2 5 10000 0 -500.043 0 # Potential -136.561 1.90791 # Absorbed -0.80038 0.000222269 # Cos -0 0 # Shadowing -244.012 1.94769 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +500.043 0 +136.561 1.90791 +0.80038 0.000222269 +0 0 +244.012 1.94769 +0 0 +0 0 tower.secondary.hyperbol 10 421.957 FRONT: 0 0 400.227 0.111144 0 0 0 0 0 0 BACK: 0 0 0 0 0 0 0 0 0 0 tower.receptor 14 25 FRONT: 136.561 1.90791 136.561 1.90791 0 0 0 0 0.273098 0.0038155 BACK: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 heliostat4.temp-heliostat150.pivot.reflector 6 100.009 2045 0 0 0 0 diff --git a/yaml/test01.ref b/yaml/test01.ref @@ -1,12 +1,12 @@ #--- Sun direction: 0 90 (-6.12323e-17 -0 -1) 7 1 1 10000 0 -1 0 # Potential -0 0 # Absorbed -1 0 # Cos -0 0 # Shadowing -1 0 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +1 0 +0 0 +1 0 +0 0 +1 0 +0 0 +0 0 square_receiver 2 100 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 1 0 0 0 0 0 0 0 reflector 6 1 10000 0 0 0 0 2 6 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 1 0 0 0 0 0 diff --git a/yaml/test02.ref b/yaml/test02.ref @@ -1,12 +1,12 @@ #--- Sun direction: 0 90 (-6.12323e-17 -0 -1) 7 1 1 10000 0 -100 0 # Potential -0.96 0.0975082 # Absorbed -1 0 # Cos -0 0 # Shadowing -99.04 0.0975082 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +100 0 +0.96 0.0975082 +1 0 +0 0 +99.04 0.0975082 +0 0 +0 0 square_receiver 2 1 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0.96 0.0975082 0.96 0.0975082 0 0 0 0 0.0096 0.000975082 reflector 6 100 10000 0 0 0 0 2 6 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0.96 0.0975082 0.96 0.0975082 0 0 0 0 diff --git a/yaml/test03.ref b/yaml/test03.ref @@ -1,12 +1,12 @@ #--- Sun direction: 0 45 (-0.707107 -0 -0.707107) 7 1 1 10000 0 -1 0 # Potential -0 0 # Absorbed -0.707107 0 # Cos -0 0 # Shadowing -0.707107 0 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +1 0 +0 0 +0.707107 0 +0 0 +0.707107 0 +0 0 +0 0 square_receiver 2 100 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 0.707107 0 0 0 0 0 0 0 reflector 6 1 10000 0 0 0 0 2 6 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 0.707107 0 0 0 0 0 diff --git a/yaml/test04.ref b/yaml/test04.ref @@ -1,12 +1,12 @@ #--- Sun direction: 0 45 (-0.707107 -0 -0.707107) 7 1 1 10000 0 -1 0 # Potential -0 0 # Absorbed -0.707107 0 # Cos -0 0 # Shadowing -0.707107 0 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +1 0 +0 0 +0.707107 0 +0 0 +0.707107 0 +0 0 +0 0 square_receiver 2 100 FRONT: 0 0 0 0 0 0 0 0 0 0 BACK: 0 0 0.707107 0 0 0 0 0 0 0 reflector 6 1 10000 0 0 0 0 2 6 FRONT: 0 0 0 0 0 0 0 0 BACK: 0 0 0.707107 0 0 0 0 0 diff --git a/yaml/test05.ref b/yaml/test05.ref @@ -1,12 +1,12 @@ #--- Sun direction: 0 90 (-6.12323e-17 -0 -1) 7 1 1 10000 0 -1 0 # Potential -0 0 # Absorbed -1 0 # Cos -0 0 # Shadowing -1 0 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +1 0 +0 0 +1 0 +0 0 +1 0 +0 0 +0 0 spherical_receiver 2 50.2403 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 1 0 0 0 0 0 0 0 reflector 6 1 10000 0 0 0 0 2 6 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 1 0 0 0 0 0 diff --git a/yaml/test06.ref b/yaml/test06.ref @@ -1,12 +1,12 @@ #--- Sun direction: 0 63 (-0.45399 -0 -0.891007) 7 1 1 10000 0 -111.97 0 # Potential -0 0 # Absorbed -0.896295 0.000571234 # Cos -0 0 # Shadowing -100 0 # Missing -0 0 # Atmosphere -0 0 # Reflectivity +111.97 0 +0 0 +0.896295 0.000571234 +0 0 +100 0 +0 0 +0 0 reflector.ground.pivot.small_square 10 1 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 100 0 0 0 0 0 0 0 reflector.ground.pivot.parabol 6 111.97 10000 0 0 0 0 10 6 FRONT: -1 -1 -1 -1 -1 -1 -1 -1 BACK: 0 0 100 0 0 0 0 0