Welcome to EE!
First, you need to determine the material characteristics (Young's modulus, Poissons ration and Modulus of rigidity).
Next, determine the appropriate applied load with a FOS (Factor of Safety) - as you don't want to load the bar at yield or even close to yield.
Then, see or use one the following calculators or videos..
Shaft Stress and Deflection under Torque
Torsion Formula - Mechanics of Materials
Shaft Shear Stress due to Torsion