Memory Error
Hi Mads, and DTU team,
I am trying to simulate a large offshore cluster with 200 WTGs. The turbines also have two different heights. I got a memory error while running the code. The error is: "Memory Error: Unable to allocate 3.49 GiB for an array with shape (208, 250000, 1, 9) data type float64"
My code looks as follows:
wf_model = All2AllIterative(site, windTurbines, wake_deficitModel=NOJDeficit(k=0.04), superpositionModel=SquaredSum(), blockage_deficitModel=SelfSimilarityDeficit(groundModel=Mirror(), superpositionModel=LinearSum()), turbulenceModel=CrespoHernandez(c=[0.66, 0.83, 0.03, 0.32]))
heights = wts.hub_height(type=types) wind_dir = np.arange(0,360,30) wind_s = np.arange(5,14,1)
print(f'\n ....... Running Simulation .......\n')
#Run simulation simulationResult = wf_model(x, y, h = heights, wd= wind_dir, ws= wind_s, type= types, yaw=0, n_cpu=None, wd_chunks=30)
model_wake = type(wf_model.wake_deficitModel).
name
model_blockage = type(wf_model.blockage_deficitModel).
name
print(f'\n ....... Converting xarray to dataframe .......\n')
wind_field_data = simulationResult.flow_map() wfd = wind_field_data.to_dataframe() results_out = f'del-{cnt}_{model_wake}-{model_blockage}-wind_data.xlsx' fpath_results = os.path.join(fpath_out, results_out)
print(f'\n ....... Writing excel file .......\n') with pd.ExcelWriter(fpath_results) as writer: wfd.to_excel(writer, sheet_name='wind_field', index=True
Is there an issue with the code, or do you have any other suggestions on how this can be overcome?
(/uploads/3008c291b7ea8937445b39a818470aec/exp.py)