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_
23 
24 namespace geos
25 {
26 
27 namespace poromechanicsFracturesKernels
28 {
29 
34 {
35 
52  template< typename POLICY, typename POROUS_WRAPPER, typename HYDRAULIC_APERTURE_WRAPPER >
53  static void
54  launch( localIndex const size,
55  POROUS_WRAPPER const & porousMaterialWrapper,
56  HYDRAULIC_APERTURE_WRAPPER const & contactWrapper,
57  arrayView2d< real64 const > const & dispJump,
58  arrayView1d< real64 const > const & pressure,
59  arrayView1d< real64 const > const & area,
60  arrayView1d< real64 const > const & volume,
61  arrayView1d< real64 > const & deltaVolume,
62  arrayView1d< real64 > const & aperture,
63  arrayView1d< real64 const > const & oldHydraulicAperture,
64  arrayView1d< real64 > const & hydraulicAperture,
65  arrayView2d< real64 const > const & fractureTraction,
66  arrayView1d< integer > const & fractureState )
67  {
68 
69  forAll< POLICY >( size, [=] GEOS_HOST_DEVICE ( localIndex const k )
70  {
71  // update aperture to be equal to the normal displacement jump
72  aperture[k] = dispJump[k][0]; // the first component of the jump is the normal one.
73 
74  real64 dHydraulicAperture_dNormalJump = 0.0;
75  real64 dHydraulicAperture_dNormalTraction = 0.0;
76  hydraulicAperture[k] = contactWrapper.computeHydraulicAperture( aperture[k],
77  fractureTraction[k][0],
78  fractureState[k],
79  dHydraulicAperture_dNormalJump,
80  dHydraulicAperture_dNormalTraction );
81 
82  deltaVolume[k] = hydraulicAperture[k] * area[k] - volume[k];
83 
84  real64 const jump[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( dispJump[k] );
85  real64 const traction[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( fractureTraction[k] );
86 
87  porousMaterialWrapper.updateStateFromPressureApertureJumpAndTraction( k, 0, pressure[k],
88  oldHydraulicAperture[k],
89  hydraulicAperture[k],
90  dHydraulicAperture_dNormalJump,
91  jump,
92  traction );
93 
94  } );
95  }
96 
97 };
98 
99 } // namespace poromechanicsFracturesKernels
100 
101 } /* namespace geos */
102 
103 #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:179
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:84
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:195
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, arrayView1d< integer > const &fractureState)
Launch the kernel function doing volume, aperture and fracture traction updates.