NOJLocalDeficit WS_eff result doesn't seem to be affected by TI
Hello,
When experimenting with different models, I found that the NOJLocalDeficit model's WS_eff results didn't appear to be affected by the TI.
Minimal example:
import py_wake
from py_wake.site import XRSite
from py_wake.examples.data.hornsrev1 import V80
from py_wake.wind_farm_models import PropagateDownwind
from py_wake.superposition_models import LinearSum
from py_wake.deficit_models import NOJLocalDeficit, NOJDeficit
V80 = V80()
import xarray as xr
import numpy as np
wd = np.array([-5, 0, 5])
ws = np.array([4,7,10])
layout = np.array([[0,0], [0, 300]])
def create_site_with_ti(ti):
prob = np.ones((wd.shape[0], ws.shape[0]))
site= XRSite(
ds=xr.Dataset(
data_vars={
'P': (('wd', 'ws'), prob),
'TI': ti},
coords={'i': np.arange(len(layout)), 'wd': wd, 'ws': ws}),
initial_position=layout)
return site
site_ti_10 = create_site_with_ti(0.1)
site_ti_20 = create_site_with_ti(0.2)
wfm_10 = PropagateDownwind(site_ti_10, V80, wake_deficitModel = NOJLocalDeficit(use_effective_ti=False), superpositionModel = LinearSum())
wfm_20 = PropagateDownwind(site_ti_20, V80, wake_deficitModel = NOJLocalDeficit(use_effective_ti=False), superpositionModel = LinearSum())
res10 = wfm_10(layout[0], layout[1], type = 0, wd = wd, ws = ws)
res20 = wfm_20(layout[0], layout[1], type = 0, wd = wd, ws = ws)
delta = res10.WS_eff.to_numpy() - res20.WS_eff.to_numpy()
print(f"Difference in waked windspeed is: \n{delta}")
This results in the following output:
Difference in waked windspeed is:
[[[0. 0. 0.]
[0. 0. 0.]
[0. 0. 0.]]
[[0. 0. 0.]
[0. 0. 0.]
[0. 0. 0.]]]
Curiously, if I ask it to then plot the flow maps:
import matplotlib.pyplot as plt
res10.flow_map().plot_wake_map()
plt.show()
res20.flow_map().plot_wake_map()
There is a difference:
Which indicates that the TI is being considered somewhere?
