commit 3727ca344e06d9a333a83410ae29e7d9e19c7e32
parent a8126cbef44859eb7da78703f8c57ae92a5f0caa
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Wed, 30 Sep 2020 15:01:28 +0200
Merge branch 'develop' into feature_unsteady_green
Diffstat:
3 files changed, 73 insertions(+), 29 deletions(-)
diff --git a/doc/stardis-output.5.txt b/doc/stardis-output.5.txt
@@ -87,11 +87,11 @@ when neither verbatim nor count, is a comment and is not part of the output.
[verse]
_______
-<output> ::= <single-MC-result>
- | <binary-green>
- | <ascii-green>
- | <geometry-dump>
- | <infrared-image>
+<output> ::= <single-MC-result>
+ | <binary-green>
+ | <ascii-green>
+ | <geometry-dump>
+ | <infrared-image>
_______
== SINGLE MONTE CARLO
@@ -101,42 +101,70 @@ temperature or flux, this result is output first to _standard output_, possibly
followed by some of the heat paths involved in the computation if option *-D*
was used too.
+Two different formats are possible: a compact, numbers only format (the default)
+or an extended format that mixes numbers and their descriptions (if option *-e*
+is used).
+
[verse]
_______
-<single-MC-result> ::= <probe-temp>
- | <medium-temp>
- | <mean-temp>
- | <mean-flux>
+<single-MC-result> ::= <single-MC-result>
+ | <ext-single-MC-result>
+
+<single-MC-result> ::= <probe-temp>
+ | <medium-temp>
+ | <mean-temp>
+ | <mean-flux>
+
+<ext-single-MC-result> ::= <ext-probe-temp>
+ | <ext-medium-temp>
+ | <ext-mean-temp>
+ | <ext-mean-flux>
-------------------------------------
-<probe-temp> ::= "Temperature at" <probe-position> <time> <MC-estimate>
- <failures-report>
+<probe-temp> ::= <MC-estimate> <failures-report>
+
+<mean-temp> ::= <MC-estimate> <failures-report>
+
+<mean-flux> ::= <MC-estimate> <MC-estimate> <MC-estimate> <MC-estimate> \
+ <MC-estimate> <failures-report>
+ # MC estimates order is: temperature, convective flux,
+ # radiative flux, imposed flux, total flux
+
+<medium-temp> ::= <MC-estimate> <failures-report>
+
+<MC-estimate> ::= <expected-value> <standard-deviation>
+
+<failures-report> ::= <error-count> <success-count>
+
+<ext-probe-temp> ::= "Temperature at" <probe-position> <time> <MC-estimate>
+ <failures-report>
-<mean-temp> ::= "Temperature at boundary" <file-name> <time> <MC-estimate>
- <failures-report>
+<ext-mean-temp> ::= "Temperature at boundary" <file-name> <time> <MC-estimate>
+ <failures-report>
-<mean-flux> ::= "Temperature at boundary" <file-name> <time> <MC-estimate>
- "Convective flux at boundary " <file-name> <time> \
- <MC-estimate>
- "Radiative flux at boundary" <file-name> <time> <MC-estimate>
- "Total flux at boundary" <file-name> <time> <MC-estimate>
- <failures-report>
+<ext-mean-flux> ::= "Temperature at boundary" <file-name> <time> <MC-estimate>
+ "Convective flux at boundary " <file-name> <time> \
+ <MC-estimate>
+ "Radiative flux at boundary" <file-name> <time> <MC-estimate>
+ "Imposed flux at boundary" <file-name> <time> <MC-estimate>
+ "Total flux at boundary" <file-name> <time> <MC-estimate>
+ <failures-report>
-<medium-temp> ::= "Temperature in medium" <medium-name> <time> <MC-estimate>
- <failures-report>
+<ext-medium-temp> ::= "Temperature in medium" <medium-name> <time> <MC-estimate>
+ <failures-report>
-<probe-position> ::= "[" <x-value> "," <y-value> "," <z-value> "]"
+<ext-probe-position> ::= "[" <x-value> "," <y-value> "," <z-value> "]"
-<time> ::= "at t=" <time-value> "="
+<ext-time> ::= "at t=" <time-value> "="
-<MC-estimate> ::= <expected-value> "+/-" <standard-deviation>
+<ext-MC-estimate> ::= <expected-value> "+/-" <standard-deviation>
-<failures-report> ::= "#failures:" <error-count> "/" <success-count>
+<ext-failures-report> ::= "#failures:" <error-count> "/" <success-count>
-<file-name> ::= STRING # as provided in input data
+<ext-file-name> ::= STRING # as provided in input data
-<medium-name> ::= STRING # as provided in input data
+<ext-medium-name> ::= STRING # as provided in input data
-------------------------------------
diff --git a/doc/stardis.1.txt.in b/doc/stardis.1.txt.in
@@ -130,7 +130,10 @@ EXCLUSIVE OPTIONS
These triangles are not added to the geometry, but must be part of it. Flux
is accounted positive when going from the front side to the back side, at a
single-triangle level. By default the compute time range is
- @STARDIS_ARGS_DEFAULT_COMPUTE_TIME@.The region does not need to be connex.
+ @STARDIS_ARGS_DEFAULT_COMPUTE_TIME@. The region does not need to be connex,
+ but it can currently only include geometry appearing in description lines
+ starting with H_BOUNDARY_FOR_SOLID, H_BOUNDARY_FOR_FLUID,
+ F_BOUNDARY_FOR_SOLID or SOLID_FLUID_CONNECTION (see *stardis-input*(5)).
*-R* [__sub-option__:...]::
Render an infrared image of the system through a pinhole camera and write it
@@ -159,7 +162,7 @@ EXCLUSIVE OPTIONS
**t=**_time-range_;;
Rendering time range. By default _time-range_ is
- @STARDIS_ARGS_DEFAULT_RENDERING_TIME@.
+ @STARDIS_ARGS_DEFAULT_RENDERING_TIME@.
**tgt=**_x_**,**_y_**,**_z_;;
Position targeted by the camera. By default, it is set to
diff --git a/src/stardis-output.c b/src/stardis-output.c
@@ -1277,6 +1277,17 @@ print_single_MC_result
str_cget(&stardis->solve_name), SPLIT2(stardis->time_range),
result.E, /* Expected value */
result.SE); /* Standard error */
+ ERR(sdis_estimator_get_imposed_flux(estimator, &result));
+ if(stardis->time_range[0] == stardis->time_range[1])
+ fprintf(stream, "Imposed flux at boundary %s at t=%g = %g +/- %g\n",
+ str_cget(&stardis->solve_name), stardis->time_range[0],
+ result.E, /* Expected value */
+ result.SE); /* Standard error */
+ else
+ fprintf(stream, "Imposed flux at boundary %s with t in [%g %g] = %g +/- %g\n",
+ str_cget(&stardis->solve_name), SPLIT2(stardis->time_range),
+ result.E, /* Expected value */
+ result.SE); /* Standard error */
ERR(sdis_estimator_get_total_flux(estimator, &result));
if(stardis->time_range[0] == stardis->time_range[1])
fprintf(stream, "Total flux Flux at boundary %s at t=%g = %g +/- %g\n",
@@ -1294,6 +1305,8 @@ print_single_MC_result
fprintf(stream, "%g %g ", result.E, result.SE);
ERR(sdis_estimator_get_radiative_flux(estimator, &result));
fprintf(stream, "%g %g ", result.E, result.SE);
+ ERR(sdis_estimator_get_imposed_flux(estimator, &result));
+ fprintf(stream, "%g %g ", result.E, result.SE);
ERR(sdis_estimator_get_total_flux(estimator, &result));
fprintf(stream, "%g %g ", result.E, result.SE);
fprintf(stream, "%zu %zu\n", nfailures, stardis->samples);