NREL / hercules

Hercules
https://nrel.github.io/hercules/
Apache License 2.0
3 stars 7 forks source link

Write script to automate amr_input.ipt generation for different wind farm sizes #100

Open achenry opened 5 months ago

achenry commented 5 months ago

To generate the actuator labels:

num_turbines = 25
"Actuator.labels = " + " ".join([f"T{i:02d}" for i in range(num_turbines)])

To generate the base positions:

set = ""
n_rows = 5
n_cols = 5
delta_x = 882.0
delta_y = 756.0
for i in range(n_rows):
    for j in range(n_cols):
        turbine_idx = (i * n_rows) + j
        set += f"Actuator.T{turbine_idx:02d}.base_position = {i * delta_x:.1f} {j * delta_y:.1f} 0.0\n"
#print(set)