💧 Hydrogel Swelling Mechanics

A cross-linked hydrogel network swells by absorbing water. Flory-Rehner theory balances elastic and mixing free energies to find equilibrium swelling ratio Q.

Materials ScienceInteractive
Left: free energy landscape · Right: swelling kinetics · P pause · R reset

How it Works

The simulation uses Flory-Rehner theory to compute the equilibrium swelling ratio Q = Vswollen/Vdry. The total chemical potential of water inside the gel has two contributions: (1) the mixing chemical potential μmix from Flory-Huggins theory, which drives swelling; (2) the elastic chemical potential μel from rubber-elastic network, which resists swelling.

At equilibrium μmix + μel = 0. The simulation finds this balance numerically across a range of Q values and shows the free energy landscape. The animated gel bead swells from Q=1 (dry) toward Qeq following a simple kinetic model. Adjust chi and cross-link density to change the equilibrium dramatically.

μmix = RT[ln(1−φ) + φ + χφ²]
μel = RT·V1·nc1/3/2 − φ]
φ = 1/Q [polymer volume fraction]
Equilibrium: μmix + μel = 0

Frequently Asked Questions

What is a hydrogel?

A hydrogel is a cross-linked polymer network that can absorb large amounts of water while maintaining its structure. It is used in contact lenses, wound dressings, drug delivery, and tissue engineering.

What is the Flory-Rehner theory?

Flory-Rehner theory describes equilibrium swelling of a polymer network by balancing two free energy contributions: elastic energy (opposes stretching) and mixing free energy (drives water absorption).

What is the swelling ratio Q?

The swelling ratio Q = Vswollen / Vdry is the ratio of swollen to dry polymer volume. In equilibrium Q is found by minimising total free energy: δ(Fel + Fmix)/δQ = 0.

What is the Flory-Huggins interaction parameter χ?

The χ parameter characterises polymer-solvent interaction energy. χ < 0.5 gives good solvent conditions (strong swelling); χ > 0.5 gives poor solvent conditions (collapsed network); χ = 0.5 is the theta point.

What is cross-link density and how does it affect swelling?

Cross-link density nc is the number of elastic strands per unit volume. Higher cross-link density increases the elastic restoring force, reducing the equilibrium swelling ratio Q.

What drives water into a hydrogel?

The chemical potential difference between pure water and water inside the network drives absorption. Water flows in until osmotic pressure is balanced by the elastic network pressure.

What is the chemical potential in polymer swelling?

The chemical potential of solvent inside the gel μ1 = μel + μmix must equal the external solvent chemical potential at equilibrium, setting the equilibrium polymer volume fraction φeq.

How does temperature affect hydrogel swelling?

Temperature affects both χ and the elastic modulus. LCST hydrogels (like pNIPAM) collapse above a critical temperature because χ increases sharply, making the solvent poor above ~32°C.

What is a stimulus-responsive hydrogel?

Stimulus-responsive hydrogels change volume in response to pH, temperature, light, or ionic strength. These smart materials are used in soft robotics, biosensors, and on-demand drug release.

What is the rubber elastic theory contribution to swelling?

The elastic free energy penalty for swelling comes from Gaussian chain statistics: Fel = (nckT/2)(3λ² − 3 − ln(λ⁶)), where λ = Q1/3 is the linear stretch ratio.

About this simulation

A binary search finds the swelling ratio Q where the mixing chemical potential (Flory-Huggins) exactly cancels the elastic restoring chemical potential of the polymer network, and the animated gel bead relaxes toward that equilibrium at rate k=0.5 per second. Because χ controls how much water the polymer "wants" and cross-link density nc controls how hard the network resists stretching, small slider moves can swing the bead from barely swollen to enormously bloated.

🔬 What it shows

A free-energy curve on the left locating the equilibrium swelling ratio Qeq where chemical potential crosses zero, and an animated gel bead on the right that visibly grows its mesh spacing as it swells toward that equilibrium.

🎮 How to use

Move the Flory χ parameter, Cross-link density nc, Molar Volume V1 and Temperature T sliders and watch the bead re-equilibrate; press P/R to pause/reset.

💡 Did you know?

pNIPAM hydrogels exploit exactly this χ-temperature coupling in reverse: above about 32°C, χ jumps so sharply that the gel expels its water and collapses almost instantly, a trick used in smart drug-release capsules.

Frequently asked questions

How does the simulation find the equilibrium swelling ratio?

findEquilibrium() performs a binary search over Q values, looking for the point where muWater(Q) — the sum of mixing and elastic chemical potentials — crosses zero, which is the Flory-Rehner equilibrium condition.

Why does raising the Flory chi slider make the bead swell more?

A lower chi value represents a better solvent, and since mu_mix includes a +chi*phi^2 term, decreasing chi lowers the mixing potential, shifting the zero-crossing to a higher equilibrium Q — this simulation shows the reverse effect as chi rises.

Why does increasing cross-link density shrink the equilibrium bead?

Cross-link density nc scales the elastic chemical potential term V1*nc*(phi^(1/3)/2 - phi), which resists swelling, so a denser network pulls the equilibrium Q down and the bead stays smaller.

What do the small arrows around the gel bead mean?

They appear only when Q_current is still below Q_eq by more than 0.05, visually indicating that the gel is actively absorbing water and has not yet reached equilibrium.

Why does the mesh inside the bead get coarser as it swells?

The drawGel() function reduces the drawn mesh resolution as Q_current grows, mimicking how a real polymer network's strands spread further apart and the pore size increases with swelling.