Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mitwindfarm/CurledWake.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
DomainExpansionRequest,
)
from UnifiedMomentumModel.Utilities.Geometry import calc_eff_yaw, eff_yaw_rotation, eff_yaw_inv_rotation
from mitwindfarm.utils.differentiate import second_der


class CurledWakeWindfield(Windfield):
Expand Down Expand Up @@ -421,9 +420,11 @@ def _step(x, _state):
# gradient fields of \Delta u:
dudy = np.gradient(_u, y, axis=0)
dudz = np.gradient(_u, z, axis=1)
d2udy2 = second_der(_u, self.dy, axis=0)
d2udz2 = second_der(_u, self.dz, axis=1)
dudx = (-v * dudy - w * dudz + nu_T * (d2udy2 + d2udz2) + self.extra_fx) / u
div_nuu = (
np.gradient(nu_T * dudy, y, axis=0, edge_order=2)
+ np.gradient(nu_T * dudz, z, axis=1, edge_order=2)
)
dudx = (-v * dudy - w * dudz + div_nuu + self.extra_fx) / u

self.extra_fx *= 0 # reset extra forces after they are used - TODO: remove

Expand Down