Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/byer3/well debug #3530

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@
<CompositionalMultiphaseWell
name="compositionalMultiphaseWell"
logLevel="1"
writeSegDebug="1"
targetRegions="{ wellRegion1, wellRegion2 }">
<WellControls
name="wellControls1"
2 changes: 1 addition & 1 deletion src/cmake/GeosxOptions.cmake
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON )

option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF )

option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " ON )
option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " OFF )

set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" )
if( GEOS_PARALLEL_COMPILE_JOBS )
12 changes: 12 additions & 0 deletions src/coreComponents/physicsSolvers/SolverStatistics.cpp
Original file line number Diff line number Diff line change
@@ -38,6 +38,18 @@ SolverStatistics::SolverStatistics( string const & name, Group * const parent )
setApplyDefaultValue( 0 ).
setDescription( "Number of time step cuts" );

registerWrapper( viewKeyStruct::numCurrentOuterLoopIterationsString(), &m_currentNumOuterLoopIterations ).
setApplyDefaultValue( 0 ).
setDescription( "Cumulative number of current outer loop iterations" );

registerWrapper( viewKeyStruct::numCurrentNonlinearIterationsString(), &m_currentNumNonlinearIterations ).
setApplyDefaultValue( 0 ).
setDescription( "Cumulative number of current nonlinear iterations" );

registerWrapper( viewKeyStruct::numCurrentLinearIterationsString(), &m_currentNumLinearIterations ).
setApplyDefaultValue( 0 ).
setDescription( "Cumulative number of current linear iterations" );

registerWrapper( viewKeyStruct::numSuccessfulOuterLoopIterationsString(), &m_numSuccessfulOuterLoopIterations ).
setApplyDefaultValue( 0 ).
setDescription( "Cumulative number of successful outer loop iterations" );
8 changes: 8 additions & 0 deletions src/coreComponents/physicsSolvers/SolverStatistics.hpp
Original file line number Diff line number Diff line change
@@ -140,6 +140,14 @@ class SolverStatistics : public dataRepository::Group
/// String key for the number of time step cuts
static constexpr char const * numTimeStepCutsString() { return "numTimeStepCuts"; }


/// String key for the current number of outer loop iterations
static constexpr char const * numCurrentOuterLoopIterationsString() { return "numCurrentOuterLoopIterations"; }
/// String key for the current number of nonlinear iterations
static constexpr char const * numCurrentNonlinearIterationsString() { return "numCurrentNonlinearIterations"; }
/// String key for the current number of linear iterations
static constexpr char const * numCurrentLinearIterationsString() { return "numCurrentLinearIterations"; }

/// String key for the successful number of outer loop iterations
static constexpr char const * numSuccessfulOuterLoopIterationsString() { return "numSuccessfulOuterLoopIterations"; }
/// String key for the successful number of nonlinear iterations

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -241,6 +241,26 @@ class CompositionalMultiphaseWell : public WellSolverBase
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs ) override;

/**
* @brief apply a special treatment to the wells that are shut
* @param time_n the time at the previous converged time step
* @param dt the time step size
* @param domain the physical domain object
* @param dofManager degree-of-freedom manager associated with the linear system
* @param matrix the system matrix
* @param rhs the system right-hand side vector
*/


virtual void outputWellDebug( real64 const time,
real64 const dt,
integer num_timesteps,
integer current_newton_iteration,
integer num_timestep_cuts,
DomainPartition & domain,
DofManager const & dofManager,
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs ) override;
/**
* @brief Sets all the negative component densities (if any) to zero.
* @param domain the physical domain object
@@ -351,6 +371,13 @@ class CompositionalMultiphaseWell : public WellSolverBase
real64 const & dt,
DomainPartition & domain ) override;

void printSegRates( real64 const & time_n,
real64 const & dt,
integer num_timesteps,
integer num_timestep_cuts,
integer current_newton_iteration,
DomainPartition & domain );

private:

/**
Original file line number Diff line number Diff line change
@@ -614,6 +614,27 @@ void SinglePhaseWell::assembleVolumeBalanceTerms( DomainPartition const & GEOS_U
// not implemented for single phase flow
}


void SinglePhaseWell::outputWellDebug( real64 const time,
real64 const dt,
integer num_timesteps,
integer current_newton_iteration,
integer num_timestep_cuts,
DomainPartition & domain,
DofManager const & dofManager,
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs )
{
GEOS_UNUSED_VAR( time );
GEOS_UNUSED_VAR( dt );
GEOS_UNUSED_VAR( num_timesteps );
GEOS_UNUSED_VAR( current_newton_iteration );
GEOS_UNUSED_VAR( num_timestep_cuts );
GEOS_UNUSED_VAR( domain );
GEOS_UNUSED_VAR( dofManager );
GEOS_UNUSED_VAR( localMatrix );
GEOS_UNUSED_VAR( localRhs );
}
void SinglePhaseWell::computePerforationRates( real64 const & time_n,
real64 const & dt, DomainPartition & domain )
{
Original file line number Diff line number Diff line change
@@ -224,6 +224,18 @@ class SinglePhaseWell : public WellSolverBase
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs ) override;



virtual void outputWellDebug( real64 const time,
real64 const dt,
integer num_timesteps,
integer current_newton_iteration,
integer num_timestep_cuts,
DomainPartition & domain,
DofManager const & dofManager,
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs )override;

struct viewKeyStruct : WellSolverBase::viewKeyStruct
{
static constexpr char const * dofFieldString() { return "singlePhaseWellVars"; }
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.