This page details the computational approach for simulating diffusion and crosslinking processes in alginate-based ink formulations.
Introduction to the Hydrogel Crosslinking Mechanism
We were interested in computationally modeling the crosslinking of sodium alginate when exposed to calcium chloride within our bioink samples. This approach aims to quantify calcium ion diffusion based on a defined set of parameters, which will guide optimization of our bioink composition protocols. This will help ensure structural integrity of our printed structures.
Hydrogel crosslinking within our bio-ink is visualized in Figure 1 below:
Figure 1. A diagram of the cross-linking mechanism of our bio-ink sample exposed to calcium chloride.
Calcium ions (Ca2+) from the calcium chloride solution diffuse into the gel, where some are captured by sodium alginate through crosslinking, forming a solidified gel zone. As more ions continue to diffuse, the already gelled region creates a physical barrier, slowing diffusion. This interaction between Ca2+ ion movement and gelation creates a crosslinking zone. Additionally, sand present in the bioink blocks calcium ion diffusion and crosslinking networks.
ASSUMPTION 1: Diffusion Modelling with Alginate-Regolith Bio-Ink Only
We focused on diffusion modeling within alginate-regolith ink, as these are the primary components of our bioink. To simplify the problem, we excluded the effects of CMC, UTEX2973, and its growth media on diffusion and crosslinking.
We designed an experimental protocol to measure diffusion and crosslinking of our alginate-based bioinks by microscope.
We built microscope experiments to view cross-linking for our alginate-only and 30 wt% earth sand alginate gels.
We tested a mathematical framework which uses images of the cross-linking front to model diffusion in 3D shapes.
We learned that we could not view cross-linking for our sand-alginate bioink formulations under a microscope, so we needed a new approach.
Our Approach
Our initial modeling approach focused on observing in vivo cross-linking in ink samples to develop intuition about the underlying processes. We conducted microscopy-based experiments 2025.06.11 Calcium Diffusion Under Microscope (1) and 2025.06.12 Calcium Diffusion Under Microscope (2) to track calcium ion diffusion, drawing from [1]. This methodology was selected for its accessible computational strategy and use of microscopy to visualize regolith particle size and distribution.
Computational Strategy
The model shows how the crosslinking agent diffuses in three dimensions by calculating small changes over time and distance. They specifically do this by using Equation 1, which demonstrates the dependence of crosslinking zone displacement xc(t) on the square root of the time elapsed.
xc(t)=kt
Equation 1 is obtained from the analytical solution to the diffusion equation in Cartesian coordinates. The authors also demonstrate the linear dependance of xc on t for solutions in spherical and cylindrical coordinates approximated with a second-order Taylor series expansion. The consistency across coordinates shows that the square root relationship between crosslinking distance and time holds true in different shapes, making the model more reliable.
k=Cg4C0D
Co: initial concentration of Ca2+
D: diffusion coefficient of the free Ca2+ ions in the cross-linked scaffold
Cg: concentration of binding sites of alginates that can react with Ca2+ ions
The constant k, whose analytical basis is established from the diffusion equation, can be obtained experimentally from the gradient of the line produced by plotting xc against t . This constant can then be used to compute the instantaneous diffusion time at a given penetration depth.
Methodology
The methodology aims to experimentally determine the value of k for our bio-ink samples. This procedure primarily relies on the fact that cross-linked alginate turns opaque compared to its free form. The cross-linking front displacement increments xc(t) can then be measured by pixel analysis. A microscope is used to sample the cross-linking displacement increments, since the relationship in Equation (1) only holds for small penetrations and small times.
Figure 2. 200μL alginate solution (on the right) added with 100μL calcium chloride (on the left). Diffusion observed seen by the differences in color of the alginate solution (represents solidification) and the green arrow indicates the diffusion direction.
Results
Figure 3. Captured image of the bio-ink composition under a microscope.
ASSUMPTION 2: “Simple Diffusion with a Barrier” Modelling Approach
Based on Figure 3, we assumed calcium ion diffusion in the bio-ink follows simple diffusion with sand particles acting as barriers, since their dispersion was insufficient to classify the ink as porous media.
Fatemah is a PhD student in Applied Mathematics at UBC, specializing in mathematical biology, with an undergraduate background in Mechanical Engineering. We consulted her to validate our diffusion modeling approach for the sand–alginate system, clarify numerical methods for solving differential equations, and guide our application of finite element analysis to simulate crosslinking behavior.
Fatemah Saghafifar
PhD student, Institute of Applied Mathematics, UBC, Vancouver
We tested two bioink samples: one with pure alginate and one with 30% earth sand. While the alginate-only sample showed clear crosslinking behavior, the sand-containing sample lacked observable opacity changes, preventing us from tracking the crosslinking front. Additionally, the crosslinker failed to diffuse beneath the microscope slide in the sand-alginate sample, leaving it soft and uncrosslinked.
Figure 4. Calcium chloride solution added to bio-ink under a microscope slide but no cross-linking was captured.
Next Steps
After encountering failure during Testing, we experimented with increasing the crosslinking time and reducing the bio-ink volume applied to the slide from 200μL to 50μL. Despite these adjustments, persistent issues with ink viscosity and visual interference from sand particles led us to adopt an alternative modeling approach.
We designed another experimental protocol which measures absorbed volume changes in alginate-based bioinks in vials.
We built experiments to view cross-linking for our alginate-only, 30wt% earth sand, and 20wt% MGS-1 alginate gels.
We tested a one-dimensional model that uses coupled differential equations to simulate calcium diffusion and crosslinking in our bioink.
We learned that we could successfully implement our computational model, and calibrate it to experimental data from our sand-alginate bioink formulations.
Our Approach
We modelled sodium alginate crosslinking using the approach from [2], which predicts calcium chloride absorption over time. This was ideal for our bioink containing sand, which blocks visual tracking. The model combines partial and ordinary differential equations to describe ion diffusion and gelation in one dimension. After validating with a control experiment, we calibrated it to our sand alginate bioink using feedback from Prof. Michele Marino, enabling diffusion estimates across different extrusion geometries.
We consulted Professor Michele Marino, Associate Professor in the Department of Civil Engineering and Computer Science Engineering at the University of Rome Tor Vegata, and a recognized expert in chemo mechanical modelling and hydrogel simulation. As a co-author of our reference paper, he helped us interpret the model, clarify key assumptions, and adapt it to bioink crosslinking with sand particles. He recommended adjusting parameters such as diffusion coefficients to better reflect the behaviour of our ink samples.
Prof. Michele Marino
Associate Professor, Continuum and Structural Mechanics, University of Rome Tor Vegata
Computational Model
The computational model by Hajikhani et al. models the geometry of the problem as one-dimensional ([2]). This means that the calcium ions diffuse along a line of length L, seen in Figure 1. A variable x is introduced, which represents the position along this line, i.e. x∈[0,L]. The variable t is also introduced, which is the time elapsed, t∈[0,tend].
The authors then define two functions of x and t, which are the calcium ion concentration and gelation degree.
Calcium ion concentration:c=c(x,t)Gelation degree:α=α(x,t)
The gelation degree is mathematically represented by the ratio of the concentration of solidified gel (cg) to the initial concentration of free alginate (ca). This ratio serves as a quantitative indicator of the extent of alginate solidification.
α=cacg∈[0,1]
When α=0, the concentration of solidified gel is zero (cg=0), indicating no cross-linking has occurred and the gel remains liquid. When α=1, the concentration of solidified gel equals the initial concentration of free alginate (cg=ca), meaning all alginate chains are fully crosslinked and the gel is completely solidified.
Diffusion Coefficient as a function of Gelation Degree (α):
As shown earlier in Figure 1, the progression of the crosslinking zone inhibits Ca2+ diffusion. One way to model this is to parametrize the diffusion coefficient as a function of the gelation degree (α). In other words, the physical state of the gel affects the diffusivity of calcium ions by the relationship below.
D(α)=D0+(D1−D0)eαgel−n−1eαgel−nα−1
Where:
D0: Diffusion coefficient of Ca2+ ions across the liquid gel (α=0).
D1: Diffusion coefficient of Ca2+ ion across the fully solid gel (α=1).
αgel: The characteristic gel point defined by 0≤αg≤1. It is a value of the gelation degree for the alginate to just start behaving as a solid, without being fully crosslinked.
n is a parameter which sets the rate of diffusivity change.
In our iHP meeting with Prof. Marino, we learned that the diffusion coefficient function D(α) is a postulation by the authors, which they found led to numerical results aligned closely with experiments.
Reaction-Diffusion Equation:
The reaction-diffusion partial differential equation in 1D is derived from a simplified form of the Mikkelsen-Elgsaeter model ([3]). An assumption made here is the diffusion of free alginate molecules out of the gel is negligible.
∂t∂c−∂x∂(D(α)∂x∂c)=−r=sink term−Ncca∂t∂α
Where:
Nc: The stoichiometric coefficient for the number of Ca2+ ions used up per alginate-alginate crosslink The effects of crosslinking are accounted for with a “sink” term. Alginate cross-linking acts as a sink to free diffusing Ca2+ ions by depleting their concentration when within its lattice.
Gelation Reaction Equation:
∂t∂α=Kcac(1−α)
The partial derivative on the left hand side of the equation is the evolution of the gelation degree which depends on:
c(x,t): the concentration of Ca2+ ions
ca: the initial concentration of free alginate
K: an experimentally fitted model parameter associated with the reaction rate.
Computational Strategy
To solve the system of equations for our experimental conditions we used FEniCS, an open source finite element library PDE solver. Our full implementation is available on GitLab, but we have gone through the steps of the program.
Boundary and Initial Conditions:
The first step to our computational strategy was implementing the provided boundary and initial conditions. This was done using the FEniCS boundary and initial condition set-up for finite element analysis.
cˆ : The concentration of Ca2+, where cˆ=wcacˆca
wca: The weight fraction of Ca2+ in CaCl2 solution.
cˆca: The initial concentration of Ca2+ at the boundary.
Discretization of the Temporal and Spatial Domain:
The time interval t∈[0,tend] is discretized into n time intervals such that Δt=tn−tn−1. We iterate over n to cover the total time. The spatial domain is x∈[0,L], represented as a mesh, is split into N nodes to create the finite element grid space.
Euler’s Method to solve Gelation Reaction Equation: The third step was to use Euler’s method to compute the next iteration αn recursively using the previous value, αn−1. We use the general form of Equation 11 in our program, however our indexing starts from n=0, with an assigned initial condition of α0=0. These gelation degree values are then used to compute the diffusion coefficient D(α)
αn=αn−1+Kcacn−1(1−αn−1)Δt
The values αn and αn−1 are used for a finite difference approximation of the time derivative of the gelation degree, shown in Equation 12. This is used to assign the RHS sink term of Equation 7, when solving for the variational problem in the next step.
∂t∂α≈Δtαn−αn−1FEniCS Finite Element Solver:
FEniCS uses the finite element method, which works with PDEs in their weak form. We need a trial function u, which is a symbolic placeholder for the unknown calcium concentration cn , and a test function v to convert our PDE to this form.
We approximate the time derivative of the calcium ion concentration as:
∂t∂c≈Δtcn−cn−1
Then substitute it into Equation 7, multiply by our test function v and integrate over the domain to convert the PDE to its weak form. The vector notation is used for simplicity in FEniCS programming, even though our problem is in 1D and does not require it.
∫ΩΔtcn−cn−1vdx−∫Ω∇⋅(Dα∇cn)vdx=−∫Ωrnvdx
The input to the solver function in FEniCS requires the weak form in Equation 14 to be expressed in it’s discrete variational form, shown in Equation 15.
a(u,v)==l(v)
After integrating by parts, rearranging, and replacing $c_n $ with our trial function u, Equation 14 can be written in the form of Equation 15 by:
a(u,v)∫ΩΔt1uvdx+∫ΩDα∇u⋅∇vdx=l(v)∫ΩΔt1cn−1vdx−∫ΩrnvdxComputing volume at the boundary:
The last step of the program is to compute the volume of calcium chloride absorbed through the top surface of the gel over the time elapsed.
Vc(t)=wcaρCaCl2A∫0tD∂x∂ccx=0dt
Where:
A: The cross-sectional area of the vial. Here it is a circle, so A=πr2, where r is the radius of the vial.
Figure 5. Red 100 mM calcium chloride solution added to earth sand alginate gel (top), and MGS-1 alginate gel (bottom).
The difference in weight before and after crosslinking was calculated and converted to volume of calcium chloride absorbed through the following equation:
vCaCl2=ρCaCl2wf−wi
Where the difference in weight is divided by density of calcium chloride. We approximated the density as 1.007 g/mL. The assumption made is that the aqueous calcium chloride solution is uniformly mixed, so the fraction of calcium chloride molecules per volume of crosslinker absorbed by the gel can be considered constant.
Model Validation
After executing our computational strategy, we wanted to validate our results to ensure the model was working properly. To do this, we fitted model parameters from [2], in order to recreate Figure 3(a) from their paper. The computational model is run for two cases of D(α).
Case where D(α)=D0:
Assumes constant diffusion coefficient D0. Keeping the diffusion coefficient constant is a much easier starting point for validating results than the original expression in Equation 6. The downside is that it does not fully capture the effects of cross-linking by neglecting the changes in diffusion coefficient from gelation. This results in a curve that deviates away shown in Figure 6.
Case where D(α) takes the form in Equation 6:
The use of this expression in our computation results in a volume output that is much closer to experimental values.
Figure 6: Results for the absorbed volume of calcium chloride with D0 in blue and and Dalpha in red using model parameters from our reference paper.
The full list of parameters used for the above can be found in our github repository. Comparing our results to [2] Figure 3(a) reveal close alignment in the absorbed volume change profiles for both D0 and Dα. Although some differences in values are observed, such as near the boundaries, these may be due to how the solvers handle discretization or error propagation. They may also be attributed to mesh or temporal resolution variations. Still, the strong agreement between our results and those referenced indicate our approach was successful at implementing their model.
Figure 7: Absorbed volume of calcium chloride results for alginate-only gel (0% sand).
The full list of parameters used for the above can be found in our github repository. After determining the absorbed volume of calcium chloride from our measurements, we then overlayed the data points onto our numerical results shown in Figure 8. The model parameters are adjusted for the geometry of our vials, as well as differences in reagent concentration. The fitted D(α) model had R2=0.84, demonstrating good agreement with the experimental data. However, we found our RMSE=29.2%, which most likely is attributed to random error from our experiments, or model deviation.
Results
We repeated our experimental methodology for the 30% sand and 20% MGS + 3.5% CMC bio-ink samples. This decision was informed by our iHP meeting with Prof. Marino, who recommended adjusting parameters in Equation 6 to better align our model with the experimental data. The impact of regolith incorporation on the crosslinking behavior of alginate-based bioinks remains largely unexplored due to the novelty of the approach. However, we noted that sand particles act as barriers to Ca2+ ion diffusion, likely influencing the parameters D0, D1 and αgel, which characterize the bio-ink’s solidification dynamics.
Figure 8: Absorbed volume of calcium chloride results for 30 wt% earth sand alginate gel and 20 wt% MGS-1 alginate gel.
The full list of parameters used for the above can be found in our github repository. For the 30 wt% earth sand and 9 wt% CMC alginate gel measurement, we attained good results by fixing D0 and αgel, while setting D1=0.25D0. Our calibrated model D(α) curve had an R2=0.97, indicating a strong trend fit between the model and experimental data. Additionally, the RMSE=7.8%, suggesting that the model’s predictions closely matched observed values with relatively low error.
Parameter fitting for our 20 wt% MGS-1 and 3.5% wt% CMC alginate gel was more challenging. We found that fixing D0, while setting D1=0.05D0 and αgel=0.8, yielded the best calibrated model fit, with an R2=0.47 and RMSE=16.49%. Unfortunately, parameter fitting was done heuristically rather than through formal optimization. However, our choices were guided by physical reasoning: the diffusion coefficients were lowered to reflect reduced Ca2+ diffusion from particle obstruction, and αgel was increased to account for the higher ion concentration required to initiate gelation in the presence of these barriers.
Future Directions
For future modelling, we would like to study how embedded particles quantitatively affect Ca2+ diffusion, or cause lattice destabilization. This would inform our calibration approach to D0, D1, and αgel A potential future step might be to train a computer model to estimate optimal parameter values. The calibrated model will then be tested on extruded ink samples and hopefully extended to two and three dimensions to explore living building material geometries that enhance crosslinking and MICP, ensuring structural integrity.
1. Palma JH, Bertuola M, Hermida ÉB. Modeling calcium diffusion and crosslinking dynamics in a thermogelling Alginate-Gelatin-Hyaluronic acid ink: 3D bioprinting applications. Bioprinting [Internet]. 2024 Apr 1 [cited 2025 Sept 19];38:e00329. Available from: https://www.sciencedirect.com/science/article/pii/S2405886624000010
2. Hajikhani A, Scocozza F, Conti M, Marino M, Auricchio F, Wriggers P. Experimental characterization and computational modeling of hydrogel cross-linking for bioprinting applications. Int J Artif Organs [Internet]. 2019 Oct 1 [cited 2025 Sept 25];42(10):548—57. Available from: https://doi.org/10.1177/0391398819856024