Question on Mass Imbalance and Initial Condition Dependence in ATS-master Transport Simulations

63 views
Skip to first unread message

Yi Xiao

unread,
Jul 3, 2025, 4:13:57 AMJul 3
to Amanzi-ATS Users
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:

  1. 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.

  2. 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.

  3. 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.Picture8.jpg

    • 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.

  4. 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:

  1. I may have made some mistakes in the XML files, although they were converted from v1.5 XML files.

  2. 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

Coon, Ethan

unread,
Jul 3, 2025, 10:12:01 AMJul 3
to Yi Xiao, Amanzi-ATS Users

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:

  1. 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.
  2. 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.
  1. 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.
  1. 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:

  1. I may have made some mistakes in the XML files, although they were converted from v1.5 XML files.
  2. 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.

Yi Xiao

unread,
Jul 8, 2025, 4:14:06 PMJul 8
to Amanzi-ATS Users
Hi Ethan,

Thanks for the reply! I can fully understand the difficulty in debugging this. I'll try to generate a simpler model with the similar issue, perhaps by coarsening the mesh, while maintaining the key boundary conditons.

Talk to you later.

Best,
Yi

Yi Xiao

unread,
Jul 24, 2025, 11:26:34 AMJul 24
to Amanzi-ATS Users
Hi Ethan,

I've created a simpler simulation case with a much coarser mesh to help with debugging. This new case has only 10 cells across the hillslope, and importantly, it completes the 10-year transport simulation in just 8 minutes using 1 processor. Previous case took 1.5-hour run on 8 processors. I've uploaded this simpler case to my Google Drive (https://drive.google.com/drive/folders/1h2cWvgBx--3XbwKJ9BXzFckKsP3mKmkw?usp=drive_link)

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


Coon, Ethan

unread,
Jul 24, 2025, 11:34:39 AMJul 24
to Yi Xiao, Amanzi-ATS Users

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

 

  1. 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 removed by sender.
    • 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.
  1. 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:

  1. I may have made some mistakes in the XML files, although they were converted from v1.5 XML files.
  2. 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.

Yi Xiao

unread,
Jul 30, 2025, 7:03:01 PMJul 30
to Amanzi-ATS Users

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

Reply all
Reply to author
Forward
0 new messages