Skip to content
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

Varibale Timestep Scale #6

Open
andrewdnolan opened this issue Nov 7, 2022 · 0 comments
Open

Varibale Timestep Scale #6

andrewdnolan opened this issue Nov 7, 2022 · 0 comments

Comments

@andrewdnolan
Copy link
Owner

andrewdnolan commented Nov 7, 2022

What we want to do:

Periodic surging experiments would greatly benefit from more efficient timesteping. Using the minimum timestep, which is typically the Stokes solver timestep during surging, for the entire 2000+ year simulation is computational prohibitive.

During the quiescence the Stokes solver probably only needs dt=1.0, whereas it's probably run with dt=0.05 during surging. Furthermore, the Enthalpy solver probably only needs to be run with dt=0.1 during quiescence, whereas it's also run with dt=0.1 during surging.

Because of the regular return intervals, this should be very doable in Elmer/Ice. Something like:

Simuluation
.
.
.
  Timestep Intervals(6)          = Integer 100 450 100 450 100 450 ![a]
  Timestep Sizes(6)              = Real    0.05 0.1 0.05 0.1 0.05 0.1  ![a]
.
.
.
End 

...

Solver X
  Exec Interval(6)            = Integer 1 10 1 10 1 10
  Timestep Scale(6)           = Real    1 10 1 10 1 10
 .
 . 
  .
End Solver

where Solver X is a dynamics solver which only needs to be run w/ dt=1.0 during quiescence. Thermodynamic solver would be executed with dt=0.1. This simulation would be 3-surge cycle with a 5-year active phase and a 45-year quiescent phase.

The Problem:

The Timestep Scale keyword from the solver section only excepts constants. See the "elmer/fem/src/MainUtils.f90" file:

     IF(.NOT. ListGetLogical( Params,'Auxiliary Solver',Found)) THEN
       DTScal = ListGetConstReal( Params, 'Timestep Scale', Found )
       IF ( .NOT. Found ) DTScal = 1.0_dp

This a problem, given that Exec Intervals needs an array the same length as Timestep Sizes and Timetep Intervals. Therefore, we can execute solvers at different intervals but the timestep will not be correctly scaled.

How to fix:

This is a problem with the "elmer/fem/src/MainUtils.f90" file which is beyond the scope of what I'm comfortable editing

I've posted on the Elmer forum requesting help to see if anyone can update the code to fix this. Elmer Forum post can be found here:

http://elmerfem.org/forum/viewtopic.php?t=7836

@andrewdnolan andrewdnolan changed the title Varibale "Timestep Scale" Varibale Timestep Scale Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant