Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to get IQ model to work #134

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions floris/simulation/flow_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ def calculate_wake(self,
# multiply by area overlap
ti_added = area_overlap * ti_calculation

# TODO: need to revisit when we are returning fields of TI
turbine_ti.current_turbulence_intensity = np.max(
(
np.sqrt(
Expand Down
16 changes: 12 additions & 4 deletions floris/simulation/wake_turbulence/ishihara_qian.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations under
# the License.

import numpy as np
from .base_wake_turbulence import WakeTurbulence


Expand Down Expand Up @@ -143,17 +144,24 @@ def function(self, ambient_TI, coord_ti, turbine_coord, turbine):
f = self.parameter_value_from_dict(self.f, Ct, ti_initial)

k1 = np.cos(np.pi / 2 * (r / D - 0.5))**2
k1[r / D > 0.5] = 1.0
# TODO: make work for array of turbulences/grid points
# k1[r / D > 0.5] = 1.0

k2 = np.cos(np.pi / 2 * (r / D + 0.5))**2
k2[r / D > 0.5] = 0.0
# TODO: make work for array of turbulences/grid points
# k2[r / D > 0.5] = 0.0

if r / D > 0.5:
k1 = 1.0
k2 = 0.0

# Representative wake width = \sigma / D
wake_width = kstar * (local_x / D) + epsilon

# Added turbulence intensity = \Delta I_1 (x,y,z)
delta = ti_initial * np.sin(np.pi * (HH - local_z) / HH)**2
delta[local_z >= HH] = 0.0
# TODO: make work for array of turbulences/grid points
# delta[local_z >= HH] = 0.0
ti_calculation = 1 / (d + e * (local_x / D) + f *
(1 + (local_x / D))**(-2)) * (
(k1 * np.exp(-(r - D / 2)**2 /
Expand All @@ -164,7 +172,7 @@ def function(self, ambient_TI, coord_ti, turbine_coord, turbine):

return ti_calculation

def parameter_value_from_dict(pdict, Ct, ti_initial):
def parameter_value_from_dict(self, pdict, Ct, ti_initial):
"""
Calculates model parameters using current conditions and
model dictionaries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ class IshiharaQian(GaussianModel):
"const": 0.15,
"Ct": -0.25,
"TI": -0.7
}
},
'calculate_VW_velocities':False,
'use_yaw_added_recovery':False,
'yaw_recovery_alpha':0.03,
'eps_gain':0.3
}

def __init__(self, parameter_dictionary):
Expand Down