Notice: Research-stage, simulation-derived hypotheses requiring prospective clinical validation. Not for diagnosis, patient-specific prognosis, or treatment guidance. Software is not FDA cleared or approved.
Computational Foundation · Variational Mechanics
The Tissue Lagrangian
The tissue Lagrangian framework provides a unified mathematical structure for coupling continuum fluid dynamics with discrete cellular kinetics. While production solvers utilize calibrated mechanistic differential equations for numerical efficiency, the variational formulation serves as a rigorous thermodynamic boundary constraint and validation standard.
The Tissue Lagrangian Density
Sinusoidal blood flow modulated by porosity and fibrosis-driven resistance.
Advection, diffusion, and reaction of AGEs, sRAGE, TGF-β, and O₂.
Elastic energy of fibrotic fronts; collagen deposition vs. MMP degradation.
Potential landscape encoding HSC activation, hepatocyte viability, and fenestration.
Toward precision intervention timing in hepatic fibrosis.
Why a Lagrangian?
From Forces to Energy
Traditional computational biology models are built from rate equations — phenomenological rules that describe how quantities change over time. These rules must be individually tuned, and there is no guarantee that the resulting system conserves mass, energy, or momentum correctly across resolutions.
The tissue Lagrangian framework provides a unified mathematical structure for coupling continuum fluid dynamics with discrete cellular kinetics. While production solvers utilize calibrated mechanistic differential equations for numerical efficiency, the variational formulation serves as a rigorous thermodynamic boundary constraint and validation standard.
Conservation
Every symmetry in the Lagrangian produces a conservation law automatically — mass, momentum, and energy are preserved by construction, not patched after the fact.
Resolution Independence
Because the Lagrangian is defined in the continuum, discretization preserves the underlying physics. Results at 64³, 128³, 384³, and 512³ agree to <8% — validated explicitly.
No Curve-Fitting
Disease parameters emerge from free-energy minimization, not from fitting to macroscopic clinical endpoints. The model predicts outcomes it was never calibrated against.
The Compact Form
Three Sectors of Tissue Physics
Paper 3 of the Lagrangian BioTwins monograph defines the tissue Lagrangian density as the sum of three sectors — fluid, solid, and cellular — plus a Rayleigh dissipation function for irreversible processes:
The equations of motion follow from the dissipative Euler–Lagrange equations:
This is the template. Paper 4 fills in the specific functional forms — the free energies, potentials, and dissipation coefficients — using the production simulation engine as the source of biological knowledge.
The Engine Formulation
Seven Free-Energy Functionals
When the three compact terms are expanded using the specific functional forms validated in the V3.8.32-L7 production engine, the tissue Lagrangian decomposes into seven identifiable free-energy functionals — each grounded in a distinct physical mechanism:
with Rayleigh dissipation R = Σᵢ (γᵢ/2) q̇ᵢ² and external forces Q = {injury input, fat input, bone marrow replenishment, apoptosis, NK killing}.
Term-by-Term
The Seven Functionals
Sinusoidal Blood Flow
The kinetic energy of blood flowing through the sinusoidal network. Porosity φ modulates the effective flow volume — as fenestrations close during capillarization, the available flow cross-section shrinks, increasing velocity and shear stress in remaining channels.
→ Drives portal pressure (HVPG). Validated against catheterization data as an out-of-sample prediction.
Capillarization Resistance
An effective potential encoding the progressive loss of sinusoidal fenestrations as fibrosis advances. As collagen deposits around sinusoids, the endothelium transitions from fenestrated to continuous — fundamentally altering substrate transport and increasing vascular resistance. The functional form ε(f) is monotonically increasing in fibrosis fraction.
→ Explains why portal hypertension can persist even after fibrosis regression — capillarization is partially irreversible.
Variational Flux Stabilization
A novel penalty term that enforces conservation of mass flux across resolution boundaries. This is the only component of the engine derived from a formal variational principle rather than from biochemistry — it is the mathematical mechanism that guarantees resolution independence. The quadratic form in ∇·J penalizes non-physical flux divergence, while the fibrosis-dependent coefficient β_eff ensures the constraint tightens as tissue stiffens.
→ This is why the simulation produces the same disease trajectory at 64³, 128³, 384³, and 512³. Foundation of the resolution-invariance patent (U.S. Prov. App. No. 64/101,014).
Fibrotic Front Surface Tension
The elastic energy cost of sharp fibrosis boundaries. This Ginzburg-Landau gradient term acts as a surface tension for fibrotic fronts — it prevents infinitely thin fibrotic interfaces and controls the spatial smoothness of collagen distribution. The diffusion coefficient D(f) is fibrosis-dependent, encoding the observation that established fibrotic regions resist further spatial reorganization.
→ Governs the spatial pattern of fibrosis: perisinusoidal "chicken-wire" at early stages, bridging fibrosis at F3, diffuse cirrhotic nodules at F4.
Net Collagen Turnover
The competition between collagen degradation (MMP-driven, quadratic penalty) and collagen deposition (HSC-driven, linear source). The effective degradation rate Γ_eff encodes stoichiometric TIMP-1/MMP neutralization. The HSC chemical potential μ_HSC captures the net fibrogenic drive from activated stellate cells. When μ_HSC exceeds Γ_eff · f, net deposition wins.
→ Explains why antifibrotic therapy targeting a single pathway (e.g., TGF-β blockade alone) is insufficient at F3–F4: the TIMP-1/MMP stoichiometric shield blocks enzymatic degradation regardless of MMP levels.
The Irreversibility Threshold
A Landau-type order parameter that activates at the percolation threshold p_c = 0.31. Below this threshold, collagen fibers are spatially disconnected and can be individually degraded by MMPs. Above it, fibers form a mechanically stable, connected network spanning the lobule — resistant to enzymatic degradation regardless of MMP activity.
→ This is the F2-to-F3 transition — the single most important prediction of the model. Identifies the exact point where fibrosis transitions from "removable individual fibers" to "self-supporting scaffold."
Stellate Cell Landscape
A free energy landscape governing transitions between five HSC functional states: Quiescent (qHSC), Primed/Inflammatory (pHSC), Activated Collagen-Producing (aHSC), Proliferative/Migratory (mHSC), and De-activated/Inactivated (iHSC). The first sum captures intrinsic state energies and entropic mixing; the second sum encodes state-state interactions. The landscape's minima shift as fibrosis and TGF-β levels change — at advanced fibrosis, the "activated" minimum deepens irreversibly.
→ The five-pool state machine is why SAM-mediated resolution works at F2 (de-activation pathway is accessible) but fails at F3+ (activation rate exceeds de-activation + NK killing rate).
Additional Cell Sector Potentials
Hepatocyte Viability
A double-well Landau potential encoding the bistability of hepatocyte populations. The coefficient a(f,T) depends on local fibrosis and TGF-β — when fibrosis exceeds a critical value, the "viable" minimum destabilizes and the hepatocyte population collapses to a low-viability state. This captures the clinically observed phenomenon of sudden hepatocyte loss at the F3→F4 transition.
Fat-Loading Energetics
A free energy functional governing intracellular lipid accumulation. The quadratic term drives steatosis toward an equilibrium set by dietary and metabolic inputs; the cross-coupling λ_S · S · f captures the bidirectional relationship between fat loading and fibrogenesis that distinguishes MASLD from ALD. This is the L7 Lagrangian correction that enables dual-etiology simulation.
Dissipation & External Forces
Beyond the Lagrangian
Biological tissue is not a conservative system — viscous losses, irreversible chemical reactions, and externally driven processes all play essential roles. The extended Euler–Lagrange formulation accommodates these through two additional terms:
Rayleigh Dissipation Function
The first term is viscous dissipation in sinusoidal blood flow — viscosity η increases with fibrosis as sinusoids narrow. The second term captures relaxation losses in solute dynamics (oxygen, TGF-β, sRAGE). The dissipation function modifies the Euler–Lagrange equations, introducing the damping forces that prevent non-physical oscillations in tissue dynamics.
External Forces
Five non-conservative forces drive the system from outside the Lagrangian:
- Injury input — ethanol toxicity (ALD) or lipotoxic stress (MASLD), the primary fibrogenic stimulus
- Fat input — dietary lipid loading, setting the steatosis equilibrium
- Bone marrow replenishment — continuous supply of monocyte-derived macrophages and stellate cell progenitors
- Apoptosis — programmed cell death of senescent HSCs and damaged hepatocytes
- NK cell killing — innate immune surveillance that eliminates activated HSCs via TRAIL and perforin pathways
7
Free-Energy Functionals
Mapped from 19 engine subsystems
8
Spatial Fields
ρ, φ, v, f, cᵢ, h, S, Nα
12
Scalar State Variables
Tracked per voxel per timestep
Paper 4 of the Lagrangian BioTwins monograph demonstrates that all 19 subsystems of the V3.8.32-L7 production engine are gradient flow on the seven free-energy functionals defined above. Every Hill function in the engine is identified as a binding partition function from equilibrium statistical mechanics. Every rate equation is shown to be a dissipative Euler–Lagrange equation. The Lagrangian reformulation is not an approximation — it is already implicit in the existing code.
Validation
Resolution Independence: The Proof
The acid test of a Lagrangian-based simulation is resolution independence: if the physics is correctly encoded in the functional, then changing the grid resolution should not change the emergent predictions. We validated this explicitly across four grid resolutions, all run from identical initial conditions:
| Grid | Mean Fibrosis | Fibrotic Fraction | HVPG (mmHg) | TGF-β | Fenestration | Runtime |
|---|---|---|---|---|---|---|
| 64³ | 0.590 | 0.990 | 26.56 | 17.07 | 0.092 | 3.5 min |
| 128³ | 0.639 | 0.990 | 31.48 | 19.07 | 0.083 | 8.0 min |
| 384³ | 0.631 | 0.990 | 30.65 | 18.36 | 0.085 | 55 min |
| 512³ | 0.623 | 0.990 | 29.74 | 18.10 | 0.086 | 138 min |
| Range | 8.3% | 0% | 18.5% | 11.7% | 10.4% | — |
All four grids reach F4-COMPENSATED / CIRRHOTIC from step 0 with identical disease staging. Fibrotic fraction is invariant (0.990) across all resolutions. The 384→512 delta is <3% on all disease metrics. Richardson extrapolation confirms that the 512³ result is within 1.8% of the infinite-resolution limit. Non-monotonic convergence (overshoot at 128³, then settle) is physically expected from the percolation transition.
→ Resolution independence is not a feature — it is a mathematical consequence of deriving discretization from the Lagrangian rather than discretizing the equations directly. This is Salmon's Principle: approximate the Lagrangian first, then derive equations. Never approximate the equations directly.
Technical Papers
The Lagrangian BioTwins Series
The mathematical foundation is documented in a five-part series, available individually or as a unified monograph. All papers are open-access under CC-BY-4.0.
The Lagrangian Approach to Physics: From Newton to Noether
Zenodo·10.5281/zenodo.21384827
From Newton to Noether: why modern physics speaks the language of action, and how symmetries guarantee conservation laws.
Download PDFThe Lagrangian Approach to Fluid Dynamics: From Particles to Continua
Zenodo·10.5281/zenodo.21384829
Extending variational principles from particles to continuous media. Derives Navier-Stokes and vorticity transport from a single functional. Introduces Salmon's Principle.
Download PDFToward a Lagrangian Framework for Biological Digital Twins
Zenodo·10.5281/zenodo.21384833
Proposes the tissue Lagrangian template and surveys the literature: no research group has previously proposed or implemented a Lagrangian-based digital twin of any biological organ.
Download PDFLagrangian Reformulation of a Biological Digital Twin Engine
Zenodo·10.5281/zenodo.21384835
Maps all 19 subsystems of the production engine into seven free-energy functionals. Identifies every Hill function as a binding partition function. Demonstrates that the Lagrangian reformulation is already implicit in the existing code.
Download PDFResolution Independence of a Lagrangian Biological Digital Twin
Zenodo·10.5281/zenodo.21384837
Validates resolution independence across 64³–512³ grids. Mean fibrosis range 8.3%, fibrotic fraction invariant at 0.990, 384→512 delta <3% on all metrics. Richardson extrapolation confirms 512³ is within 1.8% of the infinite-resolution limit.
Download PDFToward a Lagrangian Framework for Biological Digital Twins: From Variational Mechanics to Organ-Scale Simulation
Zenodo·10.5281/zenodo.21344550
The unified P1–P4 monograph. Complete end-to-end derivation from first-principles classical action to production engine architecture.
Download PDFThe tissue Lagrangian is the mathematical foundation of every prediction, patent claim, and clinical validation in our portfolio.