I want to hang a swing with a single rope to a steel pipe 2.5 meters long. the swing should support about 70kg. How much should be the diameter and thickness of the pipe?
First, assumptions. Assume pipe is simply supported at each end. Rope will be hung from the center of the pipe. You'll use something to spread out the load a bit to avoid localized failure right at the rope. Steel is a conventional grade, such as A36.
I'm going to work in English units and convert back to metric at the end. I'll work through the steps here so that if someone wants to check/comment they can. A36 steel has yield strength of 36 ksi (250 MPa).
The pipe (2.5 m)(100 cm/m)(1/2.54 in/cm) = 98.4 in
The load is (70 kg)(2.2) = 154 pounds = 0.154 kips
Creating a moment of PL/4 = (0.154 kips)(98.4 in)/4 = 3790 kip-inches
The required section modulus for a hollow circle
S = M / stress = 3790 / 36 = 106 in^3
After a few iterations, it looks like you need a pretty big pipe for this to hold a 70 kg weight. You need a pipe that is at least 450mm in diameter, with a thickness of 14mm - that's a standard sized pipe of 450mm, Schedule 40, which is big and heavy for something just being used to hold a swing. If you go with stronger steel, suck as 50 ksi (350 MPa), you still need a 400mm Schedule 40 pipe.
You should probably consider something more structurally sound, or find a way to greatly reduce the length of the pipe (which reduces the amount of bending moment it has to resist).