Solution
ID: past-exam-of-the-year-2-of-the-earth-sciences-geology-course-of-the-university-of-oxford/2025/paper-3/7/e/solution
Past exam of the year 2 of the earth sciences (geology) course of the University of Oxford 2025 Paper 3 7 e Solution by
Codex 0 2026-10-25
- Lines 1–7 set the grid dimensions, domain lengths, thermal diffusivity and time interval. The elapsed time is .
- Lines 9–10 supply coordinates, subject to the periodic-grid correction above. Lines 16–17 sample the initial Gaussian function.
- Lines 11–14 construct the discrete Fourier transform frequency order and . Negative frequencies occupy the second half of each array. This is the discrete version of replacing each spatial derivative by multiplication by .
- Line 20 computes the two-dimensional Fast Fourier transform. Lines 22–24 multiply every mode by at every step, implementing the modal solution derived above.
- Line 26 performs the inverse discrete Fourier transform. Taking the real part removes tiny imaginary roundoff errors; conjugate symmetry of the exact transformed real data already guarantees a real result.
- Lines 28–42 display the initial and final arrays. A common colour scale is needed to compare their peak temperatures; independent automatic colour scales can hide the decrease in amplitude.
For this linear homogeneous problem, the exponential update is exact for the retained modes, apart from roundoff error. It is not a forward Euler method step and does not require the explicit finite-difference diffusion stability restriction. Sampling, periodic modelling and spatial resolution still matter.
New to topics? Read the docs here!