Skip to content

Commit

Permalink
convert temperature to Celcius and use 'r' as diameter not radius
Browse files Browse the repository at this point in the history
  • Loading branch information
GilesFearon committed Sep 22, 2022
1 parent a55ca88 commit 78f2bd4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions opendrift/models/openoil/openoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,9 @@ def update_terminal_velocity(self,
weight_upper + \
Sprofiles[lower, range(Sprofiles.shape[1])] * \
(1-weight_upper)


T0 = T0 - 273.15 # convert to Celcius - needed for the calcs in this method

rho_oil = self.elements.density
rho_water = self.sea_water_density(T=T0, S=S0)

Expand All @@ -868,10 +870,10 @@ def update_terminal_velocity(self,

# terminal velocity for low Reynolds numbers
kw = 2 * g * (1 - rhopr) / (9 * ny_w)
W = kw * r**2
W = kw * (r/2)**2 # r is diameter so divide by 2 for radius

# check if we are in a high Reynolds number regime
Re = 2 * r * W / ny_w
Re = r * W / ny_w # r is diameter so no need to multiply by 2
highRe = np.where(Re > 50)

# Terminal velocity in high Reynolds numbers
Expand Down

0 comments on commit 78f2bd4

Please sign in to comment.