Example of Thesis Work
Example of Thesis Work
As we know they are many real life examples of Liquid chromatography like in Environmental
Analysis, Food and Beverage Industry, Pharmaceutical Industry, Biotechnology and so on.
So I have taken such one example of Pharmaceutical here;
In Pharmaceutical Industry:
Example: Separation and quantification of active pharmaceutical ingredients (APIs) and
impurities in drug formulations.
Application: HPLC is used to ensure the quality and consistency of drugs. For instance,
the separation of paracetamol (acetaminophen) from its degradation products is critical for
ensuring the safety and efficacy of painkillers.
Since we can solve this example of Pharmaceutical Industry where a common drug like
Paracetamol can be separated from its Impurity (Drug B) by Equilibrium Dispersive model
(EDM) PDE and numerically by finite difference and finite element analysis. But as I have to
do it by Fast Fourier Transform (FFT) in my thesis. So here is an example of how such
example can be done through FFT method
Here we will see how the Fast Fourier Transform (FFT) can be applied to solve
the Equilibrium Dispersive Model (EDM) for the HPLC (High Performance Liquid
Chromatography) separation of Paracetamol and its impurities. We will also look at how
FFT can be integrated into the solution process.
Well we know that the Fast Fourier Transform (FFT) is an efficient algorithm to compute
the Discrete Fourier Transform (DFT) and its inverse. It transforms a signal (or function)
from the time domain (or spatial domain) to the frequency domain and vice versa. The
FFT is widely used in signal processing, image analysis, and solving partial differential
equations (PDEs) numerically.
Key Concepts:
Fourier Transform: Converts a function f(t) into its frequency components F(ω):
The FFT is particularly useful for solving PDEs with periodic boundary conditions or when
the solution can be expressed in terms of sinusoidal basis functions. Because it allows us
to:
1. Transform the PDE into the frequency domain, where differentiation becomes
algebraic multiplication.
2. Solve the transformed equation efficiently.
3. Use the inverse FFT to transform the solution back to the spatial or time domain.
Moreover the FFT can be used to solve the EDM PDE for the HPLC separation of
Paracetamol and its impurities. The (Equilibrium Dispersive model) PDE is:
∂𝐶𝑖 ∂𝐶𝑖 ∂2 𝐶𝑖
+𝑢 = 𝐷𝑎𝑥 2
∂𝑡 ∂𝑧 ∂𝑧
This is a linear advection-diffusion equation, which can be solved efficiently using FFT
in the frequency domain.
Here we will solve the EDM (Equilibrium dispersive model) PDE for Paracetamol (Drug A)
and its impurity (Drug B) using FFT.
𝑡
τ= : Dimensionless time
𝑡0
z
ξ = : Dimensionless axial position
L
𝐶
∅𝑖 = 𝑖 : Dimensionless concentration
𝐶0
∂∅𝑖 𝑘2
+ 𝑖𝑘𝜙̂𝑖 = − 𝜙̂𝑖
∂𝜏 𝑃𝑒
Now solving the Transformed PDE
∂∅𝑖 𝑘2
= − (𝑖𝑘 − ) 𝜙̂𝑖
∂𝜏 𝑃𝑒
𝑘 2
This implies the solution is 𝜙̂𝑖(𝑘, 𝜏) = 𝜙̂𝑖(𝑘, 0) exp [−(𝑖𝑘 − )𝜏]
𝑃𝑒
Now the Initial Condition in Frequency Domain
For an injection pulse at ξ = 0, the initial condition in the frequency domain is:
Use the inverse FFT to transform 𝜙̂𝑖(k, τ) back to the spatial domain:
Elution Profiles
The elution profiles∅𝐴 (1, 𝜏) 𝑎𝑛𝑑 ∅𝐵 (1, 𝜏) will show peaks at:
o 𝜏𝐴 = 1 + 𝑘𝐴 = 3 (Paracetamol).
o 𝜏𝐵 = 1 + 𝑘𝐵 = 5 (Impurity).
The retention times are:
o 𝑡𝑅,𝐴 = 𝑡0 (1 + 𝑘𝐴 ) = 450 𝑠.
o 𝑡𝑅,𝐴 = 𝑡0 (1 + 𝑘𝐴 ) = 750 𝑠
The resolution 𝑅𝑠 can be calculated from the peak widths.
Implementation in Python
import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import fft, ifft
# Parameters
L = 0.15 # Column length (m)
u = 0.001 # Linear velocity (m/s)
D_ax = 1e-6 # Axial dispersion coefficient (m^2/s)
Pe = u * L / D_ax # Péclet number
t0 = L / u # Void time (s)
k_A = 2 # Retention factor for Paracetamol
k_B = 4 # Retention factor for impurity
# Discretization
N = 1000 # Number of spatial points
xi = np.linspace(0, 1, N) # Spatial grid
dxi = xi[1] - xi[0] # Spatial step
k = 2 * np.pi * np.fft.fftfreq(N, dxi) # Frequency domain
# Initial condition (injection pulse)
phi_A0 = np.exp(-100 * (xi - 0.1)**2) # Gaussian pulse for Paracetamol
phi_B0 = np.exp(-100 * (xi - 0.1)**2) # Gaussian pulse for impurity
# Time evolution
tau = np.linspace(0, 10, 100) # Dimensionless time grid
phi_A = np.zeros((len(tau), N), dtype=complex)
phi_B = np.zeros((len(tau), N), dtype=complex)
for i, t in enumerate(tau):
phi_A_hat = phi_A0_hat * np.exp(-(1j * k + k**2 / Pe) * t)
phi_B_hat = phi_B0_hat * np.exp(-(1j * k + k**2 / Pe) * t)
phi_A[i, :] = ifft(phi_A_hat)
phi_B[i, :] = ifft(phi_B_hat)
RESULT
Now with the help of Deep Seek, We changed this python code so that it could also show
the retention times of Drug Paracetamol (A) and the Impurity Drug (B). So here is the
result followed by its code;
Python Code
import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import fft, ifft
# Parameters
L = 0.15 # Column length (m)
u = 0.001 # Linear velocity (m/s)
D_ax = 1e-6 # Axial dispersion coefficient (m^2/s)
Pe = u * L / D_ax # Péclet number
t0 = L / u # Void time (s)
k_A = 2 # Retention factor for Paracetamol
k_B = 4 # Retention factor for impurity
# Retention times
t_R_A = t0 * (1 + k_A) # Retention time for Paracetamol
t_R_B = t0 * (1 + k_B) # Retention time for Impurity
# Discretization
N = 1000 # Number of spatial points
xi = np.linspace(0, 1, N) # Spatial grid
dxi = xi[1] - xi[0] # Spatial step
k = 2 * np.pi * np.fft.fftfreq(N, dxi) # Frequency domain
# Time evolution
tau = np.linspace(0, 10, 100) # Dimensionless time grid
phi_A = np.zeros((len(tau), N), dtype=complex)
phi_B = np.zeros((len(tau), N), dtype=complex)
for i, t in enumerate(tau):
phi_A_hat = phi_A0_hat * np.exp(-(1j * k + k**2 / Pe) * t)
phi_B_hat = phi_B0_hat * np.exp(-(1j * k + k**2 / Pe) * t)
phi_A[i, :] = ifft(phi_A_hat)
phi_B[i, :] = ifft(phi_B_hat)
Lastly what is Elution profiles and Retention Times and how are they calculated is
as under;
Elution Profiles
The elution profile is the concentration of a solute as it exits the column (at z = L) as a
function of time. It is obtained by solving the EDM PDE and evaluating the solution at the
column outlet. Its EDM PDE is already discussed above
Retention Times
The retention time 𝑡𝑅 is the time it takes for a solute to travel through the column and
elute. It depends on the retention factor k and the void time t0
𝑡𝑅 −𝑡0
𝑘=
𝑡0
Where:
𝑡𝑅 : Retention time of the solute.
t0: Void time (time for an unretained solute to pass through the column).
𝑡𝑅 = 𝑡0 (1 + 𝑘)
The void time is the time it takes for the mobile phase to travel through the column:
𝐿
𝑡0 = 𝑢
Where:
L: Column length.
u: Linear velocity of the mobile phase.
Let’s solve for the elution profiles and retention times using the given parameters:
Given Parameters:
Elution Profiles
The elution profiles ∅𝐴 (1, 𝜏) 𝑎𝑛𝑑 ∅𝐵 (1, 𝜏) are obtained by solving the EDM PDE using
FFT (as shown in the Python code). The peaks of these profiles correspond to the
retention times:
For Paracetamol:
𝑡𝑅,𝐴 = 𝜏𝐴 × 𝑡0 = 3 × 150 = 450𝑠
For Impurity:
𝑡𝑅,𝐵 = 𝜏𝐵 × 𝑡0 = 5 × 150 = 750𝑠