Description

This notebook simulates the elution of a ternary mixture through a packed chromatographic column. Band propagation is described by the equilibrium–dispersive (ED) model: the three solutes are carried along by convection, broadened by an apparent axial dispersion coefficient that lumps together all band-broadening effects, and are assumed to be in adsorption equilibrium with the stationary phase at every point of the column.
Competition of the solutes for the limited adsorption sites is described by the competitive Langmuir isotherm, which couples the three partial differential equations. The coupled system is solved numerically with NDSolve (method of lines). The outlet chromatograms are then analyzed with statistical moments to obtain retention times, band widths, skewness, kurtosis, peak asymmetry, plate numbers and resolution.

Governing equations

Mass balance of solute
i
in the column (
i=1,2,3
):
∂
c
i
∂t
+F
∂
q
i
∂t
+u
∂
c
i
∂z
=
D
a
2
∂
c
i
∂
2
z
with the phase ratio
F=
1-ϵ
ϵ
and the competitive Langmuir isotherm, in which every solute appears in the denominator:
q
i
=
a
i
c
i
1+
∑
j
b
j
c
j
The time derivative of
q
i
is expanded with the chain rule,
∂
q
i
∂t
=
∑
j
∂
q
i
∂
c
j
∂
c
j
∂t
which produces negative off-diagonal terms for
j≠i
: the presence of one solute lowers the loading of the other (displacement and tag-along effects).
Mass - balance matrix
M=I+F
dq
dc
is inverted once symbolically. The PDEs are then written in explicit form
dc
dt
=
-1
M
Da
2
d
c
2
dz
-u
dc
dz
.

Initial and boundary conditions

Initial condition (column nearly clean; the narrow Gaussian keeps the initial and inlet conditions consistent at the corner
t=0,z=0
):
c
i
(0,z)=
c
0,i
-1000
2
z
e
Inlet (rectangular pulse of duration
t
inj
):
c
i
(t,0)=
c
0,i
,t≤
t
inj
c
i
(t,0)=0,t>
t
inj
Outlet (no diffusive flux at the column end):
∂
c
i
∂z
z=L
=0

Parameters and symbols

◼
  • L
    – column length (cm);
    u
    – interstitial velocity (cm/s);
    D
    a
    – apparent axial dispersion coefficient (cm^2/s)
  • ◼
  • ϵ
    – total bed porosity;
    F
    – phase ratio
  • ◼
  • c
    i
    – mobile-phase concentration of solute
    i
    ;
    q
    i
    – stationary-phase concentration in equilibrium with
    c
    i
  • ◼
  • a
    i
    – Henry constant (initial slope of the isotherm);
    b
    i
    – Langmuir saturation (competition) coefficient
  • ◼
  • c
    0,i
    – injected (feed) concentration;
    t
    inj
    – injection time;
    t
    end
    – simulated time
  • Workflow

    1
    .
    Define the parameters and the injection pulse.
    2
    .
    Define the competitive Langmuir isotherm and write the coupled PDE system.
    3
    .
    Set the initial and boundary conditions and solve with NDSolve.
    4
    .
    Plot the outlet chromatograms
    c
    i
    (t,L)
    .
    5
    .
    Compute the moments and peak-shape descriptors and display the summary table.

    Quantities computed

    ◼
  • Zeroth moment (peak area, used as a mass-balance check), first moment (mean retention time), variance, and third and fourth central moments.
  • ◼
  • Skewness and excess kurtosis, with and without correction for the finite injection width.
  • ◼
  • Apex retention time, full width at half height, USP tailing factor (5% height) and asymmetry factor b/a (10% height).
  • ◼
  • Retention factor k′, plate number (from moments and from half-height width), plate height, and resolution between consecutive peaks (1/2 and 2/3).
  • Notes

    In the linear limit (small
    b
    i
    c
    i
    ) the retention times are approximately
    t
    R,i
    ≈
    L
    u
    (1+F
    a
    i
    )
    which serves as a check of the numerical result.
    ◼
  • The Gaussian initial condition places a small amount of extra solute near the inlet, so the peak area can be slightly larger than the injected mass; compare the two in the summary table.
  • ◼
  • Units: lengths in cm, time in s, concentrations in consistent arbitrary units.
  • (* Three-Component Equilibrium-Dispersive Chromatography
    Competitive Langmuir isotherm, rectangular pulse injection
    Parameters (cm, s)
    L=25;u=0.1;Da=2*^-3;(*columnlength,interstitialvelocity,dispersion*)​​eps=0.4;F=(1-eps)/eps;(*porosity,phaseratio*)​​nc=3;(*numberofcomponents*)​​aL={1.0,1.5,0.75};(*Langmuira_i*)​​bL={0.05,0.05,0.05};(*Langmuirb_i*)​​c0={1,0.5,0.75};(*injectedconcentrations*)​​tinj=10;(*injectiontime*)​​tend=1500;(*endtime;linear-limitt_R,i=(L/u)(1+Fa_i)=625,812.5,531.25s*)​​
    Injection pulse (same rectangular pulse for all components)
    cin[i_,t_]:=If[t>tinj,0,c0[[i]]];
    PlotEvaluate@Table[cin[i,t],{i,nc}],{t,0,100},
    
    Out[]=
    c1 inlet
    c2 inlet
    c3 inlet
    Concentration profiles c1[t,z], c2[t,z], c3[t,z]
    c=Table[Symbol["c"<>ToString[i]][t,z],{i,nc}];
    In[]:=
    c
    Out[]=
    {c1[t,z],c2[t,z],c3[t,z]}
    Competitive Langmuir isotherm and Jacobian dq_i/dc_j
    q[cc_List]:=aLcc/(1+bL.cc);
    In[]:=
    q[c]
    Out[]=
    
    1.c1[t,z]
    1+0.05c1[t,z]+0.05c2[t,z]+0.05c3[t,z]
    ,
    1.5c2[t,z]
    1+0.05c1[t,z]+0.05c2[t,z]+0.05c3[t,z]
    ,
    0.75c3[t,z]
    1+0.05c1[t,z]+0.05c2[t,z]+0.05c3[t,z]
    
    Mass-balance matrix M = I + F dq/dc, inverted once symbolically. The PDEs are then written in explicit form dc/dt = M^-1 . (Da d2c/dz2 - u dc/dz), so NDSolve does not have to solve the coupled 3x3 time-derivative system itself.
    cv=Array[cs,nc];(*dummyconcentrationsymbols*)​​Jq=Outer[D,q[cv],cv];(*Jacobiandq_i/dc_j*)​​Minv=Inverse[IdentityMatrix[nc]+FJq];

    Governing PDE system (explicit form)

    pde=Thread[D[c,t]==(Minv/.Thread[cv->c]).(DaD[c,{z,2}]-uD[c,z])];
    Initial and boundary conditions
    ics=Table[(c[[i]]/.t->0)==c0[[i]]Exp[-1000z^2],{i,nc}];(*cleancolumn*)​​bcIn=Table[(c[[i]]/.z->0)==cin[i,t],{i,nc}];(*inlet*)​​bcOut=Table[(D[c[[i]],{z,1}]/.z->L)==0,{i,nc}];(*outlet*)
    In[]:=
    ics
    Out[]=
    c1[0,z]
    -1000
    2
    z
    
    ,c2[0,z]0.5
    -1000
    2
    z
    
    ,c3[0,z]0.75
    -1000
    2
    z
    
    
    In[]:=
    bcIn
    Out[]=
    {c1[t,0]If[t>10,0,c0〚1〛],c2[t,0]If[t>10,0,c0〚2〛],c3[t,0]If[t>10,0,c0〚3〛]}
    In[]:=
    bcOut
    Out[]=
    
    (0,1)
    c1
    [t,25]0,
    (0,1)
    c2
    [t,25]0,
    (0,1)
    c3
    [t,25]0
    Solve
    sol=Quiet@NDSolve[Join[pde,ics,bcIn,bcOut],c,{t,0,tend},{z,0,L},AccuracyGoal->5];
    Chromatogram at the outlet
    PlotEvaluate[c/.sol/.z->L],{t,0,tend},
    
    Out[]=
    Component 1
    Component 2
    Component 3
    Outlet concentrations of all components at time tt

    Moment and peak-shape analysis of the outlet chromatograms

    Integration range 0..tend, split into segments so that the adaptive integrator cannot miss a peak.
    Zeroth moment = area (mass)
    First moment = mean retention time
    Skewness
    Excess kurtosis
    Correct for the finite rectangular injection (width tinj)
    Mean residence time
    Variance of the column response
    Rectangular pulse is symmetric: mu3 unchanged
    Apex retention time (maximum search started at the linear-limit estimate)
    Peak widths / asymmetry by linear interpolation on the grid
    Column efficiency and retention
    Hold-up time of the interstitial fluid
    Retention factor k’
    Plate number from moments
    Plate number from half-height width
    Plate height (cm)
    Linear-limit reference (valid when b*c0 << 1)
    Summary
    Resolution between neighboring peaks, in order of elution

    CITE THIS NOTEBOOK

    Three-component chromatographic separation: equilibrium-dispersive model with competitive langmuir isotherms​
    by Housam Binous​
    Wolfram Community, STAFF PICKS, October 13, 2026
    https://community.wolfram.com/t/28328