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

refactor: Preparatory for well to frac connection #3227

Open
wants to merge 46 commits into
base: develop
Choose a base branch
from

Conversation

paveltomin
Copy link
Contributor

@paveltomin paveltomin commented Jul 17, 2024

This PR includes preparatory changes for supporting well to frac connections.

  • replace CellElementSubRegion with ElementSubRegionBase where possible
  • where not possible - use templates
  • introduce targetRegion for perforations, to be able to connect to matrix or fracture (if targetRegion is not specified that means perforation will try to connect to all regions)
  • adjust connectPerforationsToMeshElements logic - since target region is already defined, loop through subregions in searchLocalElements, also adjust visitNeighborElements and initializeLocalSearch but for now preserve old versions of those 3 functions (still used in assignUnownedElementsInReservoir), will unify later

@paveltomin paveltomin changed the base branch from develop to pt/seq-wells-frac September 13, 2024 21:45
@paveltomin paveltomin changed the title well to frac (draft) refactor: Preparatory for well to frac Sep 14, 2024
@paveltomin paveltomin changed the title refactor: Preparatory for well to frac refactor: Preparatory for well to frac connection Sep 14, 2024
@paveltomin paveltomin requested a review from tjb-ltk September 16, 2024 16:34
@paveltomin paveltomin marked this pull request as ready for review September 16, 2024 16:34
@paveltomin
Copy link
Contributor Author

@paveltomin
Copy link
Contributor Author

need review please

@paveltomin paveltomin requested review from Guotong-Ren and removed request for cssherman November 7, 2024 22:51
@paveltomin
Copy link
Contributor Author

Waiting on code owner review from @CusiniM, @Guotong-Ren, @castelletto1, @frankfeifan, @jhuang2601, @matteofrigo5, @rrsettgast, @ryar9534, @untereiner, @wrtobin, and/or 2 others.

@paveltomin
Copy link
Contributor Author

@paveltomin
Copy link
Contributor Author

@CusiniM, @MelReyCG, @castelletto1, @corbett5, @frankfeifan, @jhuang2601, @rrsettgast, @ryar9534, @untereiner, and/or @wrtobin please review, i need to move this forward, it's been a while

* @brief Get the target region for a perforation.
* @return the target regions for a perforation
*/
arrayView1d< string const > getPerfTargetRegion() const { return m_perfTargetRegion; };
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be sure to understand, it can connect to multiple region if the perforation is at the interface of two or more regions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think it can and the name should "regions", not "region", let me fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh no, you are right, each perf only connects to one region, sorry my confusion

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, thanks for the explanation! It's clearer now. The returned list of these methods are for perforations data here, it imply something like getPerfsX().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, same pattern as for other functions/perf. data

Comment on lines +50 to +53
registerWrapper( viewKeyStruct::targetRegionString(), &m_targetRegionName ).
setRTTypeName( rtTypes::CustomTypes::groupNameRef ).
setInputFlag( InputFlags::OPTIONAL ).
setDescription( "Target region to connect the perforation" );
Copy link
Contributor

Choose a reason for hiding this comment

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

Why can it be customized by the user? Cannot it be determined automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the idea here is to be able to connect well to a fracture
fractures are geometrically zero volume objects so a perforation that lies on a fracture may numerically also get connected to a cell block next to it
to avoid this situation and to allow the user to control the behavior, targetRegion can be optionally specified
when not provided, GEOS will try to connect perforation with all the regions

real64 const (&GEOS_UNUSED_PARAM( elemCenter ))[3],
real64 const (&GEOS_UNUSED_PARAM( location ))[3] )
{
// only CellElementSubRegion is currently supported
Copy link
Contributor

Choose a reason for hiding this comment

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

I may be wrong, but this code should not run if not supported.

Suggested change
// only CellElementSubRegion is currently supported
static_assert( false, "only CellElementSubRegion is currently supported" );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think it will start crashing if i add that assert
the needed functions are implemented in #3359
hope we can merge both soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests type: cleanup / refactor Non-functional change (NFC)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants