timestep control in ATS

140 views
Skip to first unread message

Kewei Chen

unread,
Mar 29, 2023, 11:58:36 PM3/29/23
to Amanzi-ATS Users
Dear all,

I built a surface-subsurface reactive transport model using ATS. The simulation results look good to me. However, I found that the advancing timestep was fixed at 1 sec which was not adaptive to the convergence criteria. The simulation output is attached, and the setting for time integrator is as follows. Any comments are appreciated.
      <ParameterList name="time integrator" type="ParameterList">
        <Parameter name="extrapolate initial guess" type="bool" value="true" />
        <Parameter name="solver type" type="string" value="nka_bt_ats" />
        <Parameter name="timestep controller type" type="string" value="smarter" />
        <ParameterList name="nka_bt_ats parameters" type="ParameterList">
          <Parameter name="nka lag iterations" type="int" value="2" />
          <Parameter name="max backtrack steps" type="int" value="5" />
          <Parameter name="backtrack lag" type="int" value="0" />
          <Parameter name="backtrack factor" type="double" value="0.5" />
          <Parameter name="backtrack tolerance" type="double" value=" 1" />
          <Parameter name="nonlinear tolerance" type="double" value="1e-10" />
          <Parameter name="diverged tolerance" type="double" value="100000" />
          <Parameter name="limit iterations" type="int" value="21" />
        </ParameterList>
        <ParameterList name="timestep controller smarter parameters" type="ParameterList">
          <Parameter name="max iterations" type="int" value="18" />
          <Parameter name="min iterations" type="int" value="10" />
          <Parameter name="time step reduction factor" type="double" value="0.5" />
          <Parameter name="time step increase factor" type="double" value="1.25" />
          <Parameter name="max time step" type="double" value="10000000000" />
          <Parameter name="min time step" type="double" value="1e-10" />
          <Parameter name="growth wait after fail" type="int" value="2" />
          <Parameter name="count before increasing increase factor" type="int" value="2" />
          <Parameter name="initial time step [s]" type="double" value=" 1" />
        </ParameterList>
      </ParameterList>

Thanks,
Kewei
output.txt

Zhi Li

unread,
Apr 18, 2023, 10:24:12 AM4/18/23
to Amanzi-ATS Users
Hi Kewei,

I believe the timestep controller related lines you showed in the screenshot are for flow, not for reactive transport. The evidence is "timestep controller type=smarter". In either "chemistry surface" or "chemistry subsurface" under "PKs", the timestep controller type is called either "simple" or "fixed".
If your timestep is fixed at 1 s, I guess in your "chemistry surface" and "chemistry subsurface" under "PKs", you have both "time step control method=fixed" and "initial time step (s)=1". 

Best,
Zhi

Kewei Chen

unread,
Apr 18, 2023, 11:06:37 AM4/18/23
to Zhi Li, coo...@ornl.gov, Amanzi-ATS Users
Thanks for your suggestions, Zhi and Ethan. I have solved the problem by setting the max/min/initial timestep under the blocks of surface chemistry/subsurface chemistry as a large value (e.g., 2200000) following some other demo problems. BTW, is there any other option for " time step control method“? Thanks.

Best,
Kewei

--
You received this message because you are subscribed to a topic in the Google Groups "Amanzi-ATS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ats-users/R1Ox3aym74w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ats-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-users/21403928-84df-45f4-a265-838be9748651n%40googlegroups.com.

Zhi Li

unread,
Apr 18, 2023, 11:52:07 AM4/18/23
to Amanzi-ATS Users
Hi Kewei,

My understanding is there're two methods, "fixed" or "simple", in surface/subsurface chemistry. "Simple" is same as the "smarter" in the corresponding block in the flow part. They look the same to me (all requiring min/max # of iteration, increase/decrease factor, etc.), just with different names, but I'm not 100% sure so Ethan or Sergi please correct me if I'm wrong.

Best,
Zhi

Kewei Chen

unread,
Apr 18, 2023, 7:39:58 PM4/18/23
to Zhi Li, Amanzi-ATS Users
Got it. I will try that option. Thanks.

You received this message because you are subscribed to the Google Groups "Amanzi-ATS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-users/8e934de1-6735-4ed5-8595-96892366ac6dn%40googlegroups.com.

Sergi Molins Rafa

unread,
Apr 22, 2023, 4:16:35 PM4/22/23
to Kewei Chen, Zhi Li, Amanzi-ATS Users
This should work in ats > 1.3 after custom "flow reactive transport" pk type was replaced with "subcycling MPC" for integrated hydrology and reactive transport simulations.

It did not have any effect in 1.2 and 1.3 versions. 

Sergi

Bing Li

unread,
Apr 27, 2023, 12:11:30 AM4/27/23
to Amanzi-ATS Users
Hi Sergi,

I am writing to follow up on the previous conversation regarding the use of different types of MPC in my flow reaction transport simulation using ATS 1.4.1. Specifically, I have tried both "subcycling MPC" and "weak MPC" in my 2D transect simulation, and I have encountered some issues with the former.

While using subcycling MPC, I have noticed that some concentration values are reported as "inf" in my simulation results. However, when I switched to using weak MPC, the concentration values became reasonable and within expected ranges.

I would appreciate any comments or suggestions you may have on using subcycling MPC in this context. If you could provide any insights on the possible causes of the "inf" values, it would be very helpful for me to further troubleshoot the issue.


Best regards,
Bing
hot_spinup.xml

Sergi Molins Rafa

unread,
Apr 27, 2023, 1:11:37 PM4/27/23
to Bing Li, Amanzi-ATS Users
Does "weak MPC" subcycle reactive transport? I assume it does not so it is probably not suitable for all integrated hydrology problems with RT. You may want to check the differences between time stepping between weak and sybcycling MPC and see what is the time step that is used in the subcycling MPC for reactive transport. If this is not met by the weak MPC, then I would not trust the results even if numbers are within reason. In any case, I have not tried weak MPC myself as all of the regression tests for RT as well as the xml converter suggest that subcycling MPC is the one that replaces the old custom MPC. But as I mentioned in previous threads, we need more test problems that test this MPC for RT as the coverage is currently small.

Sergi

Zexuan Xu

unread,
Apr 27, 2023, 1:19:50 PM4/27/23
to Sergi Molins Rafa, Bing Li, Amanzi-ATS Users
I think the current syntax is "subcycling MPC" for reactive transport PK (it used to be called "flow reactive transport")
My understanding is probably "weak MPC" requires the same timestep for all PKs (so it doesn't do subcycle to reactive transport)?



--
Zexuan Xu, Ph.D

Climate & Ecosystem Sciences Division
Lawrence Berkeley National Laboratory
1 Cyclotron Road, MS 74-316C
Berkeley, CA 94720

Coon, Ethan

unread,
Apr 27, 2023, 2:16:06 PM4/27/23
to Zexuan Xu, Sergi Molins Rafa, Bing Li, Amanzi-ATS Users

That’s correct – “subcycling MPC” is exactly a “weak MPC” that allows subcycling of one or more of the sub-PKs.  Really “weak MPC” could go away and be replaced by “subcycling MPC” with defaults where none are subcycled.

 

Ethan

 

-- 

-------------------------------------------------------------------------

Ethan Coon

Senior Research Scientist

Oak Ridge National Laboratory

 

865-241-1296

https://www.ornl.gov/staff-profile/ethan-t-coon

-------------------------------------------------------------------------

 

Sergi Molins Rafa

unread,
Apr 27, 2023, 2:50:13 PM4/27/23
to Coon, Ethan, Zexuan Xu, Bing Li, Amanzi-ATS Users
Again, one thing that was enabled when "subcycling MPC" became the MPC for flow and reactive transport problems is the ability of the Transport and Chemistry PK to have a say in adjusting the time step size during subcycling. Previously, this had been hardwired in the old custom MPC (would only cut in half when failed time steps happened). Make sure that your input file has the appropriate "initial time step" and time step controls for all PKs. The chemistry (or Alquimia) PK has "fixed" and "simple". "simple" is able to adjust the size based on a set of parameters. 

Reply all
Reply to author
Forward
0 new messages