Skip to content

Commit

Permalink
update multi-turbine
Browse files Browse the repository at this point in the history
  • Loading branch information
cfrontin committed Jun 4, 2024
1 parent 302b5b9 commit 2a4fd6e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 41 deletions.
21 changes: 14 additions & 7 deletions demo/documented/studies/powercurve_validation/multi_turbine.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
general:
general:
name: 3D_Wind_Farm # Name of the output folder
output: ["mesh","initial_guess","height","turbine_force","solution"]

wind_farm:
wind_farm:

######################### Grid Wind Farm #########################
type: grid # |
grid_rows: 1 # Number of rows | -
grid_cols: 3 # Number of columns | -
x_spacing: 390 # horizontal spacing | m 390, 520, 650, 780, 910
x_spacing: 390 # horizontal spacing | m 390, 520, 650, 780, 910
y_spacing: 0 # vertical spacing | m
###################################################################

Expand All @@ -18,16 +18,23 @@ turbines:
type: power_disk # |
RD: 130.0 # Turbine Diameter | m
thickness: 13.0 # Effective Thickness | m
CPprime0: 1.360 # Region 2 Power Coeff | -
CTprime0: 1.639 # Region 2 Thrust Coeff | -
Prated: 3077551.02040 # Specific Rated Power | W
CPprime0: 1.022 # Region 2 Power Coeff | -
# CPprime0: 1.043 # Region 2 Power Coeff | -
# CPprime0: 1.360 # Region 2 Power Coeff | -
CTprime0: 1.319 # Region 2 Thrust Coeff | -
# CTprime0: 1.350 # Region 2 Thrust Coeff | -
# CTprime0: 1.431 # Region 2 Thrust Coeff | -
# CTprime0: 1.639 # Region 2 Thrust Coeff | -
Prated: 2570282.74287 # Specific Rated Power | W
# Prated: 2532257.89912 # Specific Rated Power | W
# Prated: 3077551.02040 # Specific Rated Power | W
Trated: 368163.26530 # Specific Thrust | N
force: sine # radial force distribution | -
HH: 110 # Hub Height | m
yaw: 0.0 # Yaw | rads
###################################################################

domain:
domain:

########################### Box Domain ############################
type: box # |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ turbines:
type: power_disk # |
RD: 130.0 # Turbine Diameter | m
thickness: 13.0 # Effective Thickness | m
CPprime0: 1.360 # Region 2 Power Coeff | -
CTprime0: 1.639 # Region 2 Thrust Coeff | -
Prated: 3077551.02040 # Specific Rated Power | W
CPprime0: 1.022 # Region 2 Power Coeff | -
# CPprime0: 1.043 # Region 2 Power Coeff | -
# CPprime0: 1.360 # Region 2 Power Coeff | -
CTprime0: 1.319 # Region 2 Thrust Coeff | -
# CTprime0: 1.350 # Region 2 Thrust Coeff | -
# CTprime0: 1.431 # Region 2 Thrust Coeff | -
# CTprime0: 1.639 # Region 2 Thrust Coeff | -
Prated: 2570282.74287 # Specific Rated Power | W
# Prated: 2532257.89912 # Specific Rated Power | W
# Prated: 3077551.02040 # Specific Rated Power | W
Trated: 368163.26530 # Specific Thrust | N
force: sine # radial force distribution | -
HH: 110.0 # Hub Height | m
Expand Down
65 changes: 34 additions & 31 deletions demo/documented/studies/powercurve_validation/writeup/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,26 @@
### SINGLE TURBINE CASE

if do_single_turbine:
# extract three levels of discretization
casename = "nx19ny13nz06"
# casename = "kestrel_nx19ny13nz06" # "nx19ny13nz06"
df_curves_lo = pd.read_csv(f"../curves_{casename}.csv", names=["V","P","Tf"])
df_curves_collection = [df_curves_lo]
casename = "nx27ny18nz09"
# casename = "kestrel_nx27ny18nz09" # "nx27ny18nz09"
df_curves_mid = pd.read_csv(f"../curves_{casename}.csv", names=["V","P","Tf"])
df_curves_collection = [df_curves_lo, df_curves_mid]
# casename = "kestrel_nx38ny25nz13" # "nx38ny25nz13"
# df_curves_hi = pd.read_csv(f"../curves_{casename}.csv", names=["V","P","Tf"])
# df_curves_collection = [df_curves_lo, df_curves_mid, df_curves_hi]
label_collection = [
"$N_x=19$, $N_y=13$, $N_z=6$",
"$N_x=27$, $N_y=18$, $N_z=9$",
"$N_x=38$, $N_y=25$, $N_z=13$",
]
df_curves_collection = []
label_collection = []
if False:
# extract three levels of discretization
casename = "nx19ny13nz06"
# casename = "kestrel_nx19ny13nz06" # "nx19ny13nz06"
df_curves_lo = pd.read_csv(f"../curves_{casename}.csv", names=["V","P","Tf"])
df_curves_collection.append(df_curves_lo)
label_collection.append("$N_x=19$, $N_y=13$, $N_z=6$")
if True:
casename = "nx27ny18nz09"
# casename = "kestrel_nx27ny18nz09" # "nx27ny18nz09"
df_curves_mid = pd.read_csv(f"../curves_{casename}.csv", names=["V","P","Tf"])
df_curves_collection.append(df_curves_mid)
label_collection.append("$N_x=27$, $N_y=18$, $N_z=9$")
if False:
casename = "kestrel_nx38ny25nz13" # "nx38ny25nz13"
df_curves_hi = pd.read_csv(f"../curves_{casename}.csv", names=["V","P","Tf"])
df_curves_collection = [df_curves_lo, df_curves_mid, df_curves_hi]
label_collection.append("$N_x=38$, $N_y=25$, $N_z=13$")

# get FLORIS reference data
rho_fluid = 1.225
Expand Down Expand Up @@ -114,20 +117,20 @@
ax.legend()
fig.savefig("single_turb_CPconv.png", dpi=300, bbox_inches="tight")

fig, ax = plt.subplots()

for df_power, label_case in zip(df_curves_collection, label_collection):
ax.plot(
df_power.V,
(
rho_fluid*df_power.P/Ps_fluid(df_power.V)
)/np.interp(
df_power.V,
V_floris[1:],
P_floris[1:]/1e3/Ps_fluid(V_floris[1:]),
),
label=label_case,
)
# fig, ax = plt.subplots()
#
# for df_power, label_case in zip(df_curves_collection, label_collection):
# ax.plot(
# df_power.V,
# (
# rho_fluid*df_power.P/Ps_fluid(df_power.V)
# )/np.interp(
# df_power.V,
# V_floris[1:],
# P_floris[1:]/1e3/Ps_fluid(V_floris[1:]),
# ),
# label=label_case,
# )

## thrust plot

Expand Down

0 comments on commit 2a4fd6e

Please sign in to comment.