1. Introduction
Laser- and imaging-based techniques, including particle image velocimetry (PIV) and particle tracking velocimetry (PTV), have been widely used as reliable tools to visualise, measure and study the intrinsic characteristics of complex flows (Adrian Reference Adrian2005; Westerweel et al. Reference Westerweel, Elsinga and Adrian2013; Raffel et al. Reference Raffel, Willert, Scarano, Kähler, Wereley and Kompenhans2018). The velocity fields of unsteady flows can be accurately measured using planar techniques (Keane & Adrian Reference Keane and Adrian1992; Scarano Reference Scarano2002) or three-dimensional (3-D) measurement methods (Elsinga et al. Reference Elsinga, Scarano, Wieneke and van Oudheusden2006; Gao et al. Reference Gao, Wang and Shen2013; Scarano Reference Scarano2013) with high temporal and spatial resolution. However, the measurement of pressure fields is challenging because common tracer particles only follow the motion of flows and are insensitive to dynamic variations in the pressure (Abe et al. Reference Abe, Okamoto and Madarame2004). The fluctuating pressure plays a prominent role in the evolution of flow structures and flow-induced noise (Lorenzoni et al. Reference Lorenzoni, Tuinstra and Scarano2012; Zhou et al. Reference Zhou, Wang, Wang and He2021b ). The surface pressure enables the estimation of object loads, which are highly important for engineering applications. Moreover, the intraventricular pressure gradient field has been demonstrated to be directly correlated with the function of the left ventricle (LV), and may represent a natural early indicator and predictor of cardiac function (Pedrizzetti & Domenichini Reference Pedrizzetti and Domenichini2015). Therefore, it is of great interest to determine pressure from velocity measurements by using the incompressible Navier–Stokes (N–S) equations (Liu & Katz Reference Liu and Katz2006; van Oudheusden Reference van Oudheusden2013).
However, pressure determination in scenarios with a moving boundary remains challenging. Generally, there are two methods for deriving pressure from velocity (van Oudheusden Reference van Oudheusden2013; Cai et al. Reference Cai, Liu, Chen and Liu2020; Fan et al. Reference Fan, Xu, Wang and Wang2023). The first method involves integrating the pressure gradient along a specified straight path as proposed by Liu & Katz (Reference Liu and Katz2006), and the second method involves solving the pressure Poisson equation which is obtained by taking the divergence of the pressure gradient (de Kat & van Oudheusden Reference de Kat and van Oudheusden2012; van Oudheusden Reference van Oudheusden2013; Pirnia et al. Reference Pirnia, McClure, Peterson, Helenbrook and Erath2020). Both methods require accurate estimation of the material acceleration. Based on the N–S equations, the pressure gradient can be expressed as the sum of the material acceleration
$-D\mathbf {U}/Dt$
and the viscous term
$\nu \nabla ^2\mathbf {U}$
, where
$\mathbf {U}$
denotes the velocity and
$\nu$
is the kinematic viscosity. Much effort has been devoted to improving the accuracy of material acceleration in the Eulerian or Lagrangian framework. For the Eulerian framework, material acceleration involves both local and convective acceleration, which can be directly computed according to the structured velocity using finite difference or polynomial regression approaches (Kat & Ganapathisubramani Reference Kat and Ganapathisubramani2012; van Oudheusden Reference van Oudheusden2013; Wang et al. Reference Wang, Gao, Wei, Li and Wang2017a
; Cai et al. Reference Cai, Liu, Chen and Liu2020). For the Lagrangian framework, the acceleration is evaluated from the trajectory of a physical particle from PTV (Ferrari & Rossi Reference Ferrari and Rossi2008; Schanz et al. Reference Schanz, Gesemann and Schrder2016; Shao et al. Reference Shao, Mallery, Kumar and Hong2020; Schröder & Schanz Reference Schröder and Schanz2023) or an imaginary particle from the Eulerian velocity fields (Liu & Katz Reference Liu and Katz2006; de Kat & van Oudheusden Reference de Kat and van Oudheusden2012; Wang et al. Reference Wang, Gao, Pan, Feng and Wang2017b
). van Gent et al. (Reference van Gent2017) assessed the performance of pressure field reconstructions from PIV and PTV measurements using zonal detached eddy simulations. The results indicated that a more accurate pressure field could be reconstructed via Lagrangian approaches in combination with other advanced techniques. The most widely used path integration-based and Poisson equation-based methods are feasible for the full fluid domain. However, when a stationary or moving object is immersed in the fluid domain, the pressure estimation around the immersed object becomes more complicated due to the fluid–solid interaction (Pirnia et al. Reference Pirnia, McClure, Peterson, Helenbrook and Erath2020). The pressure determination depends strongly on accurate Neumann boundary conditions, which are difficult to obtain experimentally because of the high velocity gradient, coarse spatial resolution and laser light reflection near the surfaces of the immersed objects. Few studies have investigated the pressure under conditions with moving boundaries; the work reported by Pirnia et al. (Reference Pirnia, McClure, Peterson, Helenbrook and Erath2020) is an exception, where a finite element approach was used to estimate pressure fields from the planar velocity data around immersed bodies. In their work, by reducing the order of the velocity derivatives and incorporating the surface dynamics in the Poisson equation, the error of the pressure estimation was decreased to a low level compared with that obtained by integrating the pressure gradient and solving the pressure Poisson equation.
Machine-learning-based approaches have shown promise for improving the spatial/temporal resolution of turbulent flows (Fukami et al. Reference Fukami, Fukagata and Taira2019,Reference Fukami, Fukagata and Taira2021; Kim et al. Reference Kim, Kim, Won and Lee2021; Wang et al. Reference Wang, Yang, Li and Wang2020b ), developing turbulence models for computational fluid mechanics (CFD) (Ling et al. Reference Ling, Kurzawski and Templeton2016; Duraisamy et al. Reference Duraisamy, Iaccarino and Xiao2019; Zhou et al. Reference Zhou, He and Yang2021a ; Zhang et al. Reference Zhang, Xiao, Luo and He2022), discovering governing equations and identifying unique dimensionless quantities (Brunton et al. Reference Brunton, Proctor and Kutz2016; Rabault et al. Reference Rabault, Kuchta, Jensen, Reglade and Cerardi2019; Zhao et al. Reference Zhao, He and Wang2023; Xu et al. Reference Xu, Zhang, Wang and He2022; Churchill et al. Reference Churchill, Manns, Chen and Xiu2023), reducing the order of complex systems (Yu et al. Reference Yu, Huang and Xu2019; Lui & Wolf Reference Lui and Wolf2019; Murata et al. Reference Murata, Fukami and Fukagata2020; Callaham et al. Reference Callaham, Loiseau and Brunton2023; Liao et al. Reference Liao, Zhao, Chen, Wan, Liu and Lu2023), and enhancing experimental data (Cai et al. Reference Cai, Zhou, Xu and Gao2019; Shao et al. Reference Shao, Mallery, Kumar and Hong2020; Gao et al. Reference Gao, Pan, Wang, Wei and Wang2021; Cai et al. Reference Cai, Wang, Fuest, Jeon, Gray and Karniadakis2021b ; Wang et al. Reference Wang, Liu and Wang2022a ). A comprehensive review of machine learning for fluid mechanics was given by Brunton et al. (Reference Brunton, Noack and Koumoutsakos2020). Recently, the physics-informed neural network (PINN) proposed by Raissi et al. (Reference Raissi, Yazdani and Karniadakis2020) has received much attention because of its excellent performance in solving inverse problems involving nonlinear partial differential equations (Raissi et al. Reference Raissi, Perdikaris and Karniadakis2019a ). By embedding physical laws into the loss function of a data-driven neural network, the PINN can obtain optimal variables under constraints with known data and laws. Raissi et al. (Reference Raissi, Yazdani and Karniadakis2020) proposed hidden fluid mechanics based on a PINN to learn velocity and pressure fields from images of flow visualisations. Cai et al. (Reference Cai, Wang, Fuest, Jeon, Gray and Karniadakis2021b ) used a PINN to estimate velocity and pressure fields from the temperature data of tomographic background oriented Schlieren experiments. These inverse problems are extremely ill-posed because only a scalar quantity is given. However, the results suggest that the PINN is a powerful optimisation tool for addressing these inverse problems. In addition, Xu et al. (Reference Xu, Zhang and Wang2021) employed a PINN and treated the governing equations as parametrised constraints to recover missing flow field information. Moreover, Arzani et al. (Reference Arzani, Wang and D’Souza2021) used a PINN to obtain the wall shear stress for near-wall haemodynamics from sparse velocity measurements. Wang et al. (Reference Wang, Liu and Wang2022a ) applied a PINN to reconstruct dense velocity fields from sparse experimental data under the constraint of N–S equations. One of the outstanding advantages of a PINN is that it can automatically solve for pressure fields without any pressure information. In their experimental assessment of the 3-D wake flow of a hemisphere, the low-pressure region estimated by the PINN was found to be consistent with the vortex core. Furthermore, a quantitative assessment of the pressure reconstruction methods, including the spectral decomposition-based fast pressure integration algorithm (Wang et al. Reference Wang, Gao, Wei, Li and Wang2017a ), irrotation correction on pressure gradient and orthogonal-path integration method (Wang et al. Reference Wang, Gao, Wang, Wei and Wang2016c ) and a PINN, was reported by Fan et al. (Reference Fan, Xu, Wang and Wang2023). The results indicate that PINN-based pressure reconstruction is superior to other methods even if the velocity fields contain substantial measurement errors. Jiang et al. (Reference Jiang, Kerswell, Lefauve, Linden and Zhu2024) also demonstrated that a PINN can predict the latent pressure field in density-stratified flows. Notably, a PINN has been used to reconstruct two-dimensional (2-D) pressure fields around a swimming fish from PIV measurements (Calicchia et al. Reference Calicchia, Mittal, Seo and Ni2023). Due to the motion of the swimming fish, the kinematics data of the zebrafish must be considered during pressure reconstruction. The results indicate that the PINN predictions are more accurate than those of other methods because more physical information is used. Generally, moving boundaries can be incorporated into the loss function of a PINN, as proposed by Zhu et al. (Reference Zhu, Kong, Deng and Bian2024). However, the loss function in their work considers only rigid motion with translation and rotation and cannot address the motion of non-rigid bodies. Moving boundary conditions, especially the boundary velocity, are difficult to measure accurately because of measurement noise. It is also needed to optimise the boundary conditions based on physical laws. There are still few examples for solving the pressure in the scenarios with moving boundaries due to the fluid–solid interactions.
In the present study, we propose a machine-learning-based method to reconstruct pressure fields from velocity fields with moving boundaries. This novel framework contains two neural networks: the PINN-based network is used to estimate the flow fields, and the other network is used to track the motion of moving objects. These two networks are coupled by boundary conditions. The rest of the paper is organised as follows. We first introduce our machine-learning-based pressure reconstruction approach in § 2. In § 3, the proposed method is comprehensively validated by considering the flows over an oscillating cylinder and around swimming fish, and then is applied to determine the pressure from experimental intraventricular flow data. Finally, concluding remarks are provided in § 4.
2. Methodology
2.1. Dual-network model for pressure reconstruction with moving boundaries
The PINN has been reviewed in many papers (Karniadakis et al. Reference Karniadakis, Kevrekidis, Lu, Perdikaris, Wang and Yang2021; Cai et al. Reference Cai, Mao, Wang, Yin and Karniadakis2021a ; Wang et al. Reference Wang, Liu and Wang2022a ,Reference Wang, Yu and Perdikaris b ); thus, in the present work, we do not provide a comprehensive introduction to the framework of the PINN. In brief, a PINN seamlessly integrates known data (measured data, boundary conditions and initial conditions) and physical laws by embedding partial differential equations into the loss function of a data-driven neural network via automatic differentiation. In this paper, we focus on the solution of the pressure fields with moving boundaries using a PINN.
Architecture of the dual-network model for pressure reconstruction with moving boundaries. We name this network PINN-MB. The boundary network is used to track the motion of the boundaries, and the PINN-based flow network is used to approximate the flow fields. The parameters
$\mathbf {X}$
and
$t$
denote space and time, respectively.
$\mathbf {X}_b^t$
represents the Lagrangian points on the moving boundaries at time
$t$
.

In the present work, a dual-network model, named PINN-MB (MB is an abbreviation for moving boundary), is adopted to reconstruct the pressure with a moving boundary, as shown in figure 1. PINN-MB consists of two neural networks: the boundary network and the flow network. The boundary network with input
$(t,\mathbf {X}_b^0)$
and output
$\mathbf {X}_b^t$
is used to capture the motion of the boundaries, where
$\mathbf {X}_b^0$
denotes the initial boundary position and
$\mathbf {X}_b^t$
represents the current boundary position at time
$t$
. The relationship between the inputs and outputs can be expressed as
Here,
${\mathcal {F}}_{b.c.}$
and
${\boldsymbol {\Theta }}_{b.c.}$
represent the boundary neural network and the corresponding trainable variables, respectively. Note that the boundary points should be preprocessed to ensure that the Lagrangian points at different times are one-to-one matches, as shown in the representation of the boundary data in figure 1. After ensuring the point correspondence, the boundaries at different times are described by a series of points with the same number and connectivity. The boundary network needs only the supervised boundary points for training, and the boundary velocity
$\mathbf {U}_{b}^t$
is estimated from
$\partial \mathbf {X}_{b}^t/\partial \mathbf {t}$
via automatic differentiation. Therefore, the boundary condition at time
$t$
is given as
$(\mathbf {X}_{b}^t,\mathbf {U}_{b}^t)$
. The flow network used to approximate the flow fields is expressed as follows:
where the inputs are the spatial coordinates
$\mathbf {X}$
and time
$t$
, and the outputs are the velocity field
$\mathbf {U}$
and pressure
$p$
. Similar to the PINN, the N–S equations are encoded into the loss function via automatic differentiation. The boundary network and flow network are coupled by minimising the loss function of the boundary condition as described by
The parameter
$N_{b.c.}$
denotes the number of boundary points and
$\Vert \cdot \Vert _{2}$
represents the
$\mathcal {l}_{2}$
norm. Note that
$(\mathbf {X}_{b}^t,\mathbf {U}_{b}^t)$
is estimated from the boundary network. Minimising
$\mathcal {L}_{b.c.}$
implies that the boundary velocity computed by the boundary network must be equal to the flow velocity computed by the flow network.
The total loss is given by
In (2.4),
$\mathcal{L}_{eqns}$
represents the residual of the N–S equations (Jin et al. Reference Jin, Cai, Li and Karniadakis2021; Wang et al. Reference Wang, Liu and Wang2022a
),
$\mathcal {L}_{fdat}$
represents the loss between the measured velocity
$\mathbf {U}_{meas}$
and the velocity
$\mathbf {U}_{pred}$
predicted by the flow network, and the sparse velocity measured by PIV or PTV uniformly distributes in the domain. The parameter
$\mathcal {L}_{bdat}$
represents the loss between the measured boundary positions and the boundary positions predicted by the boundary network. The trainable variables
${\boldsymbol {\Theta }}_{b.c.}$
and
${\boldsymbol {\Theta }}_{flow}$
are simultaneously optimised by minimising the total loss. Due to the inherent multitasking property of the network, the weighting coefficients
$\alpha$
,
$\beta$
and
$\gamma$
are used to balance the contributions of different loss terms in (2.4) (Wang et al. Reference Wang, Teng and Perdikaris2021). In the present work, we propose a novel approach to estimate these dynamic weights as follows:
\begin{align}& \hat {\alpha }^{k+1} = \frac {\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}/\sqrt {\mathcal {L}_{eqns}}}{\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{b.c.}}\right |}/\sqrt {\mathcal {L}_{b.c.}}},\quad \hat {\beta }^{k+1} = \frac {\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}/\sqrt {\mathcal {L}_{eqns}}}{\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{fdat}}\right |}/\sqrt {\mathcal {L}_{fdat}}}, \nonumber \\ & \hat {\gamma }^{k+1} = \frac {\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}/\sqrt {\mathcal {L}_{eqns}}}{\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{bdat}}\right |}/\sqrt {\mathcal {L}_{bdat}}}. \end{align}
Here,
$\nabla _{\boldsymbol {\Theta }}{ (\cdot )}$
represents the gradient of the loss terms with respect to all of the trainable variables
$\boldsymbol {\Theta }$
and can be computed via automatic differentiation with any deep learning framework. Additionally,
$\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}$
,
$\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{b.c.}}\right |}$
,
$\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{fdat}}\right |}$
and
$\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{bdat}}\right |}$
denote the means of the absolute values of
$\nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}$
,
$\nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{b.c.}}$
,
$\nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{fdat}}$
and
$\nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{bdat}}$
, respectively. Equation (2.5) implies that the loss terms are balanced using both the gradient and loss statistics. In Appendix A, the present dynamic weight strategy is comprehensively compared with that proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021), where the dynamic weights are estimated using only the loss gradient statistics. The results indicate that our method is more robust and accurate. For more details on the comparison, please refer to the Appendix. Consequently, the weighting coefficients in the
$k+1$
th iteration are updated using a moving average strategy as
$(\cdot )^{k+1}=(1-\eta )(\cdot )^{k}+\eta \hat {(\cdot )}^{k+1}$
. The parameter
$\eta$
is a hyperparameter and is fixed at 0.1 (Jin et al. Reference Jin, Cai, Li and Karniadakis2021).
An adaptive swish activation function is used in the present network. This function is expressed by
where
$a=n\zeta$
,
$\zeta$
is a trainable parameter and
$n$
is a scale factor. According to Jagtap et al. (Reference Jagtap, Kawaguchi and Karniadakis2020), the scale factor
$n$
is set to 10, and the value of
$\zeta$
is initialised to 0.1. For more details on the impact of the activation functions on the PINN performance, please refer to the paper by Wang et al. (Reference Wang, Liu and Wang2022a
). Additionally, the inputs and outputs of the network are normalised. The input spatiotemporal coordinates are scaled by the minimum and maximum, and output velocities are scaled by the mean and standard deviation values. These parameters (the minimum, maximum, mean and standard deviation) are estimated according to the supervised data, whereas the mean and standard deviation of pressure are assumed to be zero and one. In Appendix B, we assess the influence of the spatial discretisation of the equation points on the pressure reconstruction performance. The residual of the equations is collected via two discretisation strategies: random uniform distribution and near-wall grid refinement. The error when the random uniform distribution is used is slightly smaller than that when near-wall grid refinement is used. Therefore, random uniform residual points for equations are adopted in this work. In Appendix C, the performance of the PINN-based pressure reconstruction method is assessed using the data for two axisymmetric corotating vortex rings, where the velocity is presented in cylindrical coordinates. This case proves that in addition to Cartesian coordinates, a PINN can also be used in cylindrical coordinates. We also investigate the effect of the amount of training data on the performance of pressure reconstruction based on the 2-D flow over an oscillating cylinder (§ 3.1) and fish swimming (§ 3.2) in Appendix D. The results indicate that the supervised data needed by the proposed PINN-MB are only
$0.1\, \%$
of the CFD points. The neural networks are trained on a supercomputing platform with multiple NVIDIA GeForce RTX 4090 GPUs. The training variables are updated using the adaptive moment estimation (Adam) optimiser with an initial learning rate of
$2\times 10^{-3}$
for both the flow network and the boundary network. The learning rate decays exponentially in a stepwise manner, and the learning rate of the last 2000 epochs is fixed at
$1\times 10^{-5}$
to fine-tune the result.
2.2. Advantages of PINN-MB by comparison with PINN and the numerical method
This section compares PINN-MB with the original PINN and the numerical method to demonstrate its advantages. The proposed PINN-MB contains a boundary network
${\mathcal {F}}_{b.c.}$
and a flow network
${\mathcal {F}}_{flow}$
; the former is adopted to track the motion of boundaries and the latter is adopted to interpolate the flow fields with the constraint of the N–S equation. The boundary velocity
$\mathbf {U}_{b}^t$
is calculated from the optimal boundary
$\mathbf {X}_{b}^t$
via automatic differentiation of the boundary network. The boundary condition
$(\mathbf {X}_{b}^t, \mathbf {U}_{b}^t)$
, including location and velocity, can be predicted at an arbitrary instant from the boundary network. PINN can also estimate the pressure field if the boundary condition is given as known data. However, for a real experiment, the boundary velocity should be estimated by finite difference or by fitting the noisy boundary positions. This may introduce a very high uncertainty arising from the time derivative of the inaccurate boundary position. Moreover, a PINN is incapable of boundary optimisation and prediction, as given in Appendix E. For the numerical method, the pressure can be easily determined from the given velocity field through the Poisson equation if the boundary is fixed. However, the local acceleration (
${\partial }/{\partial t}$
) near the boundary is difficult to estimate because of the boundary’s deformation, except for adopting the immersed boundary method or the moving grid strategy. Meanwhile, the accuracy of the resulting pressure computation is sensitive to the propagation of the errors of velocity and boundary (van Oudheusden Reference van Oudheusden2013). The advantages of PINN-MB over the PINN and the numerical method are summarised in table 1. In brief, PINN-MB can solve for the pressure from the optimised velocity and boundary.
An overview of the differences among the PINN-MB, PINN and numerical method.

$^1$
The boundary velocity is deduced from the time derivative of the boundary location.
$^2$
The numerical method is difficult to construct the difference equation near the boundary.
$^3$
There is no capability for optimisation or prediction.
3. Results
3.1. Example 1: flow over an oscillating cylinder
The performance of the proposed method is first validated using a simulated 2-D flow over an oscillating cylinder at a diameter-based Reynolds number of
$Re_D$
= 185, where
$D$
denotes the diameter of the cylinder. The computational domain spans
$-15D\leqslant x \leqslant 45D$
and
$-20D\leqslant y \leqslant 20D$
, and the cylinder is initialised at the origin (0, 0) and moves in the cross-flow (y-axis) direction according to
$y_c=0.2sin(2\pi f_c t)$
. The normalised parameter
$f_c$
is set to 0.156 according to Wang et al. (Reference Wang, Vanella and Balaras2019). The ground truth velocity
$\mathbf {U}$
and pressure fields
$p$
are obtained by solving the non-dimensional incompressible N–S equations:
\begin{align} \frac {\partial \mathbf {U}}{\partial t}+(\mathbf {U}\cdot \nabla )\mathbf {U} &=-\nabla p+\frac {1}{Re_D}\nabla ^2\mathbf {U}, \nonumber\\ \nabla \cdot \mathbf {U} &= 0. \end{align}
All variables are normalised by the fluid density
$\rho$
, the free streamwise velocity
$U_{\infty }$
and the diameter
$D$
. This simulation is conducted using OpenFoam with a moving grid strategy over a body-fitted and wall-refined mesh. The non-dimensional time step in the simulation is set to
$2.5\times 10^{-3}$
, with a maximum Courant–Friedrichs–Lewy number of 0.7. A no-slip condition is imposed at the cylinder surface. Note that the data are stored every twenty steps, which means that the stored time interval is
$5.0\times 10^{-2}$
. After the CFD data are obtained, the scattered velocity data for training are collected by interpolating the flow fields on a uniform grid to mimic the typical PIV data. The inspected region is limited to the subdomain of
$-1D\leqslant x \leqslant 3D$
and
$-1D\leqslant y \leqslant 1D$
. The vector space is denoted by
$1/R$
, where
$R$
is the number of points along the diameter. A small
$R$
indicates a low spatial resolution. There are 721 boundary points distributed uniformly on the surface of the cylinder, and the time sequence is the same as that of the velocity data. In addition, evaluation of the influence of measurement noise on the performance of the proposed method is vital. Therefore, Gaussian random noise is added to the training data (including the boundary data). The noise level
$\sigma_n$
is defined as the ratio of the mean noise magnitude to the velocity magnitude. The signal-to-noise ratio (SNR) can be simply estimated as
$\textrm{SNR}=10{\log}_{10}{1/\sigma _n^{2}}$
. We randomly sampled
$1\times 10^6$
data points and
$0.5\times 10^6$
boundary points from four hundred velocity fields without pressure information as training data,
$1\times 10^6$
points to estimate the residuals of the N–S equations and
$0.5\times 10^6$
points to estimate the boundary conditions.
The PINN-MB network is built for pressure reconstruction in scenarios with a moving boundary. The boundary network contains nine hidden layers and 32 neurons per hidden layer, and the flow network contains 13 hidden layers and 128 neurons per hidden layer, yielding a total of 207 707 trainable parameters. This means that we used 207 707 parameters to capture the spatiotemporal evolution of the flow over the oscillating cylinder, whereas the numerical simulation used approximately
$1.4\times 10^7$
grid points (400 velocity fields, each field containing 35 940 CFD points) in the subdomain to compute the flow fields. The network was trained for 4000 epochs with 30 iterations per epoch, and the batch size was set to 10 000. The initial position
$\mathbf {X}_b^0$
was set to a standard circle with
$D = 1$
without measurement noise. The boundary noise at the initial position can reasonably be ignored because the experimental model is accurately designed in advance. No pressure information is provided for training. An example snapshot of the velocity and pressure is shown in figure 2. The training data with
$R = 20$
and
$\sigma _n = 0\, \%$
, the data learned over a high-resolution mesh with
$R=100$
, and the absolute error between the exact and learned data are presented from top to bottom. From left to right, the contour maps represent
$u$
,
$v$
and
$p$
, respectively. At this instant, the cylinder moves forward along the y-axis, as indicated by the yellow arrows. The pressure is greater in the stagnation region and lower in the vortex region. Notably, the mean pressure at each time instant is subtracted to enable comparative assessments. A visual inspection of the results suggests that the predicted high-resolution data are approximately the same as the exacted data, and the maximum absolute error of the pressure coefficient is approximately
$4\, \%$
of the maximum pressure. In figure 3, noise with
$\sigma _n=8\, \%$
was added to both the velocity data and boundary data. The velocity, pressure and boundary of the cylinder can still be recovered from the noisy data, although the absolute errors are larger than those in the case without noise. As shown in figures 2 and 3, a large error (
$\sim$
0.05) is always observed in the region near the boundary for high velocity gradients. This visual inspection shows that the proposed method can accurately determine the pressure fields in scenarios with a moving boundary.
A representative snapshot of the velocity, pressure and corresponding absolute error. From left to right, the contour maps represent
$u$
,
$v$
and pressure
$p$
. The dashed black lines represent negative contour levels from
$-$
1.5 to
$-$
0.1 with an interval of 0.2, and the solid black lines represent positive contour levels from 0.1 to 1.5 with an interval of 0.2. Note that the spatially averaged pressure is subtracted from both the exacted data and the predicted data for comparative assessment. For the training data, the vector space
$1/R$
is set to
$1/20$
, and the noise level is set to
$0\, \%$
. The learned data were predicted over a mesh with an interval of
$1/R=1/100$
. Therefore, the original CFD data were interpolated on the predicted mesh to compute the absolute error. The yellow arrows indicate the motion of the cylinder.

A representative snapshot of the velocity, pressure and corresponding absolute error. From left to right, the contour maps represent
$u$
,
$v$
and pressure
$p$
. The dashed black lines represent negative contour levels from
$-$
1.5 to
$-$
0.1 with an interval of 0.2, and the solid black lines represent positive contour levels from 0.1 to 1.5 with an interval of 0.2. Note that the spatially averaged pressure is subtracted from both the exacted data and the predicted data for comparative assessment. For the training data, the vector space
$R$
is set to
$1/20$
, and the noise level is set to
$8\, \%$
(the corresponding SNR is 21.9). The learned data were predicted over a mesh with an interval of
$R=1/100$
. Therefore, the original CFD data were interpolated over the predicted mesh to compute the absolute error. The yellow arrows indicate the motion of the cylinder.

To provide a quantitative comparison, we present the relative
$\mathcal {l}_{2}$
norm error of the pressure as a function of
$R$
and
$\sigma _n$
in figure 4. The relative
$\mathcal {l}_{2}$
norm error is defined as follows:
The subscripts
$ref$
and
$pred$
denote the reference value and the predicted value, respectively. The relative
$\mathcal {l}_{2}$
norm error of the velocity components is also estimated using the same formula. All errors are averaged over space and time. Before presenting the results, we note that PINN-based pressure reconstruction has been compared with traditional approaches within pure flow fields (Fan et al. Reference Fan, Xu, Wang and Wang2023). The previous work has shown that the PINN-based method is superior to the other two methods because the former can optimise the velocity fields. In the present work, a dual-network model is used to determine the pressure from velocity with a moving boundary. This method can address not only rigid bodies but also flexible boundaries, as shown in the next three examples. Returning to figure 4, it is evident that the pressure error (
$\sim 4\, \%$
) is larger than the velocity error, which is consistent with the results of Wang et al. (Reference Wang, Liu and Wang2022a
) and Fan et al. (Reference Fan, Xu, Wang and Wang2023). For the velocity, the relative error in the
$v$
component is slightly larger than that in the
$u$
component for the difference in magnitude. These figures show that the impact of the sparsity of the data on the pressure reconstruction performance is much smaller than that of the measurement noise level. The pressure error at
$R = 10$
, which corresponds to only ten points along the diameter, is nearly identical to that at
$R = 160$
. However, the pressure error increases from
$1\, \%$
to
$4\, \%$
as the noise level
$\sigma _n$
increases from
$1\, \%$
(the corresponding SNR is approximately 40) to
$16\, \%$
(the corresponding SNR is approximately 16) in this test case. These results demonstrate that reducing measurement noise and improving data accuracy are critical for pressure reconstruction from measured velocity data. Based on the quantitative analysis, we conclude that the proposed PINN-MB method is feasible and accurate for pressure reconstruction with a moving boundary.
Relative
$\mathcal {l}_{2}$
norm error as a function of noise level
$\sigma _n$
and vector space
$1/R$
: (a)
$u$
component, (b)
$v$
component and (c) pressure. In each case, the same PINN-MB model is used. The boundary network contains nine hidden layers and 32 neurons per hidden layer, and the flow network contains 13 hidden layers and 128 neurons per hidden layer. The red curves represent the mean values along the noise level or vector space.

Figure 5(a) presents the pressure coefficient around the cylinder at the time when the cylinder moves to the maximum vertical position of
$y_c=0.2$
. The parameter
$\theta$
denotes the angle of the surface points, as shown in figure 5(a). Note that the curves are obtained by averaging the data over all the instants when the cylinder reaches the maximum vertical position. Two prediction results with
$R=20, \sigma _n=1\, \%$
and
$R=160, \sigma _n=8\, \%$
are displayed in this figure. Both curves show good agreement with the CFD data, but the pressure coefficient predicted with the higher noise level has a larger deviation from the CFD data in the region of
$80^\circ \leqslant \theta \leqslant 120^\circ$
. Moreover, we present the power spectral density (PSD) of the pressure at
$(2,0)$
in figure 5(b). The parameter
$f$
denotes the non-dimensional frequency. The distributions of the spectra obtained using the proposed neural network are consistent with the reference CFD data in the region of
$0.2\leqslant f\leqslant 3$
. The deviation at a low frequency of
$f=0.1$
may be attributed to the larger error in the predicted pressure at the beginning and end of the corresponding time, as shown in the top plane of figure 6. Additionally, we present the cylinder motion, i.e. the y-axis centroid of the cylinder, in this figure. No evident difference among the three curves are observed. We next analyse the PSD with high frequencies
$f\gt 3$
, which shows that the predicted PSD is much lower than that of the reference curve in the high-frequency region. There are two possible reasons for this result. First, the interpolation from the CFD results to a regular mesh may cause errors at high wavenumbers. Second, the network may prefer to learn low-frequency modes rather than high-frequency modes, a phenomenon known as ‘spectral bias’ (Rahaman et al. Reference Rahaman, Baratin, Arpit, Draxler, Lin, Hamprecht, Bengio, Courville, Chaudhuri and Salakhutdinov2019). There are several methods for overcoming this well-known issue. Eldan & Shamir (Reference Eldan and Shamir2016) proved that a simple function expressed by a small 3-layer feedforward neural network cannot be approximated by any 2-layer network unless its width is exponential in dimension. This implies that a deeper network is needed for learning at a high frequency. Tancik et al. (Reference Tancik, Srinivasan, Mildenhall, Fridovich-Keil, Raghavan, Singhal, Ramamoorthi, Barron and Ng2020) showed that mapping the input variables via Fourier features enables a multi-layer perceptron to learn high-frequency functions in low-dimensional problem domains. This Fourier feature mapping significantly improves the high-frequency performance in the neural radiance field for view synthesis (Mildenhall et al. Reference Mildenhall, Srinivasan, Tancik, Barron, Ramamoorthi, Ng, Vedaldi, Bischof, Brox and Frahm2020). Moreover, for the super-resolution reconstruction of turbulence, generative adversarial networks have the superior capabilities for representing small-scale structures compared with convolution neural networks (Kim et al. Reference Kim, Kim, Won and Lee2021).
(a) Pressure coefficient around the cylinder at the instant when the vertical position of the cylinder reaches a maximum of
$y_c=0.2$
. The parameter
$\theta$
denotes the angle of the surface points. (b) PSD of the reference pressure and the predicted pressure at
$(2,0)$
, where
$f$
denotes the nondimensional frequency.

Time series of the pressure coefficients
$C_p$
at point (2,0) (the top panel) and the cylinder location
$y_c$
(the bottom panel).
$y_c$
denotes the y-axis centroid of the cylinder.

3.2. Example 2: fish swimming
A more complex case involves the reconstruction of the pressure around a swimming fish. Fish locomotion has attracted considerable attention from engineers and scientists because understanding the hydrodynamics of the fish is important for bionic underwater vehicle design. The fish uses the pressure signals detected along the lateral line to sense the surrounding environment (Calicchia et al. Reference Calicchia, Mittal, Seo and Ni2023), and generates propulsive forces by creating jets and vortices in the wake flow (Triantafyllou et al. Reference Triantafyllou, Triantafyllou and Yue2000; Ting & Yang Reference Ting and Yang2009; Tu et al. Reference Tu, Wang, Wang, Gao and Wei2022). A two-dimensional direct numerical simulation (DNS) of a swimming fish is carried out using an in-house CFD solver (Liu et al. Reference Liu, Wang and Ye2018, Reference Liu, Wang, Wang and He2023) to validate the accuracy of the proposed method.
A two-dimensional NACA0012 model is used to mimic the fish body. The fish axis lies on the x-axis, and the head and tail are located at (0,0) and (1,0), respectively. The lateral displacement of the fish axis is defined as the carangiform swimming style, as measured by Videler & Hess (Reference Videler and Hess1984). This motion is prescribed as the product of an envelope
$A_m(x)$
and a backward travelling wave as follows:
Here,
$A_m(x)=b_0+b_1(x/L)+b_2(x/L)^2$
,
$b_0=0.02$
,
$b_1=-0.08$
and
$b_2=0.16$
. The wavelength
$\lambda$
is equal to the fish length
$L$
, and the wave velocity
$c$
is set to the product of the tail beat frequency
$f$
and the wavelength
$\lambda$
. In this case, the parameters are set to the following values:
$L$
= 0.1 m,
$f$
= 2 Hz and the free stream velocity
$U$
= 0.1 m s-1. Therefore, the Reynolds number, which is based on the body length and free stream velocity,
$Re=LU/\nu$
, is
$1\times 10^4$
, and the Reynolds number based on the body length and tail beat frequency,
$Re=L^2f/\nu$
, is
$2\times 10^4$
. The non-dimensional time step normalised by the characteristic time
$L/U$
in the simulation is
$\textrm{d}t=2\times 10^{-3}$
, whereas the time interval of the stored data is
$\Delta t=2{\textrm d}t=4\times 10^{-3}$
for every two time steps to store the flow fields. Two hundred flow fields interpolated into a uniform grid in the domains
$-0.3\leqslant x/L \leqslant 1.3$
and
$-0.3\leqslant y/L \leqslant 0.3$
are postprocessed to train the network, and the vector space is set to
$L/400$
. Boundary data with 682 points were extracted exactly from the numerical simulation, were non-uniformly distributed on the surface of the fish, and the time sequence was the same as that of the velocity data. To test the effect of the temporal resolution on the performance of the proposed method, data for five cases with time steps
$\Delta t$
=
$2{\textrm d}t$
,
$4{\textrm d}t$
,
$6{\textrm d}t$
,
$8{\textrm d}t$
and
$10{\textrm d}t$
are generated to train the network. The numbers of corresponding velocity fields are 200, 100, 67, 50 and 40. For each case, we randomly sample
$2\times 10^6$
data points and
$1\times 10^6$
boundary points without pressure information as training data,
$2\times 10^6$
residual points to estimate the loss of N–S equations and
$1\times 10^6$
points are used for the boundary conditions. In this example, we do not consider the measurement noise.
The configuration of the PINN-MB model is set as follows: the boundary network contains nine hidden layers and 48 neurons per hidden layer, and the flow network contains 13 hidden layers and 160 neurons per hidden layer, yielding a total of 329 371 trainable parameters. The number of trainable parameters is much less than the CFD points in this subdomain (two hundred velocity fields with 76 982 CFD points per field). This network is trained for 18 000 epochs with 30 iterations per epoch and the batch size is set to 10 000. Note that all of the velocities, pressures and boundaries are still predicted in the vector space of
$L/400$
with a time separation of
$2\textrm{d}t$
. We first investigate whether PINN-MB can capture fish motion under these complex conditions. Figure 7 shows a comparison of the predicted fish bodies with those extracted from the CFD results. The red and blue curves represent the predicted results when
$\Delta t$
is equal to
$2{\textrm d}t$
and
$10{\textrm d}t$
, respectively. It is clear that the predicted curves are approximately the same as the original grey curves at different points in time, as the loss of boundary data for all the cases converges to less than
$5.0\times 10^{-6}$
. We also plot the error of the predicted body surface as a function of the time steps of the training data in figure 7(b). The boundary error normalised by the body length is less than
$0.1\, \%$
over the whole test region. This result indicates that PINN-MB can accurately predict the boundary for the coupling between the boundary and flow networks through the boundary conditions. Notably, the error of the predicted boundary is slightly larger at the beginning and end of the time (
$\sim 0.2\, \%$
) because fewer constraints are imposed at these instants.
(a) Exact (grey thick curves) and predicted fish surfaces with
$\Delta t = 2{\textrm d}t$
(red curves) and
$10{\textrm d}t$
(blue curves) at different instants. From top to bottom, the non-dimensional time separation is 0.12. (b) Predicted error of the fish body as a function of the time steps of the training data
$\Delta t$
, the error bars represent the standard deviation. The error is normalised by the body length
$L$
. Note that, all of the data, including velocities and boundaries, are predicted at the time interval of
$\Delta t = 2{\textrm d}t$
.

Representative snapshots of pressure for DNS, PINN-MB with
$\Delta t = 10 {\textrm d}t$
and the absolute error. From top to bottom, the non-dimensional times are 0.23, 0.35 and 0.47, respectively. In this case, the vector intervals of both the training data and the predicted data are set to the same values of
$L/400$
. No noise is added to the training data. The yellow arrows indicate the motion of the fish’s body. The mean value is subtracted from both the exacted data and the predicted data for comparative assessment.

The instantaneous pressure around the fish at different time instants is shown in figure 8. The CFD results, PINN-MB results with
$\Delta t = 10 {\textrm d}t$
and absolute error are displayed from left to right. The yellow arrows indicate the motion of the fish’s body. The mean value is subtracted from the exacted and predicted data for comparative assessment. We do not show the predicted pressure with high temporal resolution
$\Delta t = 2 {\textrm d}t$
because it is almost the same as that with low temporal resolution
$\Delta t = 10 {\textrm d}t$
. Generally, the PINN-MB model correctly predicts the pressure around the swimming fish. In particular, in the high-pressure region near the head, the pressure distribution is consistent with that of the DNS. At the first instant
$t=0.23$
, as shown in figure 8, a strong suction zone with low pressure is created when the middle of the body bends to the right side (Thandiackal & Lauder Reference Thandiackal and Lauder2020). A strong positive pressure is also consequently generated on the right side for pushing the water. PINN-MB can still correctly recover the pressure field at this instant. Visual inspection of the absolute error distribution in figure 8 shows that large errors are distributed mainly in the region of flow separation near the tail, where the flow is more complex than in the other regions. Figure 9 clearly shows the surface pressure coefficients extracted from the DNS and the predicted results. Note that PINN-MB can directly output the pressure at the boundaries without any interpolation. The predicted profiles with high temporal resolution
$\Delta t = 2 {\textrm d}t$
and low temporal resolution
$\Delta t = 10 {\textrm d}t$
show good agreement with the DNS results.
Comparison of the surface pressure coefficients between the CFD results (thick solid curves) and the results predicted by PINN-MB with
$\Delta t = 2 {\textrm d}t$
(thin solid curves) and
$\Delta t = 10 {\textrm d}t$
(thin dashed curves). The different colours denote the right (red, R) and left (black, L) sides of the fish body. From left to right, the non-dimensional times are 0.23, 0.35 and 0.47, respectively.

The results of the quantitative error analysis of the pressure reconstruction results for the swimming fish are presented in figure 10. We first present the relative
$\mathcal {l}_2$
norm errors for the whole field and boundary as a function of time at a high temporal resolution of
$\Delta t = 10{\textrm d}t$
. Large error fluctuations of
$10\, \%$
to
$30\, \%$
are observed in this figure. The error reaches a maximum at
$t=0.35$
and decreases to a minimum at
$t=0.23$
and
$0.47$
. This is because the relative error is normalised by the magnitude of the reference pressure (CFD result), which varies over time. As shown in figures 8 and 9, the pressure magnitude at
$t=0.35$
is smaller than that at
$t=0.23$
and
$0.47$
. Therefore, the relative error is larger at
$t=0.35$
. We also present the mean pressure error as a function of the time steps of training data in figure 10(b). The mean pressure errors for the fields and boundaries are
$14\, \%$
and
$20\, \%$
, respectively. The error profiles remain relatively flat across all the temporal resolutions tested, which is consistent with the results reported by Calicchia et al. (Reference Calicchia, Mittal, Seo and Ni2023). This result indicates that PINN-MB is insensitive to the temporal resolution of the training data for the embedding of the N–S equations.
(a) Time series of the relative
$\mathcal {l}_{2}$
norm error between the predicted pressure and the DNS pressure. (b) Error of the predicted pressure as a function of the time steps of the training data
$\Delta t$
. Note that all the data, including the velocities and boundaries, are predicted at a time interval of
$\Delta t = 2\textrm{d}t$
. The red and black curves denote the errors of fields and boundaries, respectively.

3.3. Example 3: 2-D pressure in the left ventricle
The primary function of the LV is to pump oxygenated blood into the aorta and then to every part of the body. Left ventricle dysfunction caused by structural injuries or pathological changes can induce pathological remodelling of the LV, which can lead to heart failure (HF) with significant morbidity and mortality (Stoll et al. Reference Stoll, Hess, Rodgers, Bissell, Dyverfeldt, Ebbers, Myerson, Carlhäll and Neubauer2019). Many studies have investigated cardiovascular imaging to quantitatively assess cardiac function in terms of morphology and structure. However, ventricular flow is altered in the early stages of remodelling (Stoll et al. Reference Stoll, Hess, Rodgers, Bissell, Dyverfeldt, Ebbers, Myerson, Carlhäll and Neubauer2019), which means that flow properties can be used to diagnose and prognose cardiac function (Pedrizzetti et al. 2014). The haemodynamic force, which corresponds to the global value of the intraventricular pressure gradient (IVPG), was suggested as a potential indicator for detecting early alterations in LV dysfunction and predicting disease outcome (Lapinskas et al. Reference Lapinskas, Pedrizzetti, Stoiber, Düngen, Edelmann, Pieske and Kelle2019; Mele et al. Reference Mele, Smarrazzo, Pedrizzetti, Capasso, Pepe, Severino, Luisi, Maglione and Ferrari2019; Stoll et al. Reference Stoll, Hess, Rodgers, Bissell, Dyverfeldt, Ebbers, Myerson, Carlhäll and Neubauer2019; Vallelonga et al. Reference Vallelonga, Airale, Tonti, Argulian, Milan, Narula and Pedrizzetti2021). Therefore, in vitro experiments were conducted to measure the velocity distribution in the LV and reconstruct the intraventricular pressure using the proposed PINN-MB method for the motion of the ventricular wall.
Figure 11 shows the set-up of the time-resolved 2-D PIV measurements. The pulsatile flow was simulated using an in-house LV simulator driven by a piston pump. The displacement of the piston was controlled by a user-defined signal, which is a conversion of the time evolution of the left ventricular volume extracted from Pedrizzetti & Perktold (Reference Pedrizzetti and Perktold2003). The 3-D-printed silicone LV model (refractive index of 1.41, thickness of 2.0 mm, end-systolic volume of 80 ml, base-to-apex length of 82 mm) was immersed in an acrylic hydraulic chamber filled with the same flow media. The systole and diastole of the LV were imitated by increasing and decreasing the pressure in the hydraulic chamber by using a piston pump. This hydraulic chamber was designed to have nine sides, as proposed by Saaid et al. (Reference Saaid2019), to facilitate 2-D or 3-D PIV measurements. During systole, blood flows from the LV to the aorta through the aortic valve, and then flows through the compliance chamber, resistance valve, fluid reservoir and left atrium before returning to the LV through the mitral valve. The compliance chamber downstream of the aortic valve is used to mimic arterial compliance. A resistance valve is used to adjust the systematic resistance. The fluid reservoir is open to the atmosphere to simulate the low pressure of the venous system.
Set-up of the time-resolved 2-D-PIV measurements: (a) picture of the set-up, (b) schematic of the set-up. The native mitral and aortic valves, which were anatomised from a fresh porcine heart, were connected to a 3-D-printed silicone LV. As the piston pulls back, the aortic valve is closed due to flow deceleration, and the blood analogue flows through the opened mitral valve to fill the LV. As the piston moves forwards, the mitral valve is closed, and blood is pumped into the aorta, which is driven by rapidly increasing pressure. Note that a part of the flow field is sheltered by the papillary muscles.

Native mitral and aortic valves were anatomised from a fresh porcine heart weighing approximately 330 g, because the porcine heart has been used in preclinical trials and has similar haemodynamic performance to that of humans (Gooden et al. Reference Gooden, Hatoum, Zhang, Boudoulas and Dasi2022). In this experiment, a complete mitral valve consisting of the mitral annulus, leaflets, chordae tendineae and papillary muscles was sutured to a specially designed plate, and this plate was connected with a 3-D-printed silicone LV. The papillary muscles are attached to the LV wall with connecting rods, ensuring synchronous movement with the LV. However, the papillary muscles block the laser light, producing a shadow without particles, as shown in figure 11(b). A mixed solution (
$62\, \%$
water,
$38\, \%$
glycerol by volume and 60 g/L NaCl by weight at a working temperature of
$26\,^{\textrm {o}}\textrm {C}$
) with a dynamic viscosity of 3.49 mPa
$\cdot$
s, a density of 1173 kg/m
$^3$
and a refractive index of 1.395 is used as blood analogue. The refractive index does not perfectly match that of silicone, and a better mixed solution was reported by Brindise et al. (Reference Brindise, Busse and Vlachos2018) and Chen & Dasi (Reference Chen and Dasi2023).
Because this work focused on pressure reconstruction from velocity fields, we provide only a brief introduction to the physiological conditions. The heart rate was 60 bpm and the stroke volume was 60 ml, this configuration yielded a cardiac output of 3.6 l/min. Figure 12 shows the transmitral pressure gradient (ventricular pressure–atrial pressure) and mitral flow rate during the cardiac cycle. In systole, the maximum pressure gradient is greater than 80 mmHg, and in diastole, the maximum instantaneous flow rate is approximately 8.3 l/min. The mean and maximum mitral inflow Reynolds numbers are 837 and 1930, respectively, computed as
$Re=UD/\nu$
, where
$U$
denotes the mean and maximum mitral velocities deduced from the cardiac output and the maximum instantaneous flow rate. The parameter
$D$
denotes the diameter of the mitral valve which is equal to 26 mm in this case. The associated Womersley number of the mitral inflow, defined as
$Wo = D/2\sqrt {{2\pi }/{T\nu }}$
, where
$T$
is the time of the cardiac cycle, is approximately 17. The systematic vascular resistance (SVR) is approximately 777 dyn
$\cdot$
s
$\cdot$
cm
$^{-5}$
, which is slightly less than that of a healthy human (800–1200 dyn
$\cdot$
s
$\cdot$
cm
$^{-5}$
).
Under these conditions, time-resolved 2-D PIV experiments were performed to measure the velocity field at the plane of the left ventricle outflow tract (LVOT). This plane is commonly used in clinical practice to evaluate blood flow and cardiac function. Moreover, the flow over the LVOT is approximately two-dimensional because this plane is a geometrically symmetric plane of the LV. The flow was seeded with 7
$\mu$
m fluorescent Rhodamine-B-coated particles at a density of 1500 kg/m
$^3$
. The response frequency was
$\sim$
945 kHz, which means that the fluorescent particles can fully follow the flow motion. These fluorescent particles were excited using a double-pulsed laser (Beamtech, Vlite-Hi-50) with a wavelength of 527 nm at a repetition rate of 0.2 kHz. The laser beam was guided to the hydraulic chamber by using a laser arm and the thickness of the laser sheet was approximately 1.0 mm. Orange fluorescence with a longer wavelength of 590 nm was emitted and recorded by a high-speed CMOS camera (Lavision Imager HS CMOS cameras) equipped with a 100 mm/f2.8 lens (Tokina atx-i) with a high-pass filter. The image pairs were recorded at 200 Hz with a full image resolution of 2016
$\times$
2016 pixels, and the time separation was set to 400
$\mu \textrm{s}$
to ensure that the maximum particle displacement was less than 8 pixels. This configuration yields a digital resolution of 20 pixels/mm. The velocity fields were calculated using in-house PIV software with a three-pass window deformation iterative multigrid scheme (Scarano Reference Scarano2002; Wang et al. Reference Wang, He and Wang2020a
). The interrogation window size was reduced to 32
$\times$
32 pixels with
$75\, \%$
overlap, and the velocity at the final pass was smoothed using Gaussian filtering with the same size as the interrogation window. This configuration yields a spatial resolution of 1.6 mm, and the vector step is 0.4 mm. The LV edge of each frame is detected according to the image intensity gradient and converted to physical coordinates based on the mapping function of the PIV data. Each edge contains 721 points with uniform distribution. In the present work, four cardiac cycles, consisting of 800 velocity fields with boundary data, were used to reconstruct the pressure fields.
Flow rate (red curve) and transmitral pressure gradient (ventricular pressure–atrial pressure, blue curve) for the native mitral valve during the cardiac cycle. The time is normalised with respect to the period.

To recover the pressure fields, the boundary network consists of nine hidden layers and 64 neurons per hidden layer, and the flow network contains 13 hidden layers and 200 neurons per hidden layer. This configuration yields 517 491 trainable parameters. The location of the LV wall at the first time step is chosen as the initial input
$X_b^0$
for the boundary network. Approximately
$1.4\times 10^6$
velocity vectors are randomly selected from the PIV data and used as supervised data for the flow network,
$1.0\times 10^6$
boundary data are randomly selected as supervised data for the boundary network and
$1.1\times 10^6$
equation points with a uniform distribution are used to collect the residuals of the 2-D incompressible N–S equations. The dual-network model was trained for 10 000 epochs with 30 iterations per epoch. The corresponding loss functions are presented in figure 13. The training losses gradually converge to stable values after 1000 epochs. The final equation loss
$\mathcal {L}_{eqns}$
, boundary condition loss
$\mathcal {L}_{b.c.}$
, flow data loss
$\mathcal {L}_{fdat}$
and boundary data loss
$\mathcal {L}_{bdat}$
are approximately
$2\times 10^{-3}$
,
$4\times 10^{-4}$
,
$2\times 10^{-3}$
and
$3\times 10^{-5}$
, respectively. The equation loss is greater than that in the 3-D example as shown in figure 17(a), this is because of the two-dimensional assumption applied at the plane of LVOT. Figure 14 presents a series of instantaneous flow fields in three different phases (from left to right: early diastole, end diastole and systole) during the cardiac cycle. From top to bottom, these figures display the contour maps of the original PIV velocity magnitude and the velocity magnitude and pressure field predicted by PINN-MB. Note that the blank region within the original velocity is caused by the shadow of the papillary muscles as shown in figure 11(b). However, the proposed method has the capability to physically fill the gappy flow fields, the resulting fields are shown in figure 14. Because the ground truth pressure is unknown, we can only draw conclusions from a qualitative examination. In early diastole, when the mitral jet enters the LV, the inflow is decelerated by the increasing pressure gradient directed from the apex to the base. At the end of diastole, the pressure is high when the jet impinges onto the apex. During systole, the pressure is greater at the apex than at the base and the pressure accelerates the outgoing blood flow. However, the pressure gradient between the apex and base is much lower than that during diastole. Physically, the pressure presents a low level in the vortex ring centre induced by the mitral jet. This evolution of the IVPG is consistent with the clinical ultrasound results of a normal person (Pedrizzetti et al. 2014; Mele et al. Reference Mele, Smarrazzo, Pedrizzetti, Capasso, Pepe, Severino, Luisi, Maglione and Ferrari2019).
Loss functions (equation loss
$\mathcal {L}_{eqns}$
, boundary condition loss
$\mathcal {L}_{b.c.}$
, flow data loss
$\mathcal {L}_{fdat}$
and boundary data loss
$\mathcal {L}_{bdat}$
) as a function of epochs for the 2-D experimental case of LV.

Instantaneous flow fields in the LV during different phases of the cardiac cycle: early diastole, end diastole and systole. From top to bottom, these figures present contour maps of the original PIV velocity magnitude, and the velocity magnitude and pressure fields predicted by the PINN-MB model. The predicted mesh is the same as the PIV mesh without increasing the spatial resolution. The unit of velocity is m s-1 and the pressure is converted to mmHg.

Haemodynamic force imposed on the blood during the cardiac cycle. The force is normalised by
$\rho S g$
, where
$\rho$
is the blood density,
$S$
is the area enclosed by the LV boundary and
$g$
denotes the gravitational acceleration. The time is normalised with respect to the period. The two components of the force,
$F_x$
and
$F_y$
, represent the forces in the septal-lateral and apical-basal directions, respectively.

Once the surface pressure is obtained, the haemodynamic force imposed on the blood can be calculated as the integral of the surface pressure distribution:
Here,
$S(t)$
is the surface of the LV and
$\mathbf {n}$
is the outward unit normal vector. Intraventricular blood flow is driven by the pressure gradient, and the haemodynamic force
$\mathbf {F}(t)$
represents a global force exchanged between the blood volume and the LV wall (Pedrizzetti Reference Pedrizzetti2019; Vallelonga et al. Reference Vallelonga, Airale, Tonti, Argulian, Milan, Narula and Pedrizzetti2021). Compared with the conventional approach for the quantitative assessment of cardiac function, such as the ejection fraction, the use of haemodynamic force may provide insights into the interaction between tissue mechanics and fluid dynamics in the LV. Figure 15 displays the haemodynamic force in a period of the cardiac cycle. We note that this force is normalised with respect to the density, area (volume for the 3-D case) and gravitational acceleration for comparison (Pedrizzetti Reference Pedrizzetti2019; Vallelonga et al. Reference Vallelonga, Airale, Tonti, Argulian, Milan, Narula and Pedrizzetti2021). The two components of the force,
$F_x$
and
$F_y$
, represent the force in the septal-lateral and apical-basal directions, respectively. It is clear that the apical-basal force is much greater than the septal-lateral force. During systole, blood flow is accelerated towards the outflow direction because the haemodynamic force is directed from the apex to the base, as shown in figure 14. In early diastole, the force is negative and directed from the base to the apex, generating diastolic suction due to the relaxation of the LV. After this stage, the apical pressure gradually exceeds the basal pressure due to ventricular filling, which causes force to be directed from the apex to the base to decelerate the inflow. The haemodynamic force in diastole was greater than that in systole in our study; however, the magnitude of the force in these two phases was approximately the same as that reported in a previous numerical study by Pedrizzetti (Reference Pedrizzetti2019). This may because the cardiac output in our experiment (3.6 l/min) was lower than that of a normal person (5.0 l/min). The clinical assessment of intraventricular flow is beyond the scope of this article, please refer to Pedrizzetti et al. (2014), Bermejo et al. (Reference Bermejo, Martínez-Legazpi and del Álamo2015) and Vallelonga et al. (Reference Vallelonga, Airale, Tonti, Argulian, Milan, Narula and Pedrizzetti2021) for more information.
3.4. Example 4: 3-D pressure in the left ventricle
Set-up of the time-resolved tomographic PIV measurements.

Thus far, the proposed method has been validated and investigated only for different types of 2-D flows. In this section, the feasibility of the proposed method for investigations of 3-D intraventricular flow is explored. Here as well, time-resolved tomographic PIV (Tomo-PIV) experiments were conducted based on the LV simulator described in § 3.3. Four high-speed cameras with 100 mm/f2.8 lenses were placed laterally around the nine-sided hydraulic chamber, as shown in figure 16. The view angle between two adjacent cameras was set to
$36^{\textrm {o}}$
. A cylindrical laser with a diameter of 6 cm was expanded using a series of concave and convex lenses to illuminate all of the particles in the 3-D-printed silicone LV. Compared with the 2-D experiment, larger fluorescent Rhodamine-B coated particles with a diameter of 50
$\mu$
m were used in the 3-D experiment due to lower energy of the expanded laser. The response frequency was
$\sim$
18 kHz, which means that the fluorescent particles can still follow the flow motion. The flow conditions were the same as those in the 2-D experiment. The raw particle images were preprocessed to remove the background and normalise the particle intensity. The particle concentration after preprocessing was approximately 0.045 particles per pixel (ppp). The 3-D intensity distribution was reconstructed using the multiplicative algebraic reconstruction technique proposed by Elsinga et al. (Reference Elsinga, Scarano, Wieneke and van Oudheusden2006), based on the mapping function after self-calibration (Wieneke Reference Wieneke2008). The reconstructed volume was 70
$\times$
70
$\times$
50 mm
$^3$
, containing 1400
$\times$
1400
$\times$
1000 voxels. The displacement was estimated using 3-D cross-correlation with a final interrogation volume of 48
$\times$
48
$\times$
48 voxels at
$62.5\, \%$
overlap. This configuration yields 75
$\times$
75
$\times$
52 vectors with a spatial resolution of 2.4 mm and a vector pitch of 0.9 mm. Finally, all velocity fields were postprocessed using a divergence-free smoothing algorithm to clearly visualise the flow structures (Wang et al. Reference Wang, Gao, Wang, Wei, Li and Wang2016a
). The whole Tomo-PIV process was implemented using a validated in-house MATLAB code (Gao et al. Reference Gao, Wang and Wang2012; Wang et al. Reference Wang, Gao, Wei and Wang2016b
; Zhu et al. Reference Zhu, Wang, Wang and Wang2017; Tu et al. Reference Tu, Wang, Wang, Gao and Wei2022).
Three-dimensional three-component (3-D3C) measurements were obtained through Tomo-PIV; however, it is challenging to accurately and directly determine the wall of LV. In this work, our aim was to investigate the feasibility of the proposed method in the application to a 3-D moving boundary; therefore, an alternative method for obtaining a coarse boundary from the velocity is proposed. First, the mask data are identified as the region containing non-zero velocity (the velocity magnitude is larger than 0.01 m s-1 in practice) because tracer particles are distributed only in the LV. Second, the boundary of the LV is extracted as an isosurface of the mask data. Third, the boundary points are matched by assuming that the vertices move along the wall-normal direction. Therefore, the walls at different times are described by a series of Lagrangian points with the same number and connectivity. In the present case, there are 4001 spatial points on the wall, and the time sequence is the same as that of the velocity data. The configuration of the PINN-MB model is as follows: the boundary network consists of nine hidden layers and 64 neurons per hidden layer, and the flow network contains 15 hidden layers and 200 neurons per hidden layer. This configuration yields 598 423 trainable parameters. The location of the LV wall at the first time step is chosen as the initial input
$X_b^0$
for the boundary network. Approximately
$6.6\times 10^6$
velocity vectors are randomly selected from three hundred Tomo-PIV fields with a time separation of 0.01 s (100 Hz) to serve as supervised data for the flow network,
$2.0\times 10^6$
boundary data are randomly selected as the supervised data for the boundary network,
$6.5\times 10^6$
equation points are used to collect the residuals of the 3-D incompressible N–S equations and
$2.0\times 10^6$
points are used for the boundary conditions. The PINN-MB model was trained for 20 000 epochs with 30 iterations per epoch.
(a) Loss functions (equation loss
$\mathcal {L}_{eqns}$
, boundary condition loss
$\mathcal {L}_{b.c.}$
, flow data loss
$\mathcal {L}_{fdat}$
and boundary data loss
$\mathcal {L}_{bdat}$
) as a function of epoch for the 3-D experimental case of LV. (b) PDFs of the divergence for the tomographic PIV and PINN-MB results.

Figure 17(a) presents the corresponding loss functions as a function of the training epoch. The training losses gradually converge to stable values after 1000 epochs. The final equation loss
$\mathcal {L}_{eqns}$
, boundary condition loss
$\mathcal {L}_{b.c.}$
, flow data loss
$\mathcal {L}_{fdat}$
and boundary data loss
$\mathcal {L}_{bdat}$
are approximately
$2\times 10^{-4}$
,
$4\times 10^{-5}$
,
$3\times 10^{-4}$
and
$5\times 10^{-4}$
. Figure 17(b) shows the probability distribution function (PDF) of the divergence before and after optimisation. The maximum PDF of the PINN-MB model is approximately two orders of magnitude greater than that of the raw data, implying that the reconstructed velocities better satisfy the physical constraints. The instantaneous flow fields of the raw tomographic PIV (panels a–c) and the PINN-MB results (panels d–f) are displayed in figure 18, from left to right, the time separation is 0.05 s. The vortex structures are visualised as isosurfaces with
$Q=500$
, where
$Q$
denotes the vortex identification criterion estimated as the second invariant of the velocity gradient tensor and the contour map denotes the pressure distribution. Note that there are no pressure data in the raw tomographic PIV data. The large-scale vortex structures are clearly approximately the same in the raw data and the optimised results. Some small structures, which may be contamination by measurement noise, disappear for the correction of the N–S equations. The pressure fields of greatest concern are represented by the colourful contour map in figures 18(d)–18(f). The pressure is converted to mmHg for clinical applicability. At the first time instant when the mitral vortex enters the LV, two high-pressure regions exist at the front and back of the vortex structure. A low-pressure region is observed, which is consistent with the vortex core, to balance the centrifugal force and pressure force. The pressure gradient between the apex and base reaches a maximum when the vortex travels towards the middle of the LV. At this time, a vortex ring separates from the main vortex and continues to move ahead until it impinges on the apex of the LV, as shown in figure 18(f). The pressure acting on the wall of the LV can be directly obtained from the flow network; therefore, it is convenient to compute the haemodynamic force to describe cardiac function. From this 3-D example, we can conclude that it is feasible to reconstruct the pressure field in a scenario with a moving boundary using the proposed method.
Instantaneous left ventricular flow fields of (a, b, c) the raw tomographic PIV data and (e, f, g) the present machine learning-based results. The surface pressure can be directly obtained from the flow network. The vortex structures are visualised using the Q criterion with
$Q=500$
. From left to right, the time separation is 0.05 s.

4. Discussion and conclusions
In the present work, a machine-learning-based method, named PINN-MB, is proposed to reconstruct pressure fields with time-dependent moving boundaries. PINN-MB consists of two neural networks: a boundary network to track the motion of boundaries and a physics-informed neural network to approximate the flow fields (Raissi et al. Reference Raissi, Perdikaris and Karniadakis2019a ,Reference Raissi, Wang, Karniadakis and Triantafyllou b , Reference Raissi, Yazdani and Karniadakis2020). The former is constrained by a series of Lagrangian points over the boundaries and provides boundary conditions for the flow network. The latter is constrained by the flow data, boundary conditions and physical laws. These two networks are synchronously optimised by minimising the total loss function, which consists of the residual of the N–S equations, the loss between the measured and predicted flow data, the loss between the measured and predicted boundary data, and the loss of the boundary conditions. This novel framework can simultaneously optimise the flow fields and boundaries. The flow fields are optimised according to the N–S equations and the boundaries are optimised according to the boundary conditions. Moverover, it is also possible to impose geometric constraints of the boundaries by adding an additional loss term. For example, the boundary can be forced to be a circle by adding a constraint in the loss function. Zhu et al. (Reference Zhu, Kong, Deng and Bian2024) extended the PINN to obtain incompressible flow with moving boundaries by directly imposing Dirichlet boundary conditions at the moving interfaces. However, their loss function considers only rigid motion with translation and rotation, and cannot address the motion of non-rigid bodies. The PINN-MB framework is more generally applicable to any flow problem with moving boundaries.
To effectively train this network, we propose a new strategy given in (2.5) to update the dynamic weights corresponding to the loss terms. The dynamic weights are estimated using both the loss statistics and loss gradients to balance the loss terms. This implies that the dynamic weight increases to a large value only for loss terms with a large value and small gradient. We compared the performance of our method with that of the method proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021), in which the dynamic weights are updated based on the loss gradients only. Particularly for a large-scale neural network, the solution is sensitive to the initial trainable variables and always fails to return an accurate prediction if we use the dynamic weight proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021). However, our method reasonably generates larger dynamic weights for the supervised data to train the network. In our opinion, the correct approach for the network is to converge based on the data rather than the equations or boundary conditions at the beginning of training. Therefore, our method for updating the dynamic weights is more robust and efficient than the previous approaches.
This developed machine-learning-based pressure reconstruction method for scenarios with moving boundaries was validated with flows over an oscillating cylinder and swimming fish. In addition, the proposed method was applied to determine the pressure according to experimental intraventricular flow data. Conventional methods, including the pressure Poisson equation and pressure gradient integration, face difficulties in the reconstruction of the pressure from experimental data with moving boundaries because of the complex boundary conditions and contaminated velocities and boundaries by measurement noise (Fan et al. Reference Fan, Xu, Wang and Wang2023). In the case of an oscillating cylinder, the accuracy and robustness of the proposed method are demonstrated by inputting sparse low-resolution velocity fields with Gaussian random noise. The relative
$\mathcal {l}_2$
norm pressure error is less than
$4\, \%$
across the whole test range. In the more complex case of swimming fish, the kinematic error of the fish body predicted by PINN-MB is approximately
$0.1\, \%$
, and the pressure error is approximately
$14\, \%$
. This performance is similar to the results reported by Calicchia et al. (Reference Calicchia, Mittal, Seo and Ni2023), in which the pressure predicted by PINN has a relative error of 10–
$18\, \%$
, and Queen 2.0 (a pressure integration method developed by Dabiri et al. Reference Dabiri, Bose, Gemmell, Colin and Costello2014) obtains a larger relative error of 13–
$25\, \%$
. However, PINN-MB can predict the pressure and boundaries at any instant. The proposed method was also applied to determine the pressure from 2-D and 3-D PIV velocity measurements of the LV. The results indicate that the proposed method can correctly track non-rigid motion. Due to the advantages of PINN, the measurement noise and gaps in the PIV data can be repaired by the proposed method through considering physical constraints. Using surface pressure data, we can also calculate the haemodynamic force, which may be an important clinical index of cardiac function (Pedrizzetti et al. 2014; Vallelonga et al. Reference Vallelonga, Airale, Tonti, Argulian, Milan, Narula and Pedrizzetti2021). The application of the tomographic PIV on the LV demonstrated that the proposed method can be used for 3-D scenarios with moving boundaries. However, the proposed machine-learning-based method does not provide a built-in uncertainty quantification for noisy data, which may restrict its applications. To the best of our knowledge, the probabilistic neural network proposed by Maulik et al. (Reference Maulik, Fukami, Ramachandra, Fukagata and Taira2020) and the Bayesian PINN proposed by Liu et al. (Reference Liu, Meng and Karniadakis2021) can be used to quantify the uncertainty. In applying of the Bayesian PINN, the weights and biases are assumed to be Gaussian distributions with zero means. However, the Bayesian inference is often expensive for a deeper network. The probabilistic neural network can directly predict uncertainty by maximising the average likelihood of training data.
The accuracy and robustness of PINN-MB for pressure reconstruction with a moving boundary were confirmed based on our validation and experimental applications. We expect that the proposed network will be highly beneficial for addressing flow problems with moving boundaries, including pressure and high-resolution flow field reconstruction according to the measurement data. We also find that the probabilistic neural network is an appropriate approach to estimate the uncertainty in PINN-MB if we assume a Gaussian form for the predictive probability distribution (Maulik et al. Reference Maulik, Fukami, Ramachandra, Fukagata and Taira2020). Additionally, the choice of hyperparameters in machine learning depends strongly on the user’s experience. These problems deserve further study to improve the performance of machine-learning-based methods.
Acknowledgments
This work was supported by the National Natural Science Foundation of China (NSFC) Basic Science Center Program for ‘Multiscale Problems in Nonlinear Mechanics’ Grant No. 11988102, NSFC Grant Nos. 12072348, 92252203, 12425207, and the Strategic Priority Research Program of Chinese Academy of Sciences, Grant No. XDB0620102.
Declaration of interests
The authors report no conflicts of interest.
Appendix A. On the dynamic weights
Despite encouraging results, proper training of the PINN is still difficult due to the presence of multiple competing loss terms (Wang et al. Reference Wang, Teng and Perdikaris2021). According to the backpropagated gradient analysis proposed by Wang et al. (Reference Wang, Teng and Perdikaris2021), the interplay among all of the loss terms in (2.4) should be appropriately balanced by using dynamic weights. In the present work, we investigated three different approaches to set these weights. The first approach is to set these weights to constant values, as in (A1). However, poor results are always obtained because the loss functions do not converge to the correct values. Therefore, we do not present the results obtained using constant weights.
The second approach is to update the dynamic weights using the method proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021):
\begin{equation} \hat {\alpha }^{k+1} = \frac {\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}}{\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{b.c.}}\right |}},\quad \hat {\beta }^{k+1} = \frac {\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}}{\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{fdat}}\right |}},\quad \hat {\gamma }^{k+1} = \frac {\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{eqns}}\right |}}{\overline {\left | \nabla _{\boldsymbol {\Theta }}{\mathcal {L}_{bdat}}\right |}}. \end{equation}
These equations imply that the loss terms are balanced using gradient statistics, which can be effectively computed by using automatic differentiation. However, in practice, (A2) always overestimates the weight of the boundary condition loss term (
$\alpha$
). Moreover, the final loss was sensitive to the initial trainable variables and difficult to converge, especially in the PIV experiment of LV when the dynamic weights are calculated via (A2). In the paper by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021), the weights were manually tuned to obtain satisfying results for the case of turbulent channel flow. To avoid manual adjustments, a third approach is proposed in the present work, as shown in (2.5). The major difference is that both the gradient and loss are balanced in our method. In this appendix, a comparative assessment based on the 2-D flow over a moving cylinder and 2-D flow in the LV is given.
Figure 19 displays the loss terms for the case of 2-D flow over an oscillating cylinder after 5000 epochs. The colour bars and error bars represent the mean value and standard deviation, respectively, obtained from three independent runs. For a small neural network with 86 987 trainable variables (figure19
a), the velocity loss
$\mathcal {L}_{fdat}$
obtained using the proposed dynamic weights converges to approximately
$0.4\times 10^{-4}$
, which is slightly larger than the
$0.2\times 10^{-4}$
obtained via (A2). The residual of equations
$\mathcal {L}_{eqns}$
decreases from
$3.0\times 10^{-4}$
to
$2.0\times 10^{-4}$
. For a large network with 318 907 trainable variables, these two dynamic weight strategies present similar performance because of the relatively simple flow (figure 19
b).
Losses for the numerical benchmark of a 2-D flow over an oscillating cylinder after 5000 epochs with different dynamic weight calculation approaches. The colour bars and error bars represent the mean and standard deviation of the loss obtained from three independent runs. (a) In the small neural network, the boundary network contains nine hidden layers and 32 neurons per hidden layer, and the flow network contains 13 hidden layers and 80 neurons per hidden layer, yielding a total of 86 987 trainable parameters. (b) In the large neural network, the boundary network contains nine hidden layers and 32 neurons per hidden layer, and the flow network contains 13 hidden layers and 160 neurons per hidden layer, yielding a total of 318 907 trainable parameters. No measurement noise is considered in this test case.

A more complex case of 2-D PIV flow fields at the LVOT plane is investigated to evaluate the performance of these two dynamic weight calculation strategies. Similar to figure 19, the losses after 5000 epochs are displayed in figure 20. The velocity loss
$\mathcal {L}_{fdat}$
is much greater than the equation loss
$\mathcal {L}_{eqns}$
for the dynamic weights of Jin et al. (Reference Jin, Cai, Li and Karniadakis2021) for both the small-scale and large-scale networks. Moreover, the error bars are also very large, particularly in the large network. This result implies that the dynamic weights proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021) are sensitive to the initial values especially for the large-scale network. However, the proposed dynamic weight calculation method converges to correct flow fields, as both the mean value and standard deviation are small. To directly compare the performance of the different dynamic weight calculation methods, figure 21 displays the dynamic weights obtained by different strategies in the experimental case of the LV. With the dynamic weights proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021), the dynamic weight of the boundary condition
$\alpha$
increases to approximately 200 after 800 epochs (the maximum weight is limited to 1000 in the algorithm for stability); this large weight causes the boundary condition loss term to converge to a very low value of
$O({10^{-6}})$
. However, the velocity data loss term is large because of the small weight
$\beta \lt 1$
. With the proposed approach, the boundary data loss term has the maximum weight, followed by the flow data loss term. The boundary condition term has the smallest weight. It makes sense for the network to converge according to the data rather than the equation or boundary condition terms at the beginning of training.
Losses for the experimental case of a 2-D flow in the LV after 5000 epochs for different dynamic weight calculation approaches. The colour bars and error bars represent the mean and standard deviation of the loss obtained by three independent runs. (a) In the small neural network, the boundary network contains nine hidden layers and 48 neurons per hidden layer, and the flow network contains 13 hidden layers and 128 neurons per hidden layer, yielding a total of 218 171 trainable parameters. (b) In the large neural network, the boundary network contains nine hidden layers and 48 neurons per hidden layer, and the flow network contains 13 hidden layers and 200 neurons per hidden layer, yielding a total of 502 931 trainable parameters.

Dynamic weights as a function of epochs for the experimental case of 2-D flow in the left ventricle. (a) Dynamic weights proposed by Jin et al. (Reference Jin, Cai, Li and Karniadakis2021); (b) the present method. The curves are obtained from a large-scale neural network in which the boundary network contains nine hidden layers and 48 neurons per hidden layer, and the flow network contains 13 hidden layers and 200 neurons per hidden layer. The shadow regions represent the standard deviation of the dynamic weights from three independent runs.

Appendix B. Spatial discretisation of the equation points
In this appendix, the influence of the spatial discretisation of the equation points on the performance of the proposed method is assessed in the case of flow over an oscillating cylinder, as described in § 3.1. The boundary network contains nine hidden layers and 32 neurons per hidden layer, and the flow network contains 13 hidden layers and 128 neurons per hidden layer, yielding a total of 207 707 trainable parameters. Note that the scattered velocity data are collected by interpolating the flow fields on a uniform grid to mimic regular PIV data. Two strategies are adopted to generate equation points. The first approach involves a random uniform distribution over the computational domain, as shown in figure 22(a), and the second approach involves a near-wall grid refinement, which better captures the boundary layer, as shown in figure 22(c). Each strategy is trained for 4000 epochs, and the pressure fields are predicted at the same locations and times.
(a, b) Uniformly distributed equation points and corresponding predicted pressure field. (c, d) Near-wall grid refined equation points and corresponding predicted pressure field. For the training data, the vector space
$1/R$
is set to
$1/40$
, and the noise level is set to
$0\, \%$
. The learned data were predicted over a mesh with an interval of
$1/R=1/100$
. Therefore, the original CFD data were interpolated on the predicted mesh to compute the corresponding error. The yellow arrows indicate the motion of the cylinder. The dashed black lines correspond to negative contour levels from -1.5 to -0.1 with an interval of 0.2, and the solid black lines correspond to positive contour levels from 0.1 to 1.5 with an interval of 0.2.

Figure 22 shows a comparison of the pressures predicted using the uniform and wall-refined equation points at time
$t$
= 15. A visual inspection of the results suggests that there are no differences between the contours. For a quantitative comparison, we present the relative
$\mathcal {l}_2$
norm error of the pressure as a function of time in figure 23. The error fluctuation in the non-uniform case is larger than that in the uniform case, and the global error in the uniform case is slightly smaller than that in the near-wall grid refinement case. In both cases, larger errors are observed at the beginning and end of the tested time due to the fewer physical constraints. In the present work, therefore, a more convenient random uniform distribution is adopted to generate equation points.
Time series of the relative
$\mathcal {l}_2$
norm error of the pressure for the uniform and wall-refined strategies in the case of flow over an oscillating cylinder.

Appendix C. On the coordinate system
PINN-MB is an extension of the PINN used to reconstruct the pressure with moving boundaries, where the inputs are space-time coordinates
$(t,\mathbf {X})$
, and the outputs are the velocity
$\mathbf {U}$
and pressure
$p$
. After training with the constraints of the supervised data (flow data and boundary data) and physical laws, a mapping relationship between the input and output is established with the neural network. This implies that the PINN is a network-based data assimilation method that combines the physical laws and observed data to seek the optimal states. Therefore, the physical model and the observed data should have the same coordinate system. The neural network can be trained under Cartesian or cylindrical coordinates, whereas the model trained with the Cartesian coordinates cannot be directly applied to other coordinates since the inputs and outputs depend on the boundary conditions, initial conditions and flow properties defined on a specific coordinate system. If the coordinate is rotated, the neural network must be retrained to adapt to the new coordinate, or the data should be preprocessed by coordinate transformation to satisfy the requirement of the model. However, for Reynolds averaged turbulence modelling using a deep neural network, Ling et al. (Reference Ling, Kurzawski and Templeton2016) introduced an invariant tensor basis to embed Galilean invariance into the predicted anisotropy tensor. This is because the predicted anisotropy tensor and its eigenvalues do not depend on the the coordinate system’s orientation for identical flows.
Further assessment of the PINN performance in cylindrical coordinates was carried out using the data of two axisymmetric co-rotating vortex rings (Verzicco et al. Reference Verzicco, Iafrati, Riccardi and Fatica1997). Note that PINN has been used to estimate the pressure field from the axisymmetric synthetic jet (Fan et al. Reference Fan, Xu, Wang and Wang2023). The numerical set-up of the co-rotating vortex rings is the same as that in the paper by Verzicco et al. (Reference Verzicco, Iafrati, Riccardi and Fatica1997). The Reynolds number
$Re=\Gamma / \nu$
is equal to 2500, in which
$\Gamma$
and
$\nu$
denote the circulation of the ring and the kinematic viscosity, respectively. The initial configuration consists of two identical vortex rings with Gaussian vorticity distributions, and the initial spacing between the rings is equal to the ring radius
$R$
, the ratio core-to-ring radius
$\epsilon / R = 0.3$
. The evolution of the initial flow field follows the axisymmetric N–S equations:
\begin{align} \frac {\partial u_z}{\partial t}+u_r\frac {\partial u_z}{\partial r}+u_z\frac {\partial u_z}{\partial z} &=-\frac {\partial p}{\partial z}+\frac {1}{Re}\left ( \frac {\partial ^2 u_z}{\partial r^2}+\frac {\partial ^2 u_z}{\partial z^2}+\frac {1}{r}\frac {\partial u_z}{\partial r} \right ), \nonumber \\ \frac {\partial u_r}{\partial t}+u_r\frac {\partial u_r}{\partial r}+u_z\frac {\partial u_r}{\partial z} &=-\frac {\partial p}{\partial r}+\frac {1}{Re}\left ( \frac {\partial ^2 u_r}{\partial r^2}+\frac {\partial ^2 u_r}{\partial z^2}+\frac {1}{r}\frac {\partial u_r}{\partial r}-\frac {u_r}{r^2} \right ),\\ \frac {\partial u_r}{\partial r} + \frac {\partial u_z}{\partial z} + \frac {u_r}{r} &= 0. \nonumber \end{align}
Here, the subscripts ‘r’ and ‘z’ indicate the radial and axial coordinates, respectively. After the reference velocity and pressure fields are solved via OpenFoam, the scattered velocity data for training are collected by interpolating the flow fields on a uniform grid to mimic typical PIV data. The vector space is set to
$R/40$
, and only two hundred flow fields with a time interval of 100
$\Delta t$
(
$\Delta t$
is the time step of the numerical simulation) are used for PINN training, in which the axisymmetric N–S equation (C1) is used.
The network consists of 11 hidden layers and 128 neurons per hidden layer, and contains 166 030 trainable parameters. The network was trained for 6000 epochs with 30 iterations per epoch, and the batch size was set to 10 000. This configuration is only used to prove that PINN can be applied to cylindrical coordinates. According to Verzicco et al. (Reference Verzicco, Iafrati, Riccardi and Fatica1997), the velocity is normalised with the speed of translation of the steady vortex ring in isolation,
$U_0=\Gamma /4\pi R[ln(8R/\epsilon )-1/4]$
, which is equal to 0.2414. Therefore, the pressure coefficient
$C_p$
presented in this work is scaled by
$0.5\rho U_0^2$
. Figure 24 compares the pressure reconstructed using PINN with the CFD result at time instant t = 0.5, where these two vortex rings have merged into only one ring. A visual inspection indicates that the predicted pressure is the same as the reference pressure. The relative
$\mathcal {l}_2$
norm errors for the velocity
$u,v$
and pressure
$p$
are also presented in figure 25. The maximum error of pressure is less than
$4\, \%$
.
A representative snapshot of the pressure given by (a) CFD and (b) PINN for the case of two axisymmetric co-rotating vortex rings. The dashed black lines represent negative contour levels from
$-$
4 to
$-$
0.2 with an interval of 0.4, and the solid black lines represent positive contour levels from 0.2 to 4 with an interval of 0.4. Note that for comparative assessment, the spatially averaged pressure is subtracted from both the exacted and predicted data for comparative assessment. The predicted mesh is the same as that of the training data without noise.

Relative
$\mathcal {l}_2$
norm errors for the velocity
$u,v$
and pressure
$p$
as a function of time.

Appendix D. On the number of training data
In the present study, a machine-learning-based method is proposed to reconstruct the pressure fields from measured velocity fields with moving boundaries. Because the spatial resolution of PIV/PTV is limited by the seeding concentration of tracing particles, the measured velocities are sparsely distributed in space. In this example, we investigated the effect of the amount of training data on the performance of pressure reconstruction based on the 2-D flow over an oscillating cylinder (§ 3.1) and swimming fish (§ 3.2). In our numerical simulations, 35 940 and 76 982 CFD points are used in the test region for the oscillating cylinder and fish swimming, respectively. It is reasonable that the simulation of the swimming fish requires more CFD points to capture the complex flow comprehensively. We randomly selected training data points from the CFD points to test the performance of PINN-MB. Figure 26 shows the relative
$\mathcal {l}_2$
norm error of the pressure as a function of the ratio of the number of data points to the number of CFD points. We find that the pressure errors converge to a stable value when the ratio of the data points is greater than
$0.1\, \%$
, which means that the supervised data needed by the proposed PINN-MB are only
$0.1\, \%$
of the CFD points. Note that the pressure error of fish is slightly larger than the error in figure 10 because we used a smaller neural network to reduce the training time. It is difficult to predict the lowest amount of training data for complex and high-dimensional flows. Generally, the low-dimensional flow dynamic system required less points to be represented than the high-dimensional system. Therefore, the sparse and limited training data can be used to reconstruct the low-dimensional manifold, as the pressure error decreases rapidly when the data ratio less than
$0.1\, \%$
in figure 26. This phenomenon inspires us that modal analysis such as proper orthogonal decomposition (Berkooz et al. Reference Berkooz, Holmes and Lumley1993), dynamic mode decomposition (Schmid Reference Schmid2010) and machine-learning-based autoencoder (Murata et al. Reference Murata, Fukami and Fukagata2020), extracting the low-dimensional flow features, can be used to reduce the requirement of training data and the network size. Fukami & Taira (Reference Fukami and Taira2023) compressed extreme aerodynamics to only three variables with a lift-augmented autoencoder, enabling the sparse reconstruction, dynamical modelling and control of extremely unsteady gusty flows. A data-driven framework was also developed to reduce a dynamical system onto a low-dimensional manifold and time evolution on that manifold (Linot & Graham Reference Linot and Graham2020). If the amount of training data continues to increase, as shown in figure 26, the reduction of error is extremely limited. This is because the inherent feature of neural networks, spectral bias, prefers to fit the low-dimensional models rather than high-dimensional models (Rahaman et al. Reference Rahaman, Baratin, Arpit, Draxler, Lin, Hamprecht, Bengio, Courville, Chaudhuri and Salakhutdinov2019), which has been discussed in § 3.1.
Relative
$\mathcal {l}_2$
norm error of the pressure as a function of the ratio of the number of data points to the number of CFD points. For the flow over oscillating cylinder, the boundary network contains nine hidden layers and 32 neurons per hidden layer, and the flow network contains 13 hidden layers and 128 neurons per hidden layer, yielding a total of 207 707 trainable parameters. For the flow of fish swimming, the boundary network contains nine hidden layers and 48 neurons per hidden layer, and the flow network contains 13 hidden layers and 150 neurons per hidden layer, yielding a total of 291 981 trainable parameters.

Appendix E. Comparison with the PINN
In § 2.2, we have discussed the advantages of PINN-MB by comparing it with the original PINN and the numerical method. Both PINN and numerical method can solve the pressure if the boundary condition, including the position and velocity as known data, is given. However, the pressure obtained by these two methods may be contaminated by measurement errors. To visually show the difference between PINN and PINN-MB, the pressure over an oscillating cylinder is reconstructed using these two machine-learning-based methods. Noise with
$\sigma _n=8\, \%$
was added to both the velocity data and boundary locations. For PINN, the boundary velocity was estimated usinga second-order polynomial fit over seven points, and the simple finite difference was not enough to suppress the noise. The boundary condition and flow data were fed into the PINN as supervised data. For PINN-MB, the input of the boundary network is only the noisy boundary position, and the input of the flow network is the flow data. The boundary velocity is estimated by the automatic differentiation of the boundary network and should be equal to the velocity predicted by the flow network. Figure 27 shows an example snapshot of the pressure reconstructed by PINN-MB (panel a) and PINN (panel b). The network of PINN is the same as that of PINN-MB without the boundary network. The surface pressure over the oscillating cylinder reconstructed by PINN-MB is more accurate than that reconstructed by PINN because PINN-MB can optimise the noisy boundary condition.
A representative snapshot of the pressure reconstructed by (a) PINN-MB and(b) PINN (b). The PINN is unable to optimise noisy boundary conditions, therefore, the pressure near the cylinder is incorrect.

















































































