Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
266 changes: 266 additions & 0 deletions inputFiles/mortar/TwoDomainBeam.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
<?xml version="1.0" ?>

<Problem>
<Events
maxTime="1.0">

<SoloEvent
name="genSurfaceMaster"
target="/Solvers/SurfaceGenMaster"/>

<SoloEvent
name="genSurfaceSlave"
target="/Solvers/SurfaceGenSlave"/>

<PeriodicEvent
name="solverApplications"
beginTime="0.0"
forceDt="1.0"
target="/Solvers/Mortar"/>

<PeriodicEvent
name="outputs"
timeFrequency="1.0"
target="/Outputs/vtkOutput_2beams"/>

<SoloEvent
name="initial_output"
targetTime="0.0"
target="/Outputs/vtkOutput_2beams"/>

</Events>

<ElementRegions>
<CellElementRegion
name="regionMaster"
meshBody="meshMaster"
cellBlocks="{ cb1 }"
materialList="{ steel }"/>

<CellElementRegion
name="regionSlave"
meshBody="meshSlave"
cellBlocks="{ cb2 }"
materialList="{ steel }"/>

<SurfaceElementRegion
name="surfaceMaster"
meshBody="meshMaster"
faceBlock="faceElementSubRegion"
defaultAperture="1.0e-6"
materialList="{ frictionLaw }"/>

<SurfaceElementRegion
name="surfaceSlave"
meshBody="meshSlave"
faceBlock="faceElementSubRegion"
defaultAperture="1.0e-6"
materialList="{ frictionLaw }"/>
</ElementRegions>

<Constitutive>
<ElasticIsotropic
name="steel"
defaultDensity="0.0"
defaultBulkModulus="175.0"
defaultShearModulus="80.77"/>

<Coulomb
name="frictionLaw"
cohesion="0.0"
frictionCoefficient="0.577350269"/>
</Constitutive>

<FieldSpecifications>
<FieldSpecification
name="surf"
initialCondition="1"
setNames="{ surface }"
objectPath="faceManager"
fieldName="ruptureState"
scale="1"/>

<FieldSpecification
name="x_fix_left"
objectPath="nodeManager"
fieldName="totalDisplacement"
component="0"
scale="0.0"
setNames="{ fixed_left}"/>

<FieldSpecification
name="y_fix_left"
objectPath="nodeManager"
fieldName="totalDisplacement"
component="1"
scale="0.0"
setNames="{ fixed_left}"/>

<FieldSpecification
name="z_fix_left"
objectPath="nodeManager"
fieldName="totalDisplacement"
component="2"
scale="0.0"
setNames="{ fixed_left }"/>

<FieldSpecification
name="x_fix_right"
objectPath="nodeManager"
fieldName="totalDisplacement"
component="0"
scale="0.0"
setNames="{ fixed_right}"/>

<FieldSpecification
name="y_fix_right"
objectPath="nodeManager"
fieldName="totalDisplacement"
component="1"
scale="0.0"
setNames="{ fixed_right}"/>

<FieldSpecification
name="z_fix_right"
objectPath="nodeManager"
fieldName="totalDisplacement"
component="2"
scale="0.0"
setNames="{ fixed_right}"/>

<Traction
name="distributed_load_left"
objectPath="faceManager"
scale="1.0e-2"
direction="{ 0, 1, 0 }"
functionName="loadFunction"
setNames="{ top_surface_left}"/>

<Traction
name="distributed_load_right"
objectPath="faceManager"
scale="1.0e-2"
direction="{ 0, 1, 0 }"
functionName="loadFunction"
setNames="{ top_surface_right}"/>

</FieldSpecifications>

<Functions>
<TableFunction
name="loadFunction"
inputVarNames="{ time }"
coordinates="{ 0.0, 1.0 }"
values="{ -1.0, -1.0 }"/>
</Functions>

<Outputs>
<VTK
name="vtkOutput_2beams"
plotFileRoot="VTKplot"/>

</Outputs>

<Solvers
gravityVector="{ 0.0, 0.0, 0.0 }">
<SurfaceGenerator
name="SurfaceGenMaster"
logLevel="0"
fractureRegion="surfaceMaster"
targetRegions="{ meshMaster/regionMaster}"
initialRockToughness="1.0e6"
mpiCommOrder="1"/>

<SurfaceGenerator
name="SurfaceGenSlave"
logLevel="0"
fractureRegion="surfaceSlave"
targetRegions="{ meshSlave/regionSlave}"
initialRockToughness="1.0e6"
mpiCommOrder="1"/>

<SolidMechanicsMortarContact
name="Mortar"
timeIntegrationOption="QuasiStatic"
logLevel="2"
discretization="FE1"
targetRegions="{ meshMaster/regionMaster, meshMaster/surfaceMaster, meshSlave/regionSlave, meshSlave/surfaceSlave }"
master = "surfaceMaster"
slave = "surfaceSlave">
<NonlinearSolverParameters
newtonTol="5.0e-6"
logLevel="2"
newtonMaxIter="20"
lineSearchAction="None"
lineSearchMaxCuts="4"/>
<LinearSolverParameters
solverType="direct"
logLevel="1"/>
</SolidMechanicsMortarContact>

</Solvers>

<NumericalMethods>
<FiniteElements>
<FiniteElementSpace
name="FE1"
order="1"
useHighOrderQuadratureRule = "1"/>
</FiniteElements>
</NumericalMethods>

<Mesh>
<InternalMesh
name="meshMaster"
elementTypes="{ C3D8 }"
xCoords="{ 0, 8 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 16 }"
ny="{ 10 }"
nz="{ 10 }"
cellBlockNames="{ cb1 }"/>

<InternalMesh
name="meshSlave"
elementTypes="{ C3D8 }"
xCoords="{ 8, 16 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 24 }"
ny="{ 16 }"
nz="{ 16 }"
cellBlockNames="{ cb2 }"/>

</Mesh>

<Geometry>
<Box
name = "fixed_left"
xMin = "{-0.01,-0.01,-0.01}"
xMax = "{0.01,1.01,1.01}"/>
<Box
name = "fixed_right"
xMin = "{15.99,-0.01,-0.01}"
xMax = "{16.01,1.01,1.01}"/>

<Box
name = "top_surface_left"
xMin = "{-0.01,0.99,-0.01}"
xMax = "{8.01,1.01,1.01}"/>
<Box
name = "top_surface_right"
xMin = "{7.99,0.99,-0.01}"
xMax = "{16.01,1.01,1.01}"/>

<Rectangle
name="surface"
normal="{1.0, 0.0, 0.0}"
origin="{8.0, 0.5, 0.5}"
lengthVector="{0.0, 1.0, 0.0}"
widthVector="{0.0, 0.0, 1.0}"
dimensions="{ 1.0, 1.0 }"/>

</Geometry>

</Problem>
2 changes: 1 addition & 1 deletion src/coreComponents/constitutive/PVTPackage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be here

Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,18 @@ class H1_QuadrilateralFace_Lagrange1_GaussLegendre2 final : public FiniteElement
StackVariables const & stack,
real64 ( &N )[numNodes] );

/**
* @brief Calculate shape functions gradients for each support point at a
* quadrature point.
* @param coords The parent coordinates at which to evaluate the shape function gradient (unused)
* @param gradN An array to pass back the shape function gradients for each support
* point.
*/
GEOS_HOST_DEVICE
inline
static void calcGradN( real64 const (&coords)[2],
real64 ( &gradN )[numNodes][2] );

/**
* @brief Calculate shape bubble functions values at a given point in the parent space.
* @param pointCoord coordinates of the given point.
Expand Down Expand Up @@ -298,8 +310,8 @@ H1_QuadrilateralFace_Lagrange1_GaussLegendre2::
for( localIndex a=0; a<numNodes; ++a )
{
N[a] = 0.25 *
( 1 + quadratureFactor*coords[0]*parentCoords0( a ) ) *
( 1 + quadratureFactor*coords[1]*parentCoords1( a ) );
( 1 + coords[0]*parentCoords0( a ) ) *
( 1 + coords[1]*parentCoords1( a ) );
}
}
GEOS_HOST_DEVICE
Expand Down Expand Up @@ -327,6 +339,25 @@ void H1_QuadrilateralFace_Lagrange1_GaussLegendre2::
return calcN( q, N );
}


GEOS_HOST_DEVICE
inline
void H1_QuadrilateralFace_Lagrange1_GaussLegendre2::
calcGradN( real64 const (&coords)[2],
real64 (& gradN)[numNodes][2] )
{
GEOS_UNUSED_VAR( coords );

gradN[0][0] = -0.25 * (1.0 - coords[1]);
gradN[1][0] = 0.25 * (1.0 - coords[1]);
gradN[2][0] = 0.25 * (1.0 + coords[1]);
gradN[3][0] = -0.25 * (1.0 + coords[1]);
gradN[0][1] = -0.25 * (1.0 - coords[0]);
gradN[1][1] = -0.25 * (1.0 + coords[0]);
gradN[2][1] = 0.25 * (1.0 + coords[0]);
gradN[3][1] = 0.25 * (1.0 - coords[0]);
}

//*************************************************************************************************

GEOS_HOST_DEVICE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ class H1_TriangleFace_Lagrange1_Gauss final : public FiniteElementBase
return maxSupportPoints;
}

/**
* @brief Get the number of quadrature points.
* @param q Index of the quadrature point.
* @return The weight of the quadrature point.
*/
GEOS_HOST_DEVICE
static real64 getQuadratureWeight( localIndex const q )
{
return quadratureWeight( q ) * weight;
}


/**
* @brief Calculate shape functions values at a single point.
* @param[in] coords The parent coordinates at which to evaluate the shape function value
Expand Down Expand Up @@ -151,6 +163,18 @@ class H1_TriangleFace_Lagrange1_Gauss final : public FiniteElementBase
StackVariables const & stack,
real64 ( &N )[numNodes] );

/**
* @brief Calculate shape functions gradients for each support point at a
* quadrature point.
* @param coords The parent coordinates at which to evaluate the shape function gradient (unused)
* @param gradN An array to pass back the shape function gradients for each support
* point.
*/
GEOS_HOST_DEVICE
inline
static void calcGradN( real64 const (&coords)[2],
real64 ( &gradN )[numNodes][2] );

/**
* @brief Calculate shape bubble functions values at a given point in the parent space.
* @param pointCoord coordinates of the given point.
Expand Down Expand Up @@ -410,6 +434,23 @@ calcN( localIndex const q,
return calcN( q, N );
}

template< typename NUM_Q_POINTS >
GEOS_HOST_DEVICE
inline
void H1_TriangleFace_Lagrange1_Gauss< NUM_Q_POINTS >::
calcGradN( real64 const (&coords)[2],
real64 (& gradN)[numNodes][2] )
{
GEOS_UNUSED_VAR( coords );

gradN[0][0] = -1.0;
gradN[0][1] = -1.0;
gradN[1][0] = 1.0;
gradN[1][1] = 0.0;
gradN[2][0] = 0.0;
gradN[2][1] = 1.0;
}

//*************************************************************************************************

template< typename NUM_Q_POINTS >
Expand Down
Loading
Loading