-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24873 from joshuahansel/time-sequence-stepper-las…
…t-step Added extrapolation option to TimeSequenceStepperBase
- Loading branch information
Showing
10 changed files
with
139 additions
and
16 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
framework/doc/content/source/timesteppers/CSVTimeSequenceStepper.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
framework/doc/content/source/timesteppers/ExodusTimeSequenceStepper.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
framework/doc/content/source/timesteppers/TimeSequenceStepper.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
framework/doc/content/source/timesteppers/TimeSequenceStepperBase.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# TimeSequenceStepperBase | ||
|
||
`TimeSequenceStepperBase` is a base class for time steppers that use a sequence | ||
time values $t_i$ to produce time step sizes. | ||
|
||
## Failed solves id=failed_solves | ||
|
||
If the solver fails to obtain a converged solution for a given | ||
step, the executioner cuts back the step size and attempts to advance the time | ||
from the previous step using a smaller time step. The time step is cut back by | ||
multiplying the time step by the cutback factor, defaulting to 0.5. If this is successful, | ||
the time stepper will then attempt to use the next time in the sequence, | ||
adjusting the time step to "get back on track". | ||
|
||
## Choosing the time step size past the final time value | ||
|
||
Suppose that $t_N$ is the maximum time value provided in the sequence. This value | ||
may be less than the simulation end time $t_\text{end}$ given by the | ||
[!param](/Executioner/Transient/end_time) parameter. If this is true and the current simulation | ||
time $t$ is past $t_N$, then by default, there will be a single, final time step | ||
that jumps to the end time: | ||
|
||
!equation | ||
\Delta t = t_\text{end} - t_N \,. | ||
|
||
However, in many cases this is undesirable, such as when a steady state condition | ||
is used to terminate a transient, in which case an arbitrarily large end time | ||
is specified, leading to a very large time step size. This behavior can be | ||
altered with [!param](/Executioner/TimeSteppers/TimeSequenceStepper/use_last_dt_after_last_t). | ||
If set to `true`, this uses the final time step size in the sequence instead | ||
for all time past $t_N$: | ||
|
||
!equation | ||
\Delta t = t_N - t_{N-1} \,. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# MOOSE Newsletter (July 2023) | ||
|
||
!alert! construction title=In Progress | ||
This MOOSE Newsletter edition is in progress. Please check back in August 2023 | ||
for a complete description of all MOOSE changes. | ||
!alert-end! | ||
|
||
## MOOSE Improvements | ||
|
||
## libMesh-level Changes | ||
|
||
## PETSc-level Changes | ||
|
||
## Bug Fixes and Minor Enhancements | ||
|
||
### New option for time-stepping past the last time in time sequence steppers | ||
|
||
The various time sequence steppers ([TimeSequenceStepper.md], [CSVTimeSequenceStepper.md], | ||
and [ExodusTimeSequenceStepper.md]) compute time step size from a sequence of | ||
time values. Past the final time value, they previously could only make a single | ||
time step directly to the simulation end time. Now an option | ||
`use_last_dt_after_last_t` has been added, which when true, will instead use | ||
the final time step size in the provided sequence past the last time in the sequence. |
8 changes: 8 additions & 0 deletions
8
test/tests/time_steppers/timesequence_stepper/gold/timesequence_last_dt_out.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
time,dt | ||
0,0 | ||
1,1 | ||
3,2 | ||
4,1 | ||
8,4 | ||
12,4 | ||
16,4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test/tests/time_steppers/timesequence_stepper/timesequence_last_dt.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 1 | ||
[] | ||
|
||
[Problem] | ||
solve = false | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 6 | ||
[TimeStepper] | ||
type = TimeSequenceStepper | ||
time_sequence = '0 1 3 4 8' | ||
use_last_dt_after_last_t = true | ||
[] | ||
[] | ||
|
||
[Postprocessors] | ||
[dt] | ||
type = TimestepSize | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
csv = true | ||
[] |