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

Compute temperature for xflowing injectors as weighted average #5799

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vkip
Copy link
Member

@vkip vkip commented Dec 13, 2024

Weighted average of fluids entering the well from both surface and reservoir.

@vkip
Copy link
Member Author

vkip commented Dec 13, 2024

jenkins build this please

@GitPaean
Copy link
Member

I am not familiar with the energy conservation equations. But ideally, should we have a primary variable to monitor the temperatures in the wellbore to handle the crossflow through heat conservation?

@vkip
Copy link
Member Author

vkip commented Dec 13, 2024

I am not familiar with the energy conservation equations. But ideally, should we have a primary variable to monitor the temperatures in the wellbore to handle the crossflow through heat conservation?

Maybe @hnil and/or @totto82 can comment on that. I'm just trying to get slightly more representative output with the current approach..

@totto82
Copy link
Member

totto82 commented Dec 13, 2024

If we are doing this only for output. I think a post processing like @vkip is suggestion is ok. But if we want to use this computed temperature for the energy equation I think we need to add a variable and solve for it as @GitPaean suggests. Maybe we should start investigating this for MSW? For STW we will only have one temperature for the whole well. For cross-flowing wells that may be a too coarse approximation.

const Scalar vol_heatcap = cellDensity/cellBinv * cellInternalEnergy/cellTemperature;
const Scalar heatcap_rate_prod = -std::min(perfPhaseRate, 0.0)*vol_heatcap;
const Scalar heatcap_rate_inj = perfPhaseRate*vol_heatcap;
total_weight_prod += heatcap_rate_prod;
Copy link
Member

@totto82 totto82 Dec 13, 2024

Choose a reason for hiding this comment

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

Why is this (line 2907) not std::max(perfPhaseRate, 0.0)? (to get the inflow?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I want to end up with the net injected rate for the well (weight for the injection temperature).

@vkip
Copy link
Member Author

vkip commented Dec 13, 2024

If we are doing this only for output. I think a post processing like @vkip is suggestion is ok. But if we want to use this computed temperature for the energy equation I think we need to add a variable and solve for it as @GitPaean suggests. Maybe we should start investigating this for MSW? For STW we will only have one temperature for the whole well. For cross-flowing wells that may be a too coarse approximation.

For what it's worth, I would support both, assuming adding a variable for STW would be an improvement. (But separate from this PR..)

@vkip
Copy link
Member Author

vkip commented Dec 13, 2024

jenkins build this please

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