Skip to content

Commit c47cce9

Browse files
committed
Fixes in longitudinal wake
1 parent ff6191e commit c47cce9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PyHEADTAIL/impedances/wakes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,12 @@ def function_longitudinal(self):
355355
convert_to_V_per_C = 1e12
356356

357357
time = convert_to_s * self.wake_table['time']
358-
wake_strength = -convert_to_V_per_C * self.wake_table['longitudinal']
359-
interpolation_function = interp1d(time, wake_strength)
358+
# Sign is chosen such that a positive wake corresponds to energy
359+
# loss (giadarol, 6 July 2024)
360+
wake_strength = convert_to_V_per_C * self.wake_table['longitudinal']
361+
interpolation_function = interp1d(time, wake_strength,
362+
bounds_error=False,
363+
fill_value=0.)
360364

361365
def wake(dt, *args, **kwargs):
362366
wake_interpolated = interpolation_function(-dt)

0 commit comments

Comments
 (0)