GEOS
SinglePhasePoromechanicsFractures.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_POROMECHANICSKERNELS_SINGLEPHASEPOROMECHANICSFRACTURES_HPP_
21 #define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_POROMECHANICSKERNELS_SINGLEPHASEPOROMECHANICSFRACTURES_HPP_
22 
23 namespace geos
24 {
25 
26 namespace poromechanicsFracturesKernels
27 {
28 
33 {
34 
51  template< typename POLICY, typename POROUS_WRAPPER, typename HYDRAULIC_APERTURE_WRAPPER >
52  static void
53  launch( localIndex const size,
54  POROUS_WRAPPER const & porousMaterialWrapper,
55  HYDRAULIC_APERTURE_WRAPPER const & contactWrapper,
56  arrayView2d< real64 const > const & dispJump,
57  arrayView1d< real64 const > const & pressure,
58  arrayView1d< real64 const > const & area,
59  arrayView1d< real64 const > const & volume,
60  arrayView1d< real64 > const & deltaVolume,
61  arrayView1d< real64 > const & aperture,
62  arrayView1d< real64 const > const & oldHydraulicAperture,
63  arrayView1d< real64 > const & hydraulicAperture,
64  arrayView2d< real64 const > const & fractureTraction )
65  {
66 
67  forAll< POLICY >( size, [=] GEOS_HOST_DEVICE ( localIndex const k )
68  {
69  // update aperture to be equal to the normal displacement jump
70  aperture[k] = dispJump[k][0]; // the first component of the jump is the normal one.
71 
72  real64 dHydraulicAperture_dNormalJump = 0.0;
73  real64 dHydraulicAperture_dNormalTraction = 0.0;
74  hydraulicAperture[k] = contactWrapper.computeHydraulicAperture( aperture[k],
75  fractureTraction[k][0],
76  dHydraulicAperture_dNormalJump,
77  dHydraulicAperture_dNormalTraction );
78 
79  deltaVolume[k] = hydraulicAperture[k] * area[k] - volume[k];
80 
81  real64 const jump[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( dispJump[k] );
82  real64 const traction[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( fractureTraction[k] );
83 
84  porousMaterialWrapper.updateStateFromPressureApertureJumpAndTraction( k, 0, pressure[k],
85  oldHydraulicAperture[k],
86  hydraulicAperture[k],
87  dHydraulicAperture_dNormalJump,
88  jump,
89  traction );
90 
91  } );
92  }
93 
94 };
95 
96 } // namespace poromechanicsFracturesKernels
97 
98 } /* namespace geos */
99 
100 #endif // GEOS_PHYSICSSOLVERS_MULTIPHYSICS_POROMECHANICSKERNELS_SINGLEPHASEPOROMECHANICSFRACTURES_HPP_
#define GEOS_HOST_DEVICE
Marks a host-device function.
Definition: GeosxMacros.hpp:49
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:85
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:196
A struct to perform volume, aperture and fracture traction updates.
static void launch(localIndex const size, POROUS_WRAPPER const &porousMaterialWrapper, HYDRAULIC_APERTURE_WRAPPER const &contactWrapper, arrayView2d< real64 const > const &dispJump, arrayView1d< real64 const > const &pressure, arrayView1d< real64 const > const &area, arrayView1d< real64 const > const &volume, arrayView1d< real64 > const &deltaVolume, arrayView1d< real64 > const &aperture, arrayView1d< real64 const > const &oldHydraulicAperture, arrayView1d< real64 > const &hydraulicAperture, arrayView2d< real64 const > const &fractureTraction)
Launch the kernel function doing volume, aperture and fracture traction updates.