Skip to content
Draft
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
12 changes: 12 additions & 0 deletions src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ class FlowSolverBase : public PhysicsSolverBase
GEOS_ERROR( "Poroelastic fluxes with conforming fractures not yet implemented." );
}

virtual void assembleHydrofracFluxTermsALM( real64 const time_n,
real64 const dt,
DomainPartition const & domain,
DofManager const & dofManager,
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs,
CRSMatrixView< real64, localIndex const > const & dR_dAper )
{
GEOS_UNUSED_VAR ( time_n, dt, domain, dofManager, localMatrix, localRhs, dR_dAper );
GEOS_ERROR( "Poroelastic fluxes with conforming fractures ALM not yet implemented." );
}

void initializeState( DomainPartition & domain );

virtual void initializeFluidState( MeshLevel & mesh, string_array const & regionNames ) { GEOS_UNUSED_VAR( mesh, regionNames ); }
Expand Down
88 changes: 88 additions & 0 deletions src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#include "physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsEmbeddedFractures.hpp"
#include "physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsConformingFractures.hpp"
#include "physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFractures.hpp"
#include "physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsConformingFracturesALM.hpp"
#include "physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFracturesALM.hpp"

/**
* @namespace the geos namespace that encapsulates the majority of the code
Expand Down Expand Up @@ -651,6 +653,92 @@ void SinglePhaseFVM< BASE >::assembleHydrofracFluxTerms( real64 const GEOS_UNUSE

}

template< typename BASE >
void SinglePhaseFVM< BASE >::assembleHydrofracFluxTermsALM( real64 const GEOS_UNUSED_PARAM ( time_n ),
real64 const dt,
DomainPartition const & domain,
DofManager const & dofManager,
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs,
CRSMatrixView< real64, localIndex const > const & dR_dAper )
{
GEOS_MARK_FUNCTION;

NumericalMethodsManager const & numericalMethodManager = domain.getNumericalMethodManager();
FiniteVolumeManager const & fvManager = numericalMethodManager.getFiniteVolumeManager();
FluxApproximationBase const & fluxApprox = fvManager.getFluxApproximation( m_discretizationName );

string const & dofKey = dofManager.getKey( SinglePhaseBase::viewKeyStruct::elemDofFieldString() );


this->forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &,
MeshLevel const & mesh,
string_array const & )
{
fluxApprox.forStencils< CellElementStencilTPFA, FaceElementToCellStencil >( mesh, [&]( auto & stencil )
{
typename TYPEOFREF( stencil ) ::KernelWrapper stencilWrapper = stencil.createKernelWrapper();

if( m_isThermal )
{
thermalSinglePhaseFVMKernels::
FluxComputeKernelFactory::createAndLaunch< parallelDevicePolicy<> >( dofManager.rankOffset(),
dofKey,
this->getName(),
mesh.getElemManager(),
stencilWrapper,
dt,
localMatrix.toViewConstSizes(),
localRhs.toView() );
}
else
{
singlePhaseFVMKernels::
FluxComputeKernelFactory::createAndLaunch< parallelDevicePolicy<> >( dofManager.rankOffset(),
dofKey,
this->getName(),
mesh.getElemManager(),
stencilWrapper,
dt,
localMatrix.toViewConstSizes(),
localRhs.toView() );
}
} );

fluxApprox.forStencils< SurfaceElementStencil >( mesh, [&]( auto & stencil )
{
typename TYPEOFREF( stencil ) ::KernelWrapper stencilWrapper = stencil.createKernelWrapper();

if( m_isThermal )
{
thermalSinglePhasePoromechanicsConformingFracturesALMKernels::
ConnectorBasedAssemblyKernelFactory::createAndLaunch< parallelDevicePolicy<> >( dofManager.rankOffset(),
dofKey,
this->getName(),
mesh.getElemManager(),
stencilWrapper,
dt,
localMatrix.toViewConstSizes(),
localRhs.toView(),
dR_dAper );
}
else
{
singlePhasePoromechanicsConformingFracturesALMKernels::
ConnectorBasedAssemblyKernelFactory::createAndLaunch< parallelDevicePolicy<> >( dofManager.rankOffset(),
dofKey,
this->getName(),
mesh.getElemManager(),
stencilWrapper,
dt,
localMatrix.toViewConstSizes(),
localRhs.toView(),
dR_dAper );
}
} );
} );
}

template< typename BASE >
void
SinglePhaseFVM< BASE >::applyBoundaryConditions( real64 const time_n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ class SinglePhaseFVM : public BASE
arrayView1d< real64 > const & localRhs,
CRSMatrixView< real64, localIndex const > const & dR_dAper ) override final;

virtual void
assembleHydrofracFluxTermsALM( real64 const time_n,
real64 const dt,
DomainPartition const & domain,
DofManager const & dofManager,
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs,
CRSMatrixView< real64, localIndex const > const & dR_dAper ) override final;

/**@}*/

virtual void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set( multiPhysicsSolvers_headers
poromechanicsKernels/SinglePhasePoromechanics.hpp
poromechanicsKernels/SinglePhasePoromechanics_impl.hpp
poromechanicsKernels/SinglePhasePoromechanicsConformingFractures.hpp
poromechanicsKernels/SinglePhasePoromechanicsConformingFracturesALM.hpp
poromechanicsKernels/SinglePhasePoromechanicsDamage.hpp
poromechanicsKernels/SinglePhasePoromechanicsDamage_impl.hpp
poromechanicsKernels/SinglePhasePoromechanicsEFEM.hpp
Expand All @@ -58,6 +59,7 @@ set( multiPhysicsSolvers_headers
poromechanicsKernels/ThermalSinglePhasePoromechanicsEFEM.hpp
poromechanicsKernels/ThermalSinglePhasePoromechanicsEFEM_impl.hpp
poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFractures.hpp
poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFracturesALM.hpp
poromechanicsKernels/ThermalSinglePhasePoromechanicsEmbeddedFractures.hpp
SinglePhasePoromechanics.hpp
SinglePhasePoromechanicsEmbeddedFractures.hpp
Expand Down
Loading
Loading