Actually I was trying to formulate(on matrix level) the frame/beam(6 DoF per node) elements under uniform or gradient temperature loading. I know that uniform temperature will cause only axial elongation in frame element which will result in as normal force F(temperature)= E*A*alpha*DeltaT, in order to add those forces into local and global stiffness matrices of frame element, temperature loading matrix should be composed in 12x1 matrix manner
K_temp = TRNANSPOSE[-F(temp) 0 0 0 0 0 F(temp) 0 0 0 ] (12X1)
and should be added appropriately to the RHS of linear equation system(LES) and the LES is solved with any solver Gauss elimination, LU decomposition etc.
Although the process is so simple for uniform temperature loading I couldn't succeed to obtain the correct results for temp loading, little more info on how actually it goes for the gradient temperature loading (I think it creates the beding moment which needs to be added to the K_temp matrix.
Regards,