-
Notifications
You must be signed in to change notification settings - Fork 122
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
base: master
Are you sure you want to change the base?
Conversation
…ids entering the well.
jenkins build this please |
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.. |
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; |
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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).
For what it's worth, I would support both, assuming adding a variable for STW would be an improvement. (But separate from this PR..) |
jenkins build this please |
Weighted average of fluids entering the well from both surface and reservoir.