I understand the functions of every part of a tube and fabric (two spar) ultralight wings and the loads they carry but what keeps puzzling me is the compression strut of a two spar wing as seen above. My question is where is this compression on a compression strut between the main and rear spar coming from? Is it from the drag and anti wires, the spars itself, where and how do you calculate this conpression force?
During flight, a forward-pointing force must be applied to the leading edge of a wing in order to push it through the air against the drag force that the air is applying to the wing, and to prevent the force of the onrushing air from crumpling the leading edge backwards. The purpose of the compression strut is to convey that force from the main spar to the front edge of the wing, which appears as compressive stress in that strut.
You want a nice, taut fabric cover on this wing, don't you?
The main function of the compression struts is to keep both spar tubes from being pulled closer by the fabric cover. Of course, Niels is right, aerodynamic forces come on top of this and will also pull on the tubes in the wing's plane.
In order to calculate those forces, integrate the tension in the fabric over wingspan when loaded by maximum lift forces. Below I have sketched those lift forces – they want to pull the fabric up, increasing tension within it and so the compression forces on the struts.
I hope I got the basic structure about right. Please correct me where needed.
They are called compression tubes because they are under compressive load at all times in the wire braced ladder truss formed by the spars, compression tubes and cross bracing, whereas other members can be under tension, or compression, or unloaded, depending on whether the drag loads are from the front or the back (anti-drag) (back mostly in the theoretical sense, although you could have reverse loading in the right flight conditions - and the drag wires need the anti-drag wires there to absorb their pre-tension to hold everything square when it's sitting on the ground).
The compression tubes are under compression by the tension of the cross bracing wires when at rest. In flight, they are also in compression, transferring the drag loads from the first bay's drag wire to the next bay's drag wire.
I've tried to colour code the loads in the diagram. The green wires are called drag wires, the red wires are called anti-drag wires. In forward flight, the green wires will be in tension and the red wires unloaded, and the compression tubes in compression. In "backward flight" (say in a tail slide), the red anti-drag wires will be in tension and the green wires unloaded. At rest, the wires are equally loaded with a pre-tension to keep everything square. But in the drag, anti-drag, or at-rest case, the compression tube sees only compression load.
Theoretically, you could attach the compression tube to the front and rear spar with just a locating pin sticking out the ends that fit in holes in the spars, because the tube connections to the spars never get "pulled on"; they are always being pushed. On some fabric airplanes the connection is not much more than that; maybe just a threaded pin that goes through the spar with a nut on the other side to hold it in place before the wires are tensioned.