|
40 | 40 | g = 9.81 # Acceleration due to gravity in m/s² |
41 | 41 | omega = 7.2921e-5 # Angular frequency (rad/s) |
42 | 42 | csi = 1 # Sea ice coefficient of resistance |
43 | | -wave_drag_coef = 0.3 # Wave drag coefficient |
44 | | - |
45 | 43 |
|
46 | 44 |
|
47 | 45 | class IcebergObj(LagrangianArray): |
@@ -90,6 +88,9 @@ class IcebergObj(LagrangianArray): |
90 | 88 | ('wind_skin_drag_coef', {'dtype': np.float32, #Wind/Air skin drag coef. (Cda, IK) |
91 | 89 | 'units': '1', |
92 | 90 | 'default': 0.0022}), |
| 91 | + ('wave_drag_coef', {'dtype': np.float32, #Wave drag coef. |
| 92 | + 'units': '1', |
| 93 | + 'default': 0.3}), |
93 | 94 | ("iceb_x_velocity", {'dtype': np.float32, #Iceberg velocity in the x-direction |
94 | 95 | 'units': "m/s", |
95 | 96 | 'default': 0.0}), |
@@ -145,12 +146,13 @@ def wind_force(iceb_vel, wind_vel, Ava, Aha, wind_form_drag_coef, wind_skin_drag |
145 | 146 | return np.array([F_wind_x, F_wind_y]) |
146 | 147 |
|
147 | 148 |
|
148 | | -def wave_radiation_force(rho_water, wave_height, wave_direction, iceb_length): |
| 149 | +def wave_radiation_force(rho_water, wave_height, wave_direction, wave_drag_coef, iceb_length): |
149 | 150 | """ Wave radiation force |
150 | 151 | Args: |
151 | 152 | rho_water : Water density |
152 | 153 | wave_height : Wave significant height |
153 | 154 | wave_direction : Wave direction |
| 155 | + wave_drag_coef : Wave drag coefficient |
154 | 156 | iceb_length : Iceberg's length |
155 | 157 | """ |
156 | 158 | F_wave_x = (0.25 * rho_water * wave_drag_coef * g * iceb_length * (wave_height / 2) ** 2 * np.sin(np.deg2rad(wave_direction))) |
@@ -434,6 +436,7 @@ def advect_iceberg(self): |
434 | 436 | water_skin_drag_coef = self.elements.water_skin_drag_coef |
435 | 437 | wind_form_drag_coef = self.elements.wind_form_drag_coef |
436 | 438 | wind_skin_drag_coef = self.elements.wind_skin_drag_coef |
| 439 | + wave_drag_coef = self.elements.wave_drag_coef |
437 | 440 |
|
438 | 441 | T = self.environment.sea_water_temperature |
439 | 442 | S = self.environment.sea_water_salinity |
@@ -487,13 +490,15 @@ def advect_iceberg(self): |
487 | 490 |
|
488 | 491 |
|
489 | 492 | def dynamic(t,iceb_vel, water_vel, wind_vel, wave_height, wave_direction, Avo, Aho, |
490 | | - Ava, Aha, rho_water, water_form_drag_coef, water_skin_drag_coef, wind_form_drag_coef, wind_skin_drag_coef, iceb_length, mass,lat, sea_slope_x, sea_slope_y): |
| 493 | + Ava, Aha, rho_water, water_form_drag_coef, water_skin_drag_coef, |
| 494 | + wind_form_drag_coef, wind_skin_drag_coef, wave_drag_coef, iceb_length, mass, |
| 495 | + lat, sea_slope_x, sea_slope_y): |
491 | 496 | """ Function required by solve_ivp. The t and iceb_vel parameters are required by solve_ivp, shouldn't be deleted """ |
492 | 497 | iceb_vel = iceb_vel.reshape((2, -1)) |
493 | 498 | # Individual forces |
494 | 499 | ocean_force_val = ocean_force(iceb_vel, water_vel, Avo, Aho, rho_water, water_form_drag_coef, water_skin_drag_coef) |
495 | 500 | wind_force_val = wind_force(iceb_vel, wind_vel, Ava, Aha, wind_form_drag_coef, wind_skin_drag_coef) |
496 | | - wave_radiation_force_val = int(wave_rad) * wave_radiation_force(rho_water, wave_height, wave_direction, iceb_length) |
| 501 | + wave_radiation_force_val = int(wave_rad) * wave_radiation_force(rho_water, wave_height, wave_direction, wave_drag_coef, iceb_length) |
497 | 502 | coriolis_force_val = int(coriolis) * coriolis_force(iceb_vel, mass, lat) |
498 | 503 | sea_surface_slope_val = int(sea_surface_slope) * sea_surface_slope_force(sea_slope_x, sea_slope_y, mass) |
499 | 504 |
|
@@ -533,8 +538,11 @@ def dynamic(t,iceb_vel, water_vel, wind_vel, wave_height, wave_direction, Avo, A |
533 | 538 | logger.debug("Grounding process disabled in configuration") |
534 | 539 |
|
535 | 540 | sol = solve_ivp(dynamic, [0, self.time_step.total_seconds()], V0, |
536 | | - args=(water_vel, wind_vel, wave_height, wave_direction, Avo, Aho, Ava, Aha, rho_water, |
537 | | - water_form_drag_coef, water_skin_drag_coef, wind_form_drag_coef, wind_skin_drag_coef,length, mass, lat, sea_slope_x, sea_slope_y), |
| 541 | + args=(water_vel, wind_vel, wave_height, wave_direction, |
| 542 | + Avo, Aho, Ava, Aha, rho_water, |
| 543 | + water_form_drag_coef, water_skin_drag_coef, wind_form_drag_coef, |
| 544 | + wind_skin_drag_coef, wave_drag_coef, length, mass, lat, |
| 545 | + sea_slope_x, sea_slope_y), |
538 | 546 | vectorized=True, |
539 | 547 | t_eval=np.array([self.time_step.total_seconds()])) |
540 | 548 | V = sol.y.reshape((2, -1)) |
|
0 commit comments