I am encountering an issue with mass balance and the dependence on initial conditions in transport simulations using ats-master, and I would greatly appreciate your insights. This issue was found when testing the boundary mass flux calculation.
My boundary mass flux calculation is based on Phong's answer to my previous question in this group (https://groups.google.com/g/ats-users/c/-fYaWx9cqCk), which involves using boundary face water fluxes and boundary cell mole_fraction. While the calculated boundary mass flux values appear reasonable given the boundary water flux and concentrations, I observed a mass imbalance when checking the mass balance using these calculated boundary mass fluxes.
Here's a breakdown of my case setup and observations:
Initial Setup: I first performed a 10-year flow-only spin-up simulation using constant precipitation and fixed water heads at the left and right boundaries. This simulation took approximately 4 minutes.
Transport Simulation: Following the spin-up, I set a constant mole_fraction = 1.0 at the subsurface left boundary and simulated for another 10 years. This transport simulation took about 1.5 hours.
Core Issue - Initial Condition Dependence: To better illustrate the problem, I tested the 10-year transport simulation with two different initial mole_fraction conditions. After 10 years, the concentration distribution for both cases appeared to be close to stable. However, the "stable" mole_fraction distributions varied quite significantly between the two cases, which theoretically should converge to the same distribution regardless of the initial condition.
Image 1 (Top): Shows the "stable" mole fraction distribution after 10 years when the initial mole fraction was set to 0.
Image 2 (Bottom): Shows the "stable" mole fraction distribution after 10 years when the initial mole fraction was set to 1.0.
Comparison with ATS 1.5: I did not observe such a drastic difference with ats 1.5. With different initial conditions, simulations in ATS 1.5 converged to a very close concentration distribution. The mass imbalance exists, when comparing the calculated boundary mass fluxes and the change of mass content, but error is much smaller.
My current hypotheses for the possible reason are:
I may have made some mistakes in the XML files, although they were converted from v1.5 XML files.
There might be an underlying issue with ats-master related to transport calculations, especially the coupling between surface and subsurface domain.
To help reproduce the two "stable" transport statuses and investigate the issue, I have provided my case files on Google Drive. The simulations were restarted for an additional 10 days from their 10-year checkpoints to obtain clearer output for analysis.
You'll find:
n8-caseflow-run0-spinup_steadystate: Contains the checkpoint file from the flow-only spin-up simulation.
n8-case1tracer-run0-3650d-IC0M: Contains the checkpoint files from the 10-year transport simulation with initial mole_fraction condition set to 0.
n8-case1tracer-run0-3650d-IC1M: Contains the checkpoint files from the 10-year transport simulation with initial mole_fraction condition set to 1.
n8-case1tracer-run0-3650d-IC0M-restart10d and n8-case1tracer-run0-3650d-IC1M-restart10d: Contain the 10-day restarted simulations and a Jupyter notebook for calculating boundary mass fluxes from observation files.
The .exo files are in the data-processed folder, and the PFLOTRAN reaction file is in the data folder.
I am also happy to accommodate my calculations to other simpler test cases to see whether the same issue exists.
Any assistance or guidance on this matter would be highly appreciated. Thank you for your time and help.
Best,
Yi
Hi Yi,
Is there a chance you can reproduce this on a much smaller, simpler mesh? We’ll take a look at this, but it’s hard to debug on a 1.5 hour run that I’m guessing you ran in parallel. What about using something that still has some topography variation (e.g. not just a 2D transect hillslope with constant slope) but only like 10 or 20 cells across?
Ethan
From:
ats-...@googlegroups.com <ats-...@googlegroups.com> on behalf of Yi Xiao <yixia...@gmail.com>
Date: Thursday, July 3, 2025 at 2:14 AM
To: Amanzi-ATS Users <ats-...@googlegroups.com>
Subject: [EXTERNAL] Question on Mass Imbalance and Initial Condition Dependence in ATS-master Transport Simulations
Hi all, I am encountering an issue with mass balance and the dependence on initial conditions in transport simulations using ats-master, and I would greatly appreciate your insights. This issue was found when testing the boundary mass flux calculation.
Hi all,
I am encountering an issue with mass balance and the dependence on initial conditions in transport simulations using ats-master, and I would greatly appreciate your insights. This issue was found when testing the boundary mass flux calculation.
My boundary mass flux calculation is based on Phong's answer to my previous question in this group (https://groups.google.com/g/ats-users/c/-fYaWx9cqCk), which involves using boundary face water fluxes and boundary cell mole_fraction. While the calculated boundary mass flux values appear reasonable given the boundary water flux and concentrations, I observed a mass imbalance when checking the mass balance using these calculated boundary mass fluxes.
Here's a breakdown of my case setup and observations:
My current hypotheses for the possible reason are:
To help reproduce the two "stable" transport statuses and investigate the issue, I have provided my case files on Google Drive. The simulations were restarted for an additional 10 days from their 10-year checkpoints to obtain clearer output for analysis.
You'll find:
I am also happy to accommodate my calculations to other simpler test cases to see whether the same issue exists.
Any assistance or guidance on this matter would be highly appreciated. Thank you for your time and help.
Best,
Yi
--
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/c34f4d4b-aca6-4472-950b-23a5d3145df8n%40googlegroups.com.
I have to say, initially I didn't see anything qualitatively abnormal from the visualization animations in ParaView. This issue was found when performing a mass balance check to my model. The different "stable" mass imbalances predicted by cases with different initial concentrations is something I discovered while trying to investigate and troubleshoot this issue myself. I also noticed mass_flux evaluators have recently been added to the ATS master branch. I haven't tested them yet, but I would be very interested to do so and compare the results with my current post-processing calculations for boundary mass fluxes. This might offer another avenue for diagnosis.
Please let me know if there's anything else you'd like me to provide or test with this simpler model.
Best,
Yi
That’s great, thanks. Phong and I will take a look, discuss, and get back to you with questions and/or thoughts. I’ll go digging into the example soon, but is there a script that plots the imbalance/what you’re looking for to see what you would consider “correct”?
Ethan
- Core Issue - Initial Condition Dependence: To better illustrate the problem, I tested the 10-year transport simulation with two different initial mole_fraction conditions. After 10 years, the concentration distribution for both cases appeared to be close to stable. However, the "stable" mole_fraction distributions varied quite significantly between the two cases, which theoretically should converge to the same distribution regardless of the initial condition.
- Image 1 (Top): Shows the "stable" mole fraction distribution after 10 years when the initial mole fraction was set to 0.
- Image 2 (Bottom): Shows the "stable" mole fraction distribution after 10 years when the initial mole fraction was set to 1.0.
- Comparison with ATS 1.5: I did not observe such a drastic difference with ats 1.5. With different initial conditions, simulations in ATS 1.5 converged to a very close concentration distribution. The mass imbalance exists, when comparing the calculated boundary mass fluxes and the change of mass content, but error is much smaller.
My current hypotheses for the possible reason are:
- I may have made some mistakes in the XML files, although they were converted from v1.5 XML files.
- There might be an underlying issue with ats-master related to transport calculations, especially the coupling between surface and subsurface domain.
To help reproduce the two "stable" transport statuses and investigate the issue, I have provided my case files on Google Drive. The simulations were restarted for an additional 10 days from their 10-year checkpoints to obtain clearer output for analysis.
You'll find:
- n8-caseflow-run0-spinup_steadystate: Contains the checkpoint file from the flow-only spin-up simulation.
- n8-case1tracer-run0-3650d-IC0M: Contains the checkpoint files from the 10-year transport simulation with initial mole_fraction condition set to 0.
- n8-case1tracer-run0-3650d-IC1M: Contains the checkpoint files from the 10-year transport simulation with initial mole_fraction condition set to 1.
- n8-case1tracer-run0-3650d-IC0M-restart10d and n8-case1tracer-run0-3650d-IC1M-restart10d: Contain the 10-day restarted simulations and a Jupyter notebook for calculating boundary mass fluxes from observation files.
- The .exo files are in the data-processed folder, and the PFLOTRAN reaction file is in the data folder.
I am also happy to accommodate my calculations to other simpler test cases to see whether the same issue exists.
Any assistance or guidance on this matter would be highly appreciated. Thank you for your time and help.
Best,
Yi
--
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/c34f4d4b-aca6-4472-950b-23a5d3145df8n%40googlegroups.com.
--
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/d0d71b1f-ddec-4442-950e-8b428f5362efn%40googlegroups.com.
Hi Ethan,
My apologies for the delayed response; I was just back from travel.
That's great to hear you and Phong will be taking a look. Regarding your question about a script that plots the imbalance or what I'm looking for, here's where you can find that information in the shared Google Drive:
The Jupyter notebooks in the `folders n1-case1tracer-run0-3650d-IC0M` and `n1-case1tracer-run0-3650d-IC1M` contain my post-processing calculations related to the mass imbalance. Specifically, in Section 1.2 of these notebooks, you'll find:
A plot illustrating the mass content and boundary mass fluxes over time.
Printed values for all boundary mass fluxes.
An attached picture showing the mole fraction distribution and boundary mass fluxes at the last time step, which highlights the "stable" state I'm observing.
Additionally, for the verification of the steady-state flow status (from the spin-up simulation), I used the Jupyter notebook located under the folder `n1-caseflow-run0-spinup_steadystate`.
Please let me know if anything is unclear or if you need further details.
Best,
Yi