-
Notifications
You must be signed in to change notification settings - Fork 91
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
Modified well controls to match Intersect results #1202
Conversation
src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp
Outdated
Show resolved
Hide resolved
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.
Looks great!
Would be nice to have at least one integrated test exercise the new surface rate option (did I miss it?)
src/coreComponents/physicsSolvers/fluidFlow/benchmarks/Egg/dead_oil_egg.xml
Outdated
Show resolved
Hide resolved
src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp
Outdated
Show resolved
Hide resolved
@@ -303,6 +303,9 @@ class WellSolverBase : public SolverBase | |||
/// the number of Degrees of Freedom per reservoir element | |||
localIndex m_numDofPerResElement; | |||
|
|||
/// copy of the time step size saved in this class for residual normalization | |||
real64 m_currentDt; |
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.
Not a task for this PR, but perhaps we should be passing dt
into CalculateResidualNorm()
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.
Yes I agree that it would be useful to have the dt
passed as an argument of calculateResidualNorm
here and maybe for others as well. I can take care of this in another PR.
Yes you are right the surface rate option must be used and checked in the integrated tests. In the latest commit it is now used for single-phase flow in |
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.
Nice work!
// above/below the target pressure depending on well type | ||
pressureControl = ( wellType == WellControls::Type::PRODUCER ) | ||
? 0.5 * pres | ||
: 2.0 * pres; | ||
} |
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.
So isnt' the targetBHP defined even for rate constrained wells as (e.g., as an upper limit for injectors) Is this for the case in which it is not specified by the user? Maybe I am confused by what the reference pressure is. Or is this just like an initial guess?
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.
Yes you are right rate-constrained wells have a targetBHP
as well, and the code will stop if the targetBHP
is not specified (for both single-phase and compositional). What is done here is just a not-very-good way to initialize the pressure in rate-constrained wells at the beginning of the simulation, before the first iteration.
A better way would be to set the initial pressure using targetBHP
(for instance, slightly below targetBHP
for injectors). To be honest, I did not use the targetBHP
to initialize the injectors that because I sometimes (often ;) ) use a very large targetBHP
to keep the wells at rate constraint during the full simulation, even if it is not realistic (and I don't want this large targetBHP
to perturb the initialization...). I am going to add this explanation to the inline comment just before the line you referenced.
Ultimately, to have a really good well initialization and to improve the nonlinear convergence, it would be helpful to guess the well pressure and rate by solving small local well systems (with fixed reservoir values), but there is a little bit of work to do to allow that.
This PR implements some changes in the well controls to match a simulation result generated with Intersect:
With these changes I was able to match a two-phase DO simulation result with BHP and surface oil rate controls obtained with Intersect. If at some point we need to deal with more complex constraints, more work will be required.
This PR also changes the scaling of the control/pressure difference equations because the previous scaling was creating issues with fgmres + MGR.
Related to https://github.com/GEOSX/integratedTests/pull/114