Adding torsion to a simple 2D elasticity beam problem

Hi,

So, I’ve managed to script a simple 2D cantilever beam under several point loads and now wish to add torque (twisting moments) at several points also. From this I’d like to output the maximum rotation at the end of the beam.

How should I go about doing this? Any guidance/help will be much appreciated.

Cheers.