diff --git a/examples/README.md b/examples/README.md index 3617a6cd..9708bdb6 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,9 +3,8 @@ ## Introduction -This repository provides sample applications demonstrating use of specific Physics-ML -model architectures that are easy to train and deploy. These examples aim to show how -such models can help solve real world problems. +This repository provides sample applications that demonstrate the use of specific Physics-ML +model architectures that are easy to train and deploy. These examples illustrate how such models can help solve real-world problems. ## Introductory @@ -63,14 +62,14 @@ such models can help solve real world problems. ## Additional examples -In addition to the examples in this repo, more Physics-ML usecases and examples +In addition to the examples in this repo, more Physics-ML use cases and examples can be referenced from the [PhysicsNeMo examples](https://github.com/NVIDIA/physicsnemo/blob/main/examples/README.md). ## NVIDIA support -In each of the example READMEs, we indicate the level of support that will be provided. -Some examples are under active development/improvement and might involve rapid changes. -For stable examples, please refer the tagged versions. +Each README indicates the level of support provided. +Some examples are under active development and may change rapidly. +For stable examples, refer to the tagged versions. ## Feedback / Contributions diff --git a/examples/aneurysm/README.md b/examples/aneurysm/README.md index 6ec8d834..800636da 100644 --- a/examples/aneurysm/README.md +++ b/examples/aneurysm/README.md @@ -3,7 +3,7 @@ This example uses PINNs for emulating flow in an aneurysm taking the specific blood vessel geometry as the input. ## Problem overview -This sample illustrates the features in PhysicsNeMo Symbolic such as the geometry utilities to train a PINN model for a complex geometry. The trained surrogate PINN can be used to predict the pressure and velocity of blood flow inside the aneursym. You can get more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/physicsnemo/PhysicsNeMo-sym/user_guide/intermediate/adding_stl_files.html). This sample can be extended to incroporate parameterized geometry using CCSG instead of STL to leverage the surrogate model to provide patient specific geometry. You can refer to the documentaion [here](https://docs.nvidia.com/deeplearning/physicsnemo/PhysicsNeMo-sym/user_guide/advanced/parametrized_simulations.html#creating-nodes-and-architecture-for-parameterized-problems) for more details. +This sample illustrates the features in PhysicsNeMo Symbolic such as the geometry utilities to train a PINN model for a complex geometry. The trained surrogate PINN can be used to predict pressure and velocity fields of blood flow within the aneurysm. You can find more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/physicsnemo/PhysicsNeMo-sym/user_guide/intermediate/adding_stl_files.html). This sample can be extended to incorporate parameterized geometry using CCSG instead of STL so the surrogate can adapt to patient-specific geometry. You can refer to the documentaion [here](https://docs.nvidia.com/deeplearning/physicsnemo/PhysicsNeMo-sym/user_guide/advanced/parametrized_simulations.html#creating-nodes-and-architecture-for-parameterized-problems) for more details. ## Dataset diff --git a/examples/reservoir_simulation/2D/README.md b/examples/reservoir_simulation/2D/README.md index 99c83408..5024651f 100644 --- a/examples/reservoir_simulation/2D/README.md +++ b/examples/reservoir_simulation/2D/README.md @@ -1,11 +1,11 @@ # Reservoir Simulation Forward Modelling with a Physics Informed Neural Operator (PINO) - 2D Implementation -![Nvidia-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) +![NVIDIA-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) ## An AI enabled Automatic History Matching Workflow with a PINO based forward solver: -Reservoir model calibration is applicable and relevant for locating new hydrocarbon deposits and for CCUS stratigraphic trapping initiatives in many energy companies. Energy companies are aiming to accelerate their forward simulation codes for precise and detailed subsurface/dynamic/Petro-physical mappings of their assets/plays. A fascinating and easy to implement meshless approximation to solve reservoir simulation forward problems using physics constrained/informed deep neural networks show promising results.In this project, a physics informed neural operators (PINOs) is developed for surrogating a Two phase flow black oil model . +Reservoir model calibration is applicable and relevant for locating new hydrocarbon deposits and for CCUS stratigraphic trapping initiatives in many energy companies. Energy companies are aiming to accelerate their forward simulation codes for precise and detailed subsurface/dynamic/Petro-physical mappings of their assets/plays. A fascinating and easy to implement meshless approximation to solve reservoir simulation forward problems using physics-constrained deep neural networks shows promising results. In this project, a physics-informed neural operator (PINO) is developed to surrogate a two-phase black-oil model. -The aim of this project is to develop an integrated workflow, where the finite volume fully/adaptive implicit black oil reservoir simulator is replaced by a phyiscs informed neural operator. This approach is well suited for forward and inverse uncertainty . +The aim of this project is to develop an integrated workflow, where the finite-volume fully/adaptive implicit black-oil reservoir simulator is replaced by a physics-informed neural operator. This approach is well suited for forward and inverse uncertainty analysis. ## Methods for the forward and inverse problem (In the weeds): @@ -75,7 +75,7 @@ The final pressure and saturation equations for a two-phase oil-water flow is **Fourier Neural operator based machine infused with physics constraint from black oil model ansatz** An FNO model architecture, introduced in [54], is shown below. -![Nvidia-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) +![NVIDIA-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) The goal is to replace the Finite volume simulator with an FNO surrogate. @@ -115,7 +115,7 @@ Loss_{cfd} =V(F,u;T)_{pressure} + V(u,S_w;t)_{saturation} ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. To run the example, launch the PhysicsNeMo container using below: ```bash @@ -261,7 +261,7 @@ The result for the Psurrogate is shown in Fig.2(a-d), 500 training samples was u * 2 new PINO implementation accounting for the Overall Flux and water specific flux during the pde loss computation. * Experimental gradient based method implementd with Adam & LBFGS for comparison purposes only to the aREKI scheme. * Sensible initial ensemble initialisation from MPS and 6 new training images (TI's). -* Constrained presure residual method for the fully/adaptive implict finitie volume numerical solver implemented. This method has a 2 stage V cyclec AMG, with the coarsening, aggregation, colouring & level-scheduling implemented during the restrcition operation. SOR, Gauss-Seidel, Jacobi implemented during the smoothing operation. The solution from the pressure solve serves as an initialiser for the saturation solver, which is a left-preconditioned GMRES with an ILU(0) preconditoner. +* Constrained pressure residual method for the fully/adaptive implicit finite-volume numerical solver implemented. This method has a two-stage V-cycle AMG with coarsening, aggregation, coloring, and level scheduling during the restriction operation. SOR, Gauss–Seidel, and Jacobi are implemented during smoothing. The pressure solution serves as an initializer for the saturation solver, which is a left-preconditioned GMRES with an ILU(0) preconditioner. **23.02** * Bug Fixes @@ -270,11 +270,11 @@ The result for the Psurrogate is shown in Fig.2(a-d), 500 training samples was u * First release ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com ## Contributors: -- Oleg Ovcharenko- Nvidia -- Issam Said- Nvidia +- Oleg Ovcharenko- NVIDIA +- Issam Said- NVIDIA ## References: [1] J.-Y. Zhu, R. Zhang, D. Pathak, T. Darrell, A. A. Efros, O. Wang, E. Shechtman, Toward multimodal image-to-image translation, in Advances in Neural Information Processing Systems, 2017, pp. 465–476. diff --git a/examples/reservoir_simulation/2D/src/NVRS.py b/examples/reservoir_simulation/2D/src/NVRS.py index d427fde8..982523c1 100644 --- a/examples/reservoir_simulation/2D/src/NVRS.py +++ b/examples/reservoir_simulation/2D/src/NVRS.py @@ -17,7 +17,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ -Nvidia Finite volume reservoir simulator with flexible solver +NVIDIA Finite volume reservoir simulator with flexible solver AMG to solve the pressure and saturation well possed inverse problem diff --git a/examples/reservoir_simulation/3D/README.md b/examples/reservoir_simulation/3D/README.md index 9f535d45..83a8c8f7 100644 --- a/examples/reservoir_simulation/3D/README.md +++ b/examples/reservoir_simulation/3D/README.md @@ -1,11 +1,11 @@ # Reservoir Simulation Forward Modelling with a Physics Informed Neural Operator (PINO) - 3D Implementation -![Nvidia-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) +![NVIDIA-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) ## Reservoir simulation forward modelling with a Neural Operator Surrogate : -Reservoir model calibration is applicable and relevant for locating new hydrocarbon deposits and for CCUS stratigraphic trapping initiatives in many energy companies. Energy companies are aiming to accelerate their forward simulation codes for precise and detailed subsurface/dynamic/Petro-physical mappings of their assets/plays. A fascinating and easy to implement meshless approximation to solve reservoir simulation forward problems using physics constrained/informed deep neural networks show promising results.In this project, a physics informed neural operators (PINOs) is developed for surrogating a Two phase flow black oil model . +Reservoir model calibration is applicable and relevant for locating new hydrocarbon deposits and for CCUS stratigraphic trapping initiatives in many energy companies. Energy companies are aiming to accelerate their forward simulation codes for precise and detailed subsurface/dynamic/Petro-physical mappings of their assets/plays. A fascinating and easy to implement meshless approximation to solve reservoir simulation forward problems using physics constrained/informed deep neural networks show promising results. In this project, a physics-informed neural operator (PINO) is developed to surrogate a two-phase black-oil model. -The aim of this project is to develop an integrated workflow, where the finite volume fully/adaptive implicit black oil reservoir simulator is replaced by a phyiscs informed neural operator. This approach is well suited for forward and inverse uncertainty . +The aim of this project is to develop an integrated workflow, where the finite-volume fully/adaptive implicit black-oil reservoir simulator is replaced by a physics-informed neural operator. This approach is well suited for forward and inverse uncertainty analysis. ## Methods for the forward problem (In the weeds): @@ -75,7 +75,7 @@ The final pressure and saturation equations for a two-phase oil-water flow is **Fourier Neural operator based machine infused with physics constraint from black oil model ansatz** An FNO model architecture, introduced in [54], is shown below. -![Nvidia-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) +![NVIDIA-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) The goal is to replace the Finite volume simulator with an FNO surrogate. @@ -115,13 +115,13 @@ Loss_{cfd} =V(F,u;T)_{pressure} + V(u,S_w;t)_{saturation} ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. To run the example, launch the PhysicsNeMo container using below: ```bash docker run --rm --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 --runtime nvidia -v ${PWD}:/examples -it nvcr.io/nvidia/physicsnemo/physicsnemo:23.08 ``` -Currently, this example is tested to run with PhysicsNeMo release 24.09 and earlier. +Currently, this example is tested with PhysicsNeMo release 24.09 and earlier. Next, clone the repo to get this example using: ```bash @@ -209,7 +209,7 @@ tensorboard --logdir=./ --port=7007 ## Results ### Summary of Numerical Model -The result for the Psurrogate is shown in Fig.2(a-d), 500 training samples was used were we compute the data loss and physics loss. The water flows from the injectors (downwards facing arrows) towards the producers (upwards facing arrows). The size of the reservoir computational voxel is nx, ny, nz = 40,40,3. Two phases are considered (oil and water) and the wells (4 injectors and 4 producers) are arranged in an “analogous 5- spot pattern” as shown in bottom-right of Fig. 4. The 4 producers well have measurable quantities of oil rate, water rate, water-cut as and are controlled by bottom-hole-pressure. The 4 water injector wells have measurable quantity of bottom hole pressure (BHP), controlled by injection rates. The reservoir is a sandstone channelised reservoir consisting of 2 lithofacies. 2,340 days of simulation are simulated. The left column of Fig.2(a-b) are the responses from the surrogate, the middle column are the responses from the finite volume solver with AMG (pressure solve) + GMRES(ILU(0)(saturation solve)) and the right column is the difference between each response. For all panels in Fig. 2(a-b), the first row is for the pressure, the second row is for the water saturation and the third row is for the oil saturation +The result for the surrogate is shown in Fig. 2(a–d); 500 training samples were used to compute the data and physics losses. The water flows from the injectors (downwards facing arrows) towards the producers (upwards facing arrows). The size of the reservoir computational voxel is nx, ny, nz = 40,40,3. Two phases are considered (oil and water) and the wells (4 injectors and 4 producers) are arranged in an “analogous 5- spot pattern” as shown in bottom-right of Fig. 4. The 4 producers well have measurable quantities of oil rate, water rate, water-cut as and are controlled by bottom-hole-pressure. The 4 water injector wells have measurable quantity of bottom hole pressure (BHP), controlled by injection rates. The reservoir is a sandstone channelised reservoir consisting of 2 lithofacies. 2,340 days of simulation are simulated. The left column of Fig.2(a-b) are the responses from the surrogate, the middle column are the responses from the finite volume solver with AMG (pressure solve) + GMRES(ILU(0)(saturation solve)) and the right column is the difference between each response. For all panels in Fig. 2(a-b), the first row is for the pressure, the second row is for the water saturation and the third row is for the oil saturation - The results from the Forward Problem using the 4 surrogates is shown below @@ -253,11 +253,11 @@ The result for the Psurrogate is shown in Fig.2(a-d), 500 training samples was u * First release ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com ## Contributors: -- Oleg Ovcharenko- Nvidia -- Issam Said- Nvidia +- Oleg Ovcharenko- NVIDIA +- Issam Said- NVIDIA ## References: diff --git a/examples/reservoir_simulation/3D/src/NVRS.py b/examples/reservoir_simulation/3D/src/NVRS.py index 97142012..57c978dc 100644 --- a/examples/reservoir_simulation/3D/src/NVRS.py +++ b/examples/reservoir_simulation/3D/src/NVRS.py @@ -17,7 +17,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ -Nvidia Finite volume reservoir simulator with flexible solver +NVIDIA Finite volume reservoir simulator with flexible solver AMG to solve the pressure and saturation well possed inverse problem diff --git a/examples/reservoir_simulation/CCUS/README.md b/examples/reservoir_simulation/CCUS/README.md index c92103f5..d5e0b6ec 100644 --- a/examples/reservoir_simulation/CCUS/README.md +++ b/examples/reservoir_simulation/CCUS/README.md @@ -351,14 +351,14 @@ $`w_1`$ , $`\ldots`$ , $`w_{10}`$ $`\text{ are the weights associated with the ## Important Dependencies & Prerequisites: -- Nvidia's PhysicsNeMo symbolic v23.09 :[link](https://github.com/NVIDIA/physicsnemo-sym) +- NVIDIA's PhysicsNeMo Symbolic v23.09 :[link](https://github.com/NVIDIA/physicsnemo-sym) - CUDA 11.8 : [link](https://developer.nvidia.com/cuda-11-8-0-download-archive) - CuPy : [link](https://github.com/cupy/cupy.git) - Python 3.8 upwards ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. ## Installation - Bare metal / Docker @@ -587,11 +587,11 @@ The overall loss is shown in the second column of the second row for all the fig ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com ## Contributors: -- Kaustubh Tangsali- Nvidia -- Issam Said- Nvidia +- Kaustubh Tangsali- NVIDIA +- Issam Said- NVIDIA diff --git a/examples/reservoir_simulation/CCUS/src/Compare_FVM_surrogate.py b/examples/reservoir_simulation/CCUS/src/Compare_FVM_surrogate.py index 8c387436..04679a22 100644 --- a/examples/reservoir_simulation/CCUS/src/Compare_FVM_surrogate.py +++ b/examples/reservoir_simulation/CCUS/src/Compare_FVM_surrogate.py @@ -2840,7 +2840,7 @@ def process_step( elapsed_time_secs2 = time.time() - start_time_plots2 msg = ( - "Reservoir simulation with Nvidia PhysicsNeMo took: %s secs (Wall clock time)" + "Reservoir simulation with NVIDIA PhysicsNeMo took: %s secs (Wall clock time)" % timedelta(seconds=round(elapsed_time_secs2)) ) print(msg) @@ -2855,13 +2855,13 @@ def process_step( if physicsnemo_time < flow_time: slower_time = physicsnemo_time faster_time = flow_time - slower = "Nvidia PhysicsNeMo Surrogate" + slower = "NVIDIA PhysicsNeMo Surrogate" faster = "Flow Reservoir Simulator" else: slower_time = flow_time faster_time = physicsnemo_time slower = "Flow Reservoir Simulator" - faster = "Nvidia PhysicsNeMo Surrogate" + faster = "NVIDIA PhysicsNeMo Surrogate" # Calculate speedup speedup = math.ceil(faster_time / slower_time) @@ -3218,7 +3218,7 @@ def process_step( elapsed_time_secs2 = time.time() - start_time_plots2 msg = ( - "Reservoir simulation with Nvidia PhysicsNeMo (FNO) took: %s secs (Wall clock time)" + "Reservoir simulation with NVIDIA PhysicsNeMo (FNO) took: %s secs (Wall clock time)" % timedelta(seconds=round(elapsed_time_secs2)) ) print(msg) @@ -3233,13 +3233,13 @@ def process_step( if physicsnemo_time < flow_time: slower_time = physicsnemo_time faster_time = flow_time - slower = "Nvidia PhysicsNeMo Surrogate" + slower = "NVIDIA PhysicsNeMo Surrogate" faster = "Flow Reservoir Simulator" else: slower_time = flow_time faster_time = physicsnemo_time slower = "Flow Reservoir Simulator" - faster = "Nvidia PhysicsNeMo Surrogate" + faster = "NVIDIA PhysicsNeMo Surrogate" # Calculate speedup speedup = math.ceil(faster_time / slower_time) diff --git a/examples/reservoir_simulation/GenAI_workflows/2D/README.md b/examples/reservoir_simulation/GenAI_workflows/2D/README.md index 43907687..3ca57f11 100644 --- a/examples/reservoir_simulation/GenAI_workflows/2D/README.md +++ b/examples/reservoir_simulation/GenAI_workflows/2D/README.md @@ -1,5 +1,5 @@ # Automatic History Matching with AI enhanced Weighted adaptive Regularised Ensemble Kalman Inversion ($`\alpha`$REKI) and a Physics Informed Neural Operator (PINO) based surrogate forward model with 2D Implementation -![Nvidia-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) +![NVIDIA-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) ## An AI enabled Automatic History Matching Workflow with a PINO based forward solver: Calibration of subsurface structures is an important step to forecast fluid dynamics and behaviours in a plethora of geoenvironments such as petroleum and geothermal reservoirs. History matching is an ill-posed inverse process to find reservoir model parameters honouring observations by integration of static (e.g., core, logging, and seismic) and dynamic data (e.g., oil and gas rate, water cut, bottomhole pressure, and subsidence/uplift) .In recent developments, the ensemble Kalman filter (EnKF) (Evensen 1994, Law et al 2012, Stuart 2010), ensemble smoother (ES) (van Leeuwen & Evensen 1996) ES with multiple data assimilation (ES-MDA) (Emerick & Reynolds 2013) and Iterative variants of ES (Chen & Oliver 2011, Iglesias 2013) have all been utilised for history matching/data assimilation problems. However, the ensemble-based data assimilation approaches have limited capability in preserving non-Gaussian distributions of model parameters such as facies (Aanonsen et al.,2009, Villegas et al, 2018, Lorentzen et al, 2013). In the ensemble-based data assimilation techniques, model parameters lose the non- Gaussianity of their original distributions (generated from a geostatistical software) that are initially constrained and constructed to available hard data and the distributions of the model parameters tend towards Gaussian ones (Evensen & Eikrem 2018, Kim et al 2018). Some methods utilised for this parametrisation technique in reservoir characterization literature is, the discrete cosine transform (DCT) (Jafarpour & McLaughlin, 2007) (Liu & Jafarpour, 2013), level set (Moreno & Aanonsen 2007, Dorn & Villegas 2008, Villegas et al 2018, Chang et al 2010, Lorentzen et al., 2013) and sparse geologic dictionaries (Etienam et al, 2019, Kim et al, 2018, Khaninezhad et al, 2012). In particular, Fourier transform-based methods such as DCT are capable of capturing essential traits such as main shapes and patterns of a facies channel reservoir (Khaninezhad, et al., 2012) but reveal a deficiency in describing a crisp contrast among different facies because of data loss from inverse transformation (Kim et al 2018, Khaninezhad et al, 2012, Tarrahi & Afra,2016). @@ -145,7 +145,7 @@ The final pressure and saturation equations for a two-phase oil-water flow is **Fourier Neural operator based machine infused with physics constraint from black oil model ansatz** An FNO model architecture, introduced in [54], is shown below. -![Nvidia-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) +![NVIDIA-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) The goal is to replace the Finite volume simulator with an FNO surrogate. @@ -184,8 +184,8 @@ Loss_{cfd} =V(F,u;T)_{pressure} + V(u,S_w;t)_{saturation} ## Important Dependencies & Prerequisites: -- Nvidia's in-house GPU based black oil reservoir simulator - **NVRS** -- Nvidia's PhysicsNeMo v22.09 :[link](https://docs.nvidia.com/deeplearning/physicsnemo/user_guide/getting_started/installation.html) +- NVIDIA's in-house GPU based black oil reservoir simulator - **NVRS** +- NVIDIA's PhysicsNeMo v22.09 :[link](https://docs.nvidia.com/deeplearning/physicsnemo/user_guide/getting_started/installation.html) - CUDA 11.8 : [link](https://developer.nvidia.com/cuda-11-8-0-download-archive) - CuPy : [link](https://github.com/cupy/cupy.git) - pyAMGX : [link](https://github.com/shwina/pyamgx.git) @@ -194,7 +194,7 @@ Loss_{cfd} =V(F,u;T)_{pressure} + V(u,S_w;t)_{saturation} ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. ## Installation - Bare metal / Docker @@ -276,8 +276,8 @@ cd ./project Solvers include; 1) Left-Preconditioned GMRES [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.gmres.html) 2) LSQR [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.lsqr.html) -3) Left Preconditoned Conjugate gradient [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.cg.html) -4) Constrained pressure residual -CPR (V cycle 2stage AMG for presure solve and left-precondioned GMRES with ILU(0) as preconditoner for saturation sole) [link](https://doi.org/10.2118/96809-MS) +3) Left Preconditioned Conjugate Gradient [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.cg.html) +4) Constrained Pressure Residual (CPR) (V-cycle two-stage AMG for the pressure solve and left-preconditioned GMRES with ILU(0) for the saturation solve) [link](https://doi.org/10.2118/96809-MS) 6) Spsolve [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.spsolve.html) 7) AMGx suite of solvers @@ -510,11 +510,11 @@ The result for the PINO surrogate is shown in Fig.2(a), 500 training samples was Refer to the included Energy SDK License Agreement in **Energy_SDK_License_Agreement.pdf** for guidance. ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com ## Contributors: -- Oleg Ovcharenko- Nvidia -- Issam Said- Nvidia +- Oleg Ovcharenko- NVIDIA +- Issam Said- NVIDIA ## References: diff --git a/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem.py b/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem.py index f3ad7d54..073c8ad5 100644 --- a/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem.py +++ b/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem.py @@ -7308,7 +7308,7 @@ def Get_weighting(simData, measurment): print("--------------------------ADAPTIVE-REKI----------------------------------") print("History Matching using the Adaptive Regularised Ensemble Kalman Inversion") -print("Novel Implementation by Clement Etienam, SA-Nvidia: SA-ML/A.I/Energy") +print("Novel Implementation by Clement Etienam, SA-NVIDIA: SA-ML/A.I/Energy") if DEFAULT == 1: Technique_REKI = 3 @@ -9208,7 +9208,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 2: print("") print("Adaptive Regularised Ensemble Kalman Inversion with KSVD Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) @@ -10574,7 +10574,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Convolution Autoencoder \ Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Autoencoder------------------------") bb = os.path.isfile("../PACKETS/encoder.h5") @@ -15932,7 +15932,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Convolution Autoencoder \ Parametrisation with Generative adverserail network prior\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Autoencoder------------------------") bb = os.path.isfile("../PACKETS/autoencoder.h5") @@ -17324,7 +17324,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Generative\ adverserail network prior for permeability field alone\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print(" Learn the permeability field GAN module") aa = os.path.isfile("../PACKETS/generator.h5") @@ -18709,7 +18709,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 9: print("") print("Adaptive Regularised Ensemble Kalman Inversion with KMEANS Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) @@ -20076,7 +20076,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Variational Convolution Autoencoder \ Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print( "-------------------------learn Variational Autoencoder------------------------" @@ -22914,7 +22914,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 12: print("") print("Adaptive Regularised Ensemble Kalman Inversion with DCT Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) @@ -25196,7 +25196,7 @@ def Get_weighting(simData, measurment): print( "Adaptive Regularised Ensemble Kalman Inversion with Diffusion model Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Diffusion model------------------------") if not os.path.exists(("../PACKETS/tochi")): diff --git a/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem_gradient.py b/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem_gradient.py index e3c761e4..f0152aa4 100644 --- a/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem_gradient.py +++ b/examples/reservoir_simulation/GenAI_workflows/2D/src/Inverse_problem_gradient.py @@ -5146,7 +5146,7 @@ def Plot_performance_model(PINN, PINN2, nx, ny, namet, UIR, itt, dt, MAXZ, pini_ print("|-----------------------------------------------------------------|") print("") print("History Matching using LBFGS") -print("Novel Implementation by Clement Etienam, SA-Nvidia: SA-ML/A.I/Energy") +print("Novel Implementation by Clement Etienam, SA-NVIDIA: SA-ML/A.I/Energy") if DEFAULT == 1: diff --git a/examples/reservoir_simulation/GenAI_workflows/2D/src/NVRS.py b/examples/reservoir_simulation/GenAI_workflows/2D/src/NVRS.py index bce01867..4f2962bd 100644 --- a/examples/reservoir_simulation/GenAI_workflows/2D/src/NVRS.py +++ b/examples/reservoir_simulation/GenAI_workflows/2D/src/NVRS.py @@ -15,7 +15,7 @@ # limitations under the License. """ -Nvidia Finite volume reservoir simulator with flexible solver +NVIDIA Finite volume reservoir simulator with flexible solver AMG to solve the pressure and saturation well possed inverse problem diff --git a/examples/reservoir_simulation/GenAI_workflows/3D/README.md b/examples/reservoir_simulation/GenAI_workflows/3D/README.md index 85f6fa42..59d04401 100644 --- a/examples/reservoir_simulation/GenAI_workflows/3D/README.md +++ b/examples/reservoir_simulation/GenAI_workflows/3D/README.md @@ -8,7 +8,7 @@ Calibration of subsurface structures is an important step to forecast fluid dyna Reservoir model calibration is applicable and relevant for locating new hydrocarbon deposits and for CCUS stratigraphic trapping initiatives in many energy companies. Energy companies are aiming to accelerate their forward simulation codes for precise and detailed subsurface/dynamic/Petro-physical mappings of their assets/plays. A fascinating and easy to implement meshless approximation to solve reservoir simulation forward problems using physics constrained/informed deep neural networks show promising results.In this project, a physics informed neural operators (PINOs) is developed for surrogating a Two phase flow black oil model and a recently developed weighted adaptive regularised ensemble kalman inversion method is used for solving the inverse problem. -The aim of this project is to develop an integrated workflow, where the finite volume fully/adaptive implicit black oil reservoir simulator is replaced by a phyiscs informed neural operator. This developed PINO surrogate is now used in an inverse problem methodology. Two methods are developed for the inverse problem, a newly developed adaptive regularised ensemble alman inversion method (with various forms of exotic priors). This approach is well suited for forward and inverse uncertainty quantifiication and a gradient based conjugate gradient method with line-search methodlogy and armijio conditions being adhered to. +The aim of this project is to develop an integrated workflow, where the finite volume fully/adaptive implicit black oil reservoir simulator is replaced by a phyiscs informed neural operator. This developed PINO surrogate is now used in an inverse-problem methodology. A newly developed adaptive regularised ensemble Kalman inversion method with covariance localisation, together with a mixture-of-experts approach, is implemented. This approach—called _PINO-CCR_—is well suited for forward and inverse uncertainty quantification, as is a gradient-based conjugate-gradient method with line-search that satisfies Armijo conditions. ## Methods for the forward and inverse problem (In the weeds): @@ -146,7 +146,7 @@ The final pressure and saturation equations for a two-phase oil-water flow is **Fourier Neural operator based machine infused with physics constraint from black oil model ansatz** An FNO model architecture, introduced in [54], is shown below. -![Nvidia-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) +![NVIDIA-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) The goal is to replace the Finite volume simulator with an FNO surrogate. @@ -185,8 +185,8 @@ Loss_{cfd} =V(F,u;T)_{pressure} + V(u,S_w;t)_{saturation} ## Important Dependencies & Prerequisites: -- Nvidia's in-house GPU based black oil reservoir simulator - **NVRS** -- Nvidia's PhysicsNeMo v22.09 :[link](https://docs.nvidia.com/deeplearning/physicsnemo/user_guide/getting_started/installation.html) +- NVIDIA's in-house GPU based black oil reservoir simulator - **NVRS** +- NVIDIA's PhysicsNeMo v22.09 :[link](https://docs.nvidia.com/deeplearning/physicsnemo/user_guide/getting_started/installation.html) - CUDA 11.8 : [link](https://developer.nvidia.com/cuda-11-8-0-download-archive) - CuPy : [link](https://github.com/cupy/cupy.git) - pyAMGX : [link](https://github.com/shwina/pyamgx.git) @@ -195,7 +195,7 @@ Loss_{cfd} =V(F,u;T)_{pressure} + V(u,S_w;t)_{saturation} ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. ## Installation - Bare metal / Docker @@ -483,12 +483,12 @@ The result for the PINO surrogate is shown in Fig.2(a), 500 training samples was Refer to the included Energy SDK License Agreement in **Energy_SDK_License_Agreement.pdf** for guidance. ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com ## Contributors: -- Oleg Ovcharenko- Nvidia -- Issam Said- Nvidia -- Ken Hester- Nvidia +- Oleg Ovcharenko- NVIDIA +- Issam Said- NVIDIA +- Ken Hester- NVIDIA ## References: diff --git a/examples/reservoir_simulation/GenAI_workflows/3D/src/Inverse_problem.py b/examples/reservoir_simulation/GenAI_workflows/3D/src/Inverse_problem.py index 75b88ffe..057fdbda 100644 --- a/examples/reservoir_simulation/GenAI_workflows/3D/src/Inverse_problem.py +++ b/examples/reservoir_simulation/GenAI_workflows/3D/src/Inverse_problem.py @@ -6275,7 +6275,7 @@ def Get_weighting(simData, measurment): print("--------------------------ADAPTIVE-REKI----------------------------------") print("History Matching using the Adaptive Regularised Ensemble Kalman Inversion") -print("Novel Implementation by Clement Etienam, SA-Nvidia: SA-ML/A.I/Energy") +print("Novel Implementation by Clement Etienam, SA-NVIDIA: SA-ML/A.I/Energy") if DEFAULT == 1: Technique_REKI = 2 @@ -8163,7 +8163,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Convolution Autoencoder \ Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Autoencoder------------------------") bb = os.path.isfile("../PACKETS/encoder.h5") @@ -12288,7 +12288,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Convolution Autoencoder \ Parametrisation with Generative adverserail network prior\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Autoencoder------------------------") bb = os.path.isfile("../PACKETS/autoencoder.h5") @@ -13677,7 +13677,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Generative\ adverserail network prior for permeability field alone\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print(" Learn the permeability field GAN module") @@ -15059,7 +15059,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 7: print("") print("Adaptive Regularised Ensemble Kalman Inversion with KMEANS Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) @@ -16421,7 +16421,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Variational Convolution Autoencoder \ Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print( "-------------------------learn Variational Autoencoder------------------------" @@ -17962,7 +17962,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 9: print("") print("Adaptive Regularised Ensemble Kalman Inversion with DCT Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) diff --git a/examples/reservoir_simulation/GenAI_workflows/3D/src/NVRS.py b/examples/reservoir_simulation/GenAI_workflows/3D/src/NVRS.py index 0000db39..99b69f25 100644 --- a/examples/reservoir_simulation/GenAI_workflows/3D/src/NVRS.py +++ b/examples/reservoir_simulation/GenAI_workflows/3D/src/NVRS.py @@ -15,7 +15,7 @@ # limitations under the License. """ -Nvidia Finite volume reservoir simulator with flexible solver +NVIDIA Finite volume reservoir simulator with flexible solver AMG to solve the pressure and saturation well possed inverse problem diff --git a/examples/reservoir_simulation/Norne/README.md b/examples/reservoir_simulation/Norne/README.md index 6bf82d24..85f8ad8d 100644 --- a/examples/reservoir_simulation/Norne/README.md +++ b/examples/reservoir_simulation/Norne/README.md @@ -9,7 +9,7 @@ Calibration of subsurface structures is an important step to forecast fluid dyna Reservoir model calibration is applicable and relevant for locating new hydrocarbon deposits and for CCUS stratigraphic trapping initiatives in many energy companies. Energy companies are aiming to accelerate their forward simulation codes for precise and detailed subsurface/dynamic/Petro-physical mappings of their assets/plays. A fascinating and easy to implement meshless approximation to solve reservoir simulation forward problems using physics constrained/informed deep neural networks show promising results.In this project, a physics informed neural operators (PINOs) is developed for surrogating a Two phase flow black oil model and a recently developed weighted adaptive regularised ensemble kalman inversion method is used for solving the inverse problem. -The aim of this project is to develop an integrated workflow, where the finite volume fully/adaptive implicit black oil reservoir simulator is replaced by a phyiscs informed neural operator. This developed PINO surrogate is now used in an inverse problem methodology. A newly developed adaptive regularised ensemble alman inversion method with covariance localisation together with a mixture of experts approach is implemented. This approach called _PINO-CCR_ is well suited for forward and inverse uncertainty quantifiication . +The aim of this project is to develop an integrated workflow, where the finite volume fully/adaptive implicit black oil reservoir simulator is replaced by a phyiscs informed neural operator. This developed PINO surrogate is now used in an inverse problem methodology. A newly developed adaptive regularised ensemble kalman inversion method with covariance localisation together with a mixture of experts approach is implemented. This approach called _PINO-CCR_ is well suited for forward and inverse uncertainty quantification . ## Methods for the forward and inverse problem (In the weeds): @@ -202,7 +202,7 @@ The final pressure , water saturation and gas saturation equations for a three-p **Fourier Neural operator based machine infused with physics constraint from black oil model ansatz** An FNO model architecture, introduced in [54], is shown below. -![Nvidia-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) +![NVIDIA-Energy](https://zongyi-li.github.io/assets/img/fourier_layer.png) The goal is to replace the Finite volume simulator with an FNO surrogate. @@ -406,7 +406,7 @@ are some standard parametric regressors. ## Important Dependencies & Prerequisites: -- Nvidia's PhysicsNeMo symbolic v23.09 :[link](https://github.com/NVIDIA/physicsnemo-sym) +- NVIDIA's PhysicsNeMo symbolic v23.09 :[link](https://github.com/NVIDIA/physicsnemo-sym) - CUDA 11.8 : [link](https://developer.nvidia.com/cuda-11-8-0-download-archive) - CuPy : [link](https://github.com/cupy/cupy.git) - Python 3.8 upwards @@ -623,7 +623,7 @@ tensorboard --logdir=./ --port=7007 The result for the PINO surrogate is shown in Fig.2(a), 100 training samples was used were we compute the data loss and physics loss. The water flows from the injectors (downwards facing arrows) towards the producers (upwards facing arrows). The size of the reservoir computational voxel is nx, ny, nz = 46,112,22. Three phases are considered (oil,gas and water) and the wells (9 water injectors and 4 gas injectors and 22 producers) shown here [link](https://www.equinor.com/energy/norne) . The 22 producers well have measurable quantities of oil rate, gas rate and water rate are controlled by bottom-hole-pressure. The 9 water injector wells have measurable quantity of bottom hole pressure (BHP), controlled by injection rates. 3,298 days of simulation are simulated. The left column of Fig.2(a) are the responses from the PINO surrogate, the middle column are the responses from the Flow finite volume solver and the right column is the difference between each response. For all panels in Fig. 2(a), the first row is for the pressure, the second row is for the water saturation, the third row is for oil saturation and the fourth row is for the gas saturation - The results from the Forward Problem using the PINO implementation -![alt text](Numerical_experiment/COMPARE_RESULTS/PINO/PEACEMANN_CCR/HARD_PREDICTION/Evolution.gif)***Figure 2**: Numerical implementation of Reservoir forward simulation shwoing the pressure (first row), water saturation (second row), oil saturation (third row) and gas saturation (fourth row) evolution. PINO based reservoir forwarding (left column), OPM-Flow based reservoir forwarding (first principle), (middle-column) and the difference in magnitudes from both approaches (last-column) with the well locations* +![alt text](Numerical_experiment/COMPARE_RESULTS/PINO/PEACEMANN_CCR/HARD_PREDICTION/Evolution.gif)***Figure 2**: Numerical implementation of Reservoir forward simulation showing the pressure (first row), water saturation (second row), oil saturation (third row) and gas saturation (fourth row) evolution. PINO based reservoir forwarding (left column), OPM-Flow based reservoir forwarding (first principle), (middle-column) and the difference in magnitudes from both approaches (last-column) with the well locations* @@ -733,12 +733,12 @@ They are 22 oil/water/gas producers (green), 9 water injectors (blue) and 4 gas Refer to the included Energy SDK License Agreement in **Energy_SDK_License_Agreement.pdf** for guidance. ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com ## Contributors: -- Oleg Ovcharenko- Nvidia -- Issam Said- Nvidia -- Kaustubh Tangsali- Nvidia +- Oleg Ovcharenko- NVIDIA +- Issam Said- NVIDIA +- Kaustubh Tangsali- NVIDIA diff --git a/examples/reservoir_simulation/Norne/src/Compare_FVM_surrogate.py b/examples/reservoir_simulation/Norne/src/Compare_FVM_surrogate.py index 6b5e6a6d..9308b7ad 100644 --- a/examples/reservoir_simulation/Norne/src/Compare_FVM_surrogate.py +++ b/examples/reservoir_simulation/Norne/src/Compare_FVM_surrogate.py @@ -6898,7 +6898,7 @@ def process_step( ) elapsed_time_secs2 = time.time() - start_time_plots2 msg = ( - "Reservoir simulation with NVidia PhysicsNeMo (CCR - Hard prediction) took: %s secs (Wall clock time)" + "Reservoir simulation with NVIDIA PhysicsNeMo (CCR - Hard prediction) took: %s secs (Wall clock time)" % timedelta(seconds=round(elapsed_time_secs2)) ) print(msg) diff --git a/examples/reservoir_simulation/Numerical_solvers/Black_oil_simulator/README.md b/examples/reservoir_simulation/Numerical_solvers/Black_oil_simulator/README.md index 042e8661..f9b6c4d3 100644 --- a/examples/reservoir_simulation/Numerical_solvers/Black_oil_simulator/README.md +++ b/examples/reservoir_simulation/Numerical_solvers/Black_oil_simulator/README.md @@ -1,4 +1,4 @@ -![Nvidia-Energy](../pino_modeling/3D/Forward_problem_results/FNO/TRUE/Evolution_water_3D.gif) +![NVIDIA-Energy](../pino_modeling/3D/Forward_problem_results/FNO/TRUE/Evolution_water_3D.gif) # [GPU accelerated Reservoir Simulator](https://gitlab-master.nvidia.com/GlobalEnergyTeam/simulation/gpu_black_oil_reservoir_simulation) @@ -71,14 +71,14 @@ The final pressure and saturation equations for a two-phase oil-water flow is * Creates an animation at the end ## Important Dependencies & Prerequisites: -- Nvidia's in-house GPU based black oil reservoir simulator - **NVRS** +- NVIDIA's in-house GPU based black oil reservoir simulator - **NVRS** - CUDA 11.8 : [link](https://developer.nvidia.com/cuda-11-8-0-download-archive) - CuPy : [link](https://github.com/cupy/cupy.git) - Python 3.8 upwards ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. ## Installation @@ -94,7 +94,7 @@ conda activate MDLO git clone https://gitlab-master.nvidia.com/GlobalEnergyTeam/simulation/gpu_black_oil_reservoir_simulation.git ``` -- From terminal, install (missing) dependencies in 'requirements.txt' in the conda enviroment **MDLO** +- From terminal, install missing dependencies in `requirements.txt` inside the **MDLO** environment. - Follow instructions to install CuPy from : [link](https://github.com/cupy/cupy.git) ```bash @@ -114,8 +114,8 @@ sudo chmod +x ./scripts/docker/docker-run.sh Solvers include; 1) Left-Preconditioned GMRES [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.gmres.html) 2) LSQR [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.lsqr.html) -3) Left Preconditoned Conjugate gradient [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.cg.html) -4) Constrained pressure residual -CPR (V cycle 2stage AMG for presure solve and left-precondioned GMRES with ILU(0) as preconditoner for saturation sole) [link](https://doi.org/10.2118/96809-MS) +3) Left-Preconditioned Conjugate Gradient [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.cg.html) +4) Constrained Pressure Residual (CPR) (V-cycle two-stage AMG for the pressure solve and left-preconditioned GMRES with ILU(0) for the saturation solve) [link](https://doi.org/10.2118/96809-MS) 6) Spsolve [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.spsolve.html) diff --git a/examples/reservoir_simulation/Numerical_solvers/CO2_convective_mixing_simulator/README.md b/examples/reservoir_simulation/Numerical_solvers/CO2_convective_mixing_simulator/README.md index 8b6cc8e8..a8d8a2d6 100644 --- a/examples/reservoir_simulation/Numerical_solvers/CO2_convective_mixing_simulator/README.md +++ b/examples/reservoir_simulation/Numerical_solvers/CO2_convective_mixing_simulator/README.md @@ -1,5 +1,5 @@ # GPU Based CO2-Brin sequestration -![Nvidia-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) +![NVIDIA-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) ## **Forward problem** @@ -232,7 +232,7 @@ sudo chmod +x ./scripts/docker/docker-run.sh ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. ![alt text](Evolution.gif)**Figure 1**: CO2 dissolution in brine over some epoch iterations @@ -268,5 +268,5 @@ cd .. conda deactivate ``` ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com diff --git a/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/NVR.py b/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/NVR.py index 0d83b05e..da25f011 100644 --- a/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/NVR.py +++ b/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/NVR.py @@ -15,7 +15,7 @@ # limitations under the License. """ -Nvidia Finite volume reservoir simulator with flexible solver +NVIDIA Finite volume reservoir simulator with flexible solver AMG to solve the pressure and saturation well possed inverse problem diff --git a/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/README.md b/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/README.md index df433a8b..a1b38fc4 100644 --- a/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/README.md +++ b/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/README.md @@ -1,5 +1,5 @@ # Automatic History Matching with a Weighted adaptive Regularised Ensemble Kalman Inversion ($`\alpha`$REKI) and a GPU based black oil forward model -![Nvidia-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) +![NVIDIA-Energy](https://www.dgidocs.info/slider/images/media/resources_reservoirsim.jpg) ## An Automatic History Matching Workflow with a GPU based forward solver: Calibration of subsurface structures is an important step to forecast fluid dynamics and behaviours in a plethora of geoenvironments such as petroleum and geothermal reservoirs. History matching is an ill-posed inverse process to find reservoir model parameters honouring observations by integration of static (e.g., core, logging, and seismic) and dynamic data (e.g., oil and gas rate, water cut, bottomhole pressure, and subsidence/uplift) .In recent developments, the ensemble Kalman filter (EnKF) (Evensen 1994, Law et al 2012, Stuart 2010), ensemble smoother (ES) (van Leeuwen & Evensen 1996) ES with multiple data assimilation (ES-MDA) (Emerick & Reynolds 2013) and Iterative variants of ES (Chen & Oliver 2011, Iglesias 2013) have all been utilised for history matching/data assimilation problems. However, the ensemble-based data assimilation approaches have limited capability in preserving non-Gaussian distributions of model parameters such as facies (Aanonsen et al.,2009, Villegas et al, 2018, Lorentzen et al, 2013). In the ensemble-based data assimilation techniques, model parameters lose the non- Gaussianity of their original distributions (generated from a geostatistical software) that are initially constrained and constructed to available hard data and the distributions of the model parameters tend towards Gaussian ones (Evensen & Eikrem 2018, Kim et al 2018). Some methods utilised for this parametrisation technique in reservoir characterization literature is, the discrete cosine transform (DCT) (Jafarpour & McLaughlin, 2007) (Liu & Jafarpour, 2013), level set (Moreno & Aanonsen 2007, Dorn & Villegas 2008, Villegas et al 2018, Chang et al 2010, Lorentzen et al., 2013) and sparse geologic dictionaries (Etienam et al, 2019, Kim et al, 2018, Khaninezhad et al, 2012). In particular, Fourier transform-based methods such as DCT are capable of capturing essential traits such as main shapes and patterns of a facies channel reservoir (Khaninezhad, et al., 2012) but reveal a deficiency in describing a crisp contrast among different facies because of data loss from inverse transformation (Kim et al 2018, Khaninezhad et al, 2012, Tarrahi & Afra,2016). @@ -144,14 +144,14 @@ The final pressure and saturation equations for a two-phase oil-water flow is ## Important Dependencies & Prerequisites: -- Nvidia's in-house GPU based black oil reservoir simulator - **NVRS** +- NVIDIA's in-house GPU based black oil reservoir simulator - **NVRS** - CUDA 11.8 : [link](https://developer.nvidia.com/cuda-11-8-0-download-archive) - CuPy : [link](https://github.com/cupy/cupy.git) - Python 3.8 upwards ## Getting Started: - These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -- The code is developed in a Linux enviroment. +- The code is developed in a Linux environment. ## Installation @@ -175,21 +175,21 @@ sudo chmod +x ./scripts/docker/docker-build.sh sudo chmod +x ./scripts/docker/docker-run.sh # Run docker container (also enables X server for docker) ./scripts/docker/docker-run.sh -`````` +``` ### Run **NVRS** is a fully GPU based Black oil reservoir simulator. Solvers include; 1) Left-Preconditioned GMRES [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.gmres.html) 2) LSQR [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.lsqr.html) -3) Left Preconditoned Conjugate gradient [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.cg.html) -4) Constrained pressure residual -CPR (V cycle 2stage AMG for presure solve and left-precondioned GMRES with ILU(0) as preconditoner for saturation sole) [link](https://doi.org/10.2118/96809-MS) +3) Left Preconditioned Conjugate Gradient [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.cg.html) +4) Constrained Pressure Residual (CPR) (V-cycle two-stage AMG for the pressure solve and left-preconditioned GMRES with ILU(0) for the saturation solve) [link](https://doi.org/10.2118/96809-MS) 6) Spsolve [link](https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.spsolve.html) 7) AMGx suite of solvers **CPR is the default solver**. 1) Pressure solver: V cycle 2 stage AMG with Aggregation and Level scheduling for the coarsening/restriction operations -2) Saturation solver: Left preconditoned GMRES with ILU(0) as preconditioner +2) Saturation solver: Left preconditioned GMRES with ILU(0) as preconditioner 3) Smoothers include : Jacobi, Gauss-Seidel, SOR @@ -295,7 +295,7 @@ conda deactivate Refer to the included Energy SDK License Agreement in **Energy_SDK_License_Agreement.pdf** for guidance. ## Author: -- Clement Etienam- Solution Architect-Energy @Nvidia Email: cetienam@nvidia.com +- Clement Etienam- Solution Architect-Energy @NVIDIA Email: cetienam@nvidia.com diff --git a/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/simulator_ensemble.py b/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/simulator_ensemble.py index 6dc4b2c6..c5c4f69e 100644 --- a/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/simulator_ensemble.py +++ b/examples/reservoir_simulation/Numerical_solvers/Reservoir_history_matching/simulator_ensemble.py @@ -5185,7 +5185,7 @@ def Get_weighting(simData, measurment): print("--------------------------ADAPTIVE-REKI----------------------------------") print("History Matching using the Adaptive Regularised Ensemble Kalman Inversion") -print("Novel Implementation by Clement Etienam, SA-Nvidia: SA-ML/A.I/Energy") +print("Novel Implementation by Clement Etienam, SA-NVIDIA: SA-ML/A.I/Energy") if DEFAULT == 1: Technique_REKI = 2 @@ -6156,7 +6156,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Convolution Autoencoder \ Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Autoencoder------------------------") bb = os.path.isfile("PACKETS/encoder.h5") @@ -8269,7 +8269,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Convolution Autoencoder \ Parametrisation with Generative adverserail network prior\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print("-------------------------learn Autoencoder------------------------") bb = os.path.isfile("PACKETS/autoencoder.h5") @@ -8987,7 +8987,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Generative\ adverserail network prior for permeability field alone\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print(" Learn the permeability field GAN module") @@ -9668,7 +9668,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 7: print("") print("Adaptive Regularised Ensemble Kalman Inversion with KMEANS Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) @@ -10352,7 +10352,7 @@ def Get_weighting(simData, measurment): "Adaptive Regularised Ensemble Kalman Inversion with Variational Convolution Autoencoder \ Parametrisation\n" ) - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") print( "-------------------------learn Variational Autoencoder------------------------" @@ -11219,7 +11219,7 @@ def Get_weighting(simData, measurment): elif Technique_REKI == 9: print("") print("Adaptive Regularised Ensemble Kalman Inversion with DCT Parametrisation") - print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @Nvidia") + print("Novel Implementation: Author: Clement Etienam SA Energy/GPU @NVIDIA") print("Starting the History matching with ", str(Ne) + " Ensemble members") os.chdir(oldfolder) diff --git a/examples/reservoir_simulation/README.md b/examples/reservoir_simulation/README.md index e339869d..7b0a468c 100644 --- a/examples/reservoir_simulation/README.md +++ b/examples/reservoir_simulation/README.md @@ -1,25 +1,22 @@ # PhysicsNeMo-Sym Reservoir Simulation Examples -This repository hosts various examples for reservoir simulation tasks using PhysicsNeMo-Sym, -developed by NVIDIA. +This directory hosts a collection of reservoir-simulation examples built with NVIDIA PhysicsNeMo-Sym. * [2D Reservoir Simulation](./2D/) - Explore examples and guidelines for conducting 2D reservoir simulation forward - problem using PhysicsNeMo-Sym. This section includes detailed instructions, + Explore examples and guidelines for conducting 2D reservoir-simulation forward problems using PhysicsNeMo-Sym. This section includes detailed instructions, setup procedures, and example scripts to assist you in setting up and running 2D reservoir simulation projects. * [3D Reservoir Simulation](./3D/) - Discover examples and instructions for performing 3D reservoir simulation forward - problems with PhysicsNeMo-Sym. This section provides insights into setting up 3D + Discover examples and instructions for performing 3D reservoir-simulation forward problems with PhysicsNeMo-Sym. This section provides insights into setting up 3-D reservoir simulation projects, including sample scripts and usage guidelines. * [CCUS](./CCUS/) Explore examples and guidelines for Carbon Capture, Utilization, and Storage (CCUS) - reservoir simulation forward problems using PhysicsNeMo-Sym. This section covers various + reservoir-simulation problems using PhysicsNeMo-Sym. This section covers various aspects of CCUS reservoir simulation, including setup procedures and usage instructions. @@ -32,9 +29,8 @@ developed by NVIDIA. * [GenAI Workflows](./GenAI_workflows/) - Explore Generative AI-driven workflows for 2D and 3D reservoir simulation forward - and inverse problems using PhysicsNeMo-Sym in this section. Discover innovative - approaches and techniques powered by AI for enhancing 2D reservoir simulation + Explore Generative-AI workflows for forward and inverse 2D and 3D reservoir-simulation problems using PhysicsNeMo-Sym. Discover innovative + approaches and techniques powered by AI for enhancing reservoir-simulation projects. This section provides detailed explanations, example workflows, and usage guidelines. @@ -58,11 +54,11 @@ developed by NVIDIA. * [Reservoir History Matching](./Numerical_solvers/Reservoir_history_matching/) - Learn about Reservoir History Matching techniques and implementations using a + Learn about reservoir-history-matching techniques and implementations using a numerical solver. This solver allows users to match historical data with simulated results, improving the accuracy and reliability of reservoir models. Detailed usage instructions and example scripts are provided to assist users in implementing - history matching strategies effectively. + history-matching strategies effectively. Feel free to explore each section for detailed instructions, examples, and guidelines for reservoir simulation tasks using PhysicsNeMo-Sym. For any questions or issues, please diff --git a/examples/seismic_wave/README.md b/examples/seismic_wave/README.md index 6641e35a..e546c0ce 100644 --- a/examples/seismic_wave/README.md +++ b/examples/seismic_wave/README.md @@ -1,22 +1,22 @@ -# PINNs for simulating 2D seismic wave propagation +# PINNs for simulating 2D seismic-wave propagation -This example uses PINNs for emulating 2D time-dependent seismic wave propagation using a simple domain geometry. +This example employs PINNs to emulate time-dependent 2D seismic-wave propagation in a simple domain. ## Problem overview -This sample illustrates how to solve the acoustic wave equation -You can get more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-sym/user_guide/foundational/2d_wave_equation.html) +This sample illustrates how to solve the acoustic wave equation. +For additional details, see the [documentation](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-sym/user_guide/foundational/2d_wave_equation.html). ## Dataset -This example does not require any dataset as it solves of the acoustic wave equation, the physical geometry and the boundary conditions. +This example does not require an external dataset because it directly solves the acoustic wave equation using the prescribed geometry and boundary conditions. ## Model overview and architecture -We use a simple fully connected MLP to approximate the solution of the 2D time-dependent wave equation for the given boundary conditions. The neural network will have x, y and t inputs and u, c (pressure response and velocity) and outputs . +We use a fully connected MLP to approximate the solution of the time-dependent 2-D wave equation given the boundary conditions. The network takes (x, y, t) as input and outputs the pressure response u and wave velocity c. ## Getting Started -To get started, simply run +To run the example, execute: ```bash python wave_2d.py diff --git a/examples/test/README.md b/examples/test/README.md index 25098672..3b2ae3a7 100755 --- a/examples/test/README.md +++ b/examples/test/README.md @@ -14,9 +14,11 @@ For example, the command to run all of the unit tests on gpus with ID 0 and 1 is python run_experiments.py --mode=unit_tests --gpus=0,1 ``` -NOTE, before running experiments please install quadpy with the command -`pip install quadpy GPUtil gdown`. -This library is not included in the docker image for technical reasons. +NOTE: Before running experiments, install QuadPy and related utilities: +```bash +pip install quadpy GPUtil gdown +``` +This library is not included in the Docker image for technical reasons. ## Checking Convergence diff --git a/examples/three_fin_3d/README.md b/examples/three_fin_3d/README.md index 71209f67..b0e38736 100644 --- a/examples/three_fin_3d/README.md +++ b/examples/three_fin_3d/README.md @@ -1,30 +1,30 @@ -# PINNs as parameterized surrogate model for Heat Sink design optimization +# PINNs as a parameterized surrogate model for heat-sink design optimization -This example uses PINNs to create a parameterized surrogate model that can be used to explore the design space of certain design parameters to identify an optimal design. +This example uses PINNs to create a parameterized surrogate model that explores the design space of key parameters and identifies an optimal design. ## Problem overview -This sample illustrates the capabilities in PhysicsNeMo Sym to specify a paramterized geometry of a 3-fin heat sink whose fin height, fin thickness, and fin length are variable. It illustrates use of the CSG module to construct a parameterized geometry and then to use the trained surrogate to explore the design space for a range of values of the fin height, fin thickness, and fin length. -You can get more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-sym/user_guide/advanced/parametrized_simulations.html) +This sample demonstrates how PhysicsNeMo Sym can specify a parameterized geometry of a three-fin heat sink whose fin height, thickness, and length are variable. It shows how to use the CSG module to construct the geometry and, after training, use the surrogate to explore the design space across those parameters. +For more details, see the [documentation](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-sym/user_guide/advanced/parametrized_simulations.html). ## Dataset -This example does not require any dataset as it solves of the Navier Stokes flow using the equations, the physical geometry and the boundary conditions. +This example does not require an external dataset because it directly solves the Navier–Stokes equations given the geometry and boundary conditions. ## Model overview and architecture -This is a multi-physics problem where we have to emulate both the flow and heat tranfer. This example has three neural networks - one for emulating the flow governed by the Navier-Stokes equations, one for heat transfer in the fluid for Advection diffusion and one for heat transfer in the solid due to diffusion. We use a simple fully connected MLP for all three networks. +This is a multiphysics problem that must emulate both fluid flow and heat transfer. We deploy three neural networks: one for the flow (Navier–Stokes), one for heat transfer in the fluid (advection–diffusion), and one for heat transfer in the solid (diffusion). Each network is a fully connected MLP. ## Getting Started -To train, simply run +To train the surrogate, run: ```bash python three_fin_flow.py python three_fin_thermal.py ``` -To infer in a design exploration loop +To perform inference within a design-exploration loop, run: ```bash python three_fin_design.py diff --git a/physicsnemo/sym/hydra/help.yaml b/physicsnemo/sym/hydra/help.yaml index b3739fee..93913915 100644 --- a/physicsnemo/sym/hydra/help.yaml +++ b/physicsnemo/sym/hydra/help.yaml @@ -21,7 +21,7 @@ app_name: NVIDIA PhysicsNeMo header: == ${hydra.help.app_name} == footer: |- - Nvidia Coorporation (https://developer.nvidia.com/physicsnemo) + NVIDIA Corporation (https://developer.nvidia.com/physicsnemo) By using this software you are agreeing to the SOFTWARE DEVELOPER KITS, SAMPLES AND TOOLS LICENSE AGREEMENT