Temperature for chemistry in the new master

78 views
Skip to first unread message

Sam Shaheen

unread,
Jun 12, 2025, 9:31:03 AMJun 12
to Amanzi-ATS Users
Hi all,
I've been working with the updated version of master released earlier this week. It speeds up reactive transport runs quite considerably and looks to be performing well, so thanks for your hard work! 

In my model set-ups, I have been inputting a subsurface temperature (using observed soil temperature data) purely for the purpose of chemical reaction kinetics, rather than an energy balance calculation. In the prior version of master, I was defining a subsurface temperature evaluator and this was successfully passing the data to Alquimia. In the updated master (using the new coupled flow and transport PK), this doesn't seem to be the case and the chemistry calculations are using default temperature instead. The temperature evaluator itself still seems to be working fine, so I'm wondering if there are additional steps I'd need to take here with the new PK set-ups for it to pass the variable to Alquimia.

Thanks,
Sam

Coon, Ethan

unread,
Jun 12, 2025, 11:21:18 AMJun 12
to Sam Shaheen, Amanzi-ATS Users

Hi Sam,

 

I don’t think we have a test for using temperature, but I did think it was implemented correctly.  Can you modify one of the regression tests to add temperature dependence?  Maybe one of the 07_reactive_transport/amanzi_benchmark problems would be a good place to start?  

 

If you can do that and either send me a modified input file or make a pull request on ats-regression-tests, I’m happy to debug making sure that temperature is passed to alquimia correctly.

 

Ethan

 

--
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 visit https://groups.google.com/d/msgid/ats-users/478fbd64-b566-4f6d-bb0d-f4f8747ba9e8n%40googlegroups.com.

Kewei Chen

unread,
Jun 12, 2025, 2:15:55 PMJun 12
to Amanzi-ATS Users
Hi Sam,

I’m also interested in exploring temperature-dependent reactions via Alquimia and have two questions about your experiments:
1. Did you supply an external file with the temperature time series? Ideally, ATS would perform the energy calculation and pass the resulting temperatures to PFLOTRAN via Alquimia. If that workflow isn’t yet supported, having an external temperature file would still be valuable.
2. In standalone PFLOTRAN, reactions can reference temperatures calculated in TH mode. For a PFLOTRAN input deck configured through Alquimia/ATS, which keywords control temperature-dependent reaction definitions? Is the keyword in the PFLOTRAN input deck or ATS input deck?

As Ethan suggested, including such an example in the regression tests would benefit many users. Thank you for your insights.

Best,
Kewei

Coon, Ethan

unread,
Jun 12, 2025, 2:29:40 PMJun 12
to Kewei Chen, Amanzi-ATS Users

Hi Sam, Kewei – I did remember that there is a check in the Alquimia_PK – by default “temperature key” is left empty.  If temperature key is prescribed, then it is “required” and used.  So you may just need to add the parameter,

 

“temperature key” = “temperature”

 

to your Alquimia PK, and that may get your problem working again.  That said, I’d still love to have a test for temperature-dependent chemistry with an either prescribed or solved temperature.

 

 

On #1, the Alquimia PK should use whatever temperature it is given.  This is the advantage of the Arcos concept of a dependency graph – Alquimia_PK doesn’t care if temperature is a file or a primary variable computed by an energy solve.  So in theory it should “just work,” but again, more tests or demos are welcome here!

 

Ethan

 

 

 

From: ats-...@googlegroups.com <ats-...@googlegroups.com> on behalf of Kewei Chen <chenke...@gmail.com>
Date: Thursday, June 12, 2025 at 12:16

PM

--

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.

Sergi Molins Rafa

unread,
Jun 12, 2025, 2:34:46 PMJun 12
to Coon, Ethan, Kewei Chen, Amanzi-ATS Users
with Alquimia, PFLOTRAN will use the temperatures provided by ATS. It is not the full PFLOTRAN, it is only the geochemical modules of PFLOTRAN. 

Kewei Chen

unread,
Jun 12, 2025, 2:41:14 PMJun 12
to Amanzi-ATS Users
Thank you for your explanations, Ethan and Sergi. Glad to learn that ATS–Alquimia fully supports temperature-dependent reactions. This will be very useful for exploring a variety of interesting problems.

Best,
Kewei

Sergi Molins Rafa

unread,
Jun 12, 2025, 2:45:09 PMJun 12
to Kewei Chen, Amanzi-ATS Users
It has always been like this but it has not been used much or at all, so no demos or tests. That is why it is important to add tests and demos. So any help with it as Ethan says would be great.

Sam Shaheen

unread,
Jun 12, 2025, 2:51:12 PMJun 12
to Amanzi-ATS Users
Hi all,
Ethan, I have a regression test I set up that I will post in a second, I just want to confirm that the set-up was temperature sensitive in the prior version of master (and I will test out “temperature key” = “temperature” in the new master to see if that fixes it first).

Kewei, I have been feeding in an external file with temperature data through an independent variable evaluator. Like Sergi said, PFLOTRAN will use that temperature from ATS. The energy balance set-up you mentioned should be very possible in ATS (which Ethan would know much more about working with it than I), I was just trying to simplify. I'm not sure how computationally demanding a model with a full energy balance plus chemistry would be.

Best,
Sam

Kewei Chen

unread,
Jun 12, 2025, 2:55:45 PMJun 12
to Amanzi-ATS Users
Thank you, Sam. I’ll explore a fully coupled flow–thermal–reactive transport model to assess its performance.

Best,
Kewei

Sam Shaheen

unread,
Jun 12, 2025, 3:12:05 PMJun 12
to Amanzi-ATS Users
Ethan,
See attached for a temperature test, which I built off the infiltration_drain_pflotran_crunch_calcite_surface_subsurface.xml regression test. Everything is switched over to PFLOTRAN, and I added in a constant temperature to the model as well as an activation energy to the PFLOTRAN input script that should produce Arrhenius scaling on dissolution rates. I don't think the conversion between K (ATS) and C (PFLOTRAN) inputs is working well at the moment, so I am deliberately inputting temperatures in C. I tested whether "temperature key" = "temperature" changed anything, and it didn't seem to be the case.

Nothing will crash if temperature isn't talking to Alquimia, but this shows the same average calcite dissolution rate across the domain in simulations with 5C and 25C. In the prior version of master, this produced small but clear differences when temperature is changed.

Best,
Sam

PS-it's super nice that chemistry parameters can be written as observations now, thanks for that update!
temp_benchmark.zip

chen ding

unread,
Jun 16, 2025, 10:36:23 PMJun 16
to Amanzi-ATS Users
Hi all, 
After adding the “temperature key”, I ran a test with different prescribed temperatures and got the same result as Sam. It appears that adding the “temperature key” alone does not pass temperature to Alquimia correctly.
Best,
Chen

Coon, Ethan

unread,
Jun 17, 2025, 12:14:12 PMJun 17
to chen ding, Amanzi-ATS Users

If someone sends a modified regression test with temperature-dependent reactions, I will get someone to debug.

 

Ethan

 

Sam Shaheen

unread,
Jun 17, 2025, 1:48:21 PMJun 17
to Amanzi-ATS Users
Hi Ethan,
This is a modified version of the infiltration-drain reactive transport regression test. I have it set-up so that changing the specified temperature in the input script will alter the rate of calcite dissolution, as long as things are working ok. Let me know if it looks ok, I can adjust as needed.
Thanks,
Sam
temp_benchmark.zip
Message has been deleted

Sam Shaheen

unread,
Jul 22, 2025, 10:50:55 AMJul 22
to Amanzi-ATS Users
Hi Ethan,
Just wanted to check: was this an ok regression test for troubleshooting the issue? I know it's a little tricky because the model won't crash but rather give different results if temperature isn't passed to the geochemical engine. I also wanted to check if any progress has been made here and if there's anything I can do to help.
Thanks,
Sam
Reply all
Reply to author
Forward
0 new messages