Computing the P-Delta forces for frame elements is relatively simple, as the additional force is simply a function of the axial force multiplied by the relative displacement from the starting axis.
Fenix generalizes this approach in the following manner.
First, for any given analytical frame element, the global displacements at node 1 and node 2 (I & J) are retrieved from the preceding analysis. The global displaced shape vector is computed as:
$\overrightarrow{d_{g}}= \begin{bmatrix}(N2_x+\delta_{2,x})-(N1_x+\delta_{1,x}) \\ (N2_y+\delta_{2,y})-(N1_y+\delta_{1,y}) \\ (N2_z+\delta_{2,z})-(N1_z+\delta_{1,z}) \end{bmatrix}$
where
$N1_x$, $N1_y$, and $N1_z$, are the nodal coordinates of node 1
$N2_x$, $N2_y$, and $N2_z$, are the nodal coordinates of node 2
$\delta_{1,x}$, $\delta_{1,y}$, and $\delta_{1,z}$, are the global nodal displacements at node 1
$\delta_{2,x}$, $\delta_{2,y}$, and $\delta_{2,z}$, are the global nodal displacements at node 2
This global displaced shape vector must be converted into the local coordinate system using the element’s rotation matrix.
$\overrightarrow{d_l}=\overline{R}^T \overrightarrow{d_g}$
where:
$\overline{R}$ is the local-to-global point rotation matrix (3x3) for the element
The average axial force in the element is computed by:
$P_{avg}=\dfrac{(P_1+P_2)}{2}$
The axial forces $P_1$ and $P_2$ are the local axial forces in the element, computed by the post-processor for the preceding analysis.