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

feat: Add immiscible multiphase flow package #3251

Closed
wants to merge 87 commits into from

Conversation

CusiniM
Copy link
Collaborator

@CusiniM CusiniM commented Jul 30, 2024

Implementation of a multiphase immiscible solver for compressible fluids with viscous, gravity and capillary forces:

  • Included new ImmiscibleMultiphaseFlow solver and associated kernels (currently limited to two phases)
  • Standard and total mass formulations
  • Cell-centered Dirichlet and flux boundary conditions
  • Included new TwoPhaseFluid model for tabular data input
  • Direct and iterative linear solver compatibility
  • GPU compatibility
  • Set of input files with validation cases
  • Unit tests and documentation provided

@Ammara-14 Ammara-14 self-assigned this Jul 30, 2024
@ryar9534 ryar9534 self-assigned this Aug 1, 2024
Comment on lines 12 to 13
"program": "${userHome}/two-phase/GEOS/install-ubuntu22-debug/bin/geosx",
"args": ["-i", "/home/rpiazza/two-phase/GEOS/inputFiles/immiscibleMultiphaseFlow/immiscible_2phaseFlow_1d.xml", "-o", "${userHome}/geos-output"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remove these changes.

@matteofrigo5
Copy link
Contributor

I'd remove the file host-configs/Stanford/ubuntu22.cmake before merging this branch into the develop branch.

@bd713 bd713 added the flag: requires rebaseline Requires rebaseline branch in integratedTests label Dec 12, 2024
{
FlowSolverBase::registerDataOnMesh( meshBodies );

// DomainPartition const & domain = this->getGroupByPath< DomainPartition >( "/Problem/domain" );
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?


} );

// FaceManager & faceManager = mesh.getFaceManager();
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

FlowSolverBase::initializePreSubGroups();

DomainPartition & domain = this->getGroupByPath< DomainPartition >( "/Problem/domain" );
// ConstitutiveManager const & cm = domain.getConstitutiveManager();
Copy link
Contributor

Choose a reason for hiding this comment

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

remove

// ConstitutiveManager const & cm = domain.getConstitutiveManager();

// // 1. Validate various models against each other (must have same phases and components)
// validateConstitutiveModels( domain );
Copy link
Contributor

Choose a reason for hiding this comment

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

check and remove if not needed

arrayView2d< real64, immiscibleFlow::USD_PHASE > const phaseMass = subRegion.getField< fields::immiscibleMultiphaseFlow::phaseMass >();

// Might be needed for geomechanics????? if so, need to change the accumulation as well?
//arrayView1d< real64 > const deltaVolume = subRegion.getField< fields::flow::deltaVolume >();
Copy link
Contributor

Choose a reason for hiding this comment

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

this is used for geomechanics with fractures yes, see https://github.com/GEOS-DEV/GEOS/pull/3228/files#diff-44d45911b0c4b17989e2a0ba29b844cb0ee4975f16329ff612825db0b269d55b
not really needed in your PR at this point

// apply flux boundary conditions
applySourceFluxBC( time_n, dt, dofManager, domain, localMatrix.toViewConstSizes(), localRhs.toView() );

// for( localIndex row = 0; row < localMatrix.toViewConstSizes().numRows(); ++row )
Copy link
Contributor

Choose a reason for hiding this comment

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

remove, there is a general way to print out matrix and rhs in base solver

{
GEOS_MARK_FUNCTION;

// // Only validate BC at the beginning of Newton loop
Copy link
Contributor

Choose a reason for hiding this comment

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

restore or remove

}
} );

// SourceFluxStatsAggregator::forAllFluxStatWrappers( subRegion, fs.getName(),
Copy link
Contributor

Choose a reason for hiding this comment

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

restore?

GEOS_UNUSED_VAR( dt );

DofManager::CompMask pressureMask( m_numDofPerCell, 0, 1 );
//DofManager::CompMask PhaseMask( m_numDofPerCell, 1, m_numPhases );
Copy link
Contributor

Choose a reason for hiding this comment

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

remove if not needed

@@ -213,6 +213,7 @@ class MGRStrategyBase
#if GEOS_USE_HYPRE_DEVICE == GEOS_USE_HYPRE_CUDA || GEOS_USE_HYPRE_DEVICE == GEOS_USE_HYPRE_HIP
GEOS_LAI_CHECK_ERROR( HYPRE_BoomerAMGSetAggInterpType( solver.ptr, hypre::getAMGAggressiveInterpolationType( LinearSolverParameters::AMG::AggInterpType::modifiedExtendedE ) ) );
GEOS_LAI_CHECK_ERROR( HYPRE_BoomerAMGSetCoarsenType( solver.ptr, hypre::getAMGCoarseningType( LinearSolverParameters::AMG::CoarseningType::PMIS ) ) );
GEOS_LAI_CHECK_ERROR( HYPRE_BoomerAMGSetAggNumLevels( solver.ptr, 0 ) );
Copy link
Collaborator Author

@CusiniM CusiniM Jan 28, 2025

Choose a reason for hiding this comment

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

can you remove this and create a PR only with this change? @victorapm we should test this. Unless you know why this would impact GPU performance so much.

@rpiazza87 rpiazza87 closed this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: requires rebaseline Requires rebaseline branch in integratedTests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants