Iterations Project

What is the Iterations Project?


WindNinja's momentum solver currently takes significantly more time to run than WindNinja's native conservation of mass solver, but the momentum solver provides more accurate results than the native solver. This extra runtime is due in part to different discretization schemes, the way the grids are set up, and the inclusion of more transport equations.


Because WindNinja is designed as an emergency response tool, it trades some accuracy for speed. This tradeoff is justifiable given the inherent uncertainty regargaring initial and boundary conditions available to drive the model. One way to reduce simulation time is to reduce the number of iterations performed when running the conservation of mass and momentum solver. We would like to only run as many iterations as needed to get to a state where the changes in the predicted wind field are on the order of the uncertainty in the boundary and intial conditions.


The goal of the iterations project was to investigate the impact of stopping the solver at a specified number of iterations instead of letting it run to complete convergence. Initially, the solver was set to stop at 200 iterations for "coarse" grid resolutions, 500 iterations for "medium" grid resolutions, and 1000 iterations for "fine" grid resolutions. This work investigated the suitability of those cutoffs. We attempted to identify the point at which further iteration induced flow changes primarily in recirculation or eddy zones where the true flow solution is transient and steady-state predictions should always be interpreted with caution.


Since the time of this project, we have performed other experiments to improve the momentum solver speed while conserving accuracy. This resulted in changes for some of WindNinja's internal settings, including the number of cells in the mesh for a given resolution. At the time of this study, the mesh for Coarse resolution consisted of 100,000 cells, the mesh for Medium resolution consisted of 500,000 cells, and the mesh for Fine resolution consisted of 1,000,000 cells. The number of cells for a given mesh has decreased since the time of this study. See our Mesh Count Project which is currently not posted, but will be in the next couple of weeks.


Experimental Methods


Three elevation files were selected and run with WindNinja's momentum solver for Coarse, Medium, and Fine grid resolution keeping all variables constant except for the number of iterations. Variables kept constant were:


Input Wind Height (m)10Output Wind Height (m)10
Input Wind Speed (mph)10Output asc Resolution (m)same as mesh
Input Wind Direction (deg)220Output kmz Resolution (m)200
Vegetationgrass

In addition to these settings, the following debugging variable was set to make WindNinja output residual information to the command line:


CPL_DEBUG=NINJAFOAM

WindNinja was then run on a Linux machine with 4 GB of RAM and 4 Intel Xeon e5-1603 processors (2.8 GHz) for each case using the command line interface. The command line text was redirected to a text file for evaluation of the residuals. All runs were kept sorted in specific file directories for ease of data analysis and organization.


While a computer ran in the background performing each of the simulations, an R script was written for analyzing the results. The script took the resulting asc files for each run and set up plots to show the velocities, angles, and the difference between the velocities and angles at each iteration with the converged solution. In addition, the R script used a homemade data parser to sift through the command line output text file to set up plots of all the residuals and runtimes.


Results


The following links go to the results of this study.


Big Butte SmallSalmon RiverAskervein Hill

Analysis of Results


It appears that the velocities and angles still change significantly all the way up to complete convergence. This means that to get results to be as accurate as WindNinja is capable of acheiving, a user would want to run WindNinja for as many iterations as possible. However, most of these changes occur on the lee sides of hills or in recirculation zones, places where WindNinja already sacrifices accuracy for speed. In fact, the WindNinja team found that results for regions outside of the recirculation zones and not on the lee sides of hills were better than expected for running the momentum solver to fewer iterations.


Because WindNinja results showed convergence earlier than expected for regions outside of recirculation zones and for areas not on the lee sides of hills, the WindNinja team may have the momentum solver in WindNinja cutoff at fewer iterations for some of the resolutions.