There are various ways the ribs and spars can be oriented in the swept wing. Do the placement of ribs and spars affect the aerodynamics? And, what are the structural advantages of both orientations shown in the figure below? Why the ribs in the B737 wing are placed in both ways both parallel to the airflow and perpendicular to the spar?
The aerodynamics impose structural loads on the wing, and the structural loads impact aerodynamics!
It is really a complex interaction of various factors. In theory you design a wing to fulfil an aerodynamic purpose for the aircraft, such as subsonic flight, transonic flight, altitudes, etc, etc...
So you go and design your wing so it works aerodynamically.That's when loads arise such lift, drag, and bending moment whose distribution can be chosen and affected by
- airfoil placement, sizing, and type.
- control surface placement, sizing, and type
- lift augmentation devices (such as flaps, spoilers, slats)
On aircraft like the DC-10, you have swept back wings for transonic flight. Each airfoil section causes lift and bending and torsion at differing points. Usually the center of lift of each airfoil is located along a line basically parallel to the leading edge, so the bending moments act around that line. So you could locate the spars parallel to that to handle the bending moment, and ribs perpendicular to that to take the torsion. On the 737 apparently they just did that for the tip because the root is likely subject to loads in a different angles. That's it, you're just gonna optimize the structure to the load direction.
The thing is that these aerodynamic loads are real and affect materials and cause deflections! So you have to build the wing structurally so that it will keep its shape while subject to those loads, otherwise you deviate from your plan!
Then you come and install accessories that also affect the wing loads. This includes:
- engines and powerplants that produce thrust cause bending due to weight and cause vibrations
- potentially propellers that alter the flow around the wing and cause perturbations and vibrations,
- antennas that create drag and depending on the airflow can cause vibrations
- landing gear that create drag and add weight, and cause bending, also vibrations
- other special accessories such as pods, fairings, etc...
Oh and don't forget the usually large weight of the wing and all these things! Usually you are trying to minimize these the weight as much as possible, while still allowing decent safety margins.
These loads cause deformations, that need to be accounted for in your structural and aerodynamic calculations! So then you need to account for that as well... And you have to account for these effects in different phases of flights, for different orientations, different environments, and failure scenarios.
As you can see designing a wing is very complex!
Yes the placement of the ribs and spars affects the aerodynamics. How? This is an aeroelastic effect, what we call a fluid structure interaction (FSI). We ALL agree that there is a pressure difference above and below a wing resulting in a load upwards, but then there are perturbations due to the air, winds, turbulence, windshear etc. This means that the air pressure is constantly changing, and hence so is the loading. Changes to the wing structure can help tune the stiffness and rigidity of the wing to ensure it does not start to resonate with any aerodynamically induced flutter.
Also note that there are other loads, the drag force backwards, as well as induced loads for the use of control surfaces. This makes the change in orientation of the B737 design very sensible to account for the increased twist at the wing tip. I appear to be repeating this too much, I promise I am not sponsored by them, but check the FAA manual for more info [].
 FAA. (2018). Aviation Maintenance Technician Handbook—Airframe Volume 1 (Chapter 1). Federal Aviation Admenstration.