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

Support instantaneous flow rates in extended network (WEFAC and GEFAC item 3) #4094

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

Conversation

vkip
Copy link
Member

@vkip vkip commented Jun 5, 2024

No restart support here - will come in a separate PR.

@vkip
Copy link
Member Author

vkip commented Jun 5, 2024

jenkins build this opm-simulators=5410 please

@vkip vkip requested review from bska and GitPaean June 5, 2024 07:43
@vkip
Copy link
Member Author

vkip commented Jun 5, 2024

jenkins build this opm-simulators=5410 please

Copy link
Member

@GitPaean GitPaean left a comment

Choose a reason for hiding this comment

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

It is not a lot of code, but I do feel it can be tricky. I left some comments for your consideration.

opm/input/eclipse/Schedule/Network/ExtNetwork.hpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/Network/ExtNetwork.cpp Outdated Show resolved Hide resolved
@@ -205,6 +212,36 @@ void ExtNetwork::update_node(Node node)
this->m_nodes.insert_or_assign(name, std::move(node) );
}

bool ExtNetwork::needs_instantaneous_rates(const Opm::Schedule& schedule, const int report_step) const {
Copy link
Member

Choose a reason for hiding this comment

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

Based on the usage of this function in OPM/opm-simulators#5410, it basically indicates whether we are handling network flow with extended network with "NO" in the item 3 in WEFAC or GEFAC.

Or more simply, we can use true for extended network and use false for standard network and group calculation. If we can introduce a flag to mark whether the network is extended network, we do not need this function anymore. And use_efficiency_in_ext_network will take care whether we will use instantaneous rate.

What do you think? I can understand this part wrong. Please let me know.

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 function can certainly be skipped, but the intention is to save some computation in opm-simulators in the quite common situation with default value (YES) for all instances of WEFAC/GEFAC with wells/groups in the network.

One complication I see is action handling (i.e., if item3 is updated through actions), will need to ensure the check is performed again in this case. Can have a quick look, or we just drop this for now.

opm/input/eclipse/Schedule/Group/Group.cpp Show resolved Hide resolved
@vkip vkip force-pushed the extnet_efficiency branch from 1dfbddd to cae2f0c Compare June 12, 2024 12:36
@GitPaean
Copy link
Member

jenkins build this opm-simulators=5410 please

@vkip vkip marked this pull request as draft June 28, 2024 09:33
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.

2 participants