diff --git a/mb_scenario.py b/mb_scenario.py index 700195a..f664963 100644 --- a/mb_scenario.py +++ b/mb_scenario.py @@ -270,7 +270,9 @@ def T_surface(t: dolfinx.fem.Constant) -> float: monoblock surface temperature in K """ pulse_type = my_scenario.get_pulse_type(float(t)) - return 1.1e-4 * heat(pulse_type, t=t) + COOLANT_TEMP + pulse_row = my_scenario.get_row(float(t)) + time_elapsed = my_scenario.get_time_till_row(pulse_row) + return 1.1e-4 * heat(pulse_type, t=t-time_elapsed) + COOLANT_TEMP def T_rear(t: dolfinx.fem.Constant): """Monoblock surface temperature @@ -282,7 +284,9 @@ def T_rear(t: dolfinx.fem.Constant): monoblock surface temperature in K """ pulse_type = my_scenario.get_pulse_type(float(t)) - return 2.2e-5 * heat(pulse_type, t=t) + COOLANT_TEMP + pulse_row = my_scenario.get_row(float(t)) + time_elapsed = my_scenario.get_time_till_row(pulse_row) + return 2.2e-5 * heat(pulse_type, t=t-time_elapsed) + COOLANT_TEMP def T_function(x, t: Constant): """Monoblock temperature function