Abstract
We present a framework for integrated experiments and simulations of tracer transport in heterogeneous porous media using digital twin technology. The physical asset in our setup is a meter-scale FluidFlower rig. The digital twin consists of a traditional physics-based forward simulation tool and a correction technique which compensates for mismatches between simulation results and observations. The latter augments the range of the physics-based simulation and allows us to bridge the gap between simulation and experiments in a quantitative sense. We describe the setup of the physical and digital twin, including data transfer protocols using cloud technology. The accuracy of the digital twin is demonstrated on a case with artificially high diffusion that must be compensated by the correction approach, as well as by simulations in geologically complex media. The digital twin is then applied to control tracer transport by manipulating fluid injection and production in the experimental rig, thereby enabling two-way coupling between the physical and digital twins.
Similar content being viewed by others
Explore related subjects
Find the latest articles, discoveries, and news in related topics.Avoid common mistakes on your manuscript.
1 Introduction
Insight into dynamic processes in porous media has traditionally been reached by direct observations and measurements of the processes combined with analysis and simulations of physics-based models (PBMs). Continuous improvements in sensors and imaging give increased access to data of high quality and resolution. In parallel, the field of data science, including data-driven modeling (DDM), artificial intelligence, and machine learning, has emerged as an alternative modeling approach that utilizes real-time data and thus offers a complement to the physics-based models. This calls for a hybrid approach, herein denoted Hybrid Analysis and Modeling (HAM), where data are integrated into physics-based models in real-time using techniques from data science, enabling enhanced simulation accuracy and ultimately improved decision-making in operational contexts. Such enhanced models with tight integration between simulation models and the physical asset (the porous media) can be formalized trough the concept of digital twins (Rasheed et al. 2020). The purpose of this work is to present a digital twin which can access high-quality data from a porous medium laboratory experiment, integrate this data into a physics-based simulation model in real time, and use the digital twin to guide decisions on the operation of the physical asset.
Porous media-related data streams are undergoing a transformation with increased use of sensors and emerging imaging modalities. A range of imaging technologies provides data streams of high spatial and temporal resolution, which can be used to gain access to local fluid flows within the opaque porous media (Fernø et al. 2015; Brattekås et al. 2020). Recent focus on sub-Darcy-scale displacement processes utilizes \(\upmu\)CT (Berg et al. 2013) and microfluidics (Gauteplass et al. 2015) to study pore-scale phenomena for a wide range of flow processes. The growing access to data is not limited to laboratory experiments: Field-scale operations also increasingly rely on real-time monitoring of important processes, and regulations call for frequent seismic monitoring of carbon sequestration projects for prolonged time series (Arts et al. 2004). The amount of data generated can be substantial, with time-lapsed 3D or multimodal microscopic image sequences frequently generating several TB per experiment (Benali et al. 2022). This calls for efficient approaches to incorporating data into analysis frameworks that can be used to harness physical insights contained therein.
One such framework is modeling and simulation based on physics-based models, which has a long tradition in porous media applications (Aziz and Settari 1979; Chen et al. 2006; Helmig 1997). The foundations of physics-based models, with a combination of fundamental physics, e.g., conservation or energy minimization principles, and constitutive laws, make them strong candidates for systematic studies and analysis of physical processes. Data can be incorporated into simulation models in several ways, including long-loop parameter tuning where simulation models and setups are tweaked to honor observations (Williams et al. 1998), and more continuous data assimilation methods which are popular in subsurface applications (Oliver and Chen 2011; Caers 2011). Following trends in data science, data-driven models for porous media have recently been introduced, see, for instance, Ren et al. 2019; Kiaerr et al. 2020; Lie and Krogstad 2022. Compared to physics-based models, these data-driven models are computationally highly efficient, but not being based on physical principles, their use in interpreting physical phenomena is not straightforward.
When used as a supplement, or substitute, for representing dynamics in a concrete physical asset (e.g., a porous medium), a simulation model can be interpreted as a digital twin of said asset. The digital-twin concept has been around for decades, overviews of applications to porous media can be found in Wanasinghe et al. 2020; Sircar et al. 2022, while specific use cases include Kannapinn et al. 2022; Xiao et al. 2021; Ali et al. 2020. The concept is very wide, in a sense, any simulation model that aims to represent a specific porous media can be considered a digital twin. It is, therefore, relevant to classify digital twins in terms of their level of sophistication and hence their ability to represent the status of, and inform decisions relating to, the physical asset. As is illustrated by the classification shown in Fig. 1, this capacity can vary significantly.
Increasing levels of capability for a digital twin. The capacity ranges from standalone, where the digital twin has no connection to the physical world, to fully autonomous, where the digital twin can control the physical twin without human intervention. Adapted from San et al. (2021)
A critical component for enabling the higher capability levels is the digital twin’s ability to self-correct when provided with data that are incompatible with the current digital representation. In a sense, this is one goal of data assimilation and history matching techniques applied, e.g., in subsurface engineering. These techniques are, however, based on an assumption that all relevant physical processes are included in the governing equations and adequately represented in the discretized simulation model. If this is not the case, and it is often impossible to verify, the unresolved processes can only be represented by proxy.
Hybrid Analysis and Modeling (HAM) offers an alternative version of self-correcting digital twins, which can account for mis- or underrepresented physics due to both poor parameter values and under-resolved physical processes. The COrrective Source-Term Approach (COSTA) (Blakseth et al. 2022), which falls under the HAM umbrella, employs an artificial neural network, trained on time series of combined observation and simulation data, to correct and enhance simulation results. This allows for the systematic inclusion of observations into a real-time simulation workflow and the use of these observation to enhance the predictive accuracy of the simulations.
Herein, we describe the setup of a digital twin for fluid flow and tracer transport in a porous medium. The physical asset is a FluidFlower rig, which is essentially two-dimensional and provides a data-rich environment through imaging and advanced image processing. The digital twin consists of a COSTA-enhanced physics-based model, and the physical asset and digital twin are coupled using cloud technology. Our contributions in this work can be summarized as follows:
-
We probe the ability of the digital twin to reproduce results from experiments without any feedback, thereby realizing a one-way coupling from the physical asset to the digital twin.
-
We verify the ability of a data-driven model to correct unresolved and erroneous physics in a physics-based model. Moreover, we present results for geologically complex media.
-
We demonstrate two-way real-time communication between the physical asset and its digital twin, by considering an experiment in a meter-scale flow rig. In this case, we couple the digital twin to an optimization framework wherein well controls in the physical asset are manipulated to steer the migration of the tracer plume, thus demonstrating the prescriptive capabilities of the digital twin.
As a result, the results presented herein demonstrate the feasibility of achieving level 4, autonomy (in the context of the classification scheme cited in Fig. 1). To the best of our knowledge, no digital twin with similar capabilities has previously been presented for porous media.
The rest of the article is structured as follows: Sect. 2 explains the different components that build up the experimental setup and the digital twin. In Sect. 3, we present examples of one-way couplings from the physical to the digital twin, designed to probe the accuracy of the digital twin, while an example of a two-way coupling is shown in Sect. 4. Finally, in Sect. 5, conclusions are given and potential future work is presented.
2 Components of the PoroTwin Framework
Here, we present the components that together make up the digital twin framework, termed PoroTwin: the physical asset, the digital twin, and the communication protocols that enable data exchange between the components. The latter entails both flow of information and data postprocessing, for example, image processing. To indicate how the components are coupled together, Fig. 2 shows processes and information flows in the context of controlled injection of a tracer, as is studied in Sect. 4.
The components of the physical and digital twins assembled for the optimization experiment presented in Sect. 4. Data from the physical asset are filtered through image processing and sent to an optimization controller. This runs an optimization loop, consisting of forward simulation followed by a HAM correction, and the optimized well rates are then fed to the physical asset
. While the workflow as described below is to some extent tailored for the context of our physical asset and the experiments presented in the results sections, the framework can also be adapted to other data-rich settings. These are for the moment limited to laboratory experiments as any application to subsurface flows will entail dealing with lower quality and less frequent data. The digital twin can be employed for other purposes than optimization by modifying the central hub, while the other components remain relatively unchanged. This opens the door for considering risk assessment, ‘what if?’ analysis, uncertainty quantification, and process optimization. Furthermore, the digital twin can also be generalized to a set of digital siblings, i.e., a set of different physics-based simulators (Rasheed et al. 2020).
2.1 The Physical Asset
Here, we describe the physical asset in our setup, together with the data streams used in our experiments.
2.1.1 The FluidFlower Rig
The FluidFlower enables meter-scale multiphase quasi two-dimensional flow experiments on model geological geometries with unprecedented data acquisition and repeatability. The design allows for repeated injection tests with near identical initial conditions, allowing physical uncertainty and variability to be addressed using the same geological geometry. This also enables well-confined sensitivity studies to evaluate large parameter spaces because each parameter may be varied while keeping others constant. The model geological geometry is constructed using unconsolidated sands and held in place between an optically transparent front panel and a technical back panel. The back panel has perforations that enable a range of well configurations (injector, producer, monitoring, or plugged) for porous media flow studies. The optical access of the front panel facilities detailed investigation of flow processes through a high-resolution camera combined with a tracer.
FluidFlower rigs of two different sizes are employed in this study: A small rig with an extent of slightly less than a meter is considered in the experiments reported in Sects. 3.1 and 4, while a larger rig was used for the experiments reported in Sect. 3.2. For all experiments, a passive tracer is used to focus on the effect of well operation and, for the experiments reported in Sect. 3.2, how the flow is influenced by local geological features such as faults and multi-scale heterogeneity. Further details on the rig and the experimental setups are given in Sect. 3.
Two types of data from the FluidFlower are made available to our digital twin: In addition to injection and production rates, the migration of the injected tracer is monitored using imaging as detailed next.
2.1.2 Image Processing
The measurement instrument in the considered workflow is the combination of photographs taken of the physical asset and image processing. High-quality, high-resolution images provide dense data with low noise-to-signal ratio, as well as they resolve the medium up to sand grains. This high amount of details is beneficial in the further process. The high resolution, on the other hand, also provides a challenge, as it is important to emphasize that in the context of autonomous digital twins, all image processing must be fully automatic and real-time. As a whole, the role of the image analysis in this work is, in contrast with its typical applications, more a signal-to-data conversion and less a tool for noise reduction. With that it is also the mediator of data from the physical to the digital twin.
To convert a series of images of the conducted tracer experiments to spatio-temporal tracer concentration maps, the following steps are performed. First, a set of preprocessing routines is applied, including aligning all images with respect to a fixed point based on feature detection, cropping to a region of interest, and transforming the color spectrum such that the recorded colors of an attached color palette match a set of reference colors. Applying these to all images ensures a unified set of images. Next, to extract the tracer, the sand grains are removed by considering differences of images, using a baseline image taken before the start of the injection. Here, the high quality of images comes into play. The removal of sand grains can be viewed as nearly noise free; yet, it leaves areas with little to no signal. We choose to apply total variation denoising (Rudin et al. 1992) as a combined tool for inpainting low-data regions (i.e., sand grains) and simultaneous denoising. Converting the images to a monochromatic color space provides scalar data in the interval [0, 1]. The choice of the monochromatic color depends on the used tracer; here, grayscale images are considered suitable. Finally, a globally constant rescaling and clipping value at 1 is applied to convert the scalar signal to actual volumetric tracer concentration data. For this, a time series of images taken of a representative flow experiment with known injection rate is used for calibration. The final scaling parameter is obtained as the result of a RANSAC algorithm (Fischler and Bolles 1981), aiming at matching the effective injection rate for the rescaled images, while excluding outliers. The result of the image processing is illustrated in Fig. 3.
Special care has to be applied in the context of heterogeneous media, as considered in Sect. 3.2. As luminous emittance highly depends on the underlying material, the recorded signal becomes discontinuous over interfaces of different materials. Assuming piecewise homogeneous materials, materialwise constant scaling is applied, with values minimizing the signal jumps over interfaces in a least-squares fashion. Again, calibration is applied based on a representative set of images.
For the implementation of the image processing, DarSIA (short for Darcy-Scale Image Analysis toolbox) (Nordbotten et al. 2023) is used, which is an open-source tool specifically developed for analyzing high-resolution images of porous media flow experiments, with integrated capabilities for converting data to continuum/Darcy scale. It includes both preprocessing routines as well as analysis tools for concentration- and deformation-based scenarios.
2.2 The Digital Twin
The digital twin in our setup combines traditional components of physics-based modeling and data-driven modeling in a hybrid analysis and modeling context as elaborated in the following section.
2.2.1 Physics-Based Model
The fluid flow in the porous medium is modeled as incompressible and single-phase and is governed by
Here, \({\textbf{q}}\) is the Darcy flux, K is the hydraulic conductivity, p is fluid potential, and f represents volumetric source and sink terms. The transport of a passive tracer is given as follows:
where \(\varphi\) denotes porosity, c is the tracer concentration, t represents time, and \(f_c\) is tracer sinks and sources.
The above model ignores gravitational effects caused by minor density differences between water and the tracer, which may have an impact in the longer simulations presented in Sect. 3.2. Moreover, we model the FluidFlower as two-dimensional and thus ignore variations in the (thin) third dimension.
To solve Eqs. (1)–(3) in the forward simulator of the digital twin, we consider two different numerical tools: The toolbox IFEM is used for the experiments in homogeneous porous media presented in Sects. 3.1 and 4. IFEM is an open-source object-oriented toolbox for implementing isogeometric finite element solvers for linear and nonlinear partial differential equations (Kvamsdal et al. 2022). For the simulations in the geologically complex medium reported in Sect. 3.2, we employ finite volume methods as implemented in the open-source tool PorePy (Keilegavlen et al. 2021).
2.2.2 Corrective Source-Term Approach
The COrrective Source-Term Approach (COSTA) is a methodology for combining the prediction from the physics-based simulator with data, in this case concentration maps from analyzed images, from the physical asset. COSTA is designed to operate solely on source terms, while keeping the simulation model intact. In this section, we motivate the formulation of COSTA by considering a hypothetical setting where the true solution, in our setting the image data obtained through the analysis described in Sect. 2.1.2, is available. In practice, the purpose of the physics-based model, thus of the COSTA correction, is to predict an unknown future state based on information of the current state of the system. To that end, a practical implementation of COSTA is described in Sect. 2.2.3.
Let us represent the physics-based model as a (in this context linear) operator \({\mathcal {L}}\) over a domain \(\Omega\) as
Using the above operator, Eq. (3 ) reads
where \({\tilde{c}}\) represents the solution obtained by the physics-based model, which here is assumed to contain deviations from the true solution c (in our case, the image data) due to errors in the right hand side \({\tilde{f}}_c\).
It is instructive to consider potential sources of errors in the solution obtained from the physics-based model compared to a (hypothetical) solution operator for the continuous problem Eqs. (1)–(3). The solution obtained from the physics-based model may carry the effect of incorrect parameters (e.g., the hydraulic conductivity K), poor modeling assumptions (e.g., neglecting three-dimensional effects), and numerical errors. In addition, the physics-based model may be assigned an incorrect source term, in our case corresponding to mismatches between prescribed and actual injection and production rates. All these cases can be treated by adding a correction term r to Eq. (5) and define the COSTA solution as
In practice, the correction term will be identified by the DDM; however, in the hypothetical case where it is known exactly, we see that the COSTA solution is consistent with the true solution whenever the correction term corresponds to the residual error \(r={{\mathcal {L}}}c - {\tilde{f}}_c\):
For more information on COSTA and its treatment of different sources of errors, see Blakseth et al. (2022).
2.2.3 COSTA Implementation as a Data-Driven Model
Having motivated the COSTA correction term, we next turn to its practical implementation where the true solution c is not known. Specifically, to apply COSTA to the problem of tracer migration, the task is to compute \(c_{\textsc {costa}}^{n+1}\) from a known state \(c^{n}\) and a prediction \({\tilde{c}}^{n+1}\) obtained by the physics-based model. Our aim is to use the digital twin to predict the future state of the physical asset in an application setting where \(c^{n+1}\) is unavailable; thus, the exact residual \(r^{n+1} = \mathcal {L}( c^{n+1} - {\tilde{c}}^{n+1})\) cannot be computed.
The COSTA approach relies on the availability of historical time series as training data to construct a data-driven model that approximates \(r^{n+1}\) by
to the source term and apply these in Eq. (6) so that this reads
The approximation \(\sigma ^{n+1}\) is implemented by training a deep convolutional neural network on data generated from time series of tracer migration: For each snapshot of the tracer, the physics-based model is invoked to predict the tracer distribution at the time of the next snapshot, and this is compared with the actual tracer distribution to compute a residual. Using this training data, the data-driven model is constructed to correct for errors in the physics-based model, with the intention that the correction terms should be accurate also for the tracer profiles encountered in the application phase.
The convolutional neural network used in the current work is depicted in Fig. 4 and can be expressed as follows:
In our case, the data \({\textbf{X}}\) are the predicted tracer profile \({\tilde{c}}^{n+1}\), and \(\hat{\textbf{y}}\) is \(\sigma ^{n+1}\). The layers in the neural network, denoted \({\varvec{\Phi }}_{\textbf{i}}\), may represent different operations, including convolution, activation, and/or maxpooling. As an illustration, in Fig. 4, the input data represented by a matrix \({\textbf{X}}\) of dimension \(M\times N\) are subjected to 5 convolution operations (filter dimension \(5\times 5\)) followed by 5 max-pooling (filter dimension \(2\times 2\)) operations. After that follows a number of pure \(5 \times 5\) convolution operations, without max-pooling. Finally, two dense layers consisting of 100 nodes each are utilized. Within these dense layers, known parameters such as pump settings are concatenated. The output layer (not shown in the figure) is of the same size and shape as the input. The precise number of layers used in each operation varies and is clarified in the text as necessary.
The activation function used in this work is ReLU. Since this is a regression problem, the mean-squared error (MSE) was utilized as a loss function to be minimized. The loss for the training batch \(\mathcal B\) given weights and biases \(\varvec{\theta }\) is then
where \(({\textbf{x}}_k, {\textbf{y}}_k)\) is the kth pair in the dataset \({\mathcal {D}}\). For more detailed explanation of the CNN, we refer to Goodfellow et al. (2016). The neural network was implemented using the tensorflow library (Abadi et al. 2015).
2.3 Information Flow and Communication Protocols
In addition to the physical and digital twin, our framework also constitutes a central hub which controls the action of the physical and digital assets. Communication between the components is implemented using an Internet-of-Things (IoT) model, with two types of agents and modes of communication:
-
devices or servers, which can emit one-to-many messages and respond to one-to-one queries from clients, and
-
clients, which can listen to one-to-many messages from devices, and make one-to-one requests.
The physical and digital assets are made available to the IoT network as devices. Other components of the system may optionally be published as IoT devices as well, such as the physics-based and data-driven models. The central hub is implemented as a client. A typical purely predictive data flow may look like this:
-
1.
The physical asset emits a one-to-many message notifying listeners of a new system state.
-
2.
The hub receives it and queries the physics-based model, using a one-to-one request, for a prediction from (5).
-
3.
The hub in turn queries the data-driven model for a correction, using (8).
-
4.
The hub queries the physics-based model again for a corrected prediction from (9).
-
5.
The hub emits a suitably accurate future prediction to the digital asset.
In a correction setting, the hub may instead make multiple queries for different control parameters (e.g., well rates) and finally respond back to the physics-based model with updated and optimal settings. In Sect. 4, we present a case where the hub employs the digital twin in an optimization framework to steer tracer migration in the physical asset, with a workflow illustrated in Fig. 2.
The IoT model was realized using Microsoft Azure’s IoT hub resources with cloud-based communication. Due to technical limitations with the pump-controlling software, the well controls in the physical twin could not be readily automatized, so the control messages are, therefore, communicated by audio. The communication framework is implemented as open-source software and available at Fonn et al. (2022).
3 Accuracy of the Digital Twin
To establish the accuracy of the digital twin, including both the forward simulator and its COSTA enhancement, we performed two sets of simulations. The first probed COSTA’s ability to compensate for unresolved physics, specifically to correct an artificially high numerical diffusion. The second considered simulations in a medium of complex geometry.
3.1 Performance of COSTA
We first considered simulations of tracer injection into a medium with homogeneous hydraulic conductivity. The numerical setup, using IFEM, was defined so that the physics-based model had unusually (and artificially) high numerical diffusion thus the predicted tracer profiles were overly diffusive. A COSTA module was trained to compensate for this deficiency. In addition to the known errors caused by high diffusion, there may have been other sources of errors as noted in Sect. 2.2.2, but these could not be measured nor distinguished from the diffusion-related errors.
The physical setup, used both for this experiment and in the experiment reported in Sect. 4, was as follows: The flow rig had dimensions \(0.934 \,\textrm{m} \times 0.562 \,\textrm{m}\) in the x- and z-directions, respectively. The extent in the y-direction was \(0.010 \,\textrm{m}\), but for simulation purposes, the rig was considered a two-dimensional medium. In total, five wells were utilized in the flow experiments. One of these, termed Producer, was reserved for production while the others could be used for injection of tracer and water. These wells are called, respectively, Injector and Control 1 through 3, reflecting their role in the experiment reported in Sect. 4. The locations of the wells are given in Table 1.
For a given tracer distribution, the evolution of the tracer plume depends on the rates of injection and production in the wells. To train the artificial neural network underlying our implementation of COSTA, we collected tracer profiles from a range of experiments in the physical twin, injecting tracer in the different wells. The resulting time series of tracer profiles, all taken 30 s apart, together with time series of the injection rates, were used to train COSTA following the protocol described in Sects. 2.2–2.3. The neural network for this case was modeled according to the framework of Fig. 4, with five combined convolution and max-pooling layers, no pure convolution layers, and three pure linear layers.
The effect of the COSTA correction is illustrated for two different timesteps, thus different tracer profiles, in Figs. 5 and 6. We observe that while the prediction quality for the tracer profile was poor due to to the artificially high diffusion, the corrected solution is remarkably similar to the actual state. Minor discrepancies can still be observed near the outer boundary of the predicted tracer profile, where COSTA failed to fully correct for the overly diffused profile, as well as in a region near the injection point, where the concentration reached a plateau of value 1. Nevertheless, keeping in mind that the error in the predicted state was artificially large, the improvement in the simulation result from COSTA is notable.
COSTA results at 10 min. At the top is the true experimental concentration field 30 s into the future. In the middle, we see the predicted concentration field with pure IFEM (left) and the logarithmic error (right). At the bottom is the corrected COSTA prediction (left) and its logarithmic error (right)
COSTA results at 30 min. See Fig. 5 for explanation
3.2 Performance in Heterogeneous Medium
As a second test of the digital twin, we considered simulation of tracer injection into a domain with a complex hydraulic conductivity distribution. Specifically, we considered the geometry of the benchmarking exercise defined in Nordbotten et al. (2022) and aimed to mimic the results of the well test by tracer injection, which was part of the benchmark description.
In this case, the porous medium had a size of \({2.8}{\,\hbox {m}} \times {1.5}{\,\hbox {m}}\). and was built from sands with different grain sizes, which translate into a hydraulic conductivity field that spanned 2–3 orders of magnitude. The spatial distribution of the hydraulic conductivity field is visualized in Fig. 7, together with the location of the two injection wells used in the tracer test. To account for the variable depth of this FluidFlower rig, see Nordbotten et al. (2022), the parameter fields were rescaled with depth variations incorporated into the cell volumes and hydraulic conductivity, so that a two-dimensional simulation model could be applied.
Tracer was injected in the two wells following the injection schedule described in Nordbotten et al. (2022). In short, with a total duration of 27.5 h, tracer (partially alternating with water) was injected in pulses of 30 min with longer breaks varying from 30 min to 14.5 h; the final tracer distribution is displayed in Fig. 7a. Images were taken every 5 min providing the input data for the image analysis, which returned continuous concentration maps as described in Sect. 2.1.2. While the physics-based model assumes a perfectly passive tracer, in reality, the tracer has a density slightly larger than water. During the longest injection break, notable displacement of the tracer can be observed in the physical experiment. Thus, buoyancy effects play a role which are not accounted for in the governing equations underlying the physics-based model.
A data-driven COSTA model was trained to correct single-timestep errors in this physics-based model. The model was built with two downscaling convolution layers, five pure convolution layers followed by five dense linear ‘bottleneck’ layers. In addition to the pure image inputs from the physical asset, the data-driven model was also provided with the exact injection schedule as additional input to the dense layers. See Fig. 4 for details.
The physics-based model was able to predict the next image with approximately 1% relative error, with the exception of five distinct time intervals within the 1–6 h range after the start of injection, see Fig. 8. Although some modeling error must be accountable for this effect, using COSTA we were able to correct the predictions in these intervals to match the background noise error levels. See Fig. 9 for spatial error distributions at two selected timesteps.
Although COSTA was trained to correct for single-timestep errors, i.e., errors accrued by a single application of a timestepping routine given the true concentration image as input, it is still of interest to analyze the ability of COSTA to correct for errors over longer timestepping sequences, that is, with less frequent access to true concentration data. In this case, we used corrected predictions from the previous timestep as input to the next timestep. COSTA was thus exposed to data it had not been trained for. The results are shown in Fig. 10. This figure shows the accumulated errors for long sequences of timesteps from a single starting point (at 1 h and 6 min into the experiment) for both the pure PBM and the COSTA-corrected timestepper.
Accumulated time errors for the corrected and uncorrected timestepping, beginning at 1 h and 6 min after start and then predicting many timesteps into the future. The green line shows the error accumulated by a pure PBM predictor, and the orange line shows the errror accumulated by a corrected COSTA predictor. For reference, the blue line shows the single-timstep corrected errors (the errors accrued for a single timestep when the timestepper receives the true concentration map as input)
This plot shows that, while the single-timestep corrected error remains low, COSTA faces challenges in generalizing the training set to perform corrections on initial conditions that are predicted and not sourced from ‘exact’ image data. COSTA has shown itself capable of doing this in other work, e.g., Blakseth et al. (2022). Thus, we attribute the deteriorating results in this case to potential overfitting on a narrow dataset.
4 Application: Applying the Digital Twin for Controlling Tracer Plume Migration
The experiments presented in Sect. 3 studied performance of the digital twin in a one-way coupling from the physical to the digital twin. Here, we applied the digital twin to steer the physical twin, thus achieving a two-way coupling between the physical and digital twins, and arguably showing that the digital twin has reached capacity level 4 referring to Fig. 1. COSTA was set up using the same training data as described in Sect. 3.1, but the injection pattern, thus tracer profiles, in this experiment was not present in the training set and not fed to the network.
We considered tracer injection into the same geometry as used in Sect. 3.1, with the injection rate in well 1 fixed to 500 mL/h. This resulted in a tracer plume, and the task of the digital twin was to steer the plume away from the upper part of the domain, with a demarcation line shown in Fig. 11. This corresponds to a hypothetical situation where injection of a waste (e.g., dissolved \(\hbox {CO}_{2}\)) is controlled to stay within an operation licence.
To this end, the digital twin was allowed to manipulate injection and production wells under the following constraints:
-
The injection rate for an individual control well could not surpass 500 mL/h.
-
The total injection rate in the control wells could not surpass 500 mL/h.
-
The production rate had to match the total injection rate so that the net injection rate was zero.
By corollary, the production rate was limited to 1000 mL/h, the sum of the fixed tracer injection rate and the maximal total control injection rate.
From the start of tracer injection, photographs of the tracer distribution were taken every 30 s and submitted to the digital twin. The digital twin then performed an optimization routine, minimizing a cost function
where \(c_1, c_2, \hbox{and } c_3\) are the injection rates for the three control wells subject to optimization, c is the predicted future tracer distribution, and \(0 \le \psi \le 1\) is a ‘fuzzy’ map of the disallowed zone, see Fig. 11. This fuzzing was done with the intention of allowing the digital twin to respond with suitable control rates before the tracer plume actually reached the disallowed zone, without necessarily needing to simulate so far into the future.
The minimization of f was performed with the COBYLA method (Powell 1994), a suitable algorithm able to handle all the constraints without requiring higher order data, such as derivatives. The implementation was provided by SciPy 1.5.4.
The implemented well control rates, as recommended by the optimization algorithm, are visualized in Fig. 12, while the evolution of the plume is shown in Fig. 13. As can be seen, in the initial state, the algorithm recommended controlling tracer migration through injection at close to the maximum allowed rate into Control 1, with some injection also into Control 2. After about 15 min, the injection strategy switched to mainly prioritizing Control 2. This pattern was mainly kept for the remainder of the experiment, interrupted by short periods of injection also into Control wells 1 and 3. In practice, the measured production rate was at times approximately 1% lower than the prescribed rate due to mechanical irregularities in the operation of the pump. This discrepancy was automatically accounted for in the digital twin through the source correction term described in Sect. 2.2.
The impact of the control wells can clearly be seen in the evolution of the tracer plume: Initially, injection in Control 1 leads to a deviation from the circular plume shape of an isolated injection. The switch to injection in Control 2 seems consistent with an attempt to minimize migration into the disallowed zone, as does the reactivation of Control 1 late in the experiment. Figure 13 also shows the difficulty of the assigned optimization task, due to the combination of the geometry of the disallowed zone, the placement of the control wells, and the requirement that the tracer injection rate is fixed at 500 mL/H. Nevertheless, the example proves that our framework is capable of handling real-time interaction between the physical and digital twins.
5 Conclusions and Outlook
We have presented a physical and digital twin for laboratory experiments of tracer transport in porous media. The physical twin is a meter-scale FluidFlower rig, while the digital twin consists of a traditional physics-based simulator augmented with a Hybrid Analysis and Modeling (HAM) component. The latter aims to capture physical effects that are not in the solution space of the simulator, and was in this case implemented using a COrrective Source-Term Approach (COSTA). COSTA’s ability to augment the physics-based simulator was illustrated with simulations in homogeneous and heterogeneous porous media.
We demonstrated the capabilities of the digital twin and the possibilites in real-time communication between physical asset and digital twin, by controlling tracer migration in the physical twin by optimizing on well controls. More broadly, we believe that the framework presented herein opens wide opportunities in combined experiments and simulations to study porous media dynamics in data-rich settings: The tight integration offers a natural way to include data from observations into simulation models. In contrast with traditional methods for data assembly, the COSTA framework needs no assumptions on which parameters are uncertain, and it can enhance the range of the physics-based model to include effects not represented in the governing equations. This makes our approach an ideal tool for exploring and interpreting advanced laboratory experiments.
Two natural extensions of our approach are the inclusion of more complex physics, for instance, multiphase flow, and the inclusion of spatially (and temporally) sparse data. Multiphase flow will introduce at least two significant challenges: Image processing becomes considerably more difficult, and while DarSIA can be applied also in this setting, development of an accurate tool that does not require manual tuning during the experiment may require further efforts; see Nordbotten et al. (2023) for more information. The more complex flow patterns in multiphase flow, such as gravitational and capillary effects, will also put extra requirements on the machine learning component of our framework. While it it safe to say that these effects must be included in the training data for any machine learning approach, it is at the moment unclear whether COSTA as applied herein can also be applied to multiphase problems. Similarly, we have not yet attempted to apply the digital twin to sparse data, for instance, pressure measurements. While the location of the pressure sensors can be guided by optimal sensor placement techniques, the sparse data will need to be optimized prior to application of a COSTA version based on convolutional neural network. We have not investigated this, but expect achieving interpolation accuracy to be a challenge in the presence of geological heterogeneities and multiphase flows. Further work on image processing and data inclusion is thus needed to extend the digital twin framework to more complex problems.
Data availability
All software used in the paper is open-source and available through open repositories: The Digital Twin communication platform is accessible at https://github.com/theBB/Costa, while access information for the secondary software can be found in references Nordbotten et al. (2023) (DarSIA image processing), Kvamsdal et al. (2022) (IFEM) and Keilegavlen et al. (2021) (PorePy). Data from the laboratory experiments are available from the corresponding author upon request.
References
Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G.S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mané, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viégas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., Zheng, X.: TensorFlow: large-scale machine learning on heterogeneous systems. Software available from https://www.tensorflow.org/ (2015)
Ali, M., Umer, R., Khan, K.: A virtual permeability measurement framework for fiber reinforcements using micro CT generated digital twins. Int. J. Lightweight Mater. Manuf. 3(3), 204–216 (2020)
Arts, R., Eiken, O., Chadwick, A., Zweigel, P., Van Der Meer, B., Kirby, G.: Seismic monitoring at the Sleipner underground \(\text{CO}_{2}\) storage site (North Sea). Geol. Soc. Lond. Spec. Publ. 233(1), 181–191 (2004)
Aziz, K., Settari, T.: Petroleum Reservoir Simulation. Applied Science Publishers (1979)
Benali, B., Føyen, T.L., Alcorn, Z.P., Haugen, M., Gauteplass, J., Kovscek, A.R., Fernø, M.A.: Pore-scale bubble population dynamics of \(\text{CO}_{2}\)-foam at reservoir pressure. Int. J. Greenh. Gas Control 114, 103607 (2022)
Berg, S., Ott, H., Klapp, S.A., Schwing, A., Neiteler, R., Brussee, N., Makurat, A., Leu, L., Enzmann, F., Schwarz, J.-O.: Real-time 3D imaging of Haines jumps in porous media flow. Proc. Natl. Acad. Sci. 110(10), 3755–3759 (2013)
Blakseth, S.S., Rasheed, A., Kvamsdal, T., San, O.: Deep neural network enabled corrective source term approach to hybrid analysis and modeling. Neural Netw. 146, 181–199 (2022)
Brattekås, B., Gauteplass, J., Brekke, N., Fernø, M., Ersland, G.: Unlocking multimodal PET-MR synergies for geoscience. Adv. Water Resour. 142, 103641 (2020)
Caers, J.: Modeling Uncertainty in the Earth Sciences (2011)
Chen, Z., Huan, G., Ma, Y.: Computational Methods for Multiphase Flows in Porous Media (2006)
Fernø, M., Gauteplass, J., Hauge, L.P., Abell, G.E., Adamsen, T., Graue, A.: Combined positron emission tomography and computed tomography to visualize and quantify fluid flow in sedimentary rocks. Water Resour. Res. 51(9), 7811–7819 (2015)
Fischler, M.A., Bolles, R.C.: Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Commun. ACM 24(6), 381–395 (1981)
Fonn, E., Johannessen, K., Kvarving, A. M.: Costa Software. https://github.com/theBB/Costa (2022)
Gauteplass, J., Chaudhary, K., Kovscek, A.R., Fernø, M.A.: Pore-level foam generation and flow for mobility control in fractured systems. Colloids Surf. A 468, 184–192 (2015)
Goodfellow, I., Bengio, Y., Courville, A.: Deep Learning (2016). http://www.deeplearningbook.org
Helmig, R.: Multiphase Flow and Transport Processes in the Subsurface: A Contribution to the Modeling of Hydrosystems. Springer (1997)
Kannapinn, M., Pham, M.K., Schäfer, M.: Physics-based digital twins for autonomous thermal food processing: efficient, non-intrusive reduced-order modeling. Innov. Food Sci. Emerg. Technol. 81 (2022)
Keilegavlen, E., Berge, R., Fumagalli, A., Starnoni, M., Stefansson, I., Varela, J., Berre, I.: Porepy: an open-source software for simulation of multiphysics processes in fractured porous media. Comput. Geosci. 25(1), 243–265 (2021)
Kiærr, A., Lødøen, O.P., De Bruin, W., Barros, E., Leeuwenburgh, O.: Evaluation of a data-driven flow network model (FlowNet) for reservoir prediction and optimization. In: European Conference on the Mathematics of Oil Recovery, pp. 1–18 (2020)
Kvamsdal, T., Kvarving, A. M., Okstad, K. M.: IFEM Software. https://github.com/OPM/IFEM (2022)
Lie, K., Krogstad, S.: Data-driven modelling with coarse-grid network models. In: European Conference on the Mathematics of Oil Recovery, pp. 1–14 (2022)
Nordbotten, J.M., Benali, B., Both, J.W., Brattekås, B., Storvik, E., Fernø, M.: , DarSIA: An open-source Python toolbox for two-scale image processing of dynamics in porous media. Transp. Porous Med. https://doi.org/10.1007/s11242-023-02000-9 (2023)
Nordbotten, J.M., Fernø, M., Flemisch, B., Juanes, R., Jørgensen, M.: Final benchmark description: FluidFlower international benchmark study (2022). https://doi.org/10.5281/zenodo.6807102
Oliver, D.S., Chen, Y.: Recent progress on reservoir history matching: a review. Comput. Geosci. 15(1), 185–221 (2011)
Powell, M.J.: A direct search optimization method that models the objective and constraint functions by linear interpolation. In: Advances in Optimization and Numerical Analysis, pp. 51–67 (1994)
Rasheed, A., San, O., Kvamsdal, T.: Digital twin: values, challenges and enablers from a modeling perspective. IEEE Access 8, 21980–22012 (2020)
Ren, G., He, J., Wang, Z., Younis, R.M., Wen, X.-H.: Implementation of physics-based data-driven models with a commercial simulator. In: SPE Reservoir Simulation Conference (2019)
Rudin, L.I., Osher, S., Fatemi, E.: Nonlinear total variation based noise removal algorithms. Physica D 60(1–4), 259–268 (1992)
San, O., Rasheed, A., Kvamsdal, T.: Hybrid analysis and modeling, eclecticism, and multifidelity computing toward digital twin revolution. GAMM-Mitteilungen 44(2), 202100007 (2021)
Sircar, A., Nair, A., Bist, N., Yadav, K.: Digital twin in hydrocarbon industry. Pet. Res. (2022)
Wanasinghe, T.R., Wroblewski, L., Petersen, B.K., Gosine, R.G., James, L.A., De Silva, O., Mann, G.K., Warrian, P.J.: Digital twin for the oil and gas industry: overview, research trends, opportunities, and challenges. IEEE Access 8, 104175–104197 (2020)
Williams, M.A., Keating, J.F., Barghouty, M.F.: The stratigraphie method: a structured approach to history-matching complex simulation models. SPE Reserv. Eval. Eng. 1(02), 169–176 (1998)
Xiao, H., He, L., Li, J., Zou, C., Shao, C.: Permeability prediction for porous sandstone using digital twin modeling technology and Lattice Boltzmann method. Int. J. Rock Mech. Min. Sci. 142, 104695 (2021)
Funding
Open access funding provided by University of Bergen (incl Haukeland University Hospital). This work was financed in part by Wintershall DEA through the project “Digital Twin of Large-Scale Laboratory Flow Rig” (PoroTwin).
Author information
Authors and Affiliations
Contributions
All authors contributed to the study conception and design. Kristoffer Eikehaug and Martin Fernø were responsible for the physical experiments. Eivind Fonn, Kjetil Johannesen, Jakub Both, and Eirik Keilegavlen were the main responsible for the digital twin. Trond Kvamsdal, Adil Rasheed, and Jan M. Nordbotten contributed to conceptualization and design of experiments. The first draft was written by Eirik Keilegavlen, and all authors commented on previous versions of the manuscript. All authors approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors have no relevant financial or non-financial interests to disclose.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Keilegavlen, E., Fonn, E., Johannessen, K. et al. PoroTwin: A Digital Twin for a FluidFlower Rig. Transp Porous Med 151, 1241–1260 (2024). https://doi.org/10.1007/s11242-023-01992-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11242-023-01992-8