
Can I use a PVC pipe as the rib of the wings of my homemade airplane?A rib is already load tested, and it failed at 40kg of weight and it is supposed to hold just 10kg in flight.

Can I use a PVC pipe as the rib of the wings of my homemade airplane?A rib is already load tested, and it failed at 40kg of weight and it is supposed to hold just 10kg in flight.
Yes, of course you can.
However, it's probably not a very good idea.
PVC pipes are pretty strong and light; circular-section PVC pipes have an excellent strength-to-weight ratio.
Being strong and light isn't enough though. Construction materials need to have the appropriate properties (like being strong and light) in the right conditions.
In the case of an aeroplane wing, that includes the conditions that aeroplane wings are subjected to: rapidly-changing stresses, vibration, sustained load, torsion and so on. You need to know: will PVC remain strong under such conditions?
Then presumably, you will need to find various ways of joining your PVC sections to each other and to other materials. How will these joins be made? How will they behave under the conditions an aeroplane wing is subjected to? How will the joining methods affect the properties of the PVC pipes?
Aircraft designers tend towards the conservative; even the most radical of aircraft designers would not be considered daring compared to the radical leaps taken by designers in other fields. That's because the chief reward for brave leaps in aviation is death.
All the same, over its history, aviation has tried all kinds of things (usually, quite carefully). If aviation has successfully used PVC pipes in aircraft construction, there'll be a record of it and a tradition of it. The successful pioneers of PVC-pipe-based aviation will not, however, have embarked on their adventures on the basis of an encouraging Stack Exchange reply.
If you don't already know the answers to the questions I mentioned above, and are not already in possession of reliable information about techniques, tools, practices and theory for working safely with PVC load-bearing structures, I'd prefer to use PVC pipes for plumbing only.
I would agree with @TomMcW that joining EAA would probably be a good idea. You could also join the Homebuilt Airplanes Forum.
I assume you already know the basics of choosing materials. They are a balance of strength, weight, and cost. I assume your choice of PVC is low cost. So, the big question would be whether it has the rest of the required properties.
I assume that you figured wing loading like, say, 5 lbs per square ft or 0.2 kg per square meter. Each rib has to handle the load up to halfway between the other ribs. An Aeronca C-2 has ribs about 12 inches (30.5 centimeters) apart which is closely spaced and it is a fairly light airplane at 700 lbs (318 kg) gross weight. So, we could roughly divide the gross weight by wingspan. However, the actual load on the wing isn't even. It is greater inboard near the fuselage and then falls as we go outward to the wingtip. So, multiply this by 1.4 for the greatest load at the root. Then we multiply this by the design gee rating. Let's use the Federal Aviation Administration (FAA) utility rating of 4.4 gees. Then we have to multiply by the safety factor which is normally 1.5. So, let's do the math for the C-2. We'll load it to less than gross with an average 160 lb (72.5 kg) pilot plus 9 gallons (34 liters) of fuel.
620 lbs (282 kg) gross weight
36 foot (11 meter) wingspan
12 inch (30.5 centimeter) rib spacing
620 lbs (282 kg) / 36 = 17.2 lbs (7.83 kg) per rib
17.2 x 1.4 = 24.1 lbs (11 kg) on the inboard ribs
24.1 x 4.4 gees = 106.1 lbs (48.3 kg) under highest maneuvering load
106.1 x 1.5 safety factor = 159 lbs (72 kg) per rib breaking strength
At this point I'm wondering how you got a maximum load as low as 10 kilograms unless you are talking about a large, remote control airplane.
In case you are talking about something that is intended to carry a human, I'll continue. It might be tempting to use the lower, 3.8 gee normal rating instead of the 4.4 utility rating. However, aircraft with lower wing loading are more susceptible to wind gusts so I don't think this would be a good idea.
To test the rib lift load, you space the weight with the center at the quarter chord position rather than evenly spaced across the chord. We also need to account for the pitching moment, but this is a little trickier. We know that:
dynamic pressure x wing area x coefficient of lift = lift
and
dynamic pressure x wing area x coefficient of pitch x chord = pitching moment
therefore
lift / lift_coef x pitch_coef x chord = pitching moment
lift = 159 lbs (72 kg)
For a Clark Y airfoil at 5 degrees:
lift_coef = 1
pitch_coef = 0.08
let's say the chord is 4.3 ft (1.3 meters)
The conversion is simple in pounds but metric requires multiplying by the acceleration of gravity, 9.834 meters /sec^2 since Newtons are not Earth relative whereas pounds are.
159 lbs (72.12 kg x 9.834) / 1 x 0.08 x 4.3 ft (1.31 meters) = 55 lb ft (74.57 newton meters)
55 lb ft / 159 lbs = 0.35 ft
(74.57 newton meters / 9.834 meters / sec^2) / 72.12 kg = 0.105 meters
So, we see that to match the torque of the pitching moment, we'll have to move the center of the test weight rearward 0.35 ft (4.2 inches) or 0.105 meters (10.5 cm).
If your rib is strong enough at this point then you still need to ask if sunlight would breakdown the plastic and make it brittle, if it might be too brittle in cold weather, if you would be able to inspect it.
I have seen PVC used in place of bamboo to make a cheap hang-glider. However, these were not expected to fly very high and since they used removable sails, inspection was not an issue.
Analyze this problem in terms of structure dynamics. A structural member of circular cross section is isotropic with respect to stiffness; that is to say it resists bending equally from all directions. This is not the best choice for an airframe. Because the lifting members of an airframe need to resist force primarily along the vertical axis, the underlying structure of those members should be anisoptropic. An example of an anisotropic cross section is an 'I-beam'. That kind of section yields most bending resistance per pound of material.