Dear Felix,
Good point. Instead of subtracting p%Gravity*OtherState%CoordSys%z2 directly from LinAccES, you could perform the subtraction directly in the equation for the output you want changed, e.g., change line 1905 of ElastoDyn.f90 to be:
OtherState%AllOuts( TipALxb(K) ) = DOT_PRODUCT( LinAccES(K,p%TipNode,:) - p%Gravity*OtherState%CoordSys%z2, OtherState%CoordSys%n1(K,p%BldNodes,:) )
The substraction is correct. p%Gravity is stored as a positive number in ElastoDyn. The equation you copied
FrcMGagB = OtherState%RtHS%FSTipDrag(K,:) - p%TipMass(K)*( p%Gravity*OtherState%CoordSys%z2 + LinAccES(K,p%TipNode,:) )
says that the tip mass will introduce a force if the acceleration is not equal to the acceleration in free fall, whereby
LinAccES(K,p%TipNode,:) = -p%Gravity*OtherState%CoordSys%z2
This is simply a restatement of the equation F = m*a, where F = -mg is the weight of a mass.
You’ve noticed that the inertial frame coordinate system internal within ElastoDyn does not follow IEC convention. That is, z1 in ElastoDyn = xi from the IEC coordinate system, z2 in ElastoDyn = zi from the IEC coordinate system, and z3 in ElastoDyn = -yi from the IEC coordinate system (the y and z axes are swapped between the IEC convention and the internal ElastoDyn coordinate system). The internal coordinate system was established back when FAST was first written in the 1990s, before even I worked on the software. While I agree that it would be much easier if the internal coordinate system followed IEC convention, it would be very difficult to change at this point, so, we have not spent the effort to make the change. You may have noticed that in FAST v8 we do ensure that all data passed between modules follows IEC convention. This requires swapping a few signs when data is exchanged between ElastoDyn and other FAST modules.
I don’t have the time at the moment to fully explain how to introduce the rotational velocities of the blade elements into ElastoDyn. I will say that some of the equations are already implemented – search e.g., for “AngVelEM” in the source code.
Best regards,