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

Add Infrastructure for Geomechanical Analysis #5801

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Conversation

bska
Copy link
Member

@bska bska commented Dec 16, 2024

In particular, this lays the foundation for adding new well connections as a result of fracturing processes.

@bska
Copy link
Member Author

bska commented Dec 16, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 16, 2024

jenkins build this please

@bska bska force-pushed the geomech branch 2 times, most recently from 1a50042 to eaae892 Compare December 17, 2024 08:53
@bska
Copy link
Member Author

bska commented Dec 17, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 18, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 19, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 19, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 19, 2024

jenkins build this please

@bska bska force-pushed the geomech branch 2 times, most recently from 4a7f0cf to b34550d Compare December 19, 2024 14:22
@bska
Copy link
Member Author

bska commented Dec 19, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 20, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 20, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 20, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Dec 20, 2024

jenkins build this please

Copy link
Member

@akva2 akva2 left a comment

Choose a reason for hiding this comment

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

A lot of back and forth. I gave up reviewing as I realized this is not structured as expected for a PR against a production branch. Maybe you want to address some of these, maybe not. I'll post them at least.

boost::property_tree::ptree* getBoostParamPtr() const{
//just to be able to use full boost interface
return tree_.get();
}
Copy link
Member

Choose a reason for hiding this comment

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

this commit doesn't seem ready for inclusion in main line. if we need access to the whole api in simulator code the whole approach of encapsulation using this class falls on its rear end and we should consider removing the encapsulation.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that this breaks encapsulation. I need a way to put values back into the tree, and especially into a subtree, and this was the quickest way to go about doing that. In particular, I didn't see a way of combining get_child() with put<>() in a way that would make the change persistent. I am open to suggestions.

Copy link
Member

Choose a reason for hiding this comment

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

akva2@0106bc9

should in principle do it, although it's has some rather nasty not-so-const-correct aspects.

Copy link
Member Author

Choose a reason for hiding this comment

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

akva2@0106bc9

should in principle do it, although it's has some rather nasty not-so-const-correct aspects.

Okay, thanks. I'll pick this back up after the holidays, then.



protected:
ActionHandler<Scalar> actionHandler_;
Copy link
Member

Choose a reason for hiding this comment

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

if we are to introduce this member here, don't we need to move the initialization from the Blackoil child class also? and what happens with compositional, which afaik was the reason it was put in the Blackoil class?

@@ -676,6 +676,36 @@ void WellInterfaceGeneric<Scalar>::resetWellOperability()
this->operability_status_.resetOperability();
}

template<class Scalar>
void WellInterfaceGeneric<Scalar>::addPerforations(const std::vector<std::tuple<int,double,double>>& perfs){
Copy link
Member

Choose a reason for hiding this comment

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

loong line. we should have a type alias for that novel sized type. braces.

void WellInterfaceGeneric<Scalar>::addPerforations(const std::vector<std::tuple<int,double,double>>& perfs){
int newperf = perfs.size();

for(auto& perf : perfs){
Copy link
Member

Choose a reason for hiding this comment

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

spacing

for(auto& perf : perfs){
const auto [cell, WI, depth] = perf;
auto it = std::find(well_cells_.begin(), well_cells_.end(), cell);
if(it != well_cells_.end()){
Copy link
Member

Choose a reason for hiding this comment

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

spacing

@@ -424,6 +424,10 @@ void FlowGenericVanguard::registerParameters_()
Parameters::Register<Parameters::OwnerCellsFirst>
("Order cells owned by rank before ghost/overlap cells.");
#if HAVE_MPI
Parameters::Register<Parameters::AddCorners>
("Add corners to partion.");
Copy link
Member

Choose a reason for hiding this comment

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

partition

using FlowProblemType = FlowProblem<TypeTag>;

private:
Copy link
Member

Choose a reason for hiding this comment

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

we want the blank line.


this->endStepApplyAction();
}
void endStepApplyAction()
Copy link
Member

Choose a reason for hiding this comment

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

missing newlines.

@@ -882,6 +882,42 @@ class OutputBlackOilModule : public GenericOutputBlackoilModule<GetPropType<Type
else if (FluidSystem::phaseIsActive(waterPhaseIdx))
val.second = getValue(fs.temperature(waterPhaseIdx));
}
else if (key.first == "BSTRSSXX")
{
Copy link
Member

Choose a reason for hiding this comment

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

formatting is.. not as wanted.

@@ -574,9 +574,40 @@ list (APPEND TEST_DATA_FILES
# originally generated with the command:
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
list (APPEND PUBLIC_HEADER_FILES
flow/flow_blackoil.hpp
Copy link
Member

Choose a reason for hiding this comment

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

these (mostly) contain prototypes for functions that are never installed, ie not in the library. if we need need these in downstreams there is more work to be done, this achieves nothing.

Copy link
Member Author

Choose a reason for hiding this comment

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

this achieves nothing.

That's mostly true. They're used directly in Main.hpp so we either need the headers, or the include statements in Main.hpp must go away.

Copy link
Member

Choose a reason for hiding this comment

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

yes, i am aware of that but Main.hpp is also not structured to be installed, it's only meant to end up in simulators, which again are not meant to be downstream accessible.

my point is that if we really want to prepare the code for downstreams we have a lot of things that need to be addressed, not just in the code but also in the build system., e.g. how we handle gpu stuff.

i'm not really opposing this change, it makes thing no worse than it already was and helps a little so...

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, i am aware of that but Main.hpp is also not structured to be installed, it's only meant to end up in simulators, which again are not meant to be downstream accessible.

True. I guess it slipped through in #2532 (8c2ba0b) then.

Copy link
Member Author

Choose a reason for hiding this comment

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

my point is that if we really want to prepare the code for downstreams we have a lot of things that need to be addressed, not just in the code but also in the build system., e.g. how we handle gpu stuff.

I think we may getting to a point where a careful review of the full OPM build system is in order anyway.

@bska
Copy link
Member Author

bska commented Dec 20, 2024

Resetting this back to draft state pending resolution of some of the concerns raised during review.

@bska bska marked this pull request as draft December 20, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants