human
I am working on the file "Devel/V05/Frame2D_Output.ipynb".
The first task is:
Reaction Forces
Can you write Python program for it?

Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

@extend
class Frame2D:
    
    COLUMNS_reaction_forces = ['NODEID','FX','FY','MZ']
    
    def list_reaction_forces(self,rs):
        if not hasattr(rs,'reaction_forces'):
            return []
        R = rs.reaction_forces
        ans = []
        for node in self.nodes.values():
            if node.constraints:
                l = [node.id,None,None,None]
                for dirn in node.constraints:
                    i = node.DIRECTIONS[dirn]
                    j = node.dofnums[i]
                    val = R[j-self.nfree,0]
                    l[i+1] = val
                ans.append(l)
        return ans

##test:
f.list_reaction_forces(rs)

##test:
f.write_table('reaction_forces',ds_name='test-1',prefix=rs.loadcase,record=False,precision=15,args=(rs,))
%cat test-1.d/all/reaction_forces.csv