commit a68d27640849a55a3ba32208766422550fc6776c parent 56e69091bc96581f59e57c2329b21ce7ed8e9cec Author: Benjamin Piaud <benjamin.piaud@meso-star.com> Date: Mon, 18 Jun 2018 10:30:44 +0200 minor change to deal with h == delta_solid Diffstat:
| M | src/sdis_solve_Xd.h | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/sdis_solve_Xd.h b/src/sdis_solve_Xd.h @@ -989,12 +989,14 @@ XD(solid_temperature) tmp = power * h_in_meter * h_in_meter / (2.0 * lambda); /*add the power corrective term*/ - if (h <= delta_solid){ + if (h < delta_solid){ double alpha; alpha = asin(h/delta_solid) ; - tmp += -(delta_s_in_meter*delta_s_in_meter*power)/(2.0*DIM*lambda) + tmp += -(delta_s_in_meter*delta_s_in_meter*power)/(2.0 * DIM * lambda) *2.0*sin(alpha)*cos(alpha)/(PI - 2.0*alpha); + } else if (h == delta_solid) { + tmp += -(delta_s_in_meter*delta_s_in_meter*power)/(2.0 * DIM * lambda); } T->value += tmp; }