Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vkip
Copy link
Member

@vkip vkip commented Nov 8, 2024

No description provided.

@vkip
Copy link
Member Author

vkip commented Nov 8, 2024

jenkins build this please

@vkip vkip marked this pull request as ready for review November 8, 2024 10:52
@vkip vkip requested a review from bska November 8, 2024 10:56
Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Just to be clear, this is trying to support the case of an ALQ being used in the defining expression of a UDQ, right? It's not the other way around–i.e., a UDQ being used as a UDA for the ALQ?

If so, then this looks mostly good to me although there are a couple of potential issues in the low-level details here. It's not ideal that glir() returns two different units of measurement though. The output system will perfom the correct unit conversion–i.e., no conversion at all–but the parameter will still be recorded in the SMSPEC and therefore labeled as a surface flow rate for gas in any production curve plots.

Comment on lines 753 to 754
return {alq_rate, measure::identity };
continue;
Copy link
Member

Choose a reason for hiding this comment

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

The return statement here means that the continue statement is redundant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah.. should be continue, see below.

Comment on lines 751 to 752
const double eff_fac = efac(args.eff_factors, well->name());
alq_rate += eff_fac * xwPos->second.rates.get(rt::alq, production.alq_value);
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure you want to add the values here? Please keep in mind that function glir() is the backend for the field level vector FGLIR, the group level vector GGLIR, and the well level vector WGLIR. The only difference between these cases is the contents of args.schedule_wells. Might it make sense to have special case handling of WGLIR for this purpose?

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 think it makes sense to add, but instead of 'return' above it should be 'continue' (with rates converted according to unit).

@vkip
Copy link
Member Author

vkip commented Nov 8, 2024

Just to be clear, this is trying to support the case of an ALQ being used in the defining expression of a UDQ, right?

Right.

It's not the other way around–i.e., a UDQ being used as a UDA for the ALQ?

No.

If so, then this looks mostly good to me although there are a couple of potential issues in the low-level details here. It's not ideal that glir() returns two different units of measurement though. The output system will perfom the correct unit conversion–i.e., no conversion at all–but the parameter will still be recorded in the SMSPEC and therefore labeled as a surface flow rate for gas in any production curve plots.

Good point, and didn't think of GGLIR/FGLIR.. Updated now.

@bska
Copy link
Member

bska commented Nov 8, 2024

jenkins build this please

Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the updates. I think this handles all cases, but we'll refine the solution at a later date if not. I'll merge into master.

@bska bska merged commit a1b2462 into OPM:master Nov 8, 2024
1 check passed
@vkip vkip deleted the nonzero_alq_without_vfptable branch November 8, 2024 16:17
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