-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: well time step selector based on rates/bhp tables and clarify well rates logic #3427
base: develop
Are you sure you want to change the base?
Conversation
@@ -377,4 +377,73 @@ WellControls const & WellSolverBase::getWellControls( WellElementSubRegion const | |||
return this->getGroup< WellControls >( subRegion.getWellControlsName()); | |||
} | |||
|
|||
real64 WellSolverBase::setNextDt( real64 const & currentTime, const real64 & lastDt, geos::DomainPartition & domain ) |
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.
main thing is in this function
This comment was marked as resolved.
This comment was marked as 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.
It's quite a change (switching the well from t+dt to t). But I don't see anything wrong - in any case it seems more correct. I don't think the cases we have with wells would be so greatly affected.
@@ -2356,13 +2356,6 @@ bool SolidMechanicsLagrangeContact::isFractureAllInStickCondition( DomainPartiti | |||
return ( ( numNewSlip + numSlip + numOpen ) == 0 ); | |||
} | |||
|
|||
real64 SolidMechanicsLagrangeContact::setNextDt( real64 const & 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.
Is this intentional? Do we really want this solver to inherit the behaviour of the base class?
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.
intentional - yes but I forgot about that change and didn't mention it in the description, sorry
it is very confusing what SolidMechanicsLagrangeContact::setNextDt
does right now by returning currentDt
and next time step, this basically blocks time step increase? (CC @CusiniM @matteofrigo5 @castelletto1)
could go in a small simple PR with just that fix
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.
@paveltomin Put this in its own PR.
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.
done #3490
@@ -315,4 +315,44 @@ WellControls const & WellSolverBase::getWellControls( WellElementSubRegion const | |||
return this->getGroup< WellControls >( subRegion.getWellControlsName()); | |||
} | |||
|
|||
real64 WellSolverBase::setNextDt( real64 const & time, const real64 & lastDt, geos::DomainPartition & domain ) |
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.
I think we should include an option to disable this. I might very finely discretise my rate function without wanting geos to take such small time steps.
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.
ok sounds good
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.
Added timeStepFromTables
flag to enable new behavior, disabled by default
src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp
Outdated
Show resolved
Hide resolved
Waiting on code owner review from @CusiniM, @Guotong-Ren, @VidarStiernstrom, @castelletto1, @cssherman, @frankfeifan, @jhuang2601, @matteofrigo5, @rrsettgast, @ryar9534, and/or 1 others. |
This comment was marked as resolved.
This comment was marked as resolved.
@CusiniM, @VidarStiernstrom, @castelletto1, @cssherman, @frankfeifan, @jhuang2601, @matteofrigo5, @rrsettgast, @ryar9534, and/or @wrtobin please review |
@CusiniM, @VidarStiernstrom, @castelletto1, @cssherman, @frankfeifan, @jhuang2601, @matteofrigo5, @rrsettgast, @ryar9534, @wrtobin please review |
Two things in this PR:
setNextDt
in well solver which looks at all rates/bhp/status tables and makes sure time step is selected so that we honor table intervals. Can be enabled bytimeStepFromTables
flag in well solver.t_n+dt
(end of time step) - switch tot_n
(beginning of time step) - this should be more consistent withlower
interpolation method that is used and prevent grabbing "future" rate from tables and avoid weird behavior when time step cut can lead to shutting of wells.