Next Article in Journal
TSC-Mamba: Adaptive Decomposition and Channel Interaction Fusion for Time Series Forecasting
Previous Article in Journal
Macro–Market Fusion with Cross-Attention for Equity Return Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Performance of PINN Framework for Two-Phase Displacement in Complex Casing–Annulus Geometries

1
China Oilfield Services Ltd., Sanhe 065201, China
2
Research Center of Coastal and Urban Geotechnical Engineering, Zhejiang University, Hangzhou 310058, China
3
Zhejiang Key Laboratory of the Development and Utilization of Underground Space, Zhejiang University, Hangzhou 310058, China
4
Computing Center for Geotechnical Engineering, Zhejiang University, Hangzhou 310058, China
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(8), 1362; https://doi.org/10.3390/math14081362
Submission received: 7 March 2026 / Revised: 15 April 2026 / Accepted: 17 April 2026 / Published: 18 April 2026
(This article belongs to the Special Issue New Advances in Physics-Informed Machine Learning)

Abstract

Two-phase displacement between cement slurry and drilling fluid in wellbore systems is inherently nonlinear, interface-dominated, and strongly affected by geometric confinement, posing substantial challenges to efficient and stable numerical simulation. Conventional CFD approaches rely on mesh discretization and explicit interface tracking, which become computationally demanding and sensitive to grid quality in complex geometries and convection-dominated regimes. To address these limitations, this study develops a unified physics-informed neural network (PINN) framework for directly solving the coupled incompressible Navier–Stokes and Volume of Fluid (VOF) equations governing pressure-driven displacement. The framework is first validated against canonical transient flows and then applied to two-phase displacement in parallel-plate channels, semicircular bends, and a casing–annulus geometry representative of well cementing operations. The predicted velocity, pressure, and volume fraction fields exhibit strong agreement with ANSYS Fluent (2024R1) results, with relative errors generally around 5%, thereby demonstrating physical consistency and numerical stability without mesh generation or pressure–velocity splitting, while also showing favorable computational efficiency for the cases considered. Sensitivity analyses demonstrate that a smoother casing-shoe geometry significantly enhances PINN convergence, while higher Péclet numbers deteriorate training stability by increasing convection-dominated stiffness and optimization difficulty. The results demonstrate that the proposed PINN framework, with its mesh-free and geometrically flexible characteristics, is a promising approach for modeling multiphase displacement in cementing applications.

1. Introduction

Two-phase displacement flows are widely encountered in energy and geotechnical engineering applications, such as the replacement of drilling fluid by cement slurry during well cementing, fluid substitution in pipelines, and multiphase injection and displacement processes in subsurface engineering. In oil and gas well cementing operations, displacement efficiency is regarded as a critical indicator for ensuring long-term wellbore structural integrity and reliable zonal isolation [1]. Physically, the process involves the stable and effective advancement of the injected fluid within a confined flow channel, displacing the resident fluid and ultimately forming a continuous and mechanically stable consolidated body [2,3]. However, two-phase displacement is typically accompanied by interface evolution, flow instabilities, and complex coupled behaviors arising from density and viscosity contrasts, exhibiting pronounced nonlinear characteristics [4,5,6]. Accurately characterizing interface propagation and the associated evolution of flow structures has therefore become a fundamental scientific challenge in multiphase flow modeling and numerical simulation.
Early investigations into interface advancement and flow structure evolution in two-phase displacement primarily relied on physical experiments and theoretical mechanism-based modeling. Experimentally, Renteria et al. [7] examined the formation of residual zones during interface propagation and demonstrated that interface evolution is significantly influenced by flow structures and local velocity distributions. Zhang et al. [8] conducted large-scale annular displacement experiments to quantitatively evaluate displacement efficiency and reported pronounced non-uniform characteristics during interface advancement. Nevertheless, experimental approaches remain limited in spatial resolution due to sensor placement and measurement accuracy, with interface positions typically characterized indirectly at the millimeter scale [8,9], making it difficult to continuously capture interface topology evolution and localized mixing structures. From a theoretical modeling perspective, Tardy et al. [10,11] propose annular displacement evolution models based on macroscopic governing equations, improving computational efficiency in predicting displacement efficiency. However, such models generally rely on empirical closure parameters to represent interfacial mixing and diffusion behaviors. Under strong convective conditions or rapid interface evolution, model predictions exhibit considerable sensitivity to parameter selection. Lavrov et al. [12] further noted that parameter inversion procedures may yield numerically acceptable yet physically distorted results when model parameters are artificially adjusted to fit experimental data. Overall, although experimental studies and theoretical models have provided valuable insights into the macroscopic behavior of two-phase displacement, limitations remain in achieving continuous spatiotemporal characterization of interface evolution and stable representation of nonlinear dynamics.
With the development of computational fluid dynamics (CFD), numerical simulations based on the finite volume method (FVM) and the Volume of Fluid (VOF) approach have become mainstream tools for investigating two-phase displacement flows. Peng et al. [13] established a three-dimensional CFD model using Fluent to systematically evaluate the influence of rheological parameters on displacement efficiency. Song et al. [14] constructed numerical models with irregular flow channels to analyze the effects of displacement rate and flow behavior index on interface evolution. Enayatpour et al. [15] further developed a three-dimensional CFD framework to simulate non-Newtonian flow and interfacial transport in complex cementing processes. These studies demonstrate that the VOF method enables a unified solution of the velocity field, pressure field, and volume fraction transport equation within a discretized mesh framework, thereby providing full-field information on interface propagation. However, in slender confined geometries or flow-redirection regions, accurate capture of interface gradients and shear layer evolution typically requires refined meshes and small time steps, leading to a substantial increase in computational degrees of freedom [16,17,18]. Moreover, under convection-dominated conditions, VOF-type interface algorithms are highly sensitive to mesh quality and reconstruction strategies, often introducing numerical diffusion or spurious oscillations [19,20,21,22], which may compromise the stability and accuracy of interface morphology prediction. Consequently, under multiparameter studies or complex geometric conditions, traditional CFD approaches still face challenges in computational cost and scalability.
In recent years, Physics-Informed Neural Networks (PINNs) have emerged as a continuous-domain computational framework that directly embeds governing physical equations into the neural network training process, offering a new pathway to overcome limitations of conventional discretization-based methods [23,24,25]. The central idea is to incorporate Navier–Stokes equations, boundary conditions, and initial conditions into the loss function in residual form, while leveraging automatic differentiation to replace traditional spatial discretization and time-marching procedures, thereby constructing physically constrained approximations in continuous space and time [26,27,28]. This framework alleviates dependence on explicit meshes, avoids mesh distortion and numerical dissipation issues, and exhibits promising scalability in high-aspect-ratio structures and parameter inversion problems [28,29,30,31]. Existing studies have demonstrated that PINNs achieve high prediction accuracy in single-phase flow, heat conduction, and homogeneous media problems, and have shown encouraging performance in wellbore flow and reservoir pressure inversion. For instance, Nugroho et al. [32] successfully predicted pressure distributions in geothermal well two-phase flow by constructing physics-constrained loss functions; Walter et al. [33] propose the WellPINN framework to improve pressure diffusion characterization near wells; Han et al. [34] employed domain decomposition strategies to achieve high-precision inversion of wellbore–reservoir coupled systems; Zhang et al. [35] and Patel et al. [36] further verified the feasibility of PINNs in multiphase displacement and interface instability problems.
Nevertheless, compared with single-phase or weakly nonlinear problems, two-phase displacement in cementing engineering involves interface sharpening, abrupt property variations, and strongly convection-dominated coupling. High gradients and non-smooth structures are typically present near the interface, posing significant challenges to the convergence stability and high-frequency representation capability of PINNs. Although several studies have explored the application of PINNs in multiphase displacement or fracture–wellbore systems [37,38,39,40,41], systematic validation of interface propagation under varying geometric complexities remains limited [29], particularly in achieving unified characterization of interface topology evolution and numerical stability under strong convection-dominated conditions [42,43,44]. Therefore, establishing a stable and unified framework for describing coupled behavior of complex boundaries and moving interfaces, and systematically evaluating the influence of key parameters on interface morphology and displacement efficiency, remains a critical challenge in applying PINNs to two-phase displacement problems.
Motivated by the above considerations, this study develops a unified PINN framework to directly solve the coupled incompressible Navier–Stokes equations and VOF equation governing two-phase displacement flow. The contribution of this work is not merely the application of PINNs to a coupled Navier–Stokes–VOF system, but the development of a unified framework for cement–drilling fluid displacement in complex confined geometries. The framework is validated progressively from canonical benchmarks to parallel-plate, semicircular-bend, and casing–annulus configurations. In addition, physics-guided auxiliary constraints are introduced to enhance convergence and interface stability in the strongly confined turning region. These features, together with the systematic analysis of geometric and convection–diffusion effects, distinguish the present study from existing generic PINN demonstrations.
The remainder of this paper is organized as follows. Section 2 presents the governing equations and the PINN formulation, including network architecture and physical residual design. Section 3 validates the model using classical Couette flow and Poiseuille flow cases to examine physical consistency and temporal evolution capability. Section 4 extends the framework to two-phase displacement problems in planar channels and curved geometries, with comparisons against conventional CFD results. Section 5 further develops a casing–annulus system model to investigate interface evolution in complex connected structures and performs sensitivity analyses on geometric parameters and the convection–diffusion effects. Section 6 concludes the study and outlines future research directions.

2. Methodology

2.1. Governing Equations for Two-Phase Displacement Flow

The two-phase displacement problem investigated in this study is motivated by fluid replacement processes occurring in confined geometries commonly encountered in engineering applications. Particular emphasis is placed on the continuous displacement of one fluid by another under externally imposed driving forces within representative configurations such as straight pipes, curved conduits, and U-shaped channels. Such displacement phenomena are widely observed in well cementing operations, pipeline cleaning, multiphase transport systems, and subsurface injection processes. The resulting flow behavior is governed by the combined effects of fluid property contrasts, geometric confinement, and interface evolution dynamics. To provide a unified continuum-scale description of these coupled mechanisms, a volume-fraction-based one-fluid formulation is adopted to mathematically characterize the two-phase displacement process.
In constructing the model, the following assumptions are introduced: (1) both phases are incompressible, immiscible Newtonian fluids; (2) the flow is isothermal, with thermal effects and phase change neglected; (3) chemical reactions and interfacial mass transfer are disregarded, and only hydrodynamic behavior is considered; (4) the interface thickness is negligible at the macroscopic scale, and its dynamics are represented in a continuous manner through a volume fraction transport equation. Under these assumptions, the two-phase displacement system can be regarded as a nonlinear dynamical system governed by the strong coupling among the velocity field, pressure field, and interface evolution field.
To describe the spatial distribution of the two phases, a volume fraction function α ( x , t ) is introduced to represent the volumetric proportion of the injected fluid (phase 1) at a given location and time, satisfying
α x , t 0 , 1
where α = 1 indicates that the location is fully occupied by phase 1, whereas α = 0 corresponds to complete occupation by the displaced fluid (phase 2). In the vicinity of the interface, a continuous transition region 0 < α < 1 naturally arises. This representation eliminates the need for explicit interface tracking within the continuum framework and is particularly suitable for two-phase displacement problems involving complex geometries.
Within the one-fluid modeling paradigm, the two phases are treated as an equivalent mixture whose effective properties vary continuously in space and time according to the local volume fraction. The mixture density ρ ( α ) and dynamic viscosity μ ( α ) are expressed through linear interpolation:
ρ α = α ρ 1 + 1 α ρ 2
μ α = α μ 1 + 1 α μ 2
where ρ i and μ i ( i = 1 , 2 ) denote the density and dynamic viscosity of the respective phases. This interpolation ensures the continuity of material properties across the interfacial region, mitigates potential numerical singularities, and effectively captures the influence of property contrasts on the displacement dynamics.
Based on the property interpolation described above, the velocity and pressure fields governing the two-phase displacement flow are described by incompressible Navier–Stokes equations. The momentum conservation equation is expressed as
ρ α u t + u u = p + μ α u + ( u ) T + f
where u ( x , t ) denotes the velocity vector, p ( x , t ) is the pressure field, and f represents the body force term accounting for gravity or other equivalent driving forces. In practical displacement processes, the flow is typically driven either by an imposed inlet pressure gradient or by volumetric body forces. Different driving mechanisms directly influence the propagation speed of the displacement interface and the resulting flow structure. Within the momentum equation, the relative contributions of inertial, pressure-gradient, and viscous effects depend primarily on the Reynolds number and the contrast in material properties between the two phases. When significant differences in density or viscosity exist between the injected and displaced fluids, pronounced variations in shear stress distribution and velocity gradients may arise near the interface, thereby exerting a direct impact on displacement efficiency and interface morphology.
Under the incompressibility assumption, mass conservation is enforced through
u = 0
This constraint guarantees volume conservation throughout the flow domain and serves as a fundamental condition for maintaining the physical consistency of the velocity field in two-phase displacement problems.
The spatiotemporal evolution of the two-phase interface is described by the VOF equation, written as
α t + u α = D α α
The advective term on the left-hand side governs the transport of the interface by the local velocity field, whereas the diffusion term on the right-hand side is introduced as a regularization mechanism to improve numerical stability, particularly in convection-dominated regimes where sharp interface gradients may lead to oscillations or convergence difficulties. As a result, the interface is represented as a finite-thickness transition zone rather than an ideal sharp discontinuity. It should be noted that this regularization may introduce a certain degree of interface smoothing. However, in the present study, the diffusion coefficient D α is chosen to be sufficiently small such that the overall interface evolution, displacement pattern, and global flow behavior remain consistent with reference CFD solutions. Therefore, its main influence is limited to the local interface thickness, while the macroscopic displacement characteristics are preserved. The influence of the diffusion term on interface behavior and displacement results will be further discussed in the numerical examples.
The governing equations presented above indicate that two-phase displacement flow is inherently a highly nonlinear and strongly coupled problem. The distribution of the volume fraction α determines the effective material properties ρ ( α ) and μ ( α ) of the mixture, thereby influencing the evolution of the velocity and pressure fields. Conversely, the velocity field directly governs the propagation and deformation of the interface through the VOF equation. This bidirectional coupling renders the overall displacement behavior highly sensitive to property contrasts, geometric confinement, and driving conditions, and also increases the difficulty of achieving balanced optimization during PINN training. In the coupled Navier–Stokes–VOF framework, loss weighting is therefore introduced to balance the optimization of the flow-field equations and the interface-transport equation, since these residuals may differ in magnitude and convergence sensitivity. Based on preliminary numerical testing, equal weighting between the Navier–Stokes and VOF residuals was found to provide a reasonable compromise between convergence stability and prediction accuracy. Therefore, a 1:1 weighting strategy was adopted in this study. The resulting system of equations, together with the corresponding PINN formulation, provides a unified physical framework for describing flow structures, interface dynamics, and displacement efficiency in two-phase systems, enabling systematic analysis under different geometric configurations and parameter combinations.

2.2. Fundamental Principles of PINNs

PINNs provide a continuous-domain computational framework in which governing physical equations are incorporated directly into the neural network training process. Instead of relying on mesh-based discretization, the unknown solution fields are approximated by neural networks, while the governing equations are enforced through residual minimization.
Figure 1 illustrates the architecture of the neural network employed in this study. A fully connected feedforward deep neural network (DNN) is used as a global function approximator that maps the spatial coordinates x y to the corresponding predicted field variable a ^ ( x , y ) . The transformation between adjacent layers is expressed as
z i = σ i W i T z i 1 b i
where W i and b i denote the trainable weights and biases, and σ i ( ) represents a nonlinear activation function. The hyperbolic tangent function is adopted in this study due to its smoothness and favorable gradient characteristics for representing continuous physical fields.
The neural network parameterization defines a trial solution
a ^ x , y = N θ x , y
where θ represents the set of trainable parameters.
Based on this neural network representation, the PINN framework further incorporates the governing equations as physical constraints. By means of automatic differentiation, the required spatial derivatives of the network output are obtained and substituted into the governing equations to construct the residuals. The corresponding loss functions are defined as
L P D E = 1 N r m = 1 N r f P D E x m , y m ; a ^ , a ^ , 2 a ^ 2
L B C = 1 N b m = 1 N b f B C x m , y m ; a ^ 2
The total loss is given by
L t o t a l = ω 1 L P D E + ω 2 L B C
Minimization of L t o t a l yields a continuous solution that satisfies both the governing equations and boundary conditions over the entire domain. This unified framework provides an efficient and mesh-free approach for modeling the strongly coupled two-phase displacement flows considered in this study.

3. Verification with Single-Phase Transient Canonical Flows

Before applying the proposed PINN framework to two-phase displacement problems, verification against classical flow configurations with analytical solutions is conducted. Such canonical cases provide a controlled setting for assessing the physical consistency and predictive capability of the formulation. By excluding geometric complexity and multiphysics coupling effects, these benchmark problems enable direct evaluation of the network’s ability to represent the governing equations accurately. In this section, Couette flow and Poiseuille flow are selected as verification cases. These configurations correspond to shear-driven and pressure-driven flow mechanisms, respectively, and admit well-established analytical solutions for the velocity and pressure fields. Comparison between the PINN predictions and the analytical solutions allows systematic assessment of the accuracy and stability of the proposed framework under fundamental flow conditions.

3.1. Transient Couette Flow

3.1.1. Problem Description

As shown in Figure 2, an incompressible Newtonian fluid is confined between two infinite parallel plates separated by a distance H . The flow develops tangentially along the plates, while the wall-normal coordinate is denoted by y . At the initial time, the fluid is at rest throughout the domain, with no prescribed initial velocity distribution.
To simulate the physical loading process of shear-driven flow, the lower plate remains stationary, whereas the upper plate velocity increases smoothly in time from zero to a prescribed constant value U . The temporal variation in the upper wall velocity is prescribed as
U t = U 1 e t τ
where τ represents the characteristic loading timescale. When t 4.6 τ , the wall velocity reaches approximately 0.99 U , indicating that the loading process is effectively completed within O ( τ ) . This smooth exponential ramping avoids a discontinuous jump in the boundary condition at the initial time, ensuring a physically consistent start-up process and facilitating clear observation of momentum diffusion from the moving wall into the fluid interior.
Under these conditions, the flow is driven solely by wall-induced shear, with no imposed pressure gradient and no body forces considered. Owing to geometric uniformity and homogeneous loading in the streamwise direction, the velocity field depends only on the wall-normal coordinate and time and can be expressed as
u = u y , t ,   0
As time progresses, momentum introduced by the moving wall diffuses into the fluid domain. The velocity profile evolves from the initial quiescent state to a continuous distribution along the wall-normal direction and ultimately converges to the classical linear velocity profile of steady Couette flow. The complete evolution from start-up through transient development to steady state provides a stringent test for evaluating the ability of PINNs to capture both short-term dynamics and long-time asymptotic behavior within a unified framework.

3.1.2. Governing Equation and Analytical Solution

Under the physical configuration and loading conditions described above, the governing equation for transient Couette flow can be derived from the incompressible Navier–Stokes equations under appropriate simplifying assumptions. Since the motion is driven solely by wall-induced shear and no pressure gradient is imposed in the streamwise direction, the velocity field depends only on the wall-normal coordinate y and time t , with a single nonzero tangential component. In the absence of body forces, the momentum equation reduces to the one-dimensional unsteady diffusion equation
u y , t t = ν 2 u y , t y 2
where u ( y , t ) denotes the tangential velocity and ν is the kinematic viscosity of the fluid. This equation describes the diffusion of momentum in the wall-normal direction under shear-driven conditions. The initial condition corresponds to a quiescent state throughout the domain, u ( y , 0 ) = 0 . The boundary conditions follow from the no-slip constraint at the walls: the lower wall remains stationary, u ( 0 , t ) = 0 , while the upper wall moves with the prescribed time-dependent velocity u ( H , t ) = U ( t ) , where U ( t ) represents the smooth exponential ramping function described previously.
In the long-time limit, when the wall velocity approaches a constant value U and the flow becomes time-independent, the governing equation reduces to
d 2 u y d y 2 = 0
Imposing the steady no-slip boundary conditions yields the classical Couette solution
u y = U H y

3.1.3. PINN Modeling

The proposed network takes the wall-normal coordinate y and time t as inputs and outputs the velocity field u ( y , t ) , providing a continuous approximation of the start-up and subsequent evolution of the flow. The momentum equation is enforced via the PDE residual, while the initial and boundary conditions are incorporated through dedicated loss terms. Collocation points are sampled over the space–time domain to ensure adequate resolution of the flow evolution. The detailed PINN architecture and training parameters adopted for the benchmark and two-phase displacement cases are summarized in Table 1. These include the number of hidden layers, neurons per layer, activation function, optimizer, learning rate, training epochs, and the numbers of sampling points used for different constraints. Specifically, N f , N i c , and N b c represent the numbers of collocation points associated with the PDE residual, initial condition, and boundary condition, respectively.
Figure 3 presents the velocity profiles predicted by the PINN at different time instants for the transient Couette flow, together with the classical steady linear solution. At early times (e.g., t = 0.1   s and t = 0.5   s ), the velocity remains confined near the moving upper wall, while the bulk of the fluid is nearly stationary, consistent with the diffusion of momentum from the wall into the interior. As time increases, the velocity distribution gradually extends toward the lower wall and transitions from a strongly nonlinear profile to a smoother distribution. At later times ( t = 5   s to 10   s ), the predicted profiles nearly coincide with the analytical steady solution, indicating that the PINN accurately recovers the correct long-time limit without explicitly imposing the steady-state constraint.
Figure 4 shows the evolution of the total loss and its individual components during training. The total loss decreases rapidly in the early stage and gradually stabilizes as training proceeds. Although mild oscillations are observed in the loss curves, all components exhibit an overall decreasing trend and remain bounded at low levels in the later training stages, indicating stable convergence.

3.2. Poiseuille Flow

3.2.1. Problem Description

As shown in Figure 5, the problem concerns the axial flow of an incompressible Newtonian fluid in a circular pipe of radius R . In contrast to the shear-driven Couette flow examined previously, Poiseuille flow is driven by an imposed axial pressure gradient. Under the assumptions of fully developed flow and axisymmetry about the pipe centerline, the velocity field depends only on the radial coordinate r and time t , and can be expressed as
u = u r , t ,   0 ,   0
where u ( r , t ) denotes the axial velocity component. The fluid properties are characterized by density ρ and dynamic viscosity μ , with the kinematic viscosity defined as ν = μ / ρ .
The fluid is initially at rest,
u r , 0 = 0
and an axial pressure gradient is subsequently applied to drive the flow. To avoid an abrupt onset at t = 0 , the pressure gradient is introduced smoothly through an exponential ramp function,
d p d z t = d p d z m a x 1 e t τ
where d p / d z m a x < 0 represents the constant steady-state pressure gradient and τ denotes the loading time scale. This smooth loading ensures a gradual transition from the quiescent state to the fully developed Poiseuille flow characterized by the classical parabolic velocity distribution.

3.2.2. Governing Equation and Analytical Solution

Since there is no velocity gradient in the axial direction and the radial and circumferential velocity components vanish, the momentum equation reduces significantly. In the absence of body forces, the axial velocity u ( r , t ) satisfies the following one-dimensional unsteady diffusion equation with a pressure-gradient source term:
u t = ν 1 r r r u r 1 ρ d p d z t
The initial and boundary conditions follow those defined previously, including a quiescent initial state, a no-slip condition at the pipe wall, and a symmetry condition at the pipe centerline,
u r r = 0 = 0
In the long-time limit, when the pressure gradient approaches a constant value d p / d z ) m a x and the velocity becomes time-independent, the governing equation reduces to
ν 1 r d d r r d u d r = 1 ρ d p d z m a x
Applying the symmetry and no-slip boundary conditions yields the classical steady Poiseuille solution,
u r = 1 4 μ d p d z m a x R 2 r 2

3.2.3. PINN Modeling

For the Poiseuille flow benchmark, the proposed PINN framework is formulated analogously to the Couette case, with the governing equation modified to incorporate the axisymmetric diffusion operator and the time-dependent pressure-gradient source term. The network takes the radial coordinate r and time t as inputs and outputs the axial velocity u ( r , t ) , providing a continuous approximation of the transient flow evolution. Collocation points are sampled over r [ 0 , R ] and the full temporal domain from start-up to steady state. The detailed PINN configuration and training parameters are summarized in Table 2.
Figure 6 presents the radial distributions of the axial velocity at different time instants. As time progresses under the imposed pressure gradient, the velocity profile gradually develops toward the pipe centerline and increasingly resembles the characteristic Poiseuille distribution. At t = 1.0 , the PINN prediction is nearly indistinguishable from the analytical steady solution, indicating accurate recovery of the long-time limit. As shown in Figure 7, the loss curves exhibit stable convergence, further confirming the satisfactory training performance of the model.
Through the two classical benchmarks of transient Couette flow and transient Poiseuille flow, representing shear-driven and pressure-driven mechanisms, respectively, the proposed PINN framework has been systematically validated. These analytical-solution cases are introduced solely as canonical verification benchmarks, rather than as target applications for which PINNs are intended to replace closed-form solutions. Their role is to verify that the proposed framework can accurately reproduce the underlying shear-driven and pressure-driven flow physics under controlled conditions before being extended to two-phase displacement problems with moving interfaces and complex geometries, for which analytical solutions are generally unavailable.

4. PINN Modeling of Two-Phase Displacement with Interface Evolution

Two-phase displacement flow constitutes one of the most fundamental and practically relevant problems in multiphase fluid mechanics. Unlike single-phase flow, it involves not only the evolution of velocity and pressure fields but also the dynamics of a moving interface, whose behavior critically influences displacement efficiency and flow stability. The analysis begins with a baseline configuration of two-phase displacement between parallel plates, where interface propagation and its interaction with the underlying flow field are examined in a controlled setting. Geometric curvature and flow redirection effects are subsequently incorporated to progressively approach more complex conduit configurations representative of practical engineering applications.

4.1. Two-Phase Displacement Between Parallel Plates

As illustrated in Figure 8, the computational domain consists of a two-dimensional parallel-plate channel with a length of 2 m and a height of 0.3 m, representing an idealized planar section of a conduit. Initially, the domain is filled with a stationary fluid of density ρ = 1 , and the velocity field is zero throughout the domain, corresponding to the pre-displacement state.
Displacement is initiated by imposing a pressure-driven inflow at the left boundary. A denser fluid with density ρ = 1.5 is injected to represent the cement slurry displacing the original fluid. The inlet pressure is ramped linearly from 0 to p = 5 over the time interval 0 t 1   s , and maintained constant thereafter. A constant-pressure outlet boundary with p = 0 is prescribed at the right boundary to maintain a sustained pressure gradient across the domain. No-slip boundary conditions are imposed along the upper and lower walls to account for viscous confinement by the solid boundaries. The dynamic viscosity is set to μ = 0.1 , and the density diffusion coefficient is prescribed as D = 0.01 .
For the two-phase displacement benchmark in the planar channel configuration, the flow dynamics and interface evolution are governed by the variable-density incompressible Navier–Stokes–VOF system introduced in Section 2 (see Equations (2)–(6)). Within the continuous mixture framework, the velocity field u v , pressure field p , and volume fraction field α are solved in a fully coupled manner. The volume fraction influences the momentum equations through the density interpolation relationship, thereby establishing a bidirectional coupling between hydrodynamics and interface transport.
For the two-phase displacement problem in the planar configuration, a unified PINN framework is constructed to simultaneously predict the velocity field u v , pressure field p , and volume fraction field α . The neural network takes the space–time coordinates x y t as inputs and outputs
N θ x , y , t = u x , y , t ,   v x , y , t ,   p x , y , t ,   α x , y , t
where θ denotes the trainable network parameters. To enforce physical admissibility, a Sigmoid activation is applied to the volume fraction output, ensuring 0 < α < 1 throughout training. The governing equations—including the incompressibility constraint, the variable-density momentum equations, and the VOF transport equation—are embedded into the loss function via automatic differentiation. The volume fraction field enters the momentum equations through density interpolation, thereby establishing an implicit coupling between interface transport and hydrodynamics. This volume-fraction–density–momentum linkage is essential for capturing displacement-front propagation. Initial and boundary conditions are imposed in residual form. The detailed PINN configuration and training parameters are summarized in Table 3.
To further assess the predictive reliability of the proposed PINN framework for two-phase displacement problems, numerical results obtained from the commercial computational fluid dynamics software ANSYS Fluent(2024R1) are employed as a reference benchmark. Fluent adopts a finite-volume discretization strategy and solves the incompressible Navier–Stokes equations coupled with the VOF model under the same geometric configuration, physical parameters, and boundary conditions as those used in the present study.
As shown in Figure 9, the loss curves exhibit stable convergence, confirming the satisfactory training performance of the model. Figure 10 presents the contour distributions of the velocity components ( u , v ) , pressure field p , and volume fraction α at representative time instants, together with the corresponding results obtained from Fluent simulations. A high degree of agreement is observed in terms of flow structure, pressure distribution, and interface evolution patterns. These results indicate that the proposed framework is capable of accurately resolving the strongly coupled multi-field behavior inherent in two-phase displacement processes without relying on explicit mesh discretization or interface reconstruction techniques.

4.2. Two-Phase Displacement in a Semicircular Bend

In practical engineering applications, two-phase displacement frequently occurs in conduits with geometric curvature, such as elbow sections, turning joints, and deviated wellbore segments. In contrast to straight channels, curved configurations not only alter the primary flow direction but also introduce curvature-induced effects that modify the balance among inertial, viscous, and pressure forces. The resulting redistribution of velocity and pressure fields can significantly influence interface evolution, displacement efficiency, and flow stability.
Two-phase displacement in a two-dimensional semicircular bend is investigated, as illustrated in Figure 11. The computational domain consists of a semicircular annular channel with a constant diameter along the curved centerline. A Cartesian coordinate system ( x , y ) is adopted for implementation, with the bend center located at (0, 0). The radius of the channel centerline is denoted by R c , and the inner and outer wall radii are defined as
R i = R c D 2
R o = R c + D 2
where D represents the pipe diameter. In polar coordinates, the computational domain corresponds to the semicircular annular region satisfying
R i r R o
0 θ π
The inlet and outlet are located at the two ends of the bend, corresponding to θ = π and θ = 0 , respectively, while the inner and outer walls extend along the curved arc. At the initial time t = 0 , the bend is entirely filled with the displaced fluid (drilling fluid), and the velocity field is set to zero throughout the domain. The loading strategy, boundary conditions, fluid assumptions, and governing equations are identical to those adopted in the parallel-plate displacement case. It is important to note that, although the flow trajectory undergoes significant curvature in the bend configuration, the analytical form of the governing equations remains unchanged. Geometric curvature is incorporated implicitly through the spatial domain definition and boundary conditions rather than through explicit curvature terms in the governing equations. The network architecture, optimization algorithm, and training strategy are consistent with those adopted in the previous benchmark cases. The key PINN configuration parameters for the semicircular bend case are summarized in Table 4.
Figure 12 presents the loss convergence curve, while Figure 13 compares the four predicted fields with the corresponding ANSYS Fluent results. The overall agreement confirms the accuracy and robustness of the PINN framework. The transition from a straight channel to a curved geometry further demonstrates that the proposed model maintains stability and predictive capability under flow redirection and curvature-induced momentum redistribution. Notably, without introducing additional curvature-specific terms into the governing equations, the method accommodates geometric complexity naturally through boundary representation and sampling design. This reflects the inherent flexibility of PINNs in handling multiphase flows within nontrivial domains and provides a reliable basis for extending the approach to more realistic wellbore geometries and displacement-efficiency analyses in practical cementing applications.

5. Cement Slurry Displacement of Drilling Fluid in a Casing–Annulus Geometry

In practical cementing operations, slurry displacement takes place within the casing–annulus system, where geometric confinement and local flow restrictions strongly influence the displacement pathway and interface evolution. To represent such engineering conditions while maintaining computational efficiency, a two-dimensional axisymmetric simplification of the wellbore geometry is adopted to construct an idealized casing–annulus displacement model. This configuration enables systematic evaluation of the proposed PINN framework under confined geometries and evolving interface dynamics, and provides a numerical basis for subsequent displacement-efficiency analysis.

5.1. Geometric Models and Physical Problem Descriptions

As illustrated in Figure 14, the red dashed line denotes the axis of symmetry. The computational domain comprises the fluid region inside the casing and the surrounding annulus, bounded by the outer wellbore wall and the symmetry axis, forming an axisymmetric casing–annulus configuration. The wellbore radius is R w , and the outer casing radius is R c ; the annular clearance width is therefore defined as h = R w R c d . The total axial height of the domain is H . To avoid geometric discontinuities and enhance training stability, a filet transition with radius R f is introduced at the bottom corner of the wellbore wall. In addition, a bottom clearance parameter h b is defined as the minimum axial distance between the casing shoe and the wellbore bottom, which governs the effective flow passage and influences the turning behavior of the displacing fluid as well as the associated local pressure drop.
The resulting geometry forms a typical “upper-connected–lower-restricted” flow pathway. Initially, the annular region is entirely filled with quiescent drilling fluid. Cement slurry is then injected from the upper-left inlet under a time-dependent pressure boundary, with the inlet pressure increasing linearly over the ramping period t ramp before reaching a constant value. Driven by the imposed pressure gradient, the slurry descends along the left annulus, turns through the semi-circular transition at the casing shoe, and ascends along the right annulus, thereby continuously displacing the drilling fluid. The arrows indicate the inflow and outflow directions.

5.2. Governing Equations and Boundary Conditions

The governing equations remain consistent with those introduced in Section 4, including the incompressible Navier–Stokes equations coupled with a VOF-type transport equation for the volume fraction α , except for the explicit inclusion of gravitational effects, which become non-negligible in the casing–annulus configuration due to density contrast between cement slurry and drilling fluid. The incompressible continuity equation is retained in its standard form. The momentum equation is written as
ρ u t + u u = p + μ 2 u + ρ g
where g denotes the gravitational acceleration vector. The additional body-force term ρ g introduces buoyancy-driven effects through the density field ρ ( α ) , thereby allowing density stratification and gravitational instability to influence the displacement dynamics.
The inlet, outlet, and wall conditions follow the same formulation as described in the previous two-phase displacement cases and are therefore not repeated here. Owing to the geometric and loading symmetry about the vertical centerline, a mirror symmetry boundary condition is imposed along the axis. Specifically, the normal velocity component vanishes on the symmetry line, while the normal gradients of tangential velocity, pressure, and volume fraction are set to zero,
u = 0
u x = 0
p x = 0
α x = 0

5.3. PINN Modeling

The training objective of the PINN model follows the standard physical constraints defined previously. In the casing–annulus configuration, however, the displacement process features a strongly confined “downward–turning–upward” flow pathway. Under such geometric connectivity and convection-dominated transport, enforcing only the conventional PDE residuals may result in slow convergence or insufficient interface resolution within practical training epochs. To improve training stability and better capture the essential displacement characteristics, a set of auxiliary physics-informed constraints is incorporated. These auxiliary terms are formulated as soft regularization components and incorporated into the composite loss function as
L = L P D E + L I C + L B C + L a u x
Specifically, localized volume-fraction guidance is imposed in geometrically critical regions (e.g., throat and bottom clearance zones) to facilitate physically consistent interface penetration through narrow passages. In addition, a weak interface regularization term is introduced to suppress nonphysical distortions of the α-contours without constraining their exact position. All auxiliary components are formulated as soft penalties with carefully calibrated weights to preserve the dominance of the governing equation residuals. The detailed model configuration and parameter settings are summarized in Table 5.
Figure 15, Figure 16 and Figure 17 show the training convergence history and the four fields predicted by the PINN model. The loss exhibits stable decay without divergence, indicating good convergence behavior. The predicted velocity, pressure, and volume-fraction fields are in good agreement with the CFD results, and remain physically consistent with the expected flow evolution. To quantitatively assess the prediction accuracy, a relative L2 error analysis is performed by comparing the PINN predictions with the corresponding Fluent solutions. The relative L2 error is defined as:
ε L 2 = i = 1 N ϕ i p r e d ϕ i r e f 2 i = 1 N ϕ i r e f 2 1 2
where ϕ denotes the target variable, and the superscripts “pred” and “ref” represent the PINN prediction and the corresponding Fluent solution, respectively. The results show that the average error over six representative time instants is 4.8%, with a maximum value of 5.96% observed at 8 s. The main discrepancies are concentrated near the interfacial transition zone in the turning region, where strong gradients and geometric confinement increase the difficulty of accurate prediction. Overall, the agreement between the PINN and CFD results remains good throughout the displacement process.
In addition, a comparison of computational cost is conducted to assess the efficiency of the proposed framework. The representative Fluent simulation requires approximately 5 h, whereas the corresponding PINN training takes about 0.5 h under the same computational condition. Once trained, the PINN framework can efficiently provide predictions for varying parameter settings without the need to repeat full CFD simulations. This makes the approach particularly attractive for parameter studies and optimization problems.

5.4. Geometric and Convection–Diffusion Parameter Sensitivity Analysis

To assess the robustness of the proposed PINN framework under variations in key engineering parameters, a sensitivity analysis is conducted with respect to the bottom filet radius and the Péclet number. The former governs geometric smoothness at the casing shoe and influences flow turning behavior, while the latter is a dimensionless parameter characterizing the relative importance of convective transport to diffusive transport in interface evolution. These parametric studies provide insight into the model’s ability to capture geometry-dependent flow redistribution and interface dynamics. It should be noted that the purpose of the following analysis is not to provide a comprehensive parametric study, but to examine the representative effects of key physical and geometrical parameters on the behavior of the proposed PINN framework.

5.4.1. Influence of Bottom Filet Radius R f

To quantify the influence of geometric smoothness at the casing shoe, all parameters are kept constant while varying only the bottom filet radius R f . Four cases, R f = 0 , 0.02 m, 0.05 m, 0.1 m, are considered, covering the transition from a sharp corner to progressively smoother geometries. Each case is trained under the same PINN settings so that the effect of geometric variation on convergence behavior can be assessed directly.
The corresponding PDE loss histories are shown in Figure 18. A clear improvement in convergence behavior is observed with increasing R f . When the filet radius is small, especially for the sharp-corner case ( R f = 0), the training process exhibits relatively higher residual levels and more noticeable oscillations, indicating that the strong geometric discontinuity increases the difficulty of optimization. This behavior can be attributed to the sharp turning structure, which tends to induce stronger local gradients and makes it more difficult for the PINN to satisfy the governing equations uniformly throughout the computational domain.
As R f increases, the convergence process becomes progressively smoother and the residual magnitude decreases. For larger filet radii, the PDE loss drops more steadily and reaches a lower level within the same number of training iterations, demonstrating a more stable and efficient optimization process. These results indicate that improving geometric smoothness at the casing shoe can effectively alleviate local learning difficulty and enhance the convergence performance of the PINN framework.

5.4.2. Influence of the Convection–Diffusion Parameter (Péclet Number)

In the casing–annulus displacement process, the evolution of the cement–drilling fluid interface is governed by the competition between advective transport and diffusive smoothing. To quantify their relative dominance, the Péclet number ( P e ) is defined as
P e = U L D α
where U is a characteristic velocity, L is a characteristic length scale, and D α denotes the diffusion coefficient in the volume-fraction transport equation. In the present study, variations in P e are implemented by adjusting D α while keeping all geometric and hydrodynamic parameters fixed.
The convergence histories corresponding to different P e values are shown in Figure 19. As P e increases, the convergence process becomes more difficult, as reflected by a slower decay of the PDE loss and a higher stabilized residual level. In addition, the high- P e cases exhibit more noticeable oscillations during training, indicating reduced optimization stability.
This trend can be attributed to the increasing dominance of advection over diffusion at large Péclet numbers. Under such conditions, the governing equations tend to produce sharper gradients and more localized interface structures, which makes the solution more difficult for the neural network to approximate accurately over the entire computational domain. As a result, the training process becomes less stable and the residuals decay more slowly. By contrast, at lower Péclet numbers, the stronger diffusive effect smooths the solution field and reduces local stiffness, thereby improving convergence behavior. Although the introduced physics-guided auxiliary constraints help improve stability in strongly convective regions, the results indicate that high-Péclet-number cases remain more challenging for the present PINN framework.

6. Conclusions

This study develops and systematically validates a PINN framework for modeling cement–drilling fluid displacement in well cementing operations. Through numerical examples with different casing–annulus configurations, the principal findings can be summarized as follows.
(1)
A unified physics-informed neural network (PINN) framework is developed for modeling strongly coupled two-phase displacement flows governed by the Navier–Stokes–VOF system. The framework enables the simultaneous approximation of velocity, pressure, and phase distribution within a single continuous formulation, providing a mesh-free approach for complex geometrical configurations.
(2)
As an important component of the proposed framework, physics-guided auxiliary constraints are introduced to enhance convergence, stability, and physical consistency in convection-dominated and geometrically constrained regions. These constraints improve interface evolution and mitigate nonphysical distortions while preserving the dominance of governing equation residuals.
(3)
The proposed framework is systematically validated across multiple configurations, including parallel-plate channels, semicircular bends, and casing–annulus systems. The PINN predictions show strong agreement with ANSYS Fluent simulations in terms of interface morphology, flow structure, and displacement behavior. In the casing–annulus configuration, relative errors are generally below 5%, while the computational time is reduced by approximately 90% compared with the corresponding Fluent simulation.
(4)
Sensitivity analyses indicate that the bottom filet radius has a pronounced influence on PINN convergence characteristics. A larger filet radius smooths the geometric transition near the casing shoe, thereby reducing residual magnitudes and enhancing numerical stability during training. In contrast, high Péclet number conditions increase the difficulty of residual minimization, resulting in slower convergence and stronger loss oscillations in the PINN framework.
Overall, the study demonstrates that PINNs constitute a physically consistent and numerically robust computational paradigm for multiphase displacement in complex wellbore geometries. Nevertheless, it should be noted that the proposed framework still inherits some known limitations of PINNs for convection-dominated and interface-driven problems. In particular, as the interface becomes sharper or the nonlinearity increases, the approximation and optimization may become more challenging, which could affect convergence robustness. Although the introduced physics-guided auxiliary constraints improve stability in the representative cases considered in this study, their effectiveness under more extreme conditions requires further investigation. Future work may extend the methodology to fully three-dimensional configurations, non-Newtonian rheology, and thermo–hydro–mechanical coupling to further enhance its applicability to realistic cementing scenarios. In addition, systematic comparison with other PINN stabilization strategies, such as adaptive loss weighting, domain decomposition, and other problem-dependent treatments for stiff or interface-dominated systems [45,46,47,48], will be pursued to further evaluate and improve the robustness of the proposed framework.

Author Contributions

Conceptualization, F.L.; Methodology, D.W., J.W. and Z.G.; Software, J.W.; Validation, Q.S.; Formal analysis, J.W.; Investigation, R.X.; Resources, D.W. and F.L.; Data curation, Q.S.; Writing—original draft, D.W. and J.W.; Writing—review and editing, Q.S., R.X., Z.G. and F.L.; Supervision, F.L.; Funding acquisition, F.L. All authors have read and agreed to the published version of the manuscript.

Funding

This study is supported by National Natural Science Foundation of China (NSFC) (Grant No. 42577162), the Joint Fund of Zhejiang Provincial Natural Science Foundation of China. (Grant No. LGEZ25E090002) and Zhejiang Provincial Science and Technology Plan (Grant No. 2025E10118).

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

The authors would like to sincerely thank the anonymous reviewers for their insightful and constructive comments, which have been very helpful in improving the manuscript.

Conflicts of Interest

Dayang Wen was employed by China Oilfield Services Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Yang, M.; Che, S.; Zhao, P.; Liu, X.; Wang, L.; Zhang, H.; Chen, Y.; Li, J.; Wu, Z.; Xu, F.; et al. Optimizing cementing displacement efficiency using machine learning ensemble models: Application of Fluent simulation and optimization algorithms. Geoenergy Sci. Eng. 2025, 256, 214149. [Google Scholar] [CrossRef]
  2. Mohamed, A.; Salehi, S.; Ahmed, R. Significance and complications of drilling fluid rheology in geothermal drilling: A review. Geothermics 2021, 93, 102066. [Google Scholar] [CrossRef]
  3. Yang, M.; Song, Z.P.; Zhao, P.C.; Liu, S.; Wang, S.Y. Analysis of the influence of channeling in liner cementing on displacement efficiency. Fault-Block Oil Gas Field 2025, 32, 698–704. [Google Scholar]
  4. Berg, S.; Armstrong, R.T.; Rücker, M.; Hansen, A.; Kjelstrup, S.; Bedeaux, D. From interface dynamics to Darcy scale description of multiphase flow in porous media. Adv. Colloid Interface Sci. 2026, 351, 103791. [Google Scholar] [CrossRef] [PubMed]
  5. Kiuchi, S.; Nagatsu, Y.; Ban, T.; Mishra, M.; Suzuki, R.X. Experimental demonstration of enhanced displacement by phase separation in a two-dimensional milli-model in viscously unstable fluid displacement. Phys. Chem. Chem. Phys. 2026, 28, 3325–3335. [Google Scholar] [CrossRef]
  6. Suzuki, R.X.; Nagatsu, Y.; Ban, T.; Mishra, M.; Shimizu, R. Opposite effects of a reaction-driven viscosity decrease on miscible viscous fingering depending on the injection flow rate. J. Fluid Mech. 2024, 1001, A25. [Google Scholar] [CrossRef]
  7. Renteria, A.; Sarmadi, P.; Thompson, C.; Frigaard, I.A. Effects of wellbore irregularity on primary cementing of horizontal wells, part 1: Large scale effects. J. Pet. Sci. Eng. 2022, 208, 109581. [Google Scholar] [CrossRef]
  8. Zhang, R.; Frigaard, I.A. Primary cementing of vertical wells: Displacement and dispersion effects in narrow eccentric annuli. J. Fluid Mech. 2022, 947, A32. [Google Scholar] [CrossRef]
  9. Nasiri, A.; Valizadeh, M. An investigation and laboratory study on water loss and invasion depth of drilling fluid in the API standard and comparison with sand bed. J. Pet. Res. 2013, 23, 126–132. [Google Scholar] [CrossRef]
  10. Tardy, P.M.J.; Bittleston, S.H. A model for annular displacements of wellbore completion fluids involving casing movement. J. Pet. Sci. Eng. 2015, 126, 105–123. [Google Scholar] [CrossRef]
  11. Tardy, P.M.J. A 3D model for annular displacements of wellbore completion fluids with casing movement. J. Pet. Sci. Eng. 2018, 162, 114–136. [Google Scholar] [CrossRef]
  12. Lavrov, A.; Torsnæter, M. Physics and Mechanics of Primary Well Cementing; Springer: Cham, Switzerland, 2016; pp. 23–47, 78–92. [Google Scholar] [CrossRef]
  13. Peng, B. Simulation and optimization of cementing displacement efficiency in horizontal wells. Chem. Enterp. Manag. 2021, 92–95. [Google Scholar] [CrossRef]
  14. Song, L.; Teng, W.W.; Wang, X.Y.; Wang, X.G.; Zhong, S.M.; Xi, C.M.; Wei, K. Numerical simulation of cementing displacement process in irregular boreholes. Drill. Prod. Technol. 2020, 43, 27–29, 60, 2. [Google Scholar]
  15. Enayatpour, S.; van Oort, E. Advanced modeling of cement displacement complexities. In Proceedings of the SPE/IADC Drilling Conference and Exhibition, The Hague, The Netherlands, 14–16 March 2017; p. SPE-184702-MS. [Google Scholar] [CrossRef]
  16. Xu, Q.; Liang, Y.K.; Li, M.Z.; Wang, C.W.; Gao, J.W.; Wang, R.H. Study on the stability mechanism of cementing displacement interface under different casing eccentricity conditions. J. Hydrodyn. Ser. A 2018, 33, 314–321. [Google Scholar]
  17. Zhang, J.F.; Qinnan, X.X.; Gong, H.F.; Li, S.Y.; Li, W.; Liu, Y. Fractal characterization of variable-diameter annulus and its effect on cementing displacement efficiency. J. Northeast Pet. Univ. 2023, 47, 56–68, 9–10. [Google Scholar]
  18. Ma, Y.; Wang, H.Y.; Sun, Q.L.; Hou, L.F.; Zhang, Y.; Yang, H. Displacement efficiency of cementing in eccentric annulus with small clearance. China Pet. Mach. 2022, 50, 22–28. [Google Scholar] [CrossRef]
  19. Meng, M.; Miska, S.Z.; Yu, M.; Ozbayoglu, E.M. Fully coupled modeling of dynamic loading of the wellbore. SPE J. 2020, 25, 1462–1488. [Google Scholar] [CrossRef]
  20. Pang, D.H.; Chen, B.; Zhao, W.Q.; Zhao, S.W.; Yan, D.; Zheng, S.J. Numerical simulation for cementing displacement in horizontal well with high casing center degree. Miner. Explor. 2022, 13, 302–308. [Google Scholar] [CrossRef]
  21. Dai, H.; Eslami, A.; Schneider, J.; Liu, G.; Schwering, F. Modeling displacement flow inside a full-length casing string for well cementing. Pet. Res. 2024, 9, 1–16. [Google Scholar] [CrossRef]
  22. Yang, M.; Tang, D.Q.; Yuan, Z.T.; Zhang, J.; Xu, L.Q.; Chen, Y. A new model for evaluating cement slurry displacement efficiency. Nat. Gas Ind. 2019, 39, 115–122. [Google Scholar] [CrossRef]
  23. Kim, D.; Lee, J. A review of physics informed neural networks for multiscale analysis and inverse problems. Multiscale Sci. Eng. 2024, 1, 6. [Google Scholar] [CrossRef]
  24. Raissi, M.; Perdikaris, P.; Ahmadi, N.; Karniadakis, G.E. Physics-informed neural networks and extensions. arXiv 2024, arXiv:2408.16806. [Google Scholar] [CrossRef]
  25. Cai, S.; Mao, Z.; Wang, Z.; Yin, M.; Karniadakis, G.E. Physics-informed neural networks (PINNs) for fluid mechanics: A review. Acta Mech. Sin. 2021, 37, 1727–1738. [Google Scholar] [CrossRef]
  26. Wang, J.; Huang, L.; Liang, Y.; Wang, L.; Zhang, J. Transfer learning enhanced physics-informed neural network for buried pipeline deformation analysis under permanent ground deformation. Comput. Geotech. 2026, 189, 107630. [Google Scholar] [CrossRef]
  27. Cuomo, S.; Di Cola, V.S.; Giampaolo, F.; Rozza, G.; Raissi, M.; Piccialli, F. Scientific machine learning through physics-informed neural networks: Where we are and what’s next. J. Sci. Comput. 2022, 92, 88. [Google Scholar] [CrossRef]
  28. Raissi, M.; Perdikaris, P.; Karniadakis, G.E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 2019, 378, 686–707. [Google Scholar] [CrossRef]
  29. Zhao, C.; Zhang, F.; Lou, W.; Wang, X.; Yang, J. A comprehensive review of advances in physics-informed neural networks and their applications in complex fluid dynamics. Phys. Fluids 2024, 36, 101301. [Google Scholar] [CrossRef]
  30. Torres, F.A.; Negri, M.M.; Nagy-Huber, M.; Arend Torres, F.; Massimo Negri, M.; Nagy-Huber, M. Mesh-free Eulerian physics-informed neural networks. arXiv 2022, arXiv:2206.01545. [Google Scholar] [CrossRef]
  31. Fan, D.; Yang, C.; Sun, H.; Yao, J.; Zhang, L.; Jia, C.; Fu, S.; Sang, Q. A framework of parallel physics-informed neural network with Laplace transform for well testing interpretation. Phys. Fluids 2025, 37, 014114. [Google Scholar] [CrossRef]
  32. Nugroho, A.A.; Sutopo, S.; Ashat, A. Pressure prediction in two-phase geothermal well flow using physics informed neural network (PINN). In IOP Conference Series: Earth and Environmental Science; IOP Publishing: Bristol, UK, 2025; Volume 1456, p. 012008. [Google Scholar] [CrossRef]
  33. Walter, L.; Kong, Q.; Hanson-Hedgecock, S.; Wang, S.; Zhang, Y.; Chen, J. WellPINN: Accurate well representation for transient fluid pressure diffusion in subsurface reservoirs with physics-informed neural networks. arXiv 2025, arXiv:2507.09330. [Google Scholar] [CrossRef]
  34. Han, J.X.; Xue, L.; Wei, Y.S.; Zhang, K.; Wang, Y.; Chen, Z. Physics-informed neural network-based petroleum reservoir simulation with sparse data using domain decomposition. Pet. Sci. 2023, 20, 3450–3460. [Google Scholar] [CrossRef]
  35. Zhang, J.; Braga-Neto, U.; Gildin, E. Physics-informed neural networks for multiphase flow in porous media considering dual shocks and interphase solubility. Energy Fuels 2024, 38, 17781–17795. [Google Scholar] [CrossRef]
  36. Patel, P.; Yadav, S.R. Physics informed neural networks simulation of fingering instabilities arising during immiscible and miscible multiphase flow in oil recovery processes. Chaos 2025, 35, 073123. [Google Scholar] [CrossRef]
  37. Wang, C.; Guo, H.; Yan, X.; Shi, Z.L.; Yang, Y. Improved physics-informed neural networks for the reinterpreted discrete fracture model. J. Comput. Phys. 2025, 520, 113491. [Google Scholar] [CrossRef]
  38. Abbasi, J.; Moseley, B.; Kurotori, T.; Jagtap, A.D.; Kovscek, A.R.; Hiorth, A.; Andersen, P.Ø. History-matching of imbibition flow in fractured porous media using physics-informed neural networks (PINNs). Comput. Methods Appl. Mech. Eng. 2025, 437, 117784. [Google Scholar] [CrossRef]
  39. Ji, L.; Botao, L.; Siyuan, C.; Han, M. A physics informed neural network for predicting proppant transport in hydraulic fracture. In Proceedings of the International Geomechanics Conference; ARMA: Kuala Lumpur, Malaysia, 2024; p. ARMA-IGS-2024-0390. [Google Scholar] [CrossRef]
  40. Ishitsuka, K.; Lin, W. Physics-informed neural network for inverse modeling of natural-state geothermal systems. Appl. Energy 2023, 337, 120855. [Google Scholar] [CrossRef]
  41. Klawonn, A.; Lanser, M.; Weber, J. Machine learning and domain decomposition methods—A survey. Comput. Sci. Eng. 2024, 1, 2. [Google Scholar] [CrossRef]
  42. Abbasi, J.; Jagtap, A.D.; Moseley, B.; Mowlavi, S.; Karniadakis, G.E. Challenges and advancements in modeling shock fronts with physics-informed neural networks: A review and benchmarking study. Neurocomputing 2025, 657, 131440. [Google Scholar] [CrossRef]
  43. Mullins, M.; Kamil, H.; Fahsi, A.; Soulaïmani, A. Physics-informed neural networks for solving moving interface flow problems using the level set approach. Phys. Fluids 2025, 37, 107124. [Google Scholar] [CrossRef]
  44. Imankulov, T.; Kuljabekov, A.; Bekele, S.D.; Akhmadi, I.; Kassenov, A. A systematic analysis of physics-informed neural networks for two-phase flow with capillarity: The Muskat–Leverett problem. Appl. Sci. 2025, 15, 13011. [Google Scholar] [CrossRef]
  45. Xiang, Z.; Peng, W.; Liu, X.; Yao, W. Self-adaptive loss balanced physics-informed neural networks. Neurocomputing 2022, 496, 11–34. [Google Scholar] [CrossRef]
  46. Li, S.; Feng, X.; Yu, Y.; Wang, C. Dynamic weight strategy of physics-informed neural networks for the Navier–Stokes equations. Entropy 2022, 24, 1254. [Google Scholar] [CrossRef]
  47. Jagtap, A.D.; Karniadakis, G.E. Extended physics-informed neural networks (XPINNs): A generalized space-time domain decomposition framework. Commun. Comput. Phys. 2020, 28, 2002–2041. [Google Scholar] [CrossRef]
  48. Kharazmi, E.; Zhang, Z.; Karniadakis, G.E. hp-VPINNs: Variational physics-informed neural networks with domain decomposition. Comput. Methods Appl. Mech. Eng. 2020, 374, 113547. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of DNN architecture.
Figure 1. Schematic diagram of DNN architecture.
Mathematics 14 01362 g001
Figure 2. Schematic diagram of the transient Couette flow configuration.
Figure 2. Schematic diagram of the transient Couette flow configuration.
Mathematics 14 01362 g002
Figure 3. Transient velocity profiles for Couette flow predicted by the PINN.
Figure 3. Transient velocity profiles for Couette flow predicted by the PINN.
Mathematics 14 01362 g003
Figure 4. Evolution of total and component losses during training.
Figure 4. Evolution of total and component losses during training.
Mathematics 14 01362 g004
Figure 5. Schematic diagram of the Poiseuille flow configuration.
Figure 5. Schematic diagram of the Poiseuille flow configuration.
Mathematics 14 01362 g005
Figure 6. Transient velocity profiles for Poiseuille flow predicted by the PINN.
Figure 6. Transient velocity profiles for Poiseuille flow predicted by the PINN.
Mathematics 14 01362 g006
Figure 7. Evolution of total and component losses during training.
Figure 7. Evolution of total and component losses during training.
Mathematics 14 01362 g007
Figure 8. Schematic of two-phase displacement between parallel plates.
Figure 8. Schematic of two-phase displacement between parallel plates.
Mathematics 14 01362 g008
Figure 9. Evolution of the training loss for the parallel-plate two-phase displacement case.
Figure 9. Evolution of the training loss for the parallel-plate two-phase displacement case.
Mathematics 14 01362 g009
Figure 10. Comparison of u , α , p , and v fields predicted by PINNs and Fluent at t = 3 s.
Figure 10. Comparison of u , α , p , and v fields predicted by PINNs and Fluent at t = 3 s.
Mathematics 14 01362 g010
Figure 11. Schematic of two-phase displacement in a semicircular bend.
Figure 11. Schematic of two-phase displacement in a semicircular bend.
Mathematics 14 01362 g011
Figure 12. Evolution of the training loss for the semicircular-bend two-phase displacement case.
Figure 12. Evolution of the training loss for the semicircular-bend two-phase displacement case.
Mathematics 14 01362 g012
Figure 13. Comparison of α , p , v , u fields predicted by PINNs and Fluent at t = 8 s.
Figure 13. Comparison of α , p , v , u fields predicted by PINNs and Fluent at t = 8 s.
Mathematics 14 01362 g013
Figure 14. Schematic of the axisymmetric casing–annulus geometry for slurry–drilling fluid displacement.
Figure 14. Schematic of the axisymmetric casing–annulus geometry for slurry–drilling fluid displacement.
Mathematics 14 01362 g014
Figure 15. Evolution of the training loss for the casing–annulus case.
Figure 15. Evolution of the training loss for the casing–annulus case.
Mathematics 14 01362 g015
Figure 16. Evolution of the α field predicted by PINNs and Fluent at different times.
Figure 16. Evolution of the α field predicted by PINNs and Fluent at different times.
Mathematics 14 01362 g016
Figure 17. PINNs predictions of different fields at t = 5 s: (a) p , (b) u , and (c) v .
Figure 17. PINNs predictions of different fields at t = 5 s: (a) p , (b) u , and (c) v .
Mathematics 14 01362 g017
Figure 18. Evolution of PDE loss under different R f .
Figure 18. Evolution of PDE loss under different R f .
Mathematics 14 01362 g018
Figure 19. Evolution of training loss under different P e .
Figure 19. Evolution of training loss under different P e .
Mathematics 14 01362 g019
Table 1. PINN configuration for the transient Couette flow benchmark.
Table 1. PINN configuration for the transient Couette flow benchmark.
ParameterValue
H ,   U ,   v ,   τ 1.0, 1.0, 0.1, 0.1
Hidden layers, Neurons per layer, Activation3, 64, Tanh
Inputs, Output, Optimizer, Learning rate, Epochs y , t ,   u y , t , Adam, 5 × 10−4, 30,000
N f ,   N i c ,   N b c 3000, 500, 500
Table 2. PINN configuration for the Poiseuille flow benchmark.
Table 2. PINN configuration for the Poiseuille flow benchmark.
ParameterValue
R ,   μ ,   ρ ,   d p / d z m a x ,   τ 1.0, 1.0, 1.0, −1.0, 0.1
Hidden layers, Neurons per layer, Activation3, 64, Tanh
Inputs, Output, Optimizer, Learning rate, Epochs r , t ,   u r , t , Adam, 1 × 10−4, 10,000
N f ,   N i c ,   N b c 3000, 500, 500
Table 3. PINN configuration for the two-phase displacement between parallel plates.
Table 3. PINN configuration for the two-phase displacement between parallel plates.
ParameterValue
Domain size; Time interval x [ 0,2.0 ] m ,   y [ 0,0.3 ] m ;   t [ 0,15.0 ] s
μ ,   ρ water   ,   ρ slurry   0.1, 1.0, 1.5
Hidden layers, Neurons per layer, Activation, Output constraint4, 64, Tanh, S i g m o i d ( α )
Inputs, Outputs, Optimizer, Learning rate, Epochs ( x , y , t ) ,   ( u , v , p , α ) , Adam, 2 × 10−4, 30,000
N f ,   N b ,   N 0 2000, 400, 400
Boundary: Inlet, Outlet, Walls p = p i n ( t ) ,   α = 1 ;   p = 0 ;   u = v = 0
Table 4. PINN configuration for the semicircular-bend two-phase displacement case.
Table 4. PINN configuration for the semicircular-bend two-phase displacement case.
ParameterValue
R c ,   D ,   t m a x ,   p m a x 1.0, 0.30, 20.0, 10.0
μ ,   ρ water   ,   ρ slurry 0.1, 1.0, 1.5
Hidden layers, Neurons per layer, Activation4, 64, Tanh
N f ,   N b ,   N 0 2500, 600, 600
Optimizer, Learning rate, EpochsAdam, 2 × 10−4, 30,000
Boundary: Inlet, Outlet, Walls p = p i n ( t ) ,   α = 1 ;   p = 0 ;   u = v = 0
Table 5. PINN configuration for the casing–annulus cement–drilling fluid displacement case.
Table 5. PINN configuration for the casing–annulus cement–drilling fluid displacement case.
ParameterValue
R w ,   R c ,   d ,   h ,   h b ,   R f 1.00, 0.45, 0.10, 0.45, 0.25, 0.05
t m a x ,   p m a x ,   t r a m p 20.0, 10.0, 1.0
μ ,   ρ d r i l l i n g ,   ρ s l u r r y ,   D α 0.1, 1.0, 1.5, 1.0 × 10−3
Hidden layers, Neurons per layer, Activation4, 80, Tanh
N f ,   N b ,   N 0 2200, 800, 800
Optimizer, Learning rate, EpochsAdam, 2 × 10−4, 30,000
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wen, D.; Wang, J.; Song, Q.; Xu, R.; Guo, Z.; Liu, F. Performance of PINN Framework for Two-Phase Displacement in Complex Casing–Annulus Geometries. Mathematics 2026, 14, 1362. https://doi.org/10.3390/math14081362

AMA Style

Wen D, Wang J, Song Q, Xu R, Guo Z, Liu F. Performance of PINN Framework for Two-Phase Displacement in Complex Casing–Annulus Geometries. Mathematics. 2026; 14(8):1362. https://doi.org/10.3390/math14081362

Chicago/Turabian Style

Wen, Dayang, Junduo Wang, Qi Song, Rui Xu, Zixin Guo, and Fushen Liu. 2026. "Performance of PINN Framework for Two-Phase Displacement in Complex Casing–Annulus Geometries" Mathematics 14, no. 8: 1362. https://doi.org/10.3390/math14081362

APA Style

Wen, D., Wang, J., Song, Q., Xu, R., Guo, Z., & Liu, F. (2026). Performance of PINN Framework for Two-Phase Displacement in Complex Casing–Annulus Geometries. Mathematics, 14(8), 1362. https://doi.org/10.3390/math14081362

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop