Skip to content

Well primaryvariable scaling - #4176

Closed
hnil wants to merge 6 commits into
OPM:masterfrom
hnil:well_primaryvariable_scaling
Closed

Well primaryvariable scaling#4176
hnil wants to merge 6 commits into
OPM:masterfrom
hnil:well_primaryvariable_scaling

Conversation

@hnil

@hnil hnil commented Oct 18, 2022

Copy link
Copy Markdown
Member
  • make scaling of primary variables of wells
  • scale control equation if it is bhp control
    Idea is to be able to make scaling of the matrices more normal. It is a follow up on the scaling of the reservoir primary variables.

@GitPaean

Copy link
Copy Markdown
Member

jenkins build this please

@GitPaean

Copy link
Copy Markdown
Member

benchmark please

@ytelses

ytelses commented Oct 19, 2022

Copy link
Copy Markdown

Benchmark result overview:

Test Configuration Relative
opm-git OPM Benchmark: flow_mpi_extra - Threads: 1 1.004
opm-git OPM Benchmark: flow_mpi_extra - Threads: 8 0.998
opm-git OPM Benchmark: flow_mpi_norne - Threads: 1 0.999
opm-git OPM Benchmark: flow_mpi_norne - Threads: 8 0.991
opm-git OPM Benchmark: flow_mpi_norne_4c_msw - Threads: 1 0.997
opm-git OPM Benchmark: flow_mpi_norne_4c_msw - Threads: 8 0.996
  • Speed-up = Total time master / Total time pull request. Above 1.0 is an improvement. *

View result details @ https://www.ytelses.com/opm/?page=result&id=1830

@hnil
hnil marked this pull request as ready for review October 20, 2022 11:50
@GitPaean

Copy link
Copy Markdown
Member

Do you have some ideas about what kind of number should be used to benefit a typical blackoil simulation running?

@GitPaean

Copy link
Copy Markdown
Member

Should bhp_scaling and bhp_control_scaling be same or same order or something very different?

}
case Well::ProducerCMode::BHP: {
control_eq = bhp - controls.bhp_limit;
control_eq = (bhp - controls.bhp_limit)*this->bhpControlScaling();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From here, if the bhp_scale_ and bhp_control_scale are different values, how will it affects the tolerance checking?

@GitPaean

Copy link
Copy Markdown
Member

hei, one small thing is that, for the bhp_scaling, they are used to scale to reduce the values for the related primary variables through division, while for bhp_control_scaling, it is used to reduce the orders of the control_eq through multiplication. As a result, bhp_scaling will be a big value maybe in the order or bar level, while bhp_control_scaling will be a very small value.

Do you think it is easier to use if we can change this to make both bhp_scaling and bhp_control_scaling to be big values?

@hnil
hnil marked this pull request as draft August 17, 2023 08:38
@hnil

hnil commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Closing: five of the seventeen touched files no longer exist after the Ebos rename, and the well primary-variable code has moved on considerably since 2022. Well primary-variable scaling is better approached against the current StandardWellPrimaryVariables. Branch retained on my fork.

@hnil hnil closed this Jul 29, 2026
@hnil hnil reopened this Jul 29, 2026
@hnil

hnil commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Reopening as a draft to keep it alive as a marker rather than lose the topic. Well primary-variable scaling is still worth reviewing at some point.

To be clear about its state: this cannot be rebased as-is -- five of the seventeen touched files no longer exist after the Ebos rename. Treat it as a record of the idea, to be rewritten against the current StandardWellPrimaryVariables when someone picks it up.

@hnil

hnil commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

Superseded by #7286, which is the same idea done properly: the scaling is applied to the AD derivative only, so stored values stay physical and B/C are untouched, and it comes with measured conditioning numbers for D. Branch kept.

@hnil hnil closed this Aug 10, 2026
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.

4 participants