Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to clarify the change. This resets K-values to those of last successful timestep?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Resets to zero so they can be reinitialised using Wilson's correlation. Similar treatment to the well. The storage of the k-values is a heuristic attempt to improve convergence. If they are reinitialised, the flash might take a bit longer to converge but the solution should ultimately be the same.

Original file line number Diff line number Diff line change
Expand Up @@ -2790,6 +2790,14 @@ void CompositionalMultiphaseBase::resetStateToBeginningOfStep( DomainPartition &

// update porosity, permeability
updatePorosityAndPermeability( subRegion );
// discard any warm-started state held by the fluid model (e.g. K-values
// used to seed the flash) so the rolled-back step does not inherit
// iterate-dependent state from the failed Newton attempt.
{
string const & fluidName = subRegion.template getReference< string >( viewKeyStruct::fluidNamesString() );
MultiFluidBase const & fluid = getConstitutiveModel< MultiFluidBase >( subRegion, fluidName );
fluid.initializeState();
}
// update all fluid properties
updateFluidState( subRegion );
// for thermal simulations, update solid internal energy
Expand Down
Loading