-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.py
41 lines (32 loc) · 1.34 KB
/
demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from miniwake import SingleWake
from miniwake.turbine import Turbine
from miniwake.turbine import FixedThrustCurve
import numpy as np
import matplotlib.pyplot as plt
upwind_turbine = Turbine(name="T1",
x=0.0,
y=0.0,
hub_height=80.0,
diameter=76.0,
rotational_speed_rpm=17.0,
thrust_curve=FixedThrustCurve(0.4))
upwind_velocity = 9.
amient_turbulence_intensity = 0.1
upwind_local_turbulence_intensity = amient_turbulence_intensity
single_wake = SingleWake(ambient_turbulence_intensity=amient_turbulence_intensity,
upwind_turbine=upwind_turbine,
upwind_velocity=upwind_velocity,
upwind_local_turbulence_intensity=upwind_local_turbulence_intensity,
apply_meander=True)
wake = single_wake.calculate(upwind_turbine.diameter * 4.0)
x = []
yv = []
yt = []
for normalised_distance in np.linspace(-2.0, 2.0, num=100):
distance = normalised_distance * upwind_turbine.diameter
x.append(normalised_distance)
yv.append(wake.velocity_deficit(lateral_distance=distance))
yt.append(wake.added_turbulence(lateral_distance=distance))
plt.scatter(x, yv, s=20, marker='o')
plt.scatter(x, yt, s=20, marker='^')
plt.show()