commit 4b667eb626f5ff6f60e27356767f95a098ff75d1
parent adcfccd101cb1ffb0fb09a82e5ca39e59017d55c
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Wed, 30 Sep 2020 15:00:27 +0200
Add 'imposed flux' as a new category when computing fluxes
Diffstat:
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/doc/stardis-output.5.txt b/doc/stardis-output.5.txt
@@ -122,20 +122,20 @@ _______
-------------------------------------
-<probe-temp> ::= <MC-estimate> <failures-report>
+<probe-temp> ::= <MC-estimate> <failures-report>
-<mean-temp> ::= <MC-estimate> <failures-report>
+<mean-temp> ::= <MC-estimate> <failures-report>
-<mean-flux> ::= <MC-estimate> <MC-estimate> <MC-estimate> <MC-estimate>\
- <failures-report>
- # MC estimates order is: temperature, convective flux,
- # radiative flux, total flux
+<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>
+<medium-temp> ::= <MC-estimate> <failures-report>
-<MC-estimate> ::= <expected-value> <standard-deviation>
+<MC-estimate> ::= <expected-value> <standard-deviation>
-<failures-report> ::= <error-count> <success-count>
+<failures-report> ::= <error-count> <success-count>
<ext-probe-temp> ::= "Temperature at" <probe-position> <time> <MC-estimate>
<failures-report>
@@ -147,6 +147,7 @@ _______
"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>
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
@@ -1232,6 +1232,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",
@@ -1249,6 +1260,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);