stardis-solver

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

commit 8ddfbcb57ad77f0a663bfd6bc102c72e60c3704a
parent c43f289e34c8deaaf9a45f339583e2547646df4f
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu, 21 Oct 2021 11:21:35 +0200

BugFix for green paths ending in a fluid (transcient computation)

The path's end was not correctly registred and the path was later treated as failed

Diffstat:
Msrc/sdis_heat_path_convective_Xd.h | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/sdis_heat_path_convective_Xd.h b/src/sdis_heat_path_convective_Xd.h @@ -220,8 +220,18 @@ XD(convective_path) if(tmp >= 0) { T->value += tmp; T->done = 1; - if(ctx->heat_path) { /* Update the weight of the last heat vertex */ - heat_path_get_last_vertex(ctx->heat_path)->weight = T->value; + if(ctx->heat_path) { + /* Update the registered vertex data */ + struct sdis_heat_vertex* vtx; + vtx = heat_path_get_last_vertex(ctx->heat_path); + vtx->time = rwalk->vtx.time; + vtx->weight = T->value; + } + + if(ctx->green_path) { + res = green_path_set_limit_vertex(ctx->green_path, rwalk->mdm, + &rwalk->vtx, rwalk->elapsed_time); + if(res != RES_OK) goto error; } goto exit; }