openfast icon indicating copy to clipboard operation
openfast copied to clipboard

Question: Calculation time about OLAF "Write VTK"

Open ZL6462 opened this issue 1 year ago • 3 comments

Dear all,

When I tried to output the grid data through the OLAF "Write VTK" function, I found the calculation time of the OpenFAST increased a lot.

Actually, the total simulation time (TMax) of OpenFAST is 200s, and I only need to output the grid data at the 200s, so I set the "TStart" and “TEnd” both to 200 in "OLAF.dat" file. In my understanding, the program will only need to calculate the velocity field through Biot-Savart law at the moment of 200s, but why the calculation time of 0~199s increased a lot?

Thank you for your attention.

ZL6462 avatar Nov 16 '23 17:11 ZL6462

The TStart and TEnd values only affect what is written to the output file, and not what is written to the VTK output files. To change the frequency of the VTK outputs, you need to change the VTK_fps value. This value can be less than 1, so to only get outputs at 200 seconds, you could set VTK_fps to 0.005 (I don't remember the internal counting, so this might output at the 200 + dt seconds instead of exactly at 200 seconds).

The reason you see the dramatically increased computation time is due to increasedand disk IO in writing the VTK out every couple of timesteps (disk IO is very slow).

andrew-platt avatar Nov 29 '23 17:11 andrew-platt

Hi @ZL6462

Andy is correct that the outpu frequency of the VTK can drastically slow down the simulation.

I'm understanding that you are referring to the tStart and tEnd of the grid outputs of OLAF. As far as I know, there is no bug there, and the outputs are only calculated between the specified times (the expensive calculation of computing the influence of all the vortex elements at each grid points is only done within the times requested). Make sure you disable the other VTK outputs of OLAF, by having nVTKBlades=0, and WrVTK=2 (I can't remember if WrVTK=0 would disable the plane outputs).

If things are still slow, I suspect it's because of the current implementation of AeroDyn which requests the Inflow velocity from InflowWind at all the points that OLAF will potentially need, and it does this at each time step. So effectively, the free stream velocity is requested at all the grid points at each time step. If you have a turbulent field, this can be quite expensive. This was an unfortunate side effect of the modular framework of OpenFAST where OLAF or AoerDyn do not have access to the inflow directly. It's actually responsible for an important part of the slow down of OLAF. We are progressively removing this InflowWind modular dependency, but currently, AeroDyn is still in charge of computing the velocity at all the potential points of OLAF at every time steps. We hope to fix this in the future, and request the inflow only when needed.

I hope that helps.

ebranlard avatar Nov 29 '23 20:11 ebranlard

I missed that this TStart and TEnd are the ones in the OLAF input file.

As @ebranlard mentioned, the really big slowdown is likely due to the way the wind is currently handled. We are in the process of modifying the way the InflowWind data is handled to speed this up, but it will be a while before that is ready to include in a release.

andrew-platt avatar Nov 29 '23 20:11 andrew-platt