Physics: Foundations of Physical Science

MGU Physics · Preparatory Volume

Chapter 57: Computational and Data-Based Physics

57.1 Why Physics Uses Computation

The equations of physics are often simple to write but impossible to solve by hand for

realistic systems. Newton's law F = ma is three lines of algebra for one object. For ten

objects interacting with each other gravitationally, it becomes ten coupled differential equations with thirty unknowns that have no closed-form solution — the famous n-

body problem. The atmosphere of Earth contains roughly 10²⁵ molecules, each obeying

the same gas laws studied in Chapter 32, but predicting tomorrow's weather from first principles requires tracking their collective behaviour through billions of coupled interactions. Computation enters wherever the gap between the known laws and the tractable solution is too wide to cross by algebra alone. Three categories of problem drive this need. The first is complexity: systems with too many interacting parts (weather, protein folding, galaxy formation, financial markets). The second is geometry: domains with irregular shapes, boundaries, or internal structure that cannot be reduced to a symmetric idealisation (blood flow through the branching arteries of a specific patient's heart; acoustic vibrations of a concert hall). The third is extreme scale: processes too fast, too small, too large, or too energetic to study by direct observation, from femtosecond laser pulses to the evolution of the universe over billions of years. Computation also plays a role in the other direction: analysing data that experiments produce. Modern detectors generate millions of measurements per second. A particle physics experiment at CERN records petabytes of collision data annually. A genomics laboratory sequences billions of base pairs. A gravitational wave observatory monitors laser interference fringes at kilohertz frequencies. In every case, the physical signal of interest is buried in noise, and extracting it requires systematic, automated data analysis rather than manual inspection.

Computation does not replace physical understanding — it amplifies it. A simulation is only as meaningful as the physical model it implements. Garbage in, garbage out: a simulation based on wrong assumptions produces wrong predictions, often presented with misleading precision. Understanding what a model assumes is as important as knowing how to run it. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.2 Models, Inputs, Outputs, and Assumptions

Every computational physics problem begins with a model: a mathematical description of the physical system, specifying which laws apply, which variables are tracked, and which interactions are included. The model is always a simplification of reality — the question is whether the simplification is appropriate for the question being asked. A model has four components. Inputs are the quantities that describe the initial or boundary conditions of the system: positions and velocities of objects, temperature and pressure at the boundaries, material properties. Equations are the physical laws (Newton's laws, Maxwell's equations, thermodynamic relations) written in a form the computer can solve numerically. Outputs are the computed quantities that answer the question: final positions, temperatures, pressures, energies, images. Assumptions are the simplifications made to make the model tractable: treating air as an ideal gas, ignoring radiation losses, assuming surfaces are perfectly smooth, treating Earth as a perfect sphere. Component What it represents

Inputs Initial and boundary conditions Current temperature, pressure, humidity, and wind at every measurement station worldwide Equations Physical laws to be solved Navier-Stokes fluid equations, thermodynamic gas laws, radiation transfer equations Outputs Computed predictions Predicted temperature, rainfall, and wind speed at future times and locations Assumptions Simplifications made Terrain approximated by grid; clouds treated statistically; ocean surface temperature held fixed

Table 57.1

The validity of a model is tested by validation and verification. Verification checks that the computer code correctly implements the intended equations (are there bugs?). Validation checks that the model equations correctly represent the real physical system (does the simulation match independent experimental data it was not trained on?). Both steps are essential. A correctly implemented wrong model is useless; a physically correct model with a programming error is equally useless.

A student simulates a projectile ignoring air resistance. For a ping-pong ball launched at 15 m/s, the model overpredicts range by more than 50%. For a bowling ball at the same speed, the error is under 1%. The same model assumption (no drag) is valid for one case and invalid for the other, depending on the mass-to-surface-area ratio. Knowing when an assumption holds is as important as knowing the physics. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.3 Data Collection and Sensors

Physics computations are fed by measurements. Modern experiments use sensors — devices that convert a physical quantity into an electrical signal that can be recorded, stored, and processed digitally. The diversity of sensor types reflects the diversity of physical quantities physicists measure. Physical quantity Sensor type Principle Applications Temperature Thermocouple, thermistor, infrared detector Seebeck effect; resistance change; thermal radiation Climate monitoring, medical diagnostics, industrial control Pressure Piezoelectric transducer, capacitive sensor Mechanical deformation of crystal or diaphragm Weather balloons, aircraft altimeters, biomedical Position / distance Ultrasonic ranger, LIDAR, GPS Time-of-flight of sound or light pulse Robotics, self- driving vehicles, surveying Acceleration MEMS accelerometer Capacitance change of micro-machined spring- mass Smartphones, airbags, earthquake seismometers Light intensity Photodiode, CCD, photomultiplier Photoelectric effect; charge accumulation Telescopes, cameras, fibre -optic sensors Magnetic field Hall effect sensor, fluxgate magnetometer Hall voltage; core saturation Compasses, MRI machines, geophysical surveys Sound Microphone (condenser, piezoelectric) Diaphragm displacement → capacitance/voltage Acoustics, sonar, ultrasound

Table 57.2

A sensor produces an analogue electrical signal (a continuously varying voltage or current) proportional to the physical quantity. An analogue-to-digital converter (ADC) samples this signal at regular intervals and converts each sample to a binary number. The sampling rate (samples per second) determines the highest frequency the system Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics can faithfully record (Nyquist theorem: sampling rate must be at least twice the signal frequency). The bit depth (number of bits per sample) determines the precision of each measurement: 8-bit resolution gives 256 discrete levels; 16-bit gives 65 536 levels. Sensor calibration — establishing the relationship between the sensor output and the true physical value — is essential before any measurement is meaningful. A thermistor may produce 2.3 V when immersed in 25°C water, but this number means nothing without a calibration curve that maps volts to degrees. Calibration is performed by exposing the sensor to known reference values (e.g., ice water at 0°C, boiling water at 100°C) and recording the corresponding outputs.

57.4 Tables, Graphs, and Digital Measurements

Raw data from an experiment is a table of numbers: values of the independent variable (usually time, position, or temperature) and the corresponding values of one or more dependent variables. The table is the primary record of the experiment. Before any analysis, data should be inspected for outliers (values far from the expected range that may indicate sensor failure, transcription errors, or genuine anomalies), missing values, and units. Graphs are the most powerful tool for initial data analysis. Plotting data before fitting any model allows the experimenter to see the overall shape of the relationship, identify whether it is linear or curved, spot outliers, and check whether scatter is uniform or systematic. A graph that looks like a straight line suggests a linear relationship; a curve suggests power-law or exponential behaviour, which can be identified by plotting on logarithmic axes. Linearisation is the process of transforming variables so that a non-linear relationship

becomes linear, enabling a straight-line fit. For example, if theory predicts y = axⁿ,

taking logarithms gives log y = log a + n log x, which is linear in log x and log y (a log

-log plot). If theory predicts y = ae^(bx), taking the natural logarithm gives ln y = ln a

+ bx, which is linear in x and ln y (a semi-log plot). Relationship Raw plot shape Linearisation Linearised axes

y = mx + c

Straight line None needed y vs x

y = axⁿ (power law)

Curve

log y = log a + n log

x log y vs log x y = ae^(bx) (exponential) Curve

ln y = ln a + bx

ln y vs x

y = a / x (inverse)

Hyperbola

y = a(1/x)

y vs 1/x

Table 57.3

Digital measurement tools — data loggers, oscilloscopes, spectrum analysers, and computer-interfaced sensors — can record thousands of data points per second with timestamps, making it possible to study processes that are far too fast for manual recording. A computer-interfaced motion sensor can track the position of a pendulum twenty times per second, producing a dataset that clearly reveals the sinusoidal oscillation and allows precise measurement of the period. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.5 Numerical Models

A numerical model replaces an exact mathematical solution with a sequence of approximate calculations performed step by step. The core idea is discretisation: instead of solving a differential equation for a continuous function, we approximate it by computing the function at a finite set of discrete points, stepping forward in small increments. The simplest numerical method for solving equations of motion is Euler's method. Given the state of a system at time t (position x, velocity v), we approximate the state

at time t + Δt using:

v(t + Δt) ≈v(t) + a(t) × Δt

x(t + Δt) ≈x(t) + v(t) × Δt

The process is then repeated: use the new v and x to compute the force at the new time, compute the next step, and so on. Each step introduces a small error; these errors accumulate over time, so the accuracy of Euler's method degrades for long simulations. More accurate methods (Runge-Kutta, Verlet, leapfrog) reduce the per-step error and are preferred in practice, but Euler's method captures the essential idea.

A 0.1 kg ball falls from rest with

drag force F_drag =

bv where b = 0.05 N·s/m. Net force F = mg

bv = 0.981

0.05v. Using Δt = 0.1 s: Step 0: v = 0, x = 0, F = 0.981 N, a = 9.81 m/s². Step 1: v = 0

+ 9.81 × 0.1 = 0.981 m/s; x = 0 + 0 × 0.1 = 0 m. Step 2: F = 0.981

0.05 × 0.981 =

0.932 N; a = 9.32 m/s²; v = 0.981 + 9.32 × 0.1 = 1.913 m/s; x = 0 + 0.981 × 0.1 =

0.098 m. Repeating 50 steps gives the full velocity-time curve approaching terminal

velocity v_t = mg/b = 19.6 m/s.

The power of numerical methods is that they handle forces that change with time, position, or velocity in ways that cannot be integrated analytically. Drag proportional to

v², spring forces that vary nonlinearly, electromagnetic forces that depend on both

position and velocity — all are trivially handled by the same Euler update loop, provided the force law is specified.

57.6 Simulations of Motion and Forces

Orbital mechanics provides one of the clearest examples of computational physics. For two bodies (Earth and Moon, or Earth and Sun), the equations of motion have exact analytical solutions — Kepler's ellipses. For three or more bodies, no general analytical solution exists. The trajectories of spacecraft, the long-term stability of the solar system, and the orbital evolution of binary star systems all require numerical simulation. NASA's Jet Propulsion Laboratory uses numerical integrations of the equations of motion for all solar system bodies, updated with radar ranging data, to compute spacecraft trajectories with metre-level precision at distances of billions of kilometres. The Voyager 1 probe, launched in 1977, is now beyond the solar system — its trajectory was computed numerically decades in advance. Collision and impact simulations use numerical methods to model what happens when objects collide at high speed: the deformation of metal in a car crash, the formation of craters when meteorites strike planets, the behaviour of protective armour under projectile impact. These simulations use finite element analysis (FEA), which divides the object into millions of tiny elements, each governed by stress-strain laws, and tracks the deformation of every element through time. Molecular dynamics (MD) simulation models matter at the atomic level. Each atom is treated as a classical particle subject to forces from neighbouring atoms (described by empirical potential energy functions). Integrating the equations of motion for systems of millions of atoms over nanoseconds reveals how proteins fold, how materials fracture, how drug molecules bind to receptors, and how heat conducts through semiconductors. MD is computationally intensive: a simulation of one microsecond of a protein with 100 000 atoms may require weeks of supercomputer time.

The first computer simulation in physics was performed in 1953 at Los Alamos National Laboratory by Enrico Fermi, John Pasta, Stanislaw Ulam, and Mary Tsingou. They simulated the vibrations of a one-dimensional chain of particles coupled by nonlinear springs, expecting energy to distribute evenly across all vibrational modes as classical thermodynamics predicted. Instead, the energy kept returning to the initial mode — the Fermi-Pasta-Ulam-Tsingou recurrence problem, which remained unexplained for over a decade and eventually led to the discovery of solitons and the foundations of chaos theory. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.7 Simulations of Fluids, Heat, and Weather

Fluid dynamics simulations solve the Navier-Stokes equations — the governing equations of fluid motion derived from Newton's second law applied to fluid parcels — on a three-dimensional grid. The fluid domain is divided into a mesh of small cells; velocity, pressure, temperature, and density are computed at each cell centre and updated at each time step. This approach is called computational fluid dynamics (CFD). CFD is now essential in aerospace engineering. Every major commercial aircraft is extensively simulated before physical prototypes are built, reducing the number of wind tunnel tests required. The aerodynamic drag and lift of the entire aircraft, the flow over engine inlets, and the thermal loads on turbine blades are all computed via CFD. The same methods are used to design Formula 1 racing cars, optimise wind turbine blade shapes, simulate blood flow through cardiac prostheses, and predict the dispersal of pollutants in urban air. Heat transfer simulations solve the heat equation — a partial differential equation describing how temperature diffuses through a material over time — on a spatial grid. Applications include: designing the thermal management systems of computer chips (which must remove heat generated by billions of transistors switching billions of times per second), modelling the heat shield of a spacecraft re-entering the atmosphere, and predicting the temperature distribution in a nuclear reactor core. Numerical weather prediction (NWP) is one of the most computationally intensive applications of physics. A global weather model divides the atmosphere into a three- dimensional grid (horizontal resolution now reaching 10 km; vertical resolution of tens to hundreds of metres in layers) and solves the coupled equations of fluid dynamics, thermodynamics, and radiation transfer at each grid point for each time step. A 10-day

global forecast requires roughly 10¹³ floating-point operations and runs on the world's

most powerful supercomputers in about an hour. Without this computation, done twice daily, modern weather forecasts would be impossible. Climate models extend weather models to run for decades or centuries, but with coarser resolution and simplified representations of processes too small to resolve (clouds, ocean eddies, sea ice dynamics). Climate projections — such as those produced for the Intergovernmental Panel on Climate Change (IPCC) — are the product of dozens of independent models from research groups worldwide, whose agreement (or disagreement) on specific outcomes provides a measure of confidence in the predictions.

57.8 Data Analysis in Experiments

After data is collected, the goal of data analysis is to extract physical meaning from numbers. This involves several stages: cleaning (removing bad data points), exploration (graphing to understand the shape of the data), fitting (finding the parameters of a model that best match the data), and inference (drawing conclusions about physical quantities, with stated uncertainties). The most fundamental fitting procedure is least-squares regression: finding the line (or curve) that minimises the sum of the squared vertical distances between the data

points and the model. For a linear model y = mx + c, the least-squares best-fit slope

and intercept can be calculated analytically:

m = (Σxy −n̄x̄y) / (Σx² −n̄x²)

c = ̄y −m̄x

̄ ̄

The goodness of fit is measured by the coefficient of determination R² (R-squared). R²

= 1 means the model explains 100% of the variance in the data (a perfect fit). R² = 0

means the model explains none of the variance (no better than the mean). In practice,

R² > 0.99 indicates excellent linear fit; R² < 0.90 suggests either significant scatter, a

non-linear relationship, or both. Residuals are the differences between the data values and the model predictions

(y_data

y_model for each point). Plotting residuals against the independent variable

is one of the most informative diagnostics in data analysis. Random scatter in the residuals confirms that the model captures the systematic behaviour. A systematic pattern in residuals — all positive on one side and negative on the other, or a curve — indicates that the model is wrong (e.g., a linear fit applied to data with a quadratic relationship).

A student measures the extension of a spring for applied forces 1 N to 6 N in 1 N steps, obtaining extensions 2.1, 4.0, 5.9, 8.2, 9.8, 12.1 cm. Plotting force vs extension and fitting a straight line (F =

kx) by least squares gives slope k = 0.499 N/cm

49.9 N/m with R² = 0.9993. The

residuals show no systematic pattern, confirming Hooke's Law holds. The 0.07% deviation from 50 N/m is within the expected measurement uncertainty. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.9 Error, Uncertainty, and Noise in Data

Every measurement contains uncertainty. This is not a failure of equipment or experimenter; it is an unavoidable feature of the physical world (at the quantum level) and of the limitations of any finite measurement apparatus. Understanding and quantifying uncertainty is essential for interpreting data correctly. Random error (noise) is unpredictable variation in repeated measurements of the same quantity. It arises from thermal fluctuations in electronics, vibrations in the environment, photon shot noise in optical measurements, and countless other sources. Random error can be reduced by averaging many measurements: if the noise in each measurement

has standard deviation σ, the standard error on the mean of n measurements is σ/√n.

Doubling the number of measurements halves the standard error. Systematic error is a consistent bias that shifts all measurements in the same direction. A miscalibrated thermometer that reads 1°C too high introduces a systematic error that averaging cannot remove. Systematic errors are eliminated by careful calibration, cross- checking with independent methods, and blind analysis (analysing data without knowing which measurements come from which condition, to avoid confirmation bias).

σ_mean = σ / √n

Signal-to-noise ratio (SNR) is the ratio of the signal amplitude to the noise amplitude.

SNR = 1 means signal and noise are equal (very difficult to extract the signal). SNR =

10 means the signal is ten times larger than the noise (usually detectable). In gravitational wave detection, the first observed signal (GW150914, detected in 2015 by LIGO) had an SNR of about 24 in the combined detector data — but it was buried in noise that was several times larger in individual frequency bins, extracted only by matched filtering against theoretical waveform templates. Propagation of uncertainty: when a physical quantity is computed from several measured quantities, each with its own uncertainty, the uncertainty in the result can be

estimated. If a quantity z = f(x, y) depends on two measured quantities x and y with

uncertainties δx and δy:

For z = x + y or z = x −y:

δz = √(δx² + δy²)

For z = xy or z = x/y:

δz/z = √((δx/x)² + (δy/y)²)

57.10 Pattern Recognition and Prediction

One of the most powerful roles of computation in modern physics is finding patterns in large datasets that no human analyst could detect by inspection. This includes spectral analysis (finding periodic signals in noisy time series), clustering (grouping similar objects in a multidimensional dataset), classification (labelling objects as belonging to one of several known categories), and anomaly detection (identifying unusual events that do not match the expected pattern). Spectral analysis — specifically, the Fast Fourier Transform (FFT) — decomposes a time- varying signal into its constituent frequencies. Given a signal measured over time, the FFT produces a spectrum showing how much power is present at each frequency. Periodic signals appear as sharp peaks; noise appears as a broad, flat baseline. The FFT is used in audio engineering, seismology, medical imaging (MRI, ultrasound), communications, and mechanical vibration analysis. Machine learning (ML) methods train algorithms to recognise patterns by exposure to labelled examples. In physics, ML is used to: classify particle tracks in detectors (identify electrons from muons from pions from background noise); identify gravitational wave signals in LIGO data; find exoplanets in telescope photometry data (the Kepler mission used ML to identify planetary transits — brief dips in starlight as a planet crosses the star's face); and accelerate simulations by replacing expensive physical computations with fast neural network approximations. Predictive modelling uses a fitted model to forecast values at inputs not yet observed. This is only valid when the model correctly captures the underlying physics and is used within its range of validity. Weather forecasting is predictive modelling: the model is fitted (calibrated) against historical observations and then run forward in time. A critical concept is extrapolation risk: using a model beyond the range of data it was fitted to. A linear fit to data from 0–10°C that is extrapolated to 1000°C will give physically meaningless results if the relationship is not truly linear over that range.

When you see a graph of data with a fitted curve, always ask: (1) What physical model does the curve represent? (2) Is the fit good (are residuals random and small)? (3) Is the curve being extrapolated beyond the data range? (4) What are the uncertainties on the fitted parameters? A curve that passes through all data points and has no stated uncertainties is as likely to be over-fitted noise as a genuine physical law. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.11 Computational Physics in Engineering, Medicine, and Astronomy

The applications of computational physics span every domain of modern science and technology. A survey of three fields illustrates the breadth. Engineering Structural engineering uses finite element analysis to compute stresses and deformations in bridges, buildings, aircraft, and dams under load. The 1940 collapse of the Tacoma Narrows Bridge in Washington State (driven into oscillation by aerodynamic forces) would now be detected in CFD simulations before construction. Every modern skyscraper is modelled for wind loads, seismic response, and thermal expansion. The Boeing 787 Dreamliner was designed almost entirely in simulation before any physical prototype was built, saving an estimated billions of dollars in development costs. Semiconductor device simulation models the quantum mechanical behaviour of electrons in transistors, enabling chip designers to predict whether new transistor architectures will function before fabrication. Modern transistors are a few nanometres in size — so small that quantum tunnelling effects must be included in the model. Without these simulations, the rapid progress of computing power described by Moore's Law would have stalled decades ago. Medicine Medical imaging relies on computational physics at every stage. X-ray computed tomography (CT) takes hundreds of two-dimensional projections of the body from different angles, then uses the Radon transform (an inverse problem solved computationally) to reconstruct a three-dimensional density map. MRI uses the Fourier transform to convert raw frequency-space data (k-space) into anatomical images. Ultrasound imaging uses beamforming algorithms to construct images from arrays of piezoelectric elements. None of these images would exist without the computational steps that convert raw detector data into interpretable pictures. Radiation therapy treatment planning uses computational models of how X-ray beams deposit energy in tissue to optimise the directions and intensities of beams from many angles, maximising dose to a tumour while minimising dose to surrounding healthy tissue. Monte Carlo simulation — using random sampling to model the probabilistic trajectories of millions of individual photons through tissue — is the gold standard for dose calculation. Astronomy and Cosmology N-body simulation models the gravitational interaction of thousands to billions of particles, tracking the formation of galaxies, galaxy clusters, and the large-scale structure of the universe. The Millennium Simulation (2005) followed 10 billion particles of dark matter through 13 billion years of cosmic evolution, producing a synthetic universe whose statistical properties match the observed distribution of galaxies. The IllustrisTNG project (2018) extended this to include gas dynamics, star formation, and black hole feedback. Gravitational wave astronomy, opened by LIGO's first detection in 2015, is entirely computational. The waveforms of gravitational waves from merging black holes and neutron stars are computed by solving Einstein's equations of general relativity numerically (numerical relativity) — a problem that required decades of algorithm development before the first stable simulations were achieved in 2005. Detecting the signal requires matched filtering: correlating the observed data with a bank of millions of pre-computed waveform templates to find the best match. Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

57.12 Limits and Risks of Computer Models

Computational models are tools, not oracles. They are only as good as the physics they encode, the data they are given, and the assumptions they make. Uncritical trust in model outputs — sometimes called model worship or garbage-in-garbage-out blindness — is one of the most dangerous failure modes in applied science and engineering. Sensitivity to initial conditions is a fundamental limit. In chaotic systems — systems governed by the same deterministic equations but exhibiting exponential sensitivity to starting conditions — even infinitesimally different inputs produce completely different outputs after sufficient time. The atmosphere is a chaotic system: this is the physical basis of the two-week predictability horizon for weather forecasting. No amount of computational power or measurement precision can extend reliable daily weather forecasts much beyond about two weeks because the unavoidable uncertainty in initial conditions amplifies exponentially. Numerical errors accumulate. Every arithmetic operation in a computer is performed with finite precision (floating-point representation). Small rounding errors in each step accumulate over millions of steps. For well-designed algorithms and appropriate step sizes, these errors are controllable; for poorly designed simulations or too-large step sizes, numerical errors can dominate the output and produce physically meaningless results that look superficially plausible. Unresolved scales: a simulation grid cannot resolve features smaller than the grid spacing. Atmospheric models with 10 km horizontal resolution cannot directly simulate individual thunderstorms (which are 1–10 km across) and must instead use parameterisations — statistical representations of the average effect of many unresolved storms. If the parameterisation is wrong, the large-scale simulation is wrong. This is the main source of uncertainty in climate projections. Model overfitting is a risk whenever a model has more free parameters than the data can constrain. An overfit model describes the noise in the training data perfectly but fails to predict new data. The antidote is cross-validation: fitting the model on a portion of the data and testing its predictions on the remainder.

reproduces one set of observations does not prove the model is correct — it only shows that the model is consistent with those observations. The same data may be consistent with multiple models based on different physical assumptions. Independent experimental validation, ideally by a different group with different apparatus, is required before a model should be trusted for high-stakes predictions.

57.13 Common Mistakes in Data-Based Physics

• Plotting data without first inspecting it for errors. Outliers, sign errors, unit inconsistencies, and instrument glitches produce obviously wrong data points that should be identified and investigated before fitting any model. • Fitting a linear model to non-linear data. If the data has a visible curve, a

straight-line fit gives wrong slope and intercept values and misleading R². Always

check residuals: a curved residual plot indicates a non-linear relationship. • Confusing correlation with causation. A computed correlation coefficient tells you that two quantities vary together; it says nothing about which causes which, or whether both are caused by a third factor. Correlation is a mathematical property of the data; causation requires a physical mechanism. • Ignoring uncertainty. Reporting a fitted value without its uncertainty (e.g., g =

9.81 m/s² with no stated uncertainty) is incomplete. A measurement of g = 9.81

± 0.05 m/s² and g = 9.81 ± 2.0 m/s² have very different physical meaning, even

though the central values are identical. • Extrapolating beyond the data range. A model fitted to data from 0–50°C should not be used to predict values at 200°C unless there is independent physical justification that the same relationship holds. The validity of the model is only established within the range of the data. • Using too-large a time step in numerical simulations. Euler's method with a large

Δt introduces large errors per step that accumulate rapidly. As a check, run the

simulation with half the time step: if the results change significantly, the original step size was too large. • Treating simulation output as ground truth. A simulation result is only as reliable as the model that produced it. Comparing simulation outputs to independent experimental data is always required before using a simulation for prediction or decision-making. • Omitting units from graphs and tables. Every axis label, every column header, every reported result must include the SI unit (or clearly stated non-SI unit). A table of temperatures with no unit could mean anything from Kelvin to Fahrenheit; a plot of "current" with no unit tells the reader nothing.

The most dangerous outputs of computational physics are those that look precise but are based on an invalid model or bad data. Computers report numbers to many decimal places regardless of whether those decimal places are meaningful. Numerical precision (how many digits the computer calculates) is entirely separate from physical accuracy (how close the result is to reality). Always ask: what physical assumptions went into this result, and are they valid here? Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

Chapter Summary

Computational physics extends physical reasoning into domains of complexity, scale, and precision that are beyond analytical or manual methods. It encompasses numerical modelling, simulation, data collection, and data analysis. • Models specify inputs, equations, outputs, and assumptions. Validation (does the model match reality?) and verification (is the code correct?) are both essential. • Sensors convert physical quantities to digital signals. Calibration, sampling rate, and bit depth determine measurement quality. • Graphing and linearisation are the first steps of data analysis. Residuals reveal whether a model is appropriate. • Euler's method approximates equations of motion by stepping forward in small

time increments Δt. Accuracy increases as Δt decreases.

• Simulations of motion (orbital mechanics, FEA, molecular dynamics), fluids (CFD), heat (heat equation), and weather (NWP) all use discretised differential equations solved on grids or for particle ensembles. •

Least-squares regression finds the best-fit model parameters. R² and residual

plots assess fit quality. •

Random error is reduced by averaging (uncertainty ∝1/√n). Systematic error

requires calibration and experimental design. • Pattern recognition (FFT, machine learning, matched filtering) extracts signals from noisy data at scales impossible for human inspection. • Limits of computational models: chaos limits weather forecasting; numerical errors accumulate; unresolved scales require parameterisation; overfitting risks extrapolation failure. • Simulation output is not evidence. Independent experimental validation is always required.

Key Terms

computational physics
The use of numerical algorithms and computers to solve

physical problems that are analytically intractable, simulate physical systems, and analyse experimental data.

model
A mathematical description of a physical system specifying inputs, governing

equations, outputs, and simplifying assumptions.

validation
The process of testing whether a model correctly represents the real

physical system by comparing its predictions to independent experimental data.

verification
The process of testing whether computer code correctly implements the

intended mathematical model (checking for bugs and numerical errors).

sensor
A device that converts a physical quantity (temperature, pressure, position, etc.)

into an electrical signal that can be recorded and digitised.

analogue-to-digital converter (ADC)
A device that samples a continuous electrical

signal at regular time intervals and converts each sample to a binary number. Characterised by sampling rate and bit depth.

sampling rate
The number of samples per second taken by an ADC. Must be at least

twice the highest frequency in the signal (Nyquist theorem) to avoid aliasing.

calibration

The process of establishing the quantitative relationship between a sensor 's output signal and the true physical value, using known reference standards.

linearisation
A mathematical transformation of variables (e.g., taking logarithms) that

converts a non-linear relationship into a linear one, enabling straight-line fitting.

residuals
The differences between observed data values and the values predicted by a

fitted model; a plot of residuals against the independent variable reveals whether the model is appropriate.

Euler's method
The simplest numerical method for solving differential equations,

updating state variables in small time steps Δt using the derivative at the start of

each step.

finite element analysis (FEA)
A numerical method for solving structural and thermal

problems by dividing the domain into a mesh of small elements and computing physical quantities in each element.

computational fluid dynamics (CFD)
Numerical simulation of fluid flow by solving the

Navier-Stokes equations on a spatial grid, used in aerospace, automotive, biomedical, and environmental engineering.

numerical weather prediction (NWP)
Computer simulation of the atmosphere by
Physics
Foundations of Physical Science

Chapter 57 — Computational and Data-Based Physics solving coupled equations of fluid dynamics and thermodynamics on a three- dimensional grid to produce weather forecasts.

least-squares regression
A fitting method that finds the model parameters minimising

the sum of squared residuals between data and model.

R² (coefficient of determination)
A measure of goodness of fit ranging from 0

(model explains none of the variance) to 1 (perfect fit). R² > 0.99 indicates excellent

linear fit.

random error
Unpredictable, zero-mean variation in repeated measurements arising

from noise; reduced by averaging many measurements (uncertainty ∝1/√n).

systematic error
A consistent bias affecting all measurements in the same direction;

not reduced by averaging; eliminated by calibration and careful experimental design.

signal-to-noise ratio (SNR)
The ratio of signal amplitude to noise amplitude; higher

SNR means the signal is more easily detected and measured.

Fast Fourier Transform (FFT)
An efficient algorithm for decomposing a time-domain

signal into its constituent frequency components; fundamental to spectral analysis.

overfitting
The condition in which a model has too many free parameters relative to

the data, causing it to fit noise rather than physical signal; identified by poor performance on new data.

extrapolation
Using a fitted model to predict values outside the range of data used to

fit it; inherently risky unless the physical model is known to hold beyond the data range.

matched filtering
A signal processing technique that detects a known waveform in

noisy data by correlating the data with a template; used in gravitational wave detection and communications.

Monte Carlo simulation
A computational method using random sampling to model

probabilistic physical processes; used in radiation dose calculation, statistical mechanics, and financial modelling.

Concept Review Questions

Answer in complete sentences. No calculations required unless stated.

  1. Give two examples of physical systems that cannot be solved analytically but can

be studied by numerical simulation. For each, explain what makes an exact solution impossible.

  1. A student runs a simulation of a pendulum using Euler's method and finds that

the amplitude grows over time, which is physically impossible for a frictionless pendulum. What is the most likely cause? What should the student change to fix it?

  1. Explain the difference between validation and verification of a computational

model. Give an example of a failure of each.

  1. A thermistor is calibrated by measuring its resistance in ice water (0°C) and

boiling water (100°C). A student uses the calibration to measure the temperature of a flame at 800°C. What is the risk of this approach? What concept does it illustrate?

  1. A dataset of force vs. extension for a rubber band is plotted. The data looks

roughly linear up to 5 N but curves upward between 5 N and 10 N. A student fits a single straight line to all the data and reports a spring constant. What is wrong with this analysis?

  1. Explain why averaging many measurements reduces random error but does not

reduce systematic error. Give an example of each type of error in a physics experiment.

  1. What is the significance of the Nyquist sampling theorem? What happens to a

signal if the sampling rate is too low? Give a concrete example.

  1. Why can reliable weather forecasts not be extended beyond about two weeks,

no matter how powerful computers become? What fundamental physical concept limits predictability?

  1. A machine learning algorithm is trained on particle collision data from one set of

experiments and correctly identifies signal events 95% of the time. A physicist proposes using it to analyse data from a new experiment at higher energies. What concerns should be raised about this approach?

  1. Explain the difference between numerical precision and physical accuracy. Why

might a simulation report a result to six significant figures that is physically wrong? Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

Data Interpretation Exercises

Use the data provided to answer each question. Show your working.

  1. A data logger records the temperature of a cooling object every 30 seconds,

starting at 85°C: 85, 72, 60, 52, 44, 38, 33, 29, 26, 24°C (room temperature 22°C).

(a) Plot ΔT = T

T_room vs. time. (b) Plot ln(ΔT) vs. time. (c) Is Newton's Law of

Cooling (exponential decay) supported? (d) Find the time constant τ from the

linearised plot.

  1. A student measures the period T of a pendulum for five different lengths L: (0.20

m, 0.90 s), (0.40 m, 1.27 s), (0.60 m, 1.55 s), (0.80 m, 1.80 s), (1.00 m, 2.01 s).

Theory: T = 2π√(L/g). (a) Linearise by plotting T vs. √L. (b) Find the slope and

hence determine g from the slope. (c) Find R² and state whether the fit is good.

(d) Compare your value of g to 9.81 m/s².

  1. Voltage across a charging capacitor: V(t) = V_0(1

e^( t/RC)). Measured data:

(0 s, 0 V), (1 s, 3.93 V), (2 s, 6.32 V), (3 s, 7.77 V), (5 s, 9.33 V), (10 s, 9.99 V). V_0

= 10 V. (a) Calculate V_0

V for each point. (b) Plot ln(V_0

V) vs. time. (c) Find

the time constant RC from the slope. (d) If R = 2 kΩ, find C.

  1. The following data shows stopping distance d (m) vs. initial speed v (km/h) for a

car: (30, 9), (50, 23), (70, 46), (90, 74), (110, 110) km/h →m. Theory: d ∝v²

(braking = kinetic energy dissipated). (a) Plot d vs. v and d vs. v². (b) Which plot

is more linear? (c) Find the proportionality constant k in d = kv². (d) Predict

stopping distance at 130 km/h. Is extrapolation justified here? Simple Simulation Activities These exercises use Euler's method to simulate physical systems. Perform calculations by hand for the first few steps, then describe how you would automate the remaining steps.

  1. Simulate the fall of a 0.05 kg tennis ball from rest with air drag F_drag =

bv

where b = 0.003 N·s/m. Use g = 9.81 m/s² and Δt = 0.2 s. (a) Write down the

net force formula. (b) Complete the Euler update table for t = 0, 0.2, 0.4, 0.6, 0.8,

1.0 s, computing F, a, v, and x at each step. (c) What is the terminal velocity

predicted by theory (v_t = mg/b)? How close is your simulated v at t = 1.0 s?

  1. Simulate a spring-mass oscillator: mass 0.5 kg, spring constant 20 N/m, no

friction, starting from x = 0.10 m at rest. F =

kx. Use Δt = 0.05 s. (a) Complete

the Euler table for t = 0 to 0.5 s. (b) The theoretical period is T = 2π√(m/k).

Calculate T. (c) Compare your simulated motion to the expected sinusoidal oscillation. Does Euler's method conserve energy? (Check: does the amplitude stay constant?)

  1. Simulate projectile motion with quadratic drag: mass 0.1 kg, initial speed 30 m/s

at 45°, drag coefficient C_d = 0.47, cross-section area 0.005 m², ρ_air = 1.2

kg/m³. Drag force magnitude F_drag = ½ C_d ρ A v² opposing velocity. Using Δt

= 0.1 s, simulate the trajectory for 10 steps (x and y components separately).

Compare the range to the no-drag case (R = v₀² sin 2θ / g). What fraction of the

no-drag range is achieved?

  1. A simulation of a pendulum using Euler's method with Δt = 0.5 s shows the

amplitude growing over time. (a) Explain why this happens physically (hint: Euler's method slightly overestimates the restoring force each step). (b) Re-

simulate with Δt = 0.1 s and Δt = 0.01 s. Does the energy drift decrease? (c)

What would be the ideal method to use for a long-time pendulum simulation, and why? Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics

Graph and Model Analysis

  1. A researcher fits a power law y = axⁿ to data by plotting log y vs. log x and

fitting a straight line. The fitted line has slope 2.03 and y-intercept (on the log- log plot) of 0.602. (a) Find n. (b) Find a (note: the y-intercept of the log-log plot

is log a). (c) Write the power law equation. (d) Predict y when x = 5.0.

  1. Two students independently measure the same quantity and obtain: Student A:

12 measurements giving mean 9.82 m/s² and standard deviation 0.18 m/s².

Student B: 3 measurements giving mean 9.79 m/s² and standard deviation 0.12

m/s². (a) Find the standard error of the mean for each student. (b) State each

result as value ± uncertainty. (c) Are the two results consistent with each other?

Are they consistent with g = 9.81 m/s²?

  1. A simulation of heat conduction in a metal bar predicts the temperature at the

midpoint as a function of time. The simulation is run with grid spacings Δx = 1.0

cm, 0.5 cm, and 0.25 cm. The predicted temperatures at t = 60 s are 45.2°C,

47.8°C, and 48.6°C respectively. (a) Is the simulation converging as the grid is refined? (b) Estimate the converged (exact) value by extrapolation. (c) What does

this tell you about the reliability of the Δx = 1.0 cm result?

  1. A student measures the specific heat of a metal using a calorimeter. The

quantities measured and their uncertainties are: mass of metal m = 85.0 ± 0.5 g;

initial temperature T_i = 98.0 ± 0.5°C; final equilibrium temperature T_f = 28.3 ±

0.2°C; mass of water m_w = 200.0 ± 0.5 g; ΔT_water = 8.3 ± 0.3°C. The formula

is c_metal = m_w c_water ΔT_water / (m ΔT_metal). (a) Find c_metal. (b) Find the

uncertainty in ΔT_metal = T_i

T_f. (c) Find the relative uncertainty in c_metal by

propagating all uncertainties. (d) State the result as c_metal ± δc.

Applied Computational Physics Problems

  1. A weather model divides the atmosphere over a 1000 km × 1000 km region into

a 10 km horizontal grid and 50 vertical layers. (a) How many horizontal grid cells are in the model domain? (b) How many total three-dimensional grid cells? (c) If each cell requires storing 10 physical variables (T, P, u, v, w, humidity, etc.) each as a 64-bit float (8 bytes), how many megabytes of memory does one snapshot of the model state require? (d) If the model is run for 10 days with a time step of 10 minutes, how many time steps are executed?

  1. A cardiac CT scanner takes 512 two-dimensional X-ray images (slices) of the

chest, each of resolution 512 × 512 pixels with 16-bit depth. (a) Find the size of

the raw data in megabytes. (b) The scanner acquires all slices in 0.35 seconds. Find the data rate in MB/s. (c) The images are processed by a filtered back- projection algorithm that requires 10¹ floating-point operations. At 10¹ operations/second, how long does reconstruction take? (d) Why must reconstruction be fast in a clinical setting?

  1. A seismometer records ground acceleration with a sampling rate of 100 Hz and

24-bit resolution. An earthquake signal of interest has a peak frequency of 1 Hz. (a) Is the sampling rate adequate (Nyquist criterion)? (b) How many samples are recorded in one hour? (c) At 3 bytes per sample (24-bit), how many megabytes are recorded per day? (d) The signal-to-noise ratio for an M4.0 earthquake at 200 km distance is estimated at 30. By how much (in dB) does averaging 900

samples of noise reduce the noise floor? (Hint: SNR improves as √n in amplitude,

or 10 log₁₀(n) in dB power.)

  1. A molecular dynamics simulation of a protein (N = 50 000 atoms) calculates the

force on each atom from all other atoms at each time step. (a) In a naive implementation, the number of pairwise interactions computed per step is N(N 1)/2. How many interactions is this? (b) Cutoff methods reduce this to

interactions within a 1 nm radius. If the simulation box is 10 nm × 10 nm × 10

nm and atoms are uniformly distributed, what fraction of all pairs are within 1 nm of each other? (Estimate using the volume ratio of a 1 nm sphere to the full box.) (c) If each time step takes 10 ⁶ seconds per interaction computed, and the simulation uses 5000 interactions per atom, how long does 1 microsecond of

simulation time take? (1 microsecond = 10⁶ fs; typical MD step Δt = 1 fs.)

Physics: Foundations of Physical Science Chapter 57 — Computational and Data-Based Physics Final Book Checkpoint This checkpoint covers the key computational and data skills developed in Chapter 57 and consolidates the quantitative reasoning skills used throughout this book. Before completing Physics: Foundations of Physical Science, confirm you can do each of the following. I can… See Section Explain why computation is necessary in modern physics and give three categories of problem that require it 57.1 Identify the four components of a computational model (inputs, equations, outputs, assumptions) 57.2 Describe the difference between validation and verification of a model 57.2 Name at least four sensor types, the physical quantity each measures, and the underlying principle 57.3 Explain sampling rate, bit depth, and calibration for digital measurements 57.3 Linearise a power-law or exponential relationship and use the resulting straight-line plot to find constants 57.4 Perform 2–3 steps of Euler's method for a simple equation of motion 57.5 Describe what finite element analysis and computational fluid dynamics are used for 57.6–57.7 Perform or interpret a least-squares linear regression and

assess fit quality using R² and residuals

57.8 Distinguish random error from systematic error and apply the

σ/√n rule for uncertainty in a mean

57.9 Propagate uncertainties through addition/subtraction and multiplication/division 57.9 Explain what the Fast Fourier Transform does and name one application 57.10 Describe three real applications of computational physics in engineering, medicine, or astronomy 57.11 State three limitations of computational models (chaos, numerical error, unresolved scales) 57.12 Identify common data analysis mistakes: wrong model, extrapolation, ignoring uncertainty, omitting units 57.13 —