stardis-solver

Solve coupled heat transfers
git clone git://git.meso-star.fr/stardis-solver.git
Log | Files | Refs | README | LICENSE

commit 18a7d865d480e6d8151a3f604f372a779bf60552
parent a946365e93304023ecb7d50043cce1ad40a71f80
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 17 Apr 2024 18:40:27 +0200

Correction of external diffuse flux calculation

The external diffuse flux from the radiance scattered in the environment
is treated as being relative to the diffuse radiance of the source. It
is then multiplied by it only to update the Monte Carlo weight. But in
fact, this term was already multiplied by the diffuse radiance of the
source, leading to a squared diffuse radiance and therefore an
over-estimation of this component. This commit corrects this problem.

Diffstat:
Msrc/sdis_heat_path_boundary_Xd_handle_external_net_flux.h | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/sdis_heat_path_boundary_Xd_handle_external_net_flux.h b/src/sdis_heat_path_boundary_Xd_handle_external_net_flux.h @@ -375,8 +375,7 @@ XD(compute_incident_diffuse_flux) * given instant. It must therefore be multiplied by this radiance to * obtain its real contribution. This trick makes it possible to manage * the external flux in the green function. */ - const double Ld = source_get_diffuse_radiance(scn->source, time, dir); - diffuse_flux->scattered = Ld * PI; /* [W/m^2] */ + diffuse_flux->scattered = PI; diffuse_flux->dir[0] = dir[0]; diffuse_flux->dir[1] = dir[1]; diffuse_flux->dir[2] = dir[2];