Modeling Shear-Thickening Fluids with Simple Numerical Experiments
PythonSimulationFluid MechanicsComputational Tutorial

Modeling Shear-Thickening Fluids with Simple Numerical Experiments

DDr. Mira Ellison
2026-04-17
21 min read
Advertisement

Build a Python toy model of oobleck-like shear thickening and explore how shear rate changes apparent viscosity.

Modeling Shear-Thickening Fluids with Simple Numerical Experiments

Shear thickening is one of the most visually dramatic behaviors in fluid mechanics: a material can flow easily under gentle motion, then suddenly resist deformation when stressed faster. Oobleck, the classic cornstarch-and-water suspension, is the iconic classroom example, but the real scientific interest goes well beyond a novelty toy. In rheology, shear thickening sits at the intersection of particle interactions, packing, dissipation, and flow instabilities, which makes it a perfect candidate for a small computational experiment. If you want a practical entry point into non-Newtonian fluid modeling, this guide shows how to build a toy mental model and a reproducible numerical experiment in Python, then use it to explore how shear rate changes apparent viscosity.

Recent reporting has highlighted that dense drops of oobleck subjected to high shear can spread like a liquid and then stiffen into something solid-like, reminding us that even a familiar suspension can surprise under fast deformation. That kind of behavior is precisely what makes a toy model useful: it gives you a controlled way to ask what changes when the forcing gets stronger, what assumptions matter, and where simple formulas stop being enough. For readers who like hands-on learning, this article is structured like a mini lab notebook, with equations, code logic, and interpretation alongside the physics. If you are also interested in how scientific communication turns complex material into something teachable, see our guide on how emerging tech can revolutionize journalism and enhance storytelling, which mirrors the same clarity-first philosophy we use here.

1. What shear thickening actually means

Apparent viscosity is not a material constant

For a Newtonian fluid, viscosity is constant: double the shear rate and the shear stress doubles. In a shear-thickening suspension, that simple proportionality breaks down. Instead, the effective or apparent viscosity increases with shear rate, so the fluid seems to become “thicker” as it is driven harder. This is why the same slurry can ooze slowly from a container and still resist a sudden punch or impact.

In a particle suspension such as oobleck, the thickening is not caused by the molecules themselves behaving differently in isolation. Rather, the particles interact, crowd each other, and reorganize under stress. At low shear, particles can rearrange smoothly through the interstitial fluid. At higher shear, frictional contacts, transient force chains, and local jamming can emerge, causing a sharp rise in resistance.

Why oobleck is a suspension, not a pure liquid

Oobleck is best understood as a dense particle suspension: solid particles dispersed in a liquid. The flow behavior depends strongly on the particle volume fraction, the size distribution, the solvent viscosity, and the interaction between grains. This is why the same corn-starch recipe can behave differently if it is too wet, too dry, or mixed unevenly. The physics is collective, not purely molecular.

That collective nature connects oobleck to a broad class of materials in rheology, from industrial slurries to protective body armor fluids and cement-like pastes. If you want a broader framing of how materials and constraints shape behavior, our article on why core materials matter offers a useful analogy: the hidden structure, not just the surface, often determines performance.

When shear thickening matters in the real world

Shear thickening is not just a curiosity for demonstrations. It matters in industrial processing, granular transport, impact protection, and formulation science. Engineers often want suspensions that flow when pumped but resist sudden loads, or the opposite, depending on the application. Understanding the curve of viscosity versus shear rate is therefore a practical design problem, not merely an academic one.

For a broader sense of how “behavior under stress” becomes an engineering concern across domains, compare this problem to strategic energy management or even predictive maintenance in infrastructure: in both cases, responses change when inputs cross a threshold. Rheology gives us the fluid-mechanics version of that threshold thinking.

2. The physics behind a toy viscosity model

A minimal constitutive law: power-law thickening

The simplest computational entry point is a generalized viscosity law in which apparent viscosity depends on shear rate γ̇. One of the most common toy models is the power law:

η(γ̇) = η0 (γ̇ / γ̇0)n, where n > 0 gives thickening behavior. Here, η0 is a reference viscosity and γ̇0 is a reference shear rate. For n = 0, you recover Newtonian behavior. For n > 0, viscosity increases with shear rate, and larger n means stronger thickening.

This model is intentionally simple. It does not capture discontinuous thickening, hysteresis, jamming transitions, or the microphysics of contact networks. But it is excellent for a first numerical experiment because it is easy to implement, easy to visualize, and easy to extend. A good toy model should reveal the structure of a phenomenon before you add the full complexity.

A more realistic alternative: threshold-based thickening

A step up in realism is to use a piecewise model with a low-viscosity regime and a high-viscosity regime separated by a critical shear rate γ̇c. This resembles what students often sketch in introductory rheology: below γ̇c the suspension flows readily, and above γ̇c the apparent viscosity rises sharply. A smooth version can be built with a logistic function, which avoids a numerical discontinuity but still creates a rapid crossover.

This approach is useful because it lets you compare continuous and threshold-like behavior. In experiments, many suspensions do not thicken smoothly forever; they may stiffen abruptly when the internal particle network percolates. For that reason, the logistic or “sigmoid” model can be a better qualitative match than a pure power law.

What the model leaves out on purpose

The key to educational modeling is knowing what you are ignoring. A toy model usually omits Brownian motion, particle shape effects, hydrodynamic lubrication forces, sedimentation, wall effects, and memory effects. It also does not resolve the spatially heterogeneous flow fields that occur near boundaries. Yet by stripping those details away, we can isolate the central question: how does increasing shear rate change apparent viscosity?

That modeling discipline is valuable in computational physics generally. It is the same reason concise tutorials can be so effective when paired with a solid conceptual map, like our guides on on-device processing or secure AI search: you begin with a manageable approximation, then add complexity only when the basic picture is clear.

3. Building a Python simulation of oobleck-like behavior

Set up the shear-rate sweep

The cleanest numerical experiment is to sweep across a range of shear rates and calculate the corresponding apparent viscosity. This does not require a full fluid solver. Instead, you can treat the flow as local and homogeneous, which means the model returns one viscosity value for each imposed shear rate. That makes it ideal for plotting curves and checking whether your thickening law behaves as expected.

Here is a minimal Python example using NumPy and Matplotlib. It constructs a smooth thickening law with a tunable exponent and then plots η versus γ̇ on log-log axes. The logarithmic presentation is helpful because rheology often spans several orders of magnitude, and scaling relations become visually obvious.

import numpy as np
import matplotlib.pyplot as plt

# Shear-rate range (s^-1)
gammadot = np.logspace(-2, 3, 400)

# Toy model parameters
eta0 = 1.0      # reference viscosity
ref = 1.0       # reference shear rate
n = 0.6         # thickening exponent

# Power-law thickening model
eta = eta0 * (gammadot / ref)**n

plt.figure(figsize=(7,5))
plt.loglog(gammadot, eta, lw=2)
plt.xlabel(r'Shear rate $\dot{\gamma}$ (s$^{-1}$)')
plt.ylabel(r'Apparent viscosity $\eta(\dot{\gamma})$')
plt.title('Toy shear-thickening model')
plt.grid(True, which='both', ls=':')
plt.show()

This tiny script already teaches several important lessons. First, the response is monotonic: more shear means more resistance. Second, the curve shape is controlled by the exponent n, so tuning one parameter can produce dramatically different macroscopic behavior. Third, the choice of axis scale matters. If you plot on linear axes, the low-shear regime can appear visually compressed, hiding the dependence that becomes obvious on a logarithmic plot.

Add a smooth transition to mimic a critical shear rate

If you want behavior closer to oobleck, modify the model so the fluid remains nearly constant below a critical rate and thickens rapidly above it. A smooth logistic function is a good compromise between realism and numerical stability. The apparent viscosity can be written as η = ηlow + (ηhigh − ηlow) / [1 + exp(−k(γ̇ − γ̇c))].

In code, that looks like this:

eta_low = 1.0
eta_high = 80.0
gammadot_c = 30.0
k = 0.15

eta = eta_low + (eta_high - eta_low) / (1 + np.exp(-k * (gammadot - gammadot_c)))

This version captures a rapid “turning point.” When γ̇ is far below γ̇c, viscosity stays near ηlow. As γ̇ crosses the threshold, the viscosity climbs sharply toward ηhigh. The model is still toy-level physics, but it now echoes the kind of sudden stiffening seen in dense suspensions under stress. If you like comparing model abstractions, our article on practical mental models beyond the textbook is a useful parallel: the right abstraction can explain a lot without pretending to be the full system.

Turn the model into a numerical experiment

To make the simulation feel more like an experiment, do not just compute one curve. Sweep parameters. Vary n, ηhigh, γ̇c, or the particle concentration proxy. Then record how the viscosity curve shifts. A numerical experiment becomes more informative when you treat parameters like controlled variables in a lab, not just constants hidden in the code.

For example, if you increase n, the curve steepens, suggesting stronger thickening. If you increase γ̇c, the onset of thickening moves to higher shear rates. If you increase ηhigh, the jammed state becomes more resistant. This sensitivity analysis is the computational analog of mixing different cornstarch ratios and observing whether the suspension behaves like a fluid, a paste, or something closer to a transient solid.

4. Interpreting the viscosity curve like a physicist

Why log-log plots are so informative

Rheology data are often plotted on log-log axes because many constitutive laws appear as straight lines in that representation. In the power-law model, the slope of log η versus log γ̇ is precisely the exponent n. That makes the slope a compact summary of the thickening strength. Even when the curve is not a perfect power law, the log-log plot helps identify regimes: flat regions, crossover regions, and steepening regions.

One of the best habits in computational physics is to ask what the plot is actually telling you. A curve may look dramatic on a linear axis but be modest in relative terms, or vice versa. The visual story should match the mathematical story. For a broader example of how presentation affects interpretation, see our guide to clear storytelling with technical content.

Apparent viscosity versus intrinsic viscosity

It is important not to confuse apparent viscosity with a fundamental material constant. In complex fluids, viscosity depends on the measurement protocol, the geometry, and the shear history. That is why the term “apparent” viscosity is preferred in many suspension contexts. You are not measuring a unique constant; you are measuring a response under specified conditions.

This distinction matters because students sometimes expect a single number to fully characterize a fluid. In reality, rheological behavior often requires a curve or even a family of curves. That is true for shear thickening, shear thinning, and viscoelasticity alike. The model here should be read as a map of behavior, not a universal property table.

What counts as success for a toy model

A toy model succeeds if it reproduces the qualitative trend correctly and supports parameter exploration. It does not need to match a particular experiment in every detail. In fact, overfitting the toy model to a single measurement can hide the physics you are trying to teach. The goal is to build intuition: how flow resistance responds to forcing, and how a macroscopic transition can emerge from simple rules.

That same philosophy appears in many practical fields where one must balance simplicity and fidelity, from predictive maintenance to regional growth strategy. A model earns its keep when it clarifies decision-making, not when it merely looks sophisticated.

5. A richer toy model: microstate switching and local jamming

Two-state particles as a conceptual bridge

If you want to move beyond a single curve, you can model the suspension as switching between two local states: a lubricated flowing state and a frictional jammed state. Each particle or local region can contribute to one state or the other depending on the shear rate. At low shear, most regions remain lubricated. At high shear, the probability of frictional contact increases, and the material thickens collectively.

A simple computational implementation uses a probability p(γ̇) that increases with shear rate. Then define the viscosity as a weighted average of low- and high-viscosity states. This is still schematic, but it begins to resemble the physics of force-chain formation in dense suspensions. The advantage is that the model becomes interpretable in terms of state occupancy rather than just an algebraic curve.

Monte Carlo-style sampling for visual intuition

You can also create a pseudo-stochastic experiment: for each shear rate, sample many local regions and assign each one to a jammed or flowing state based on a probability rule. Then compute the average viscosity over the sample. This is not a full particle simulation, but it gives a sense of how heterogeneity can produce smooth macroscopic trends from microscopic randomness.

For a hands-on computational activity, try changing the number of sampled regions and observing how the curve fluctuates. With few samples, the result is noisy. With many samples, the model stabilizes. That directly illustrates a core lesson in numerical methods: the macroscopic signal becomes clearer as statistical averaging improves.

Why heterogeneity matters in dense suspensions

Real oobleck does not thicken everywhere at once. Local jamming can begin in one region and propagate through the suspension, especially under confined flow or impact. That is why a perfectly smooth constitutive law cannot capture all the interesting physics. Heterogeneous toy models remind us that sharp transitions may emerge from local variation, not just from a global threshold. If you enjoy system-level thinking, our piece on how AI agents reshape supply chains offers a non-physics analogy for distributed local changes creating a global outcome.

6. Comparing common viscosity models

Below is a practical comparison of model types you can use when teaching or exploring shear thickening computationally. The right choice depends on whether you want clarity, realism, or a bridge between the two. In the classroom, start simple and increase sophistication only when the earlier model no longer answers the question of interest.

ModelFormStrengthsWeaknessesBest use
Constant viscosityη = η0Very simple; baseline comparisonCannot represent thickeningIntroductory contrast
Power law thickeningη ∝ γ̇nEasy to code; good scaling intuitionNo threshold or saturationFirst numerical experiment
Logistic crossoverη transitions smoothly between two plateausCaptures onset behaviorStill phenomenologicalOobleck-like demonstrations
Piecewise threshold modelLow η below γ̇c, high η above γ̇cClear physical interpretationNumerically discontinuous unless smoothedTeaching critical shear rate
State-switching modelMix of flowing and jammed statesAdds heterogeneity and stochasticityMore parameters; still simplifiedExploring local jamming

These models form a ladder of complexity. A constant-viscosity fluid is useful only as a reference, but it clarifies what is special about non-Newtonian behavior. Power-law and logistic models are easy to test in Python. State-switching models are more conceptually rich and begin to hint at the microphysics behind dense suspension rheology.

7. Extending the experiment: parameter sweeps and sensitivity analysis

Vary the exponent, threshold, and amplitude

Once the basic model works, turn it into a parameter sweep. Create loops over n, γ̇c, and ηhigh, then generate a family of curves. This is one of the most useful habits in computational modeling because it shows not just what the model predicts, but how stable those predictions are under parameter changes. In practice, a model that changes wildly with tiny perturbations may be less informative than one that encodes robust trends.

For example, you might find that increasing the thickening exponent shifts the onset-looking behavior more dramatically than increasing the high-viscosity plateau. That tells you which parameter is most influential in shaping the curve. In a real research workflow, this sensitivity check is a first pass before fitting experimental data. It is also a good bridge from toy simulation to reproducible science.

Connect the toy model to experimental observables

If you were measuring a suspension in the lab, you might record torque, stress, viscosity, or flow curve data under controlled shear. Your model can be framed in the same language by choosing an observable and mapping it to your parameters. For a Couette cell or cone-and-plate geometry, the shear rate is directly tied to rotation rate and gap geometry. That gives the numerical experiment a physical anchor.

One of the reasons computational tutorials are powerful is that they help readers translate abstract equations into experimental design. That is especially important for complex fluids, where it is easy to confuse the control variable with the response variable. Keep asking: what do I impose, what do I measure, and what quantity is actually changing?

Document the assumptions like a real research note

Do not hide your assumptions in comments. Put them in the article, the notebook, and the code output. State whether your model is local or global, deterministic or stochastic, smooth or piecewise. This documentation practice builds trust and makes the experiment reproducible. It also helps future readers understand whether they can reuse your model for a different suspension or a different flow geometry.

If you are developing a broader research workflow, the habits are similar to those in compliance-first migration checklists or secure enterprise systems: define boundaries, expose assumptions, and make the logic auditable.

8. How to debug your shear-thickening simulation

Check axis units and scaling first

The most common mistake in a rheology toy model is unit confusion. Shear rate should be in inverse seconds, viscosity in pascal-seconds or a dimensionless scaled equivalent, and any critical threshold should match the same units. If your curve looks physically nonsensical, the problem is often a units mismatch rather than a physics failure.

Another common issue is plotting a power law on linear axes and concluding it is “flat” or “too steep.” Always inspect the data on the scale that reveals the trend. A good numerical experiment does not just generate numbers; it generates interpretable structure.

Avoid overpromising what the model can do

Toy models are educational precisely because they are limited. They should not be presented as predictive engineering tools unless validated against actual data. The purpose here is to build intuition about thickening, not to replace a full suspension simulation. That honesty is part of scientific rigor.

For readers thinking about the difference between a model and a deployment-ready system, the contrast is similar to the one discussed in practical checklist-style infrastructure guides. A prototype can illuminate the problem, but a robust system needs validation, edge-case testing, and careful documentation.

Compare against real data when possible

If you have access to rheology data, fit your toy model to one curve and check whether it captures the onset and trend. Even if the fit is imperfect, the comparison will reveal where the simplified law succeeds and where it fails. This is one of the best ways to learn from model discrepancy. The gap between theory and data is often more educational than the fit itself.

That same idea underlies many data-driven guides, including our work on real-time spending data, where observed behavior helps refine models rather than merely confirm them. In physics, the same loop between theory and observation is essential.

9. A practical workflow for students and teachers

Use the model as a classroom lab

This article can be turned into a 30- to 60-minute computational lab. First, have students plot a constant-viscosity line and discuss why it is insufficient. Next, implement the power-law model and ask what the exponent does. Finally, introduce the threshold or logistic model and compare the plots. Each stage adds one conceptual layer while reinforcing the previous one.

The pedagogical advantage is that students see how code, equations, and interpretation work together. They also learn that a simulation is not magic; it is a sequence of assumptions translated into a computable rule. That lesson is much more durable than memorizing a single constitutive equation.

Ask prediction questions before running the code

Before you execute the script, ask students to predict what will happen when n increases or γ̇c shifts. Prediction forces them to reason physically instead of passively watching the output. After the run, compare expectation to result and discuss discrepancies. This pattern is one of the most effective ways to use computation in science education.

To support that process with additional conceptual scaffolding, you might also pair this lesson with our guide on mental models or even with an analogy from energy management in sports arenas, where thresholds and response curves are also central. Analogies can reduce anxiety while preserving rigor.

Make reproducibility part of the assignment

Ask students to submit code, parameter choices, and a short interpretation paragraph. Require a brief note on what their model does not include. That practice teaches scientific communication, not just coding. It also mirrors professional computational physics, where reproducibility is as important as the numerical result itself.

Pro tip: the best toy models are not the ones with the most physics, but the ones that make the invisible assumption visible. If a student can explain why the curve bends, they are learning rheology; if they can explain why the code bends the way it does, they are learning computation.

10. Conclusion: from oobleck to computational intuition

The value of simplicity

Shear-thickening fluids are fascinating because they turn a familiar assumption upside down: more forcing does not always mean easier flow. A simple Python model cannot reproduce every detail of cornstarch suspensions, but it can expose the central idea that apparent viscosity can rise with shear rate. That single idea already opens the door to deeper questions about particle interactions, jamming, and non-Newtonian response.

If your goal is to understand, not merely to simulate, the toy model is enough to begin. Use it to ask what parameters matter, what regimes exist, and where the transition sits. Then, if needed, move from the toy model to more sophisticated rheological laws or particle-based simulations.

Where to go next

After mastering the basic experiment, the next steps are clear: add concentration dependence, explore shear thinning for comparison, introduce time dependence, or model local heterogeneity more explicitly. You can also compare your results with experimental papers or build a small interactive notebook for teaching. The point is not to stop at the first satisfactory curve, but to use the curve as a doorway into the physics.

For broader context on scientific methods, data interpretation, and the way technical ideas are made accessible, continue with our related resources on data-informed modeling and technical storytelling. Good computational physics is, at its best, both mathematically honest and teachably clear.

FAQ

What is the simplest model for shear thickening?

The simplest usable model is a power law in which apparent viscosity increases with shear rate. It is easy to code, easy to plot, and good for teaching scaling behavior. However, it does not capture a sharp onset or jamming transition, so it is best used as a first pass.

Do I need particle simulation to model oobleck?

No. For a classroom-level numerical experiment, you can model oobleck with an effective viscosity law. Particle simulation becomes useful when you want to study microstructure, contacts, and spatial heterogeneity. Start with the toy model and only add particles if your research question needs them.

Why use logarithmic plots for viscosity and shear rate?

Because rheology often spans wide ranges, logarithmic axes make it easier to see scaling laws and regime changes. A power law becomes a straight line, which is much easier to interpret. It also prevents low-shear data from being visually compressed.

Can this model predict real oobleck experiments?

Only qualitatively. It can show that viscosity may increase with shear rate and help you reason about onset behavior, but it will not capture all real physical effects. To make predictive claims, you need data, parameter fitting, and likely a more sophisticated constitutive model.

How can I extend the Python code?

You can add parameter sweeps, stochastic switching between flowing and jammed states, concentration dependence, or time-dependent forcing. Another good extension is to compare several models on the same plot. That allows you to see which assumption changes the behavior most strongly.

Advertisement

Related Topics

#Python#Simulation#Fluid Mechanics#Computational Tutorial
D

Dr. Mira Ellison

Senior Physics Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.

Advertisement
2026-04-17T02:21:25.559Z