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

Calculation of pole_moment_x and pole_moment_y is using wrong angle to split into components #1316

Closed AllisonBrand closed 1 year ago

AllisonBrand commented 1 year ago

Problem description

The moment on the pole due to wind on the pole itself and its weight, tilt is split into x and y components - sine and cosine of the wind direction and tilt direction. The code uses the degree of pole tilt where it should be using the direction the pole is tiliting in.

Steps to reproduce

Go to this link: https://github.com/arras-energy/gridlabd/blob/137e7cee81fa56d3da33e7b05bda37fe30f24bbf/module/powerflow/pole.cpp#L489C92-L489C102

    double pole_moment_x = pole_moment_wind*cos(wind_direction*PI/180)+pole_moment*cos(tilt_angle/180*PI);
    double pole_moment_y = pole_moment_wind*sin(wind_direction*PI/180)+pole_moment*sin(tilt_angle/180*PI);

Expected behavior

tilt_angle (the degree of tilt off the pole center line) should be tilt_direction (the direction the pole is leaning in).

System information

Release 4.3.1 (chiba-1) (https://github.com/arras-energy/gridlabd/pull/1145[)](https://github.com/arras-energy/gridlabd/commit/0e9b8ee3513503c914e8e225baf18a84c17bbb42)