P01.10 · Lesson 10 of 18
Multiple Integrals
Mass, centre of mass, inertia tensor: three integrals over the same lump of metal, and every flight-dynamics equation you will ever write needs all three.
Build it Mass properties of a wing box
- Learning outcomes
- Derive, as iterated integrals, the mass, centre of mass and inertia tensor of a tapered swept wing box; reduce them to one-dimensional closed forms by integrating over the cross-section first; derive the Jacobian of the map from the unit cube to the box and the parallel-axis theorem for the full tensor.
- Implement and test a mass-properties module that evaluates the same integrals three ways (composite midpoint rule on the unit cube, SymPy term-by-term,
scipy.integrate.tplquad) and agree. - Measure, by computational experiment, the convergence order of the midpoint rule for the mass and for , and explain why the second is not the clean second order of the first.
- Decide what level of geometric detail the inertia tensor needs for a flight-dynamics model, from how the tensor's entries respond to taper and to the smeared-density assumption.
- Prerequisites
P01.03–P01.04(integration, numerical quadrature and its order),P01.07(vectors, cross product, moments),P01.08(functions of several variables),P00.03(np.meshgrid, broadcasting),P00.09(SymPy). Skill check: you can integrate a polynomial in one variable, and you know what means.- Engineering question
What are the mass, centre of mass and inertia tensor of a tapered, swept wing box, how accurately does a simple grid-based integration recover them, and which of the geometric details (taper, sweep, depth) actually move the numbers that a flight-dynamics model needs?
Full lesson specification (11 more items)
- Assumptions and limits
The wing box is a solid of uniform effective density : the skins, spars, ribs and fuel are smeared into one homogeneous block occupying the box between two chord fractions and of depth . Linear taper, straight leading-edge sweep, no twist, no dihedral; the chord is horizontal. The smeared density gets the mass and CG about right if is calibrated to the real wing's mass, but it misplaces the inertia whenever the real mass sits at the skins rather than filling the box; the error is bounded in §2.9. The model says nothing about the stiffness, the loads or the structure's layout; it is the first input to Phase 09, not an answer about Phase 06.
- Analytical work
Double integrals over rectangles and general regions as iterated integrals (Fubini); triple integrals for , and ; the change of variables from the unit cube to the box with Jacobian ; closed forms and ; the polar double integral for a ring; the parallel-axis theorem $I_O = I_{cg} + m(
- Computational deliverable
starter/main.py:chord,map_to_box,midpoint_3d,mass_properties_midpoint,mass_properties_analytic,mass_closed_form,spanwise_cg_closed_form,parallel_axis,inertia_about_cg,ring_inertia_polar,ring_inertia_closed_form,convergence_study,tplquad_mass_and_ixx. Tests prove: the map hits the box corners and its Jacobian is the analytic one; the midpoint rule integrates constants and the volume; mass by three methods agrees to ; the midpoint mass error falls by 4 per doubling; the CG lies inside the box and on the symmetry plane; the inertia tensor is symmetric, positive definite and obeys the triangle inequalities; midpoint andtplquadtensors match SymPy; the parallel-axis shift round-trips and the CG minimises every diagonal entry; ; the polar ring matches its closed form and the thin-ring limit .- Practical activity
computational experiment: convergence of the midpoint mass and with from 2 to 128, Richardson extrapolation, and a sensitivity sweep of the tensor against taper ratio and sweep.
- Equipment
None. A computer with the environment from
P00.01.- Safety
None beyond normal computer use.
- Evidence
Completed
main.py, passing tests,wing_box_mass.png, the hand calculation of , and with its comparison to the code, the convergence table with both observed orders and an explanation of the sign change, and the taper-sweep sensitivity table with one paragraph.- Assessment
assessments/phase-01/grading-rubric.md; competencies 1–4. Pass: the Jacobian and both closed forms derived; all public tests pass; the hand values of , and agree with the code to four figures; the convergence experiment reports the order of the mass and explains with a formula why behaves differently.- References
@openstax-calculus-volume-3§5.1 "Double Integrals over Rectangular Regions" (required-free); §5.2 "Double Integrals over General Regions" (required-free); §5.3 "Double Integrals in Polar Coordinates" (required-free); §5.4 "Triple Integrals" (required-free); §5.6 "Calculating Centers of Mass and Moments of Inertia" (required-free); §5.7 "Change of Variables in Multiple Integrals" (required-free); §5.5 "Triple Integrals in Cylindrical and Spherical Coordinates" (supplementary-free, needed for Problem 3).- Extensions
★ Replace the solid box by two skins of thickness at and two spar webs, with the same total mass, and compare the inertia tensors. ★ Add linear twist to the map and recompute; show the product of inertia is no longer zero.
- Time
unmeasured
1. The engineering problem
Every equation of motion for an aircraft or a spacecraft contains the mass, the position of the centre of mass and the inertia tensor. The mass sets the acceleration for a given force; the centre of mass is where that force appears to act and the point about which the vehicle rotates; the inertia tensor sets the angular acceleration for a given moment and, through its off-diagonal entries, couples roll into yaw. Phase 09 will write those equations; this lesson computes their inputs for one component, a wing box, from its geometry.
A wing box is a tapered beam between two spars: at each spanwise station it occupies the chord fractions to and the depth , and its leading edge is swept back by an angle . We smear its skins, spars, ribs and fuel into a solid of uniform effective density. The mass is then the volume integral of the density, the centre of mass is the mass-weighted mean position, and each inertia entry is a mass-weighted mean of a quadratic in the coordinates. All three are multiple integrals over a region whose boundaries depend on the coordinates, which is the one thing that makes them harder than the single integrals of P01.03.
Three independent routes will be built: closed-form integration (SymPy, exact because the integrands are polynomials), a composite midpoint rule on a grid after a change of variables that straightens the box into a unit cube, and the library's adaptive tplquad in the original coordinates. Success criteria, written before we start: the three routes agree on the mass to and on the inertia tensor to ; the midpoint mass error falls by a factor of 4 per doubling of the grid; the hand calculation of , and agrees with the code to four figures; and the parallel-axis theorem round-trips the tensor between the root and the centre of mass to machine precision.
2. Understand and derive
2.1 Double integrals and Fubini's theorem
The integral of over a rectangle is the limit of Riemann sums over a grid of cells, , and Fubini's theorem (@openstax-calculus-volume-3 §5.1) says it equals either iterated integral:
The inner integral is an ordinary one-variable integral with the outer variable held fixed, exactly the "hold everything else still" of P01.08. Over a general region (§5.2) bounded by curves, the inner limits depend on the outer variable: a region , gives . The order matters for the limits, not for the value, and the practical rule is: integrate first over the direction in which the region is described by two simple bounding functions.
2.2 Triple integrals for mass properties
For a solid of density (§5.4, §5.6):
The diagonal entries are the familiar moments of inertia, : the mass-weighted mean of the squared distance from the -axis. The off-diagonal products of inertia are zero whenever the body is symmetric about a coordinate plane, and non-zero for a swept wing about its root, which is why a swept aircraft's roll and yaw are coupled. The tensor is symmetric and positive definite, and its diagonal entries obey (and permutations), because . Those two facts are tests.
Geometry. Axes at the root leading edge: aft along the chord, spanwise, up. Chord ; leading edge . The box is
Our numbers: m, m, m, , , , , kg/m³ (a solid box of that density has the mass of a real light-aircraft wing of this size with fuel).
2.3 Integrate over the cross-section first: closed forms
The box's cross-section at station is a rectangle of width and height , so its area is . Integrating over and first turns every triple integral into a single integral in :
(The last step: is linear in , so , the same algebra as the volume of a frustum.) Hand values: m²; m³; volume m³; kg. Similarly
which is : inboard of mid-span because the root is wider. For an untapered box (4) gives ; for a triangle () it gives ✓. The chordwise CG needs : m. And splits into a spanwise part and a depth part:
The depth part is 0.025 % of the total: for the rolling inertia of a wing, the box's thickness is irrelevant and only the spanwise mass distribution matters. That is the first design conclusion of the lesson, and it came from a hand calculation.
2.4 Change of variables: straighten the box into a cube
A grid-based rule wants a rectangular domain. Define the map from the unit cube (§5.7):
The Jacobian determinant is the volume-scaling factor of the map:
The two entries (shear from sweep and taper) sit off the diagonal in a column with zeros elsewhere and do not enter the determinant: shearing a slab does not change its volume. Then , and is just the cross-section area times , as (3) already said. The map's four corners at and and its Jacobian against (7) are the first test.
2.5 The composite midpoint rule in three dimensions
Divide the cube into cells of side and evaluate the integrand at each cell centre:
The one-dimensional midpoint rule has error (P01.04); in three dimensions the leading error is the sum of that expression in each direction. For the mass the integrand is , which depends on only, and , so the error is a clean : the mass errors at are kg, dividing by exactly 4 each time, and always negative because is convex and the midpoint rule underestimates a convex integrand. For the integrand is , and §4 shows that the part's leading term happens to vanish for this taper ratio, so the two parts converge at different orders and the total error changes sign at . A rule that converges "at second order" does so for each term separately, and the observed order of a sum can be anything until the slowest term dominates.
2.6 Polar coordinates: a fuselage frame
A circular ring (a fuselage frame, , length along its axis) is a general region in but a rectangle in polar coordinates (§5.3). The area element is , the Jacobian of :
Forgetting the in the area element is the classic error and gives a mass proportional to instead of . An aluminium frame of radius 0.95–1.00 m and 50 mm length has kg and kg m², within 0.07 % of the thin-ring value at the mean radius 0.975 m (the ring is thin: 5 % of its radius). The midpoint rule on the rectangle reproduces both to with , because the integrands and are smooth and periodic in .
2.7 The parallel-axis theorem for the tensor
With in (2) and by definition of the CG, the cross terms vanish and
the identity. The added matrix is the inertia tensor of a point mass at ; it is positive semi-definite, so every diagonal entry of is smallest about the CG, which is a test. Our box about the root leading edge has ; about its CG at the shift removes and leaves kg m². A uniform rod of the same mass and length would have ; the tapered box is 11 % lower because its mass sits toward the root. The principal moments about the CG, the eigenvalues of , are kg m²: a slender body with one small axis (the span) and two nearly equal large ones.
2.8 Which route when
- Closed form (3)–(5): exact, instant, and the only route that shows which geometric parameter matters. Available only because the integrand is a polynomial over a region described by linear functions; a real wing with a curved planform or a cambered section loses it.
- Midpoint on the mapped cube: function evaluations, second-order, trivial to vectorise (
np.meshgrid), and extends to any integrand (a density that varies with position, Problem 6) and to any region you can map to a cube. ( points) gives the mass to relative in a few milliseconds. scipy.integrate.tplquad: adaptive Gauss–Kronrod in each of three nested directions; handles -dependent limits directly, needs no map, returns an error estimate, and is the oracle the tests compare against. It is slow (hundreds of thousands of integrand calls for relative) and the integrand must be a scalar function, not vectorised.
2.9 Where the model stops being valid
- Smeared density. A real wing box carries most of its structural mass in the skins at . For that is irrelevant (the depth part was 0.025 %); for about the CG, which is dominated by chordwise and depth terms, concentrating the mass at the skins instead of filling the box changes the contribution by a factor of up to 3 ( for two skins is per unit mass against for a solid). Extension 1 quantifies it.
- Fuel. Fuel is a large fraction of a wing's mass and moves; the tensor changes during the flight and Phase 09 needs it at several fuel states.
- The rest of the aircraft. One half-wing's tensor is a sum term; the aircraft's tensor is the sum over all components after each is shifted to the common CG by (10). The products of inertia of the two half-wings cancel by symmetry; the values add.
3. Build the computational model
Open starter/main.py. The geometry is a frozen WingBox dataclass; _check validates it.
Step 1: the map and its Jacobian
def map_to_box(xi, eta, zeta, box=DEFAULT_BOX):
y = eta * box.L
c = box.c_root + (box.c_tip - box.c_root) * eta
x = y * np.tan(box.sweep) + (box.f0 + (box.f1 - box.f0) * xi) * c # (6)
z = (zeta - 0.5) * box.tau * c
jac = (box.f1 - box.f0) * box.tau * box.L * c**2 # (7)
return x, y, z, jac
Step 2: the midpoint rule on the cube
def midpoint_3d(f, n, box=DEFAULT_BOX):
m = (np.arange(n) + 0.5) / n
xi, eta, zeta = np.meshgrid(m, m, m, indexing="ij")
x, y, z, jac = map_to_box(xi, eta, zeta, box)
return float(np.sum(f(x, y, z) * jac) / n**3) # (8)
mass_properties_midpoint calls it ten times (mass, three first moments, six tensor entries) with lambdas such as lambda x, y, z: y**2 + z**2.
Step 3: the exact route
def mass_properties_analytic(box=DEFAULT_BOX):
xi, eta, zeta = sp.symbols("xi eta zeta", real=True)
... # build x, y, z, jac as SymPy expressions of (xi, eta, zeta) exactly as in map_to_box
def integ(expr):
poly = sp.Poly(sp.expand(expr * jac), xi, eta, zeta)
return float(sum(coef / ((a + 1) * (b + 1) * (c + 1)) for (a, b, c), coef in poly.terms()))
... # m = rho * integ(1); cg = rho * [integ(x), integ(y), integ(z)] / m; I from (2)
Each monomial integrates over the cube to , so expanding the polynomial and summing its terms is the exact integral, with no call to sp.integrate and in a few milliseconds.
Step 4: closed forms, shifts, the ring, the oracle
mass_closed_form and spanwise_cg_closed_form are (3) and (4); parallel_axis and inertia_about_cg are (10) and its inverse; ring_inertia_polar is the midpoint rule on the rectangle with dA = dr * dtheta and the integrands R * dA and R**3 * dA; tplquad_mass_and_ixx hands tplquad the physical limits with innermost (lambda z, x, y), then with limits depending on , then from 0 to .
Verify
Run python -m pytest curriculum/phase-01/lesson-10-multiple-integrals from the repo root. The tests, in order of how much they would hurt if wrong:
- The map.
chordis linear and raises outside ; the eight cube corners land on the box corners; the Jacobian equals (7) and equals the cross-section area times . - The rule.
midpoint_3dof 1 gives the volume for every to and of a constant times the volume; raises. - Mass three ways. Closed form, SymPy and
tplquadagree to ; midpoint at to ; the error divides by – per doubling from to 64. - CG. Inside the box; ; equals (4); for an untapered box ; for zero sweep with the -weighted mean chord.
- Tensor. Symmetric, positive definite, triangle inequalities, by the symmetry, because throughout the box, for a slender span; midpoint at and
tplquadmatch SymPy to and relative. - Parallel axis. Shifting to the CG and back reproduces the tensor to ; every diagonal entry about the CG is below that about any of twenty random points.
- Scaling. Doubling doubles ; scaling all lengths by multiplies by and by .
- Ring. Polar midpoint equals (9) to at ; a thin ring tends to .
- Interface.
main()writes the figure.
Compare
main() prints:
mass: closed form 67.2000 kg, SymPy 67.2000 kg
centre of mass (m): [0.86064 1.96429 0. ]; closed-form y_cg = 1.96429 m (0.3929 L)
inertia tensor about the root leading edge (kg m^2):
[[ 384.0952 -127.6136 -0. ]
[-127.6136 53.825 -0. ]
[ -0. -0. 437.7297]]
inertia tensor about the centre of mass (kg m^2):
[[124.8095 -14.0088 -0. ]
[-14.0088 4.0496 -0. ]
[ -0. -0. 128.6686]]
principal moments about the CG: [ 2.4458 126.4133 128.6686]
midpoint n = 2: mass 66.600000 kg (err -6.00e-01), y_cg 2.094595, I_xx 385.38058 (rel err 3.35e-03)
...
midpoint n = 32: mass 67.197656 kg (err -2.34e-03), y_cg 1.964790, I_xx 384.09514 (rel err 2.36e-07)
observed orders for the mass: [2. 2. 2. 2.]
scipy tplquad: mass 67.200000 kg, I_xx 384.095232 kg m^2 (SymPy 384.095232)
fuselage frame ...: polar midpoint m = 41.3512 kg, I = 39.33534 kg m^2; closed form 41.3512 kg, 39.33534 kg m^2
SymPy and tplquad agree on to all nine printed figures, and both agree with the hand value 384.10 of (5). tplquad is the established tool: it is what you reach for on a region with curved limits and no polynomial structure, and it took a third of a second here against a few milliseconds for the term-by-term sum. The midpoint rule at is within on and on the mass; the inertia converges faster than the mass for a reason §4 asks you to find.
4. Experiment at home, or investigate real data
Mode: computational experiment.
Experiment A: two convergence curves. Tabulate the signed errors of the midpoint mass and of for against the SymPy values. Prediction, written before running: the mass error is negative and divides by 4 per doubling (order 2); the error is positive at small , crosses zero near , and is negative and second order at large . Then split into its and parts with two extra midpoint_3d calls and tabulate each part's error. Compute the midpoint error coefficient for the mapped integrand by hand and show it is zero for this taper ratio ; then repeat the experiment with m and show the sign change disappears. Finally apply Richardson extrapolation to the pair and report the gain.
Experiment B: what moves the tensor. Sweep the taper ratio from 0.3 to 1.0 at fixed mass (adjust so that kg) and the sweep angle from 0° to 30°, and tabulate , , and about the root. Prediction: taper moves by tens of per cent at fixed mass (it changes where the mass is along the span); sweep leaves and exactly unchanged, raises about the root by tens of per cent at 30°, and multiplies the product of inertia several times over (it is not zero even unswept, because the box lies at ). Decide, from the table, which two of the three parameters a flight-dynamics model must get right and which it can approximate.
Raw data format: the two error tables of Experiment A with the observed orders per row, and the parameter table of Experiment B, in your lesson notes.
5. Validate and improve
| quantity | hand (§2) | SymPy | midpoint | tplquad |
difference |
|---|---|---|---|---|---|
| (kg) | 67.20 | 67.2000 | 67.1977 | 67.2000 | (midpoint) |
| (m) | 1.9643 | 1.96429 | 1.96479 | ||
| (m) | 0.8606 | 0.86064 | |||
| (kg m²) | 384.10 | 384.0952 | 384.0951 | 384.0952 | |
| (kg m²) | 124.8 | 124.8095 | rod | 11 % (taper, expected) | |
| ring , | 41.35, 39.34 | polar : 41.3512, 39.33534 | closed 41.3512, 39.33534 |
Every residual has a cause. The midpoint mass is low by because is convex and the rule's error is kg at ; is high by because the first moment and the mass have errors of different size and the ratio inherits the difference. at is closer than the mass because its dominant part has no error term at this taper ratio (Experiment A). The 11 % between and the uniform rod is not an error but the taper: a uniform rod is the wrong comparison and the right one, a rod with linear mass density matching , gives 124.8 exactly.
What is still unverified when everything agrees: the smeared-density assumption and the geometry itself. Three integrators agreeing to nine figures on a solid box says nothing about whether a real wing of this planform has kg m² about its root; the extension with skins instead of a solid, and a mass breakdown of a real wing, would each move the number by more than every numerical error in the table combined. The honest statement is " kg m² for the solid-box model, exact to ; model error unknown but bounded by the skin-versus-solid comparison for the small entries and by the mass calibration for the large ones".
6. Defend your work
Submit: the completed starter/main.py with all tests passing; wing_box_mass.png; the hand calculation of , , and with the comparison table; the two experiment tables with one paragraph each; and a one-page note (sections 1, 2, 5, 6 and 7 of projects/_template/report-template.md) stating what the smeared-density model assumes and which tensor entries you would trust in a flight-dynamics model.
Adversarial self-checks
- What if the taper ratio goes to zero? A triangular planform: (3) gives and (4) gives . Check with
WingBox(c_tip=1e-9)(the code requires ); the midpoint rule still converges at second order because is still a polynomial. - What if the box is untapered and unswept? Then exactly (the CG shift of a body symmetric about its own centre), and with . Problem 1 uses this as a hand check.
- Which assumption fails first in the real world? Smeared density, always: a real box is skins and spars, hollow or fuel-filled, and differs between the structure and the fuel. The mass survives calibration; and about the CG do not.
- What measurement could falsify the model? A bifilar pendulum swing test of the wing gives about the CG directly to about 2 %; a CG measurement on two scales gives to a few millimetres. If the measured is outboard of (4), the mass is not distributed as and a spanwise density (Problem 6) is needed.
- Does the result survive a change in integrator? Midpoint, SymPy and
tplquadmust agree to on every tensor entry; if they do not, the usual cause is a Jacobian error (a missing or ), which shows up as a mass error first. - Which decision changes if the uncertainty doubled? If the effective density were known only to ±20 % instead of ±10 %, every entry scales with and the ratios and the CG are unchanged. The decision that changes is whether to weigh the wing before the swing test: at ±10 % the model's is as good as a rough swing test, at ±20 % the swing test wins and the model is only a check on its plausibility.
Check yourself
- State Fubini's theorem for a rectangle and say what changes for a general region.
- Write , and the full tensor as integrals; which entries are zero for a body symmetric about the -plane, and why?
- For a linearly tapered box, why does the mass depend on and not on ?
- The map (6) has off-diagonal entries from sweep and taper. Why do they not appear in the Jacobian?
- In polar coordinates, where does the factor in come from, and what mass would you get for a ring if you forgot it?
- State the parallel-axis theorem for the full tensor and show that the diagonal entries are smallest about the CG.
- The midpoint mass error divides by 4 per doubling; the error changes sign. Give the one-line reason.
- The depth term in (5) was 0.025 % of . Is the same true for about the CG? Compute the ratio from the printed tensor and the geometry.
Problem set
Attempt every problem before opening solutions/. Record what you tried. State units on every numerical answer and the reference point and axes of every inertia value you write.
Several problems use your personal seed s: the day of the month you were born (1–31).
1. (Warm-up: an untapered, unswept block)
A rectangular wing box has half-span m, constant chord m, walls at and , depth , no sweep, and effective density 150 kg/m³. Model it as WingBox(L=L, c_root=1.2, c_tip=1.2, f0=0.2, f1=0.6, tau=0.12, sweep=0.0, rho=150.0).
Find by hand: (a) the box's width , height and mass; (b) the centre of mass; (c) the inertia tensor about the CG from the rectangular-block formulas etc.; (d) the tensor about the root leading edge by the parallel-axis theorem, including the product . Check (a)–(d) with mass_properties_analytic, inertia_about_cg and parallel_axis. Answer form: numbers with units, four significant figures; the full tensor for (d).
2. (Derivation: the closed forms)
For the tapered box of the lesson with :
(a) Derive and hence the mass (3). Show it reduces to the untapered and triangular cases. (b) Derive , equation (4), and show it equals for and for . (c) Derive the Jacobian (7) of the map (6) by computing the full matrix of partials, and explain in one sentence why the sweep and taper terms drop out. (d) Starting from (2), derive the parallel-axis theorem (10) for the full tensor, and show that the added matrix has eigenvalues with eigenvector for the zero. (e) Show that for any mass distribution , and find the condition for equality.
Answer form: derivations.
3. (Unfamiliar scenario: a partly filled spherical tank)
A spherical oxidiser tank of radius m contains liquid oxygen ( kg/m³) to a depth above the bottom, under so the surface is flat. Use cylindrical coordinates about the vertical axis with measured from the bottom of the tank, so that the liquid occupies , .
(a) Set up the triple integrals for the mass, the height of the centre of mass and the moment of inertia about the vertical axis, with the from the cylindrical volume element. (b) Evaluate all three in closed form as functions of (integrate over and first). (c) Tabulate mass, and for m. Check the full-tank limit against and . (d) The tank sits 2 m from the vehicle's roll axis. By how much does of the vehicle change as the tank empties from to m? Which term, the tank's own or the parallel-axis term, dominates, and by what factor? (e) Explain why the flat-surface assumption fails during a burn and what replaces it (one paragraph).
Answer form: integrals in (a), closed forms in (b), a table for (c), numbers for (d).
4. (Uses your code: convergence of the inertia and Richardson extrapolation)
With the lesson's DEFAULT_BOX:
(a) Tabulate the signed error of the midpoint against SymPy for and the observed order between successive rows. Explain the sign change with the error coefficient of §2.5 (compute for and for the part).
(b) Apply Richardson extrapolation to the and pairs. Which pair benefits, and why does the other not?
(c) Change the tip chord to 0.6 m and repeat (a). Is the order now a clean 2?
(d) Time mass_properties_midpoint(n) for and tplquad_mass_and_ixx. Plot error against time for the midpoint rule and mark tplquad. At what accuracy does the adaptive routine become the cheaper choice?
Answer form: two tables, one plot, a paragraph for (a) and (d).
5. (Judgment: how good does the tensor need to be?)
Phase 09 will need the inertia tensor of a 1200 kg aircraft whose two half-wings are the box of this lesson (mirrored), plus a fuselage, tail and engine that you may take as a uniform rod of 900 kg and length 7 m along through the CG.
(a) Assemble the aircraft's , and about its CG (take the aircraft CG at the wing root, , , ). Which component dominates each entry? (b) The smeared-density wing model's could be wrong by 15 % and its by a factor of 2. Propagate each into the aircraft's tensor. Which aircraft entry is sensitive to the wing model and which is not? (c) Roll response depends on , pitch on , yaw on . For which axis is it worth doing a better wing model before Phase 09, and for which would a swing test of the whole aircraft be the only useful improvement? (d) Write five sentences for the flight-dynamics group: the tensor you are handing over, its reference point, the entry you trust least and why, and what would fix it.
Answer form: numbers with units for (a)–(b), prose for (c)–(d).
6. (Unfamiliar scenario: a density that varies along the span)
A real wing box is heavier at the root (thicker skins, fuel) than at the tip. Replace the uniform density by kg/m³ for the lesson's box.
(a) Write the mass, and as single integrals in using the cross-section area, and evaluate them in closed form (SymPy is fine; the integrands are polynomials).
(b) Evaluate the same three quantities with midpoint_3d and an integrand that includes , for , and confirm second-order convergence to (a).
(c) Compare with the uniform box: mass, and about the root. Why does fall by a larger fraction than the mass?
(d) The lesson's closed forms (3)–(4) and mass_closed_form cannot be used here. What minimal change to mass_properties_midpoint would let it accept any rho(x, y, z)? Describe (or implement) it, and say which tests would still pass unchanged.
Answer form: closed forms and numbers for (a)–(c), a design note for (d).
Get the code
Clone the repository once, write your code in starter/main.py, then run the tests from the repository root.
pytest curriculum/phase-01/lesson-10-multiple-integrals
To run the same tests against the reference solution instead:
AEFS_IMPL=solution pytest curriculum/phase-01/lesson-10-multiple-integrals
Found a mistake? Every page is built from the Markdown in the repository; edit it on GitHub.