arras-energy / gridlabd-old

HiPAS GridLAB-D is the California Energy Commission (CEC) version of GridLAB-D.
https://docs.gridlabd.us
BSD 3-Clause "New" or "Revised" License
33 stars 31 forks source link

Refactor pole.cpp #1324

Open AllisonBrand opened 1 year ago

AllisonBrand commented 1 year ago

Removed inaccurate cos(pole_tilt) correction from calculation of moment due to wind on the pole face. This makes it consistent with the HiPAS Pole Failure Modeling Upgrade Google Doc (reasoning is explained there).

This moment calculation and supporting calculations were repeated in a few places throughout the code, so I made functions to do each in on one place and replaced the repeat code with function calls.

I added some comments explaining the calculations and changed a variable name for readability: "pole_moment_nowind" became "pole_moment_per_wind" The former name made it sound like the moment on the pole in the absence of wind, when it really representes the moment due to wind per unit wind pressure.