1 Introduction

Hydrogels, known for their biocompatibility, high water content, and adaptable mechanical properties, are at the forefront of innovation in the fabrication of functional materials for biomedical applications [62]. The fabrication of hydrogels has been supported by the integration of quantitative experimental techniques with computational models describing the material and mechanical properties of the fabricated hydrogel. A comprehensive review of available experimental methods to investigate hydrogel properties, along with an overview of some common mathematical modeling approaches describing hydrogels’ mechanics and transport properties, can be found in [16]. A recent review of the theories capturing hydrogel’s diffusion-deformation coupled mechanisms can be found in [57].

Diffusion-deformation models for hydrogels combine continuum mechanics and thermodynamics with solvent diffusion physics through the balance of mass and Fick’s law of diffusion [13, 19, 42], but lack an analytical solution in general [21, 57]. Hence, the model’s solution requires numerical methods, such as the Finite Element Method (FEM) [4, 57]. Running such a full-order model (FOM) finite element simulation can become costly [12, 22]. This has hindered the widespread adoption of multiphysics modeling in hydrogel manufacturing, where many-query tasks are often performed, and several hundreds or thousands of similar runs are often necessary. Typical many-query tasks are material parameter identification [64], uncertainty quantification [51], process optimization, model-based 3D printing monitoring, or feedback printing error compensation [40, 56].

Model-order reduction (MOR) offers a promising solution to the challenges posed by the computational burden of multiphysics models. By using a ROM, we can save on computation resources while still capturing the dominant behaviors of the system. ROMs can be tailored to specific regions of interest, ensuring accuracy where it is most crucial. ROMs can bridge the gap between the detailed insights provided by multiphysics models and the practical necessities of the many-query tasks mentioned above; see, for example, [17, 56], and [51].

In the MOR literature, Proper Orthogonal Decomposition (POD) and its variants are particularly popular across multiple disciplines; see, for example, [46] for a review of POD-based methods for MOR in a variety of research areas. Additionally, we refer to [8, 10] and [28] for a comprehensive introduction to POD applied to MOR and to [9] for a survey in the context of parametrized PDEs. In particular, POD-based reduced-order modeling has been successfully applied in engineering, in the context of fluid mechanics [6, 26, 50], image processing [58], rotor dynamics [43, 45], for structural damage detection [23], and in the area of structural dynamics [35]. POD-based methods can be also used to solve optimal control problems [7, 15, 48, 60]. Moreover, POD-based ROMs can be physically interpreted based on the concept of proper orthogonal modes (POMs) [35]. However, while the theory is solid for linear and some non-linear systems [10], applying ROMs to tasks such as hydrogels fabrication by printing is largely unexplored. In this work, we exploit the capabilities of POD to predict the transient diffusion-deformation of hydrogels in co-axial printing and its efficiency in many-query tasks such as material parameter identification and uncertainty propagation.

Different POD-based algorithms have been proposed in the literature. Global POD methods focus on the estimation of global POD basis functions [8, 10]. In contrast, local POD methods are based on snapshot clustering [54]. Adaptive POD methods have been developed to improve POD basis functions construction by choosing additional snapshot locations in an optimal way [39]. Incremental POD has also been proposed, allowing an adaptive enrichment of the POD basis in case of unforeseen changes in the solution behavior [24, 25]. Transient POD methods focus on snapshots of time-dependent problems [44]. The so-called nested-POD method applies to time-dependent partial differential equations (PDEs) and enables a two-step dimensionality reduction: first in the temporal domain and then in the spatial domain, which also includes parameter information [33, 34]. This last approach has been shown to be particularly useful when the PDE requires many time steps to be approximated. In this work, we adopt the nested-POD approach and compare it to the traditional POD.

In this paper, we consider a specialized theory for small deformations superposed on a previously homogeneously swollen gel as presented in [4]. This model is derived following rigorous thermodynamic concepts and can be considered the linearized version of the more general diffusion-deformation theory presented in [19] and [21]. This diffusion-deformation model was recently validated in [18] and showed good agreement with experimental data to study the diffusion-deformation process within the first three hours. If long-time deformations are present, a nonlinear material model accounting for the hyperelastic deformation of the polymer network and describing the mixing of the solvent with the polymer network should be considered [13, 19, 21, 57]. We implement two POD-based ROMs, study their accuracy, and evaluate the computation speed-up to assess its suitability for many-query scenarios.

The main contributions of the paper can be summarized as follows:

  1. 1.

    We present the first work that considers POD-based parametric ROMs for the diffusion-deformation of hydrogels.

  2. 2.

    We demonstrate the effectiveness of the obtained parametric ROMs for material parameter identification and uncertainty propagation for hydrogel printing processes.

The paper is organized as follows: Sect. 2 summarizes the coupled diffusion-deformation theory of gels in the small deformation regime. Section 3 introduces the POD framework. Section 4 states the material parameter identification problem enabled by the reduced-order model. In Sect. 5, several simulations are conducted and computationally analyzed. Concluding remarks are given in Sect. 6.

2 Small deformation theory for the diffusion-deformation of hydrogels

Diffusion-deformation theories of gels integrate fluid transport and solid mechanics principles to explain how gels swell or shrink due to fluid movement and how these processes influence their shape and mechanical properties [13, 19, 21, 57]. In a diffusion-deformation model of gels, the driving forces are fluid diffusion into or out of the gel and mechanical deformation due to external loads or internal stresses. The model should allow for predicting swelling or shrinking behaviors, stress distributions, and changes in mechanical properties over time. The primary outcomes of this model include the gel’s deformation patterns and mechanical responses under varying conditions. Essential parameters for model calibration encompass the diffusion coefficient, the gel matrix’s mechanical properties such as shear and bulk modulus, and fluid-gel interaction parameters such as Flory’s interaction parameter.

This section summarizes the theory describing the diffusion-deformation mechanisms in elastomeric gels that undergo small deformations under isothermal conditions. The model is derived as a special case of a more general theory of chemoelasticity [3, 4]. This linear theory is suitable for capturing swelling and drying for the first few hours of the diffusion-deformation process [4, 18]. For example, the theory can describe the diffusion-deformation of hydrogels in bioprinting applications where the hydrogel is mixed in the printer’s nozzle with living cells and nutrients necessary for cell growth and proliferation, or in co-axial printing where the hydrogel is directly crosslinked in the printer’s nozzle [36].

As notation rules, we denote gradient \(\text {grad}(\bullet )\) and divergence \(\text {div}(\bullet )\). The time derivative of any field is denoted by \(\partial _t (\bullet )\). The operator \(\text {tr}({\textbf{A}})\) refers to the trace of the second-order tensor \({\textbf{A}}\). We denote the spatial dimension with d, and in this section, we exclusively work with \(d=3\). Finally, let \(I:=\{0,T_f\}\) be the time interval with end time value \(T_f>0\).

2.1 Kinematics of the deformation

Consider a continuum homogeneous elastomeric body \({\mathcal {B}}\) within the Euclidean space \({\mathbb {R}}^d\) and its boundary \(\partial {\mathcal {B}} = \partial {\mathcal {B}}{{\textbf{u}}} \cup \partial {\mathcal {B}}{\bar{{\textbf{t}}}} = \partial {\mathcal {B}}_{R}\). Here, \(\partial {\mathcal {B}}{{\textbf{u}}}\) denotes the displacement (Dirichlet) boundary, \(\partial {\mathcal {B}}{\bar{{\textbf{t}}}}\) the traction (Neumann) boundary, and \(\partial {\mathcal {B}}_{R}\) the fluid flux (Robin) boundary. The outward normal vector to the domain boundaries is denoted by \({\textbf{n}}\in {\mathbb {R}}^d\). The displacement field is defined as \({\textbf{u}}:{\mathcal {B}}\rightarrow {\mathbb {R}}^d\) and the deformation is described by the displacement gradient tensor, with \({\textbf{H}}:{\mathcal {B}}\rightarrow {\mathbb {R}}^{d \times d}\),

$$\begin{aligned} {\textbf{H}} = \text {grad} ({\textbf{u}}). \end{aligned}$$
(1)

For small deformations, the strain tensor can be approximated by the linearized strain tensor, \(\varvec{\varepsilon }:{\mathcal {B}}\rightarrow {\mathbb {R}}^{d \times d}\),

$$\begin{aligned} \varvec{\varepsilon } = \frac{1}{2} ({\textbf{H}} + {\textbf{H}}^T), \end{aligned}$$
(2)

which represents the symmetric part of the displacement gradient.

2.2 Governing partial differential equations

The two governing PDEs for the quasi-static vector-valued displacements \({\textbf{u}}:{\mathcal {B}}\rightarrow {\mathbb {R}}^d\) and scalar-valued, time-dependent, fluid content in terms of the concentration \(c:{\mathcal {B}}\times I\rightarrow {\mathbb {R}}\) consist of:

  1. 1.

    The local form of the balance of linear momentum:

    $$\begin{aligned} {\left\{ \begin{array}{ll} \text {div} (\varvec{\sigma }) + {\textbf{b}} = \varvec{0}, &{} ~ \text {in} ~ {\mathcal {B}}, \\ {\textbf{u}} = \bar{{\textbf{u}}}, &{} ~ \text {on} ~ \partial {\mathcal {B}}_{{\textbf{u}}}, \\ \varvec{\sigma } \cdot {\textbf{n}} = \bar{{\textbf{t}}}, &{} ~ \text {on} ~ \partial {\mathcal {B}}_{\bar{{\textbf{t}}}}, \\ \varvec{\sigma }\vert _{t = 0} = \varvec{\sigma }_0, &{} ~ \text {in} ~ {\mathcal {B}}\,. \end{array}\right. } \end{aligned}$$
    (3)

    Here, \(\varvec{\sigma }:{\mathcal {B}}\rightarrow {\mathbb {R}}^{d \times d}\) denotes the Cauchy stress tensor, and \(\varvec{\sigma }_0:{\mathcal {B}}\rightarrow {\mathbb {R}}^{d \times d}\) its initial value at \(t = 0\). External actions consist of body forces per unit deformed volume \({\textbf{b}}:{\mathcal {B}}\rightarrow {\mathbb {R}}^d\). Moreover, boundary conditions prescribe displacements \(\bar{{\textbf{u}}}:{\mathcal {B}}\rightarrow {\mathbb {R}}^d\) and tractions \(\bar{{\textbf{t}}}:\partial {\mathcal {B}}_{\bar{{\textbf{t}}}}\rightarrow {\mathbb {R}}^{d}\) on separate portions of the boundary. Notice that inertial effects have been neglected due to the considerably slow dynamics of the fluid diffusion evolution w.r.t. the time scale of the wave propagation.

  2. 2.

    The local form of the mass balance of fluid content inside the hydrogel:

    $$\begin{aligned} {\left\{ \begin{array}{ll} \partial _t c + \text {div} ( {\textbf{j}} ) = 0, &{} ~ \text {in} ~ {\mathcal {B}} \times I,\\ -{\textbf{j}} \cdot {\textbf{n}} = \alpha _R (\mu - \mu _{\infty }), &{} ~ \text {on} ~ \partial {\mathcal {B}}_{R}\times I,\\ \mu \vert _{t = 0} = \mu _0, &{} ~ \text {in} ~ {\mathcal {B}}\times \lbrace t=0 \rbrace . \end{array}\right. } \end{aligned}$$
    (4)

    Boundary conditions are defined by a Robin condition on the boundary \(\partial {\mathcal {B}}_{R}\), which prescribes a relationship between the fluid flux \({\textbf{j}}\) and the chemical potential \(\mu \). Specifically, \(\alpha _R\) is a proportionality constant, and \(\mu _{\infty }:\partial {\mathcal {B}}_{R}\times I\rightarrow {\mathbb {R}}\) represents a reference chemical potential. This condition models the proportional flux response to the difference in chemical potential at the boundary and is considered to be more consistent with experimental observations of fluid absorption in hydrogels [18]. Furthermore, \(\mu _0: {\mathcal {B}}\times \lbrace t=0 \rbrace \rightarrow {\mathbb {R}}\) refers to the initial value of the chemical potential inside the hydrogel. Notice that the mass balance of fluid content is written in terms of c and \({\textbf{j}}\), but its corresponding boundary and initial conditions involve the chemical potential \(\mu \). The connection of Eq. (4) with \(\mu \) becomes clear by introducing a constitutive relation for \({\textbf{j}}\), for example, through Fick’s laws of diffusion.

2.3 Thermodynamically consistent constitutive theory for linear isotropic gels

In this subsection, we present a thermodynamically consistent constitutive theory describing the coupled diffusion-deformation mechanisms for linear isotropic gels. Only the main ingredients are provided, but the step-by-step derivation of the constitutive model is detailed in A.

For linear isotropic hydrogels, the following thermodynamically-consistent constitutive relation can be established for Cauchy’s stress

$$\begin{aligned} \varvec{\sigma }(\mu , \varvec{\varepsilon }) = 2 G \varvec{\varepsilon } + \lambda ^d (\text {tr} \varvec{\varepsilon }) \varvec{1} + \frac{\chi }{\Lambda }(\mu - \mu _{0}) \varvec{1}, \end{aligned}$$
(5)

with G representing the elastic shear modulus, \(\lambda ^{d}\) the drain Lamé parameter, \(\varvec{1}\) the identity tensor, \(\chi \) the stress-chemical modulus, and \(\Lambda \) the chemical modulus.

Additionally, the following constitutive relation can be established for the species concentration as a function of the chemical potential

$$\begin{aligned} c(\mu , \varvec{\varepsilon }) = c_{0} - \frac{\chi }{\Lambda } \text {tr} \varvec{\varepsilon } - \frac{1}{\Lambda }(\mu - \mu _{0}). \end{aligned}$$
(6)

Moreover, we append a thermodynamically motivated choice for the fluid flux \({\textbf{j}}\) based on Fick’s law for species diffusion. That is, \({\textbf{j}}\) is proportional to the gradient of the chemical potential, namely,

$$\begin{aligned} {\textbf{j}} = - {\textbf{M}} ~ \text {grad} (\mu ), \end{aligned}$$
(7)

with \({\textbf{M}}\) is the species mobility tensor defined as

$$\begin{aligned} {\textbf{M}} = \left( \frac{D}{k_B {\bar{T}}}\right) \varvec{1}, \end{aligned}$$
(8)

where D is a constant for fluid diffusivity, \(k_B\) is the Boltzmann constant, and \({\bar{T}}\) is the absolute temperature.

The final model is characterized by four independent material parameters, two from isotropic linear elasticity \([G, {\lambda }^{d}]\) and the other two from the fluid equations \([\Omega , D]\), where \(\Omega \) is the molar volume of the fluid as defined in Appendix A.

It is worth mentioning that the theory introduced here can be linked with the classical theories of chemoelasticity and linear poroelasticity; see [3] and [4] [Chapters 15 and 16] for more details. The related transformations are explained in Appendix A.

2.4 Coupled diffusion-deformation model in normalized form

To facilitate the analysis of the model derived in Appendix A, Problem 4, the physical quantities are normalized as follows

$$\begin{aligned} \begin{array}{cc} \varvec{X} \rightarrow \frac{\varvec{x}}{l}, &{} T \rightarrow \frac{t D}{l^{2}}, \\ \mu ^* \rightarrow \frac{{\mu }}{k_{B}{\bar{T}}}, &{} \varvec{\sigma }^* \rightarrow \frac{\varvec{\sigma }}{G}, \\ {\textbf{b}}^* \rightarrow \frac{\varvec{b}l}{G}, &{} \varvec{t}^* \rightarrow \frac{\varvec{t}}{G}, \\ \lambda ^* \rightarrow \frac{\lambda ^{d}}{G}, &{} A \rightarrow \frac{k_{B}{\bar{T}}}{G\Omega }. \end{array} \end{aligned}$$
(9)

In equation (9), l is the reference length of the hydrogel, \(\lambda ^*\) is the dimensionless first Lamé constant, which indicates how much volumetric versus shear deformation contributes to the material response, and A is the dimensionless scaling factor for the chemical potential’s influence on the stress. This normalization closely follows the methodology presented by [18].

The reader should note that the normalized model only contains two non-dimensional parameters, compared to six parameters in the original formulation; see Appendix A, Problem 4. Moreover, as the time-dependent chemical potential enters into the displacements, the governing PDEs become quasi-static, indirectly depending also on time. Thus, we write \({\textbf{u}}: {\mathcal {B}} \times I \rightarrow {\mathbb {R}}^d\) in the remainder of the paper.

The resulting coupled PDE model with normalized quantities reads:

Problem 1

(Strong form linear diffusion-deformation of gels) Given \(\bar{{\textbf{u}}},\bar{{\textbf{t}}}^*,\mu ^*_{\infty }\) as boundary data and \(\varvec{\sigma }^*_0,\mu ^*_0\) as initial data, find \(\varvec{u}:{\mathcal {B}}\times I\rightarrow {\mathbb {R}}^d\) and \(\mu ^*:{\mathcal {B}}\times I\rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} \text {div} (\varvec{\sigma }^*) + {\textbf{b}}^* = \varvec{0},&~ \text {in} ~ {\mathcal {B}} \times I,\end{aligned}$$
(10)
$$\begin{aligned} \text {tr} \left( \partial _t \varvec{\varepsilon } \right) = \text {div} \left( \text {grad} \left( \mu ^* \right) \right) ,&~ \text {in} ~ {\mathcal {B}} \times I,\end{aligned}$$
(11)
$$\begin{aligned} {\textbf{u}} = \bar{{\textbf{u}}},&~ \text {on} ~ \partial {\mathcal {B}}_{{\textbf{u}}} \times I, \end{aligned}$$
(12)
$$\begin{aligned} \varvec{\sigma }^* \cdot {\textbf{n}} = \bar{{\textbf{t}}}^*,&~ \text {on} ~ \partial {\mathcal {B}}_{\bar{{\textbf{t}}}} \times I, \end{aligned}$$
(13)
$$\begin{aligned} \varvec{\sigma }^*\vert _{t = 0} = \varvec{\sigma }^*_0,&~ \text {in} ~ {\mathcal {B}} \times \lbrace T = 0 \rbrace , \end{aligned}$$
(14)
$$\begin{aligned} \text {grad} (\mu ^*) \cdot {\textbf{n}} = \alpha _R (\mu ^* - \mu ^*_{\infty }),&~ \text {on} ~ \partial {\mathcal {B}}_{R}\times I, \end{aligned}$$
(15)
$$\begin{aligned} \mu ^*\vert _{t = 0} = \mu ^*_0,&~ \text {in} ~ {\mathcal {B}}\times \lbrace T=0 \rbrace , \end{aligned}$$
(16)

with the constitutive law for stresses in normalized form given by

$$\begin{aligned} \varvec{\sigma }^* = 2 \varvec{\varepsilon } + \lambda ^* (\text {tr} \varvec{\varepsilon }) \varvec{1} -A(\mu ^* - \mu ^*_{0}) \varvec{1}, \end{aligned}$$
(17)

and the strain tensor defined as in equation (2), which now contains only two dimensionless material parameters, namely \([\lambda ^*, A]\), defined in equation (9).

The reader should notice that, for simplicity in the notation, the asterisks in the normalized quantities will be removed in the subsequent sections.

2.5 Weak formulation

The solution of the coupled PDE system given by equations (10)–(17) consists of a vector-valued field of displacements \({\textbf{u}}\) and a scalar-valued field of the chemical potential \(\mu \).

In the following, we derive the weak formulation. We adopt standard notation for the usual Lebesgue and Sobolev spaces, see, for example, [61]. The functional space \(H^1({\mathcal {B}})^d\) is a Sobolev space that consists of functions defined on a bounded domain \({\mathcal {B}} \subset {\mathbb {R}}^d\), with square integrable partial derivatives up to the first order. To this end, we define the trial and test spaces as follows

$$\begin{aligned} Q&:= H^1 \left( {\mathcal {B}} \right) , V := \left( H^1 \left( {\mathcal {B}} \right) \right) ^d, \\ V_{\bar{{\textbf{u}}}}&:= \Big \lbrace {\textbf{u}} \in V \Big \vert ~ {\textbf{u}} = \bar{{\textbf{u}}} ~~ \text {on} ~~ \partial {\mathcal {B}}_{{\textbf{u}}} \Big \rbrace ,\\ V_{\varvec{0}}&: = \Big \lbrace {\textbf{u}} \in V \Big \vert ~ {\textbf{u}} = \varvec{0} ~~ \text {on} ~~ \partial {\mathcal {B}}_{{\textbf{u}}} \Big \rbrace . \end{aligned}$$

To formulate both problem statements in an abstract fashion, we introduce for the displacement system the bilinear form \(a((\mu , {\textbf{u}}))({\textbf{v}})\). Furthermore, let \(b({\textbf{v}})\) be the given right-hand side data. Next, for the balance of fluid concentration, we use \(c((\mu , {\textbf{u}}))(q) \) and d(q). Then, the weak formulation can be written as

Problem 2

(Weak form) Find \(({\textbf{u}},\mu ) \in V_{\bar{{\textbf{u}} }} \times Q\), with \(\mu (0) = \mu _0\) and \(\sigma (0) = \sigma _0\), such that for \(t\in I\) it holds

$$\begin{aligned} \varvec{{\mathcal {M}}}( (\mu , {\textbf{u}}), t):= {\left\{ \begin{array}{ll} a((\mu , {\textbf{u}}))({\textbf{v}}) + b({\textbf{v}}) &{} = {\textbf{0}}, ~~ \forall {\textbf{v}} \in V_0, \\ c((\mu , {\textbf{u}}))(q) + d(q) &{} = 0, ~~ \forall q \in Q, \end{array}\right. }\nonumber \\ \end{aligned}$$
(18)

where

$$\begin{aligned} a((\mu , {\textbf{u}}))({\textbf{v}})&= \int _{{\mathcal {B}}} \varvec{\sigma } ( \mu , {\textbf{u}}): \text {grad} ({\textbf{v}}) dV, \end{aligned}$$
(19)
$$\begin{aligned} b({\textbf{v}})&= - \int _{{\mathcal {B}}} {\textbf{b}} \cdot {\textbf{v}} dV, \end{aligned}$$
(20)
$$\begin{aligned} c((\mu , {\textbf{u}}))(q)&= \int _{{\mathcal {B}}} \text {tr} \left( \partial _t \varvec{\varepsilon }({\textbf{u}}) \right) \cdot q dV + \int _{{\mathcal {B}}} \text {grad} (\mu ) \cdot \text {grad} (q) dV \nonumber \\&\quad - \int _{\partial {\mathcal {B}}_R} \alpha _R \mu \cdot q dS, \end{aligned}$$
(21)
$$\begin{aligned} d(q)&= - \int _{\partial {\mathcal {B}}_R} \alpha _R \mu _{\infty }\cdot q dS, \end{aligned}$$
(22)

with “  :  " denoting the double contraction of the second-order tensors \(\varvec{\sigma }\) and \(\text {grad} ({\textbf{v}})\), where \(\varvec{\sigma } ( \mu , {\textbf{u}})\) is defined by Eq. (17), which couples the two balance equations.

2.6 Discrete weak formulation and numerical solution

In order to deal with efficient POD-based ROMs, we are required to fulfill the assumption of affine parametric dependence on the operators appearing in the weak form (18) at the FOM level. This allows us to decouple the construction stage of the reduced-order space (offline) from the parametric evaluation stage (online).

To meet this requirement, let us assume that the computational domain \({\mathcal {B}}\) is decomposed into triangular elements. We employ Taylor-Hood elements such that the inf-sup condition is fulfilled, that is, \(V_{h, {{\textbf{0}}}} \times Q_h \subset V_{{{\textbf{0}}}} \times Q\), with quadratic functions in \(V_{h}\) and linear functions in \(Q_h\). Then, the parametric semi-discrete variational monolithic formulation for the diffusion-deformation model reads:

Problem 3

(Parametric spatial semi-discrete weak form) Given the material parameter \(\varvec{\theta }=[\lambda , A]\in {\mathbb {R}}^{d_{\varvec{\theta }}}\) and model coefficients \(\varvec{\Theta }:= [2, \varvec{\theta }] \in {\mathbb {R}}^{d_{\varvec{\theta }}+1}\), find \(({\textbf{u}}_h, \mu _h) \in \{\bar{{\textbf{u}}}_h|_{\partial {\mathcal {B}}_{{\bar{u}}}} + V_{h,{{\textbf{0}}}}\} \times Q_h\) such that for \(t\in I\) it holds

$$\begin{aligned} \varvec{{\mathcal {M}}}( (\mu _h, {\textbf{u}}_h), t; \varvec{\theta } ):= {\left\{ \begin{array}{ll} \varvec{\Theta }~a((\mu _h, {\textbf{u}}_h)) ({\textbf{v}}_h) = b ({\textbf{v}}_h), \quad \forall {\textbf{v}}_h \in V_{h, {\textbf{0}}}, \\ c ((\mu _h, {\textbf{u}}_h))(q_h) = d (q_h), \quad \forall q_h \in Q_{h}, \end{array}\right. } \end{aligned}$$
(23)

where equation (23)\(_1\) can be reformulated as

$$\begin{aligned} \varvec{\Theta }~a((\mu _h, {\textbf{u}}_h)) ({\textbf{v}}_h) = \sum _{m=1}^{3} \Theta _m a_m ({\textbf{u}}_h, {\textbf{v}}_h), \end{aligned}$$
(24)

with

$$\begin{aligned} \begin{aligned} a_1 ({\textbf{u}}_h) ({\textbf{v}}_h)&= \int _{{\mathcal {B}}} \varvec{\varepsilon } ({\textbf{u}}_h): \text {grad} ({\textbf{v}}_h) \, dV, \\ a_2 ({\textbf{u}}_h) ({\textbf{v}}_h)&= \int _{{\mathcal {B}}} (\text {tr} \varvec{\varepsilon } ({\textbf{u}}_h)) \varvec{1}: \text {grad} ({\textbf{v}}_h) \, dV, \\ a_3 ((\mu _h, {\textbf{u}}_h)) ({\textbf{v}}_h)&= -\int _{{\mathcal {B}}} (\mu _h - \mu _0) \varvec{1}: \text {grad} ({\textbf{v}}_h) \, dV, \end{aligned} \end{aligned}$$
(25)

and

$$\begin{aligned} b ({\textbf{v}}_h) = - \int _{{\mathcal {B}}} {\textbf{b}} \cdot {\textbf{v}}_h \, dV. \end{aligned}$$
(26)

Additionally, Eq. (23)\(_2\) can be written analogously as

$$\begin{aligned} c((\mu _h, {\textbf{u}}_h)) (q_h) = \sum _{n=1}^{3} c_n ((\mu _h, {\textbf{u}}_h), q_h) \end{aligned}$$
(27)

with

$$\begin{aligned} \begin{aligned} c_1 ({\textbf{u}}_h) (q_h)&= \int _{{\mathcal {B}}} (\text {tr} (\partial _t \varvec{\varepsilon } ({\textbf{u}}_h))) q_h \, dV, \\ c_2 (\mu _h)(q_h)&= \int _{{\mathcal {B}}} \text {grad} (\mu _h) \cdot \text {grad} (q_h) \, dV, \\ c_3 (\mu _h)(q_h)&= \int _{\partial {\mathcal {B}}_{R}} \alpha _R (\mu _h - \mu _{\infty }) q_h \, dS, \end{aligned} \end{aligned}$$
(28)

and

$$\begin{aligned} d (q_h) = - \int _{\partial {\mathcal {B}}_{R}} \alpha _R \mu _{\infty } q_h \, dS. \end{aligned}$$
(29)

Here, \(\varvec{{\mathcal {M}}}( (\mu _h, {\textbf{u}}_h), t; \varvec{\theta } )\) is the semi-discrete operator that captures the transient behavior of the coupled diffusion-deformation problem and is affine parameterized by the material parameters \(\varvec{\theta }=[\lambda , A]\).

The time-dependent operator defined in Eq. (28)\(_1\) is further discretized in time with the first-order A-stable implicit Euler scheme. The arising linear system of equations in Problem 3 is solved with a sparse direct solver. The implementation is done in FEniCS. All details of this FOM realization can be found in [57].

3 Parametric POD-based reduced order modeling

In this section, we describe parametric POD-based and parametric nested-POD approaches as reduced-order modeling strategies applied to the transient diffusion-deformation of hydrogels. Such a ROM construction allows to speed up the solution of the coupled model presented in Sect. 2, which enables its use in many-query scenarios.

The computation in the reduced-order modeling strategy is divided into two phases: offline and online.

  1. (1)

    The offline phase refers to the parametric ROM construction. It mainly consists of two steps:

    1. (1a)

      Collect a set of snapshots that are FOM solutions for different parameter values and time instances. The simulation time interval for each parameter instance remains the same.

    2. (1b)

      Find an optimal reduced-order approximation of the primary variables \((\mu _h, {\textbf{u}}_h)\) by projecting the snapshot matrix into a reduced linear subspace using the Galerkin approach.

    Figure 1 illustrate the main steps of the offline phase for the parametric ROM construction.

  2. (2)

    The online phase refers to the use of the ROM as a surrogate of the FOM to predict the diffusion-deformation of hydrogels in many-query tasks. Here, the parametric ROM is used for parameter identification; see Sect. 5.

The offline steps are explained in detail below. The starting point is the assembly of the snapshot matrix in Sect. 3.1, followed by the singular value decomposition (SVD) in Sect. 3.2. We introduce the nested-POD approach as a computationally efficient variant in Sect. 3.3. The Galerkin projection is outlined in Sect. 3.4. The implementation of the parametric POD and nested-POD-based ROMs is inspired in [41] and [33].

Fig. 1
figure 1

Illustration of the offline phase workflow for the POD-based ROM’s construction

3.1 Assembly of snapshots matrix

The snapshots are obtained by solving the model

$$\begin{aligned} \varvec{{\mathcal {M}}}((\mu _h, {\textbf{u}}_h), t; \varvec{\theta }) = \varvec{0}. \end{aligned}$$
(30)

This results in a global snapshot matrix \({\mathbb {S}}\in {\mathbb {R}}^{(N_h^{\mu }+N_h^{{\textbf{u}}}) \times (N_t \cdot N^{\varvec{\theta }})}\), with

i.:

\(N^{{\textbf{u}}}_h\) the number of displacement degrees of freedom,

ii.:

\(N^{\mu }_h\) the number of chemical potential degrees of freedom,

iii.:

\(N_t\) the number of time steps, and

iv.:

\(N^{\varvec{\theta }}\) the number of parameter instances used for training.

Different assembly strategies arise from splitting the subset global snapshots into subsets in order to enhance computational efficiency. Here, we consider partitioning in the primary variables \((\mu _h, {\textbf{u}}_h)\) as well as in space and time. The reader should note that the latter approach is also referred to as the nested-POD approach.

Partitioning of primary variables To this end, we consider a partitioned approach to derive reduced bases for \(\mu _h\) and \({\textbf{u}}_h\) separately. We focus on the displacement field in what follows, although a similar procedure applies to the chemical potential. Given the parameter instances \(\varvec{\theta }_i\), \(\forall i \in N^{\varvec{\theta }}\) of the training dataset, the corresponding temporal snapshot matrix \({\mathbb {S}}_{{\textbf{u}}}(\varvec{\theta }_i)\in {\mathbb {R}}^{N^{{\textbf{u}}}_{h} \times N_t}\) is assembled as:

$$\begin{aligned} {\mathbb {S}}_{{\textbf{u}}}(\varvec{\theta }_i) = \begin{pmatrix} {\textbf{u}}_h (.,t_0;\varvec{\theta }_i)&\ldots&{\textbf{u}}_h (.,t_{N_t};\varvec{\theta }_i) \end{pmatrix} \end{aligned}$$
(31)

for the displacement field \({\textbf{u}}_h(.,t_n;\varvec{\theta }_i)\) at a specific time \(t_n\), for \(n = 0, \dots , N_t\), and parameter instance \(\varvec{\theta }_i\).

The complete snapshots matrix \({\mathbb {S}}_{{\textbf{u}}}\in {\mathbb {R}}^{N^{{\textbf{u}}}_{h} \times (N_t \cdot {N^{\varvec{\theta }}})},\) is then constructed by aggregating the individual temporal snapshot matrices \({\mathbb {S}}_{{\textbf{u}}}(\varvec{\theta }_i)\) as:

$$\begin{aligned} {\mathbb {S}}_{{\textbf{u}}} = \begin{pmatrix} {\mathbb {S}}_{{\textbf{u}}}(\varvec{\theta }_1)&\ldots&{\mathbb {S}}_{{\textbf{u}}}(\varvec{\theta }_{N^{\varvec{\theta }}}) \end{pmatrix}. \end{aligned}$$
(32)

Consequently, each row in \({\mathbb {S}}_{{\textbf{u}}}\) corresponds to a degree of freedom in the spatial discretization, and each column corresponds to the state of the system at a particular time for a particular parameter sample.

3.2 POD for the displacement field

In this subsection, we describe the key parts of the POD for the displacement field. The chemical potential POD is computed in an analogous fashion. In synthesis, POD reduces the dimensionality of \({\mathbb {S}}_{{\textbf{u}}}\)(32) by computing a matrix \({\mathbb {V}} \in {\mathbb {R}}^{N_h^{{\textbf{u}}} \times r})\), which represents the best approximation in the least-squares sense to the snapshot matrix \({\mathbb {S}}_{{\textbf{u}}}\). Here, \(r \ll N_t \cdot N^{\varvec{\theta }}\) is the number of retained modes based on analyzing the singular values that retain the most significant information in the snapshots matrix. We refer the reader to Eq. (34).

The POD solution is then derived by solving the optimization problem:

$$\begin{aligned} {\mathbb {V}}^{*} =&{\text {arg min}}_{{\mathbb {V}} \in {\mathbb {R}}^{N_h^{{\textbf{u}}} \times r}} \Vert {\mathbb {S}}_{{\textbf{u}}} - {\mathbb {V}}{\mathbb {V}}^T {\mathbb {S}}_{{\textbf{u}}} \Vert _F^2 = \sum _{i = r + 1}^{(N_t \cdot N^{\varvec{\theta }})} \sigma _i, \end{aligned}$$
(33)

where \(\Vert \cdot \Vert _F\) denotes the Frobenius norm, which measures the distance between \({\mathbb {S}}_{{\textbf{u}}}\) and its approximation \({\mathbb {V}}{\mathbb {V}}^T {\mathbb {S}}_{{\textbf{u}}}\) in terms of all entries of the snapshots matrix. Moreover, \(\sigma _i\) refers to the i-th singular value of \({\mathbb {S}}_{{\textbf{u}}}\) and \({\mathbb {V}}{\mathbb {V}}^T\) yield the identity matrix with dimension of \(N_h^{{\textbf{u}}} \times N_h^{{\textbf{u}}}\).

The singular values \(\sigma _i\) provide quantitative guidance for choosing the size of the POD basis. That is, the number of modes r required to capture a desired fraction of energy of the FOM, measured by the fraction of retained energy

$$\begin{aligned} {\mathcal {E}} = \frac{E_r}{E_{\text {total}}} = \frac{\sum _{i=1}^{r} \sigma _i^2}{\sum _{i=1}^{(N_t \cdot N^{\varvec{\theta }})} \sigma _i^2} \ge \eta , \end{aligned}$$
(34)

where \(E_{\text {total}}\) is the total energy of the system and \(E_r\) is the retained energy by \(r\) modes. Consequently, the number of modes r is chosen such that the retained energy ratio meets a predefined target fraction \({\mathcal {E}} \ge \eta \in [0, 1]\).

3.3 Nested-POD approach for the displacement field

For a large number of parameters \(N^{\varvec{\theta }}\) and/or time steps \(N_t\), applying SVD on the snapshot matrix (32) may become inefficient, requiring large memory storage. An alternative is to apply the nested-POD approach; see, for instance, [33], and also our own study in Fig. 5 (Sect. 5).

The snapshot matrix \({\mathbb {S}}_{{\textbf{u}}}\) (32) can be further decomposed into temporal and space parts to apply the nested-POD approach. That is, the time dimension is reduced first, followed by the spatial dimension for the parameter samples. The dimensionality reduction steps can be summarized as follows:

  1. 1.

    Temporal dimensionality reduction: POD is applied individually for every parameter sample \(\varvec{\theta }_i\) on the snapshots matrix \({\mathbb {S}}_{{\textbf{u}}}(\varvec{\theta }_i)\) (31). In this way, we obtain the basis functions for the first \(n_t \ll N_t\) temporal modes and for each \(\varvec{\theta }_i\). The snapshot matrix after the temporal reduction is represented as \( \tilde{{\mathbb {S}}}_{{\textbf{u}}}(\varvec{\theta }_i) \in {\mathbb {R}}^{N^{{\textbf{u}}}_h \times n_t}\):

    $$\begin{aligned} \tilde{{\mathbb {S}}}_{{\textbf{u}}}(\varvec{\theta }_i) = \begin{pmatrix} \tilde{\varvec{w}}^{{\textbf{u}}}_1&\dots&\tilde{\varvec{w}}^{{\textbf{u}}}_{n_t} \end{pmatrix}, \end{aligned}$$
    (35)

    with \(\tilde{\varvec{w}}^{{\textbf{u}}}_i\) referring to the basis functions in the temporal domain.

  2. 2.

    Spatial dimensionality reduction: after the temporal dimension has been reduced for each parameter sample \(\varvec{\theta }_i\), we assemble a new snapshot matrix \(\tilde{{\mathbb {S}}}_{{\textbf{u}}} \in {\mathbb {R}}^{N^{{\textbf{u}}}_{h} \times (n_t \cdot N^{\varvec{\theta }})}\) as

    $$\begin{aligned} \tilde{{\mathbb {S}}}_{{\textbf{u}}} = \begin{pmatrix} \tilde{{\mathbb {S}}}_{{\textbf{u}}}(\varvec{\theta }_1)&\ldots&\tilde{{\mathbb {S}}}_{{\textbf{u}}}(\varvec{\theta }_{N^{\varvec{\theta }}}) \end{pmatrix}. \end{aligned}$$
    (36)

    Then, in analogy to the optimization problem (33), POD is applied again on \(\tilde{{\mathbb {S}}}_{{\textbf{u}}}\) to retain the r first modes and construct spatial bases functions.

For both the temporal and spatial dimensionality reduction, the criterion (34) is employed to select the number of required basis functions.

It is worth remarking here that the SVD algorithm is at the core of dimensionality reduction. In this work, we adopt the SVD algorithm provided by the RBniCS library. Other methods can also be used to improve the SVD efficiency further. For example, the method of snapshots [55] and the streaming method of snapshots [31], or modern variants such as randomized [47] and incremental [14, 37] SVD.

3.4 Galerkin projections

In this subsection, we finally construct the reduced-order solutions using Galerkin projections. In both the POD and nested-POD cases, only the first r modes are retained during the dimensionality reduction and are employed to construct the basis functions for the reduced order space \({\mathcal {U}}_r\) for the displacement field \(\varvec{u}\). Thus, we map the temporal and spatial dimensions to their representation in a linear manifold, producing the best approximation in the reduced space \({\mathcal {U}}_r\) for \({\textbf{u}}(\cdot ; t, \varvec{\theta })\).

The optimal representation is obtained on a reduced basis space by means of Galerkin projection. Let \((\varvec{w}^{{\textbf{u}}}_1, \dots , \varvec{w}^{{\textbf{u}}}_r)\) denote the basis functions spanning \({\mathcal {U}}_r\). Given a time \(t_n\) and a parameter instance \(\varvec{\theta }_i\) in the training set, the best approximation \(\tilde{\textbf{U}}_h (\cdot ; t_n, \varvec{\theta }_i)\) to \({\textbf{u}}_h (\cdot ; t_n, \varvec{\theta }_i)\) in \({\mathcal {U}}_r\) is given by

$$\begin{aligned} \tilde{\textbf{U}}_h (\cdot ; t_n, \varvec{\theta }_i) = \sum _{k=1}^r \xi _k^U (t_n, \varvec{\theta }_i) \varvec{w}^{{\textbf{u}}}_k, \end{aligned}$$
(37)

where the coefficients \(\xi _k^U\) are solutions to the Galerkin projection problem. Specifically, for given \({\textbf{u}}_h (\cdot ; t_n, \varvec{\theta }_i)\), find \(\varvec{\xi }^U (t_n, \varvec{\theta }) = \lbrace \xi _1^U (t_n, \varvec{\theta }_1), \dots , \xi _r^U (t_n, \varvec{\theta }_r) \rbrace \in {\mathbb {R}}^r\) such that,

$$\begin{aligned} \sum _{j=1}^r \xi _j^U (t_n, \varvec{\theta }) (\varvec{w}^{{\textbf{u}}}_k, \varvec{w}^{{\textbf{u}}}_j)_{{\mathcal {U}}_r} = \left( {\textbf{u}}_h (\cdot ; t_n, \varvec{\theta }_i), \varvec{w}^{{\textbf{u}}}_k \right) _{{\mathcal {U}}_r}. \end{aligned}$$
(38)

The operator \((\varvec{w}^{{\textbf{u}}}_k, \varvec{w}^{{\textbf{u}}}_j)_{{\mathcal {U}}_r}\) forms a matrix that can be precomputed and stored, facilitating the efficient computation of the coefficients \(\xi _k^U\) for each new instance of the parameters or time.

The reduced basis approximation \(\hat{\textbf{U}}_h (\cdot ; t_n, \varvec{\theta }_i)\) is computed as:

$$\begin{aligned} \hat{\textbf{U}}_h (\cdot ; t_n, \varvec{\theta }_i) = \sum _{k=1}^r \xi _k^U (t_n, \varvec{\theta }_i) \varvec{w}^{{\textbf{u}}}_k. \end{aligned}$$
(39)

In the same fashion, we obtain the reduced basis approximation for the chemical potential:

$$\begin{aligned} {\hat{\Gamma }}_h (\cdot ; t_n, \varvec{\theta }_i) = \sum _{k=1}^r \xi _k^{\Gamma } (t_n, \varvec{\theta }_i) \varvec{z}^{\mu }_k. \end{aligned}$$
(40)

Here, \(\varvec{z}^{\mu }_1, \dots , \varvec{z}^{\mu }_r\) are the basis functions spanning the reduced order space \(\Gamma _r\). Furthermore, \(\xi _k^{\Gamma }\) are the coefficients resulting from the Galerkin projection.

We can numerically approximate the parametric discrete FOM \(\varvec{{\mathcal {M}}}( (\mu _h, {\textbf{u}}_h), t; \varvec{\theta } )\) in Problem 3 by the POD-based ROM \(\varvec{\hat{{\mathcal {M}}}}( ({\hat{\Gamma }}_h, \hat{\textbf{U}}_h), t; \varvec{\theta } )\) as

$$\begin{aligned} \varvec{{\mathcal {M}}}( (\mu _h, {\textbf{u}}_h), t; \varvec{\theta } ) \approx \varvec{\hat{{\mathcal {M}}}}( ({\hat{\Gamma }}_h, \hat{\textbf{U}}_h), t; \varvec{\theta } ), \end{aligned}$$
(41)

to approximate \(\mu _h\) and \({\textbf{u}}_h\) in the online phase.

The reader should notice that, in the online phase, the ROM should be only used for predictions of \(\mu _h\) and \({\textbf{u}}_h\) within the parameter range for which it has been trained. Particularly, the ROM model in Eq. (41) needs to be evaluated at the new desired \(\varvec{\theta }\) values. If, in the online phase, it becomes apparent that predictions outside this parameter range are necessary, additional training is recommended, as extrapolation is prone to errors. Then, one can look into various methods proposed, for instance, in [32, 38], or [25]. Furthermore, some research has also been focusing on using machine learning combined with ROM to tackle this issue, as done in [29]. However, in the present study, we did not consider such cases.

Finally, we utilize the \(L^1, L^2\) and \(L^{\infty }\) norms to evaluate the approximation errors, for example, \({\textbf{e}}_{{\textbf{u}}}:= {\textbf{u}}_{FOM} - {\textbf{u}}_{ROM}\) between the FOM \({\textbf{u}}_{h_{FOM}}\) and ROM \({\textbf{u}}_{h_{ROM}}\) solutions.

4 Material parameter identification from full-field data

We exemplary consider material parameter identification from full-field observations to evaluate the ROM’s performance in a many-query scenario. A recent review on parameter identification from full-field data in computational mechanics can be found in [52]. Here, our objective is to identify the optimal set of dimensionless material parameters \(\varvec{\theta }^{\text {opt}} = [\lambda ^{\text {opt}}, A^{\text {opt}} ] \in {\mathbb {R}}^2\) that minimize a metric \({\mathcal {L}}(\varvec{\theta })\) for the discrepancy between model predictions (parametric POD-based ROM or FOM) and some observational data capturing the diffusion-deformation process of the hydrogel. To this end, material parameter identification can be cast as the below optimization problem:

$$\begin{aligned} \varvec{\theta }^{\text {opt}} = \text {arg}\min _{\varvec{\theta }} \ {\mathcal {L}}(\varvec{\theta }). \end{aligned}$$
(42)

The discrepancy metric \({\mathcal {L}}(\varvec{\theta })\) is often referred to as loss or objective function. In order to ensure proper convergence of the optimization problem stated above, the loss contributions from the different physical fields are computed and scaled individually. This leads to the following composite loss function

$$\begin{aligned} {\mathcal {L}} (\varvec{\theta }) = {\mathcal {L}}_{\text {rel}}^{{\textbf{u}}} (\varvec{\theta }) + {\mathcal {L}}_{\text {rel}}^{\mu } (\varvec{\theta }), \end{aligned}$$
(43)

whose contributions are computed from the relative \(L^2\) norms of the difference between observed and computed displacement fields \(\varvec{u}_{\text {obs}}\) and \(\varvec{u}(\varvec{\theta })\)

$$\begin{aligned} \begin{aligned} {\mathcal {L}}_{\text {rel}}^{{\textbf{u}}}&= \frac{\Vert \varvec{u}_{\text {obs}} - \varvec{u}(\varvec{\theta }) \Vert _2}{\Vert \varvec{u}_{\text {obs}} \Vert _2}, \end{aligned} \end{aligned}$$
(44)

as well as of the difference between observed and computed concentration fields \(\mu _{\text {obs}}\) and \(\mu (\varvec{\theta })\):

$$\begin{aligned} {\mathcal {L}}_{\text {rel}}^{\mu } = \frac{\Vert \mu _{\text {obs}} - \mu (\varvec{\theta }) \Vert _2}{\Vert \mu _{\text {obs}} \Vert _2}. \end{aligned}$$
(45)

The solutions \(\mu (\varvec{\theta })\) and \(\varvec{u}(\varvec{\theta })\) can be obtained either from the FOM predictions or its ROM approximation given by Eq. (41) at those discrete time steps \(t_i\) at which observational data is available. The solution of the optimization problem stated in Eq. (42) requires iterative solution techniques, which makes the use of a ROM appealing. In this work, the L-BFGS-B optimizer is used, a variant of the Limited Memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) algorithm, which belongs to the family of quasi-Newton methods [63]. This algorithm is particularly suited for solving large-scale optimization problems with bound constraints. Its hyperparameters are provided in Sect. 5.1.4.

5 Numerical simulations

In this section, we conduct two extensive numerical studies to evaluate the effectiveness of parametric POD-based ROMs in capturing the main dynamics of the FOM describing the diffusion-deformation process of hydrogels. The motivation behind the numerical computations is to capture the step-by-step process of manufacturing hydrogels using bioprinting as functional materials in biomedical applications. Typically, hydrogel fabrication is done in two stages. The first stage involves characterizing the material to be manufactured, whereas, in the second stage, a bioprinter can be used to fabricate more intricate structures, possibly capturing complexities closer to those in living tissues.

Figure 2 illustrates the simulation setup of the two problems. First, a benchmark problem is considered, namely, a free-swelling of a 2D square hydrogel block (Fig. 2a). We implement parametric POD and nested-POD-based ROMs, test their accuracy, compare the simulation speed-up with respect to the FOM, and perform a material parameter identification to evaluate the ROMs’ effectiveness in this many-query scenario. The second test is a case study mimicking co-axial hydrogel bioprinting (Fig. 2b). For the case study, we present the results for the parametric nested-POD-based ROM and test its accuracy and computation speed-up with respect to the FOM. The code for the POD-based ROM is provided for interested readers. Finally, we conduct a parameter uncertainty propagation and exploit the simulation speed-up achieved by the nested-POD-based ROM. The FOM is solved using FEniCSFootnote 1 [2] and the ROM is implemented in RBniCSFootnote 2 [53]. All codes to reproduce and verify the results can be accessed in the following online repository: [1].

Fig. 2
figure 2

Illustration of the simulated problems: a benchmark: 2D square hydrogel block and b Case study: co-axial printing. Notes: i The white dashed boxes mark the domains extracted for the simulation setup. ii The shadowed area in b refers to the neglected part due to the axisymmetric nature of the case study

5.1 Benchmark: free-swelling of a 2D square hydrogel block

This subsection refers to the first stage of hydrogels manufacturing. The first stage involves characterizing the material to be manufactured. This is done through a series of experiments in the laboratory where molding techniques are used to fabricate simple hydrogel blocks under controlled conditions. These fabricated hydrogels are then subjected to, for example, free-swelling experiments to i. characterize material properties such as bulk and shear moduli and absorption capabilities of diffusing species and ii. validate mathematical models that can be used later as predictive tools for the material behavior.

5.1.1 Simulation setup

As a benchmark problem, we consider the transient free-swelling of a gel in a two-dimensional setting as illustrated in Fig. 2a. The 2D hydrogel block initially has a square cross-section. The hydrogel block is immersed into a non-reactive solvent with a reference chemical potential \(\mu ^0 = 0\). Only a quarter of the whole model is considered because of the symmetry of the block. In terms of mechanical boundary conditions, the bottom and left edges are subject to Dirichlet boundary conditions \(u_y = 0\) and \(u_x = 0\), respectively. The top and right edges are considered to be traction-free. In terms of chemical boundary conditions, the bottom and left edges are subject to zero fluid flux. The chemical potential is subject to a Robin boundary condition as defined in Eq. (15) on the top and right edges. A similar setup to this example can be found in, e,g., [20, 42], or [18].

The following values are selected as the nominal dimensionless material parameterFootnote 3: \(\lambda = 1558\) and \(A = 4000\), and the Robin boundary coefficient is defined as \(\alpha = 0.66\). The chemical potential’s initial condition is \(\mu _{o} = -0.3124\), and the domain is considered to be initially stress-free. These material parameters taken from [18] represent a gelatin-based hydrogel. The reader is referred to [18] for more details on the gel preparation and its mechanical characterization.

The domain is discretized into triangular elements with quadratic interpolation for displacement and linear interpolation for the chemical potential to obtain the Taylor-Hood elements as introduced in Sect. 2. The dimensionless coupled system of equations (23) is solved as a variational monolithic problem using the FEniCS package as a PDE solver. We remark here that we solve the FOM in a monolithic fashion, but later for the POD, we partition the snapshot matrix into two parts in order to apply the partitioned approach as described in Sect. 3.

Following the convergence analysis reported in Appendix B, a mesh density of \(N_h = 50\), that is, 5000 triangular elements, is specified to obtain what we denote as the FOM nominal simulation setup. The total dimensionless simulation time is chosen as \(T = 0.25\), and the time interval \(\lbrace 0,~T \rbrace \) is discretized into 100 time steps. The reader should notice that \(T = 0.25\) corresponds to about \(t = 3\) hours of the hydrogel diffusion-deformation before normalization based on equation (9). In their experimental work, the authors of [18] found that the linear model is valid up to 3 h of fluid absorption. For larger simulation times, a nonlinear theory should be adopted [57].

5.1.2 Numerical results for the full-order model

Figure 3 shows the primary variables for the FOM at three different simulation times. Figure 3a displays the evolution of the chemical potential within the 2D hydrogel block. It can be observed that the chemical potential transitions over time from its initial condition to its boundary value. This increase in chemical potential indicates that as the gel absorbs the solvent, its internal fluid concentration rises, driving the absorption process towards equilibrium.

Figure 3b illustrates the evolution of the displacement magnitude. It is evident that displacement increases in tandem with solvent absorption, with the highest displacement occurring in the corner fully exposed to the solvent. The symmetry in the displacement field reflects the isotropic swelling of the gel.

Fig. 3
figure 3

Benchmark: FOM simulation results for primary variables. a normalized chemical potential and b displacement magnitude at time steps \(T = \{0.01, 0.15, 0.25\}\)

Figure 4 shows the time evolution of normalized chemical potential (Fig. 4a), displacement (Fig. 4b), and normalized stress (Fig. 4c) at different points in the 2D hydrogel block. The figure reveals that the four selected points undergo different diffusion-deformation pathways, highlighting the spatial dependency of the problem. Figure 4 complements observations from Fig. 3. Figure 4c shows that while a region within the domain experiences compressive stresses, another region experiences the opposite. This stress gradient is the main driver of the fluid’s diffusion. The figure also reaffirms that the points on the right side remain traction-free throughout the simulation.

Fig. 4
figure 4

Benchmark: transient FOM simulation. a normalized chemical potential, b displacement in x-direction, and b normalized stresses at different points in the 2D hydrogel block

5.1.3 Numerical results for the reduced-order model

In this section, we provide numerical experiments to validate and demonstrate the ROMs’ accuracy and computational efficiency. All the following computations are conducted in RBniCS. The same mesh density and time steps as for the nominal simulation are taken. Material parameters are sampled within the ranges \(\lambda =\left[ 1000, 2000 \right] \) and \(A = \left[ 2000, 6000\right] \).

In order to minimize the overall computational effort, the immediate task is now to identify the minimum number of basis functions and samples. For this purpose, we follow the procedure presented in Sect. 3 and summarized in Fig. 1. This procedure is followed for both the traditional parametric POD-based ROM and the nested variant, both of which have been introduced in Sect. 3.

Figure 5a depicts the generated training and testing samples from the material parameters used in the construction of the ROM. The samples were generated using Monte Carlo sampling from a uniform distribution. We noticed that 10 samples are the minimum to obtain an acceptable approximation of the FOM with both POD and nested-POD-based ROM. We trained the POD-based ROMs using 30 samples. Figure 5b reports the wall time required for training the ROMs adopting the POD and nested-POD algorithms for an increasing number of training samples. The wall time is composed of the time required to create the snapshots and to perform the SVD on the resulting snapshots matrix.

Fig. 5
figure 5

Benchmark: a training and testing samples from the material parameters used in the training and error analysis of the POD-based ROMs and b the wall time required for training the ROMs for an increasing number of training samples

POD-based approach Figure 6 shows the singular values and energy retained by the SVD on the snapshots matrix. From Fig. 6a, c, it is observed that the singular values magnitude decays very fast for both chemical potential and displacement. Such a behavior is advantageous, as it facilitates the development of an efficient low-dimensional ROM. In fact, from Fig. 6b, d, it is possible to conclude that only six basis functions are required to retain up to \(\eta = 99.9999 \%\) of the energy contained in the FOM.

Fig. 6
figure 6

Benchmark: POD-based ROM. SVD of the snapshots matrices for chemical potential: a. singular values and b retained energy; and displacement: c singular values and d retained energy

An illustration of the error for the selected number of basis functions can be found in Fig. 7. Here, the POD is assembled, and the predictions are compared to the nominal FOM model (\(A=4000, \lambda =1558\), and \(\alpha =0.66\)). The reader should notice that these parameter values were not included in the training dataset; therefore, they can be used to validate the POD-based ROM.

Figure 7 depicts a comparison of the temporal evolution of chemical potential (Fig. 7a) and displacement (Fig. 7b) at different points inside the 2D hydrogel block for the POD-based ROM. The figures show that the root mean square error (RMSE) between the POD-based ROM and FOM has its maximum at the beginning of the simulation. However, for the chemical potential, the RMSE reaches \(3 \times 10^{-3}\) in about \(T = 0.05\) and keeps decreasing as time evolves. For the displacement, the RMSE is smaller than \(10^{-3}\) for almost the whole simulation time.

Fig. 7
figure 7

Benchmark: POD-based ROM simulation results with six basis functions. a. normalized chemical potential and square root error with respect to the FOM; b displacement magnitude at different simulation times, and square root error with respect to the FOM

Nested-POD-based approach Figures 8 and 9 report the singular values and fraction of energy retained for the chemical potential and displacement for the nested-POD approach, respectively. On the one hand, Figs.  8a, b and 9a, b report the behavior of the singular values and retained energy for the temporal dimension, for which SVD is locally applied for each material parameter sample. The behavior of the singular values and retained energy are presented for three out of the 30 samples taken for the parameters. The figures show that the singular values and retained energy behavior are very similar for the temporal dimension in each case. From the analysis, it is concluded that only four temporal modes are necessary to retain the desired fraction of energy \(\eta \). On the other hand, Figs. 8c, d and 9c, d display the behavior of the singular values and retained energy for the spatial dimension, for which SVD is applied over the snapshots matrix containing the temporal basis functions and spatial information for the 30 training parameter samples. From this analysis, it is concluded that only six spatial basis functions are required to retain the desired fraction of energy \(\eta \) contained in the FOM for the chemical potential and displacement.

Fig. 8
figure 8

Benchmark: nested-POD-based ROM. SVD of the chemical potential snapshots matrix: a singular values and b retained energy for the temporal domain; and c singular values and d retained energy for the spatial domain

Fig. 9
figure 9

Benchmark: nested-POD-based ROM. SVD of the displacement snapshots matrix: a singular values and b retained energy for the temporal domain; and c singular values and d retained energy for the spatial domain

As we found that the results obtained with the nested-POD-based ROM were identical to those reported in Fig. 7, we instead plot a full-field visualization of the simulation outcome for \([\lambda , A] = [1558, 4000]\). To this end, Fig. 10 displays the chemical potential (Fig. 10a) and displacement (Fig. 10c) obtained with the six basis functions at three different time steps for the nested-POD-based ROM, namely, \(T= \{0.02, 0.15, 0.25\}\). Errors with respect to the FOM simulation results reported in Fig. 3 are displayed for the chemical potential in Fig. 10b and for the displacement in Fig. 10d. As seen from Fig. 10, the nested-POD-based ROM can predict the FOM to a satisfactory extent. From Fig. 10b and d, it can be observed that the maximum discrepancy between the FOM and ROM is less than \(0.55\%\) for the chemical potential and \(0.3\%\) for the displacement field, respectively. It is also clear that the maximum discrepancy occurs at the beginning of the simulation but fades as time evolves. This result is expected because, at the beginning of the simulation, the chemical potential field has a very sharp gradient close to the exposed boundaries, but it is almost flat towards the center. It is well known that global surrogate models suffer when approximating flat functions.

Fig. 10
figure 10

Benchmark: nested-POD-based ROM simulation results for primary variables. a normalized chemical potential field and b absolute ROM error with respect to the FOM, as well as c displacement magnitude field and d absolute ROM error with respect to the FOM at time steps \(T = \{0.01, 0.15, 0.25\}\)

POD and nested POD-based ROMs require the same number of basis functions to retain the desired fraction of energy \(\eta \), and both approaches lead to the same level of accuracy; see also Appendix C for the convergence error analysis. However, the demand for computational resources significantly increases with the number of parameter samples. The advantage of the nested-POD algorithm becomes evident as reported in Fig. 5b. While both algorithms perform similarly with a small number of training samples, the nested-POD algorithm becomes more efficient as the number of training samples increases.

Figure 11 demonstrates the significant computational speed-up achieved with the ROM. For instance, the FOM computation time for \(N_h = 10\) is 0.33s, but for \(N_h = 160\), it is already 213.4 s. This corresponds to an exponential increase of the computational cost w.r.t. the mesh density. In contrast, the ROM computation time for \(N_h = 10\) is 0.018 s, but for \(N_h = 160\), it is still only 0.025 s. That is, the ROM simulation is about a factor of 8536 faster than the FOM simulation for \(N_h = 160\).

In the following, we restrict our analysis to the nested-POD approach only. This is because the same number of basis functions is required to retain the desired fraction of energy \(\eta \), the same level of accuracy has been obtained with POD and nested POD-based ROMs, and given the computational advantage of nested-POD algorithm for a large number of training samples. However, the code is provided to replicate results with POD and nested-POD-based ROM for all upcoming examples; see [1].

5.1.4 Material parameter identification from full-field data

This section shows the potential of using the developed nested-POD-based ROM to identify the model’s material parameters from full-field data. In the lack of experimental data, we take the solution of the nominal FOM (\(\lambda =1558, A=4000\)) at \(T = \{0.15, 0.25\}\) as synthetic data. It is worth recalling that the ROM did not encounter these values in the training dataset.

The optimization problem (42) to identify the optimal value of the material parameters was implemented in Python and solved using the minimize function from the Scipy library [59]. The hyperparameters of the L-BFGS-B algorithm are the maximum number of function evaluations and iterations (‘maxfun’ and ‘maxiter’), both set to 15, 000. The function tolerance (‘ftol’) is set to \(2.22 \times 10^{-9}\), and the gradient tolerance (‘gtol’) to \(1 \times 10^{-5}\). The function tolerance dictates the precision of the objective function and the convergence criterion based on the gradient’s magnitude, respectively. The step size for numerical approximation (‘eps’) is \(1 \times 10^{-8}\), and the maximum number of line search steps (‘maxls’) per iteration is 20. This setup allowed for efficient parameter space exploration while adhering to the constraints imposed by the problem’s physical context.

The optimization process starts with an initial guess for the material parameters, set to \(\varvec{\theta }_0 = [\lambda _0, A_0] = [1800, 3800]\), but we verified that the same result is obtained if different initial conditions are chosen. A bound constraint \([\lambda , A] = [(1000, 2000), (2000, 6000)]\) ensures that the solution remains within the parameter range the ROM was trained for.

Table 1 summarizes the results obtained from the parameter identification with ROM and FOM, as well as the related computational cost. From the results, it is possible to observe the nested-POD-based ROM’s effectiveness in performing many-query tasks. The material parameters identified with the ROM have a relative error of \(0.95~\%\) and \(1.95~\%\) for \(\mu \) and \({\textbf{u}}\), respectively. This discrepancy is attributed to the low number of temporal snapshots \((T = \{0.15, 0.25\})\) used for the identification problem. If more snapshots were considered for the identification problem, the error between the identified and correct material parameters is expected to decrease, but especially with the FOM, the computational cost would also increase significantly. Considering both the ROM training and the actual parameter identification, only a third of the time needed with the FOM was consumed. It is important to remark that the material parameter values identified using the FOM also deviate from the nominal values used to create the synthetic data.

Table 1 Benchmark: nested-POD-based ROM v.s. the FOM. Computational analysis of the model parameters identification

It is worth remarking that the optimization in Eq. (42) converges within 6 steps using the FOM, but 84 model calls were necessary to approximate the Jacobian. Thus, the computational time could be reduced significantly when using adjoints. However, our focus is on repeated calibration in laboratory contexts, where the ROM would still be beneficial.

5.2 Case study: co-axial hydrogel bioprinting

Co-axial bioprinting is one technique that can be used to automate the fabrication process of hydrogels [36]. It uses a dual-nozzle in a core/sheath configuration system to extrude a hydrogel precursor and a crosslinking agent simultaneously; see Fig. 2b. This core/sheath configuration, which enables immediate gelation and structural stability, can be adapted for specific hydrogel composition designs, allowing for multi-material deposition and improved resolution. It is crucial in tissue engineering for creating complex 3D structures with controlled properties like stiffness and porosity [36].

Model validation in the first stage is then employed to make predictions of the co-axial printing process and understand the effect of material parameter uncertainties on the printed hydrogel. In this case, the model might need to be evaluated many times to evaluate different printing conditions. More precisely, the material parameters \(\lambda \) and A could present a significant source of uncertainty. Consequently, in Sect. 5.2.3, we exploit the ROM’s efficiency and propagate the uncertainty in the material parameters onto two quantities of interest (QoIs) in the co-axial process, namely, the chemical potential at the nozzle’s tip and the induced stresses within the domain due to swelling.

On the one hand, the chemical potential is directly related to the species concentration and can inform about the degree of crosslinking (DoC) of the extruded material [30]. The DoC is a QoI that influences the gel’s properties and determines its possible application. On the other hand, induced stresses due to fluid absorption at the co-axial printer’s nozzle are often overlooked in the literature on hydrogel bioprinting. The focus has primarily been on induced shear stresses from extrusion [22]. However, this does not capture the full picture of co-axial printing, where additional stresses are induced in the nozzle due to fluid absorption and hydrogel crosslinking, resulting in swelling and shrinking stresses. The mean and maximum induced stresses could be monitored to evaluate if the printed hydrogel has the right conditions for cells viability after printing [22].

Fig. 11
figure 11

Benchmark: nested-POD-based ROM computational speed-up compared to the FOM

5.2.1 Simulation setup

We consider a vertical hydrogel bar where the height is four times the length as marked by the dashed white box in Fig. 2b. We assume that the diffusion time of the fluid into the hydrogel is relatively small compared to the velocity at which the hydrogel is extruded out of the printer’s nozzle. This allows us to neglect the physics of the hydrogel transport through the co-axial nozzle. We study the transient free-swelling of the hydrogel bar in a two-dimensional setting, assuming a homogeneous mix of gel and solvent at the nozzle’s tip. The material parameters are the same as in the benchmark problem mentioned earlier. Therefore, if the characteristic length in the previous example is \(l = 0.0015\) m, the dimensions of the hydrogel bar are \(0.0015 \times 0.0060\) m\(^2\) or, equivalently, \(1.5 \times 6.0\) mm\(^2\). This size is representative of a filament being crosslinked in the nozzle of a co-axial bioprinter.

We assume that only \(75 \%\) of the gel bar is exposed to the solvent on the left and right edges. The remaining \(25 \%\) of the left and right edges and the top surface have zero fluid flux for the solvent concentration boundary conditions. Due to the symmetry of the problem, only half of the domain is considered. The axisymmetric axis is marked in red in Fig. 2b. A Robin boundary condition imposes the chemical potential on the exposed portion on the left edge as defined in Eq. (15). Symmetric (Neumann) boundary conditions are defined at the center of the domain. In terms of mechanical boundary conditions, the axisymmetric edge is subject to a Dirichlet boundary condition \(u_x = 0\), while all other boundaries are considered to be traction-free.

The domain is discretized into triangular elements with quadratic interpolation for displacement and linear interpolation for the chemical potential, resulting in Taylor-Hood elements as introduced in Sect. 2. Equation (23) is solved as a variational monolithic problem using the FEniCS package as a PDE solver.

5.2.2 Numerical results for the reduced-order model

In this section, we provide numerical experiments to validate and demonstrate the parametric nested-POD-based ROM’s accuracy and computational efficiency, as we did for the benchmark case. The procedure in Fig. 1 is also followed in this section to assemble the nested-POD-based ROM. The material parameters are varied within the same range as in the benchmark problem to create the training and testing sets; see Fig. 5.

Figures 12 and 13 show the singular values and fraction of energy retained for the nested-POD algorithm for the chemical potential and displacement, respectively. On the one hand, Fig. 12a, b and 13a, b report the behavior of the singular values and retained energy for the temporal dimension. They show the decay of the singular values and the retained energy for three out of the 30 parameter samples, as we did for the benchmark problem. It is seen from the figures that the singular values and retained energy behavior are very similar for the temporal dimension. We conclude from the analysis that six temporal modes are enough to retain \(\eta =99.9999 \%\) of the energy. On the other hand, Figs. 12c, d and 13c, d display the decay of the singular values and retained energy for the spatial dimension. This analysis concludes that we can retain the desired fraction of energy \(\eta \) contained in the FOM with eight spatial basis functions.

Fig. 12
figure 12

Case study: hydrogel bar-nested-POD-based ROM. SVD of the chemical potential snapshots matrix: a singular values and b retained energy for the temporal domain; c singular values and d retained energy for the spatial domain

Fig. 13
figure 13

Case study: hydrogel bar-nested-POD-based ROM. SVD of the displacement snapshots matrix: a singular values and b retained energy for the temporal domain; c singular values and d. retained energy for the spatial domain

The nested-POD-based ROM is assembled with six and eight basis functions for the temporal and spatial domains. Four locations at the hydrogel bar domain are selected to verify the ROM’s accuracy as marked in Fig. 14. The root mean square error (RMSE) is measured over time at each location.

Fig. 14
figure 14

Case study: hydrogel bar. Nested-POD-based ROM simulation results with eight basis functions. a normalized chemical potential and square root error with respect to the FOM; b displacement magnitude and square root error with respect to the FOM

Fig. 15
figure 15

Case study: hydrogel bar. Nested-POD-based ROM simulation results. a normalized chemical potential and b absolute error of the ROM with respect to the FOM; c displacement magnitude and d absolute error of the ROM with respect to the FOM at time steps \(T = \{0.01, 0.15, 0.25\}\)

The ROM for the hydrogel bar developed using the nested-POD method is compared with the nominal FOM model (\(A=4000, \lambda =1558\) and \(\alpha =0.66\)). Figure 14 depicts a comparison of the temporal evolution between ROM and FOM in terms of chemical potential (Fig. 14a), displacement in x direction and displacement in y direction (Fig. 14b) at different points of the hydrogel bar. The figures show that the maximum RMSE between both models remains lower than \(10^{-2}\) for the chemical potential and displacement.

Figure 15 displays the chemical potential (Fig. 15a) and displacement (Fig. 15c) obtained with eight basis functions for the temporal and spatial domains at three different time steps, namely, \(T= \{0.01, 0.12, 0.25\}\). The corresponding errors with respect to the FOM are illustrated for the chemical potential in Fig. 15b and for the displacement in Fig. 15d, respectively.

As seen from Figs. 14 and 15, the nested-POD-based ROM can predict the FOM to a satisfactory extent. From Fig. 15, it can be observed that the maximum discrepancy between the FOM and ROM is less than 0.40% for the chemical potential and 0.24% for the displacement field, respectively.

Notice that the displacement field is not symmetric. The asymmetry in the displacement field suggests uneven swelling of the hydrogel bar during the printing process. This is relevant because this uneven swelling could impact the mechanical integrity of the final printed structure, particularly in complex multi-layered scaffold designs, where stability is crucial.

5.2.3 Uncertainty propagation of the material parameter

In this subsection, we exploit the ROM’s efficiency to understand the effect of material parameters on two QoIs. We consider \(\lambda \) and A as random variables and propagate their uncertainty onto i. the chemical potential at the nozzle’s tip and ii. the induced stresses within the domain due to swelling.

In principle, the probability density function (PDF) of the two material parameters can be determined as discussed below:

  1. 1.

    Bayesian updating of the material parameters from measurement data; the reader can, for instance, refer to [27, 49], and [5]. However, acquiring species concentration-related and displacement measurement data during printing is a technological challenge.

  2. 2.

    Bayesian inference from benchmark: Alternatively, one could quantify the uncertainty for the benchmark problem and then propagate this uncertainty in the case study. However, although both problems involve the same hydrogel material, the distinct boundary conditions and domain dimensions result in different chemical potential profiles and displacement magnitudes, thereby influencing the material response differently, as evidenced when comparing Figs. 1415 (case study) with Figs. 34 (benchmark). Consequently, directly applying the identified PDFs from the benchmark problem may not adequately capture the full range of uncertainties present in the case study.

  3. 3.

    Designing synthetic PDFs based on prior knowledge or expert opinion for \(\lambda \) and A around the nominal values identified for the benchmark problem is a more appropriate approach in the present context. Here we assume a normal distribution and use the Monte Carlo method to generate 1000 samples for \(\lambda \) and A. We set the mean values of \(\lambda \) and A equal to their nominal values \([\lambda , A] = [1558, 4000]\) and the standard deviation as \(10\%\) around these nominal values. The motivation for such a choice is based on the experimental work reported in [18] where it is evidenced that, under a similar hydrogel fabrication protocol, \(\lambda \) and A present a significant level of uncertainty (the reader is referred to Figs. 3 and 5 in [18]). The reader should notice that assuming a Gaussian distribution implies that \(\lambda \) and A could take unphysical negative values, but the probability of getting them at the given mean and standard deviation is approximately \(7 \times 10^{-24}\), i.e., essentially zero. Fig. 16 depicts the PDF along with the normalized histogram of 1000 samples generated from the PDF for \(\lambda \) (Fig. 16a) and A (Fig. 16b). It is observed from the figure that, indeed, the two random variables follow a normal distribution, and the generated samples remain within the range the ROM was trained (\(\lambda = [1000, 2000]\) and \(A = [2000, 6000]\)).

Fig. 16
figure 16

Case study: hydrogel bar. Uncertainty propagation analysis. Probability distribution function and normalized histogram of the generated samples of a \(\lambda \) and b A.

We solve the nested-POD-based ROM iteratively and observe how the uncertainty in \(\lambda \) and A propagates to the QoIs. Figure 17 shows the effect of the uncertain material parameters on the temporal evolution of the selected QoIs for 1000 ROM realizations. It is worth remarking that one iteration of the ROM took an average of 15 s, which led to a total computation time of around 4 h on a standard laptop. The same 1000 iterations adopting the FOM instead will take up to 24 h on the same laptop (an average of 90 s for each FOM iteration), which shows the advantage of adopting the nested-POD-based ROM in this many-query task.

Figures 17a, b report the evolution of the normalized chemical potential at the nozzle’s tip. Figure 17a refers to the corner at (\(X=0,~Y=0\)) and Fig. 17b to the nozzle’s tip center at the point (\(X=0.5,~Y=0\)). From Fig. 17 can be observed that variations up to \(10\%\) in the material parameters can lead to considerable differences in the diffusion-deformation process evolution. The effect of varying \(\lambda \) and A becomes more pronounced at the center of the nozzle’s tip.

The normalized mean induced stress in the \(XX\)-direction at each time instance is computed as the average of the stress values over the domain as

$$\begin{aligned} \sigma ^{\text {mean}}_{XX}(t) = \frac{1}{A_{2D-block}} \int _{A_{2D-block}} \sigma _{xx}((x,y),t) dA, \end{aligned}$$
(46)

with \(A_{2D-block}\) the simulated hydrogel bar area and \(dA = dxdy\) representing the differential area element.

The maximum normalized induced stress in the \(XX\)-direction at each time instance is computed as the maximum value of the stress over the domain as

$$\begin{aligned} \sigma ^{\text {max}}_{XX}(t) = \max _{(x, y) \in A_{\text {2D-block}}} \sigma _{XX}((x, y), t). \end{aligned}$$
(47)

Similarly, we can compute the normalized mean \(\sigma ^{\text {mean}}_{YY}\) and max \(\sigma ^{\text {max}}_{YY}\) induced stresses in the \(YY\)-direction at each time instance.

Fig. 17
figure 17

Case study: hydrogel bar. Uncertainty propagation analysis. Normalized chemical potential at the nozzle’s tip at points a \((X = 0, Y = 0)\) and b \((X = 0.5, Y = 0)\). Normalized induced c mean and d maximum stress

Figures 17c, d show the normalized mean \(\sigma ^{\text {mean}}_{XX}\) and maximum \(\sigma ^{\text {max}}_{XX}\) induced stresses in the \(XX\)-direction due to the diffusion of the solvent into the hydrogel, but identical results are obtained for \(\sigma ^{\text {mean}}_{YY}\) and \(\sigma ^{\text {max}}_{YY}\). It is observed from the figures that the level of induced stress has pronounced peaks at the beginning of the simulation, which can lead to some damage to the cells contained in bio-inks.

These induced stresses are normalized by the shear modulus G, which [18] found to be equal to 33 kPa from the experiments. Hence, the maximum induced stress can be amplified 80 times and reaches a maximum of 2600 kPa based on the results reported in Fig. 17d. Just as a reference example, the authors of [22] studied the level of damage caused by the shear stresses during hydrogels extrusion in bioprinting applications and reported that cells could suffer damage up to \(50\%\) for induced stresses between 100 and 500 kPa. This threshold is clearly exceeded at the beginning of the performed simulation and can have significant consequences on the cell viability at the end of the process. One alternative to preventing such high-stress fluctuations could be implementing a feedback control mechanism that can monitor the mean and maximum induced stresses informed by the ROM and dynamically adjust the solvent concentration at the mixing zone (see Fig. 2b) to keep the induced stresses under a desired limit.

6 Conclusions

In this paper, we demonstrated that POD-based algorithms are feasible for developing a ROM of a coupled diffusion-deformation model. The accuracy of the ROM was tested in two different scenarios: i. free-swelling of a 2D gel block, a well-established benchmark in the literature, and ii. a case study resembling a bioprinting process using a co-axial bioprinter. In both cases, we highlighted the computational benefits of adopting the ROM, where the computational cost of the ROM online evaluation was only 0.01% of running the full-order model. Furthermore, when using a finer mesh, we found that the ROM is even 5172 times faster than the FOM in simulating the time-dependent diffusion-deformation evolution in the co-axial printing application.

We demonstrated the benefits of adopting a ROM in many-query tasks, that is, parameter identification from full-field data and uncertainty propagation. In parameter identification, we showed that the computational resources spent in the offline phase for training data generation and ROM construction are repaid by a relatively large number of evaluations (90 on average) of the trained model in an online phase. Additionally, we exploited the simulation speed-up provided by the ROM and propagated the uncertainty in the material parameters to two quantities of interest in co-axial bioprinting: the chemical potential at the nozzle’s tip and the stresses due to the fluid’s absorption that lead to the hydrogel’s swelling. The significant simulation speed-up provided by the ROM paves the way for more advanced applications, such as online feedback error compensation during the bioprinting process. This would ensure that the printed products meet design and functional requirements, ultimately aiming to produce consistent, high-quality hydrogel products to advance the reliability of bioprinting technologies.

7 Supplementary information

No supplementary information was produced from this research.