Question on getting boundary mass fluxes in ATS-PFLOTRAN

39 views
Skip to first unread message

Yi Xiao

unread,
May 20, 2025, 3:00:20 PMMay 20
to Amanzi-ATS Users
Hello all,

I'm working with a hillslope ATS-PFLOTRAN model and would like to obtain the mass flux across domain boundaries. I've done some explorations and would appreciate your thoughts on whether there's a better approach.

Here's the setup
- The model I'm testing is relatively simple: integrated hydrology with constant precipitation and a single conservative tracer only. The tracer boundary condition is a constant concentration at the summit of the hillslope. Over a long enough time, both flow and tracer distributions reach steady state. 

Here's what I've tried so far:
- I first tried to do this with the observation file, inspired by the water balance check in ats_demos/05_ecohydrology. I tried defining a generic multiplicative evaluator to get the mass flux across boundaries, but I couldn't get it to work.
- Then I tried to do this with the visualization file. For the subsurface domain, I used the darcy_velocity and total_component_concentration.tracer to calculate the advective flux. However, I think this advective flux only approximate to the true boundary flux. Part of the reason is because I'm doing a cell-based post-processing. For comparison, I also tested water flow calculated from darcy_velocity versus the "water_flux" evaluator at boundaries, and found a ~5% deviation in my case at the toe of the hillslope.

My main questions are:
- Is it possible to get the boundary mass fluxes with the observation file? as the visualization file is essentially pointwise in time while observation file is complete in time.
- Does ATS include diffusive flux at boundaries (such as subsurface boundary faces at the summit and toe) in addition to the advective flux?

Thanks in advance for your help!

Best,
Yi


Phong Le

unread,
May 20, 2025, 10:48:15 PMMay 20
to Amanzi-ATS Users
Hi Yi,

Yes you can get the boundary mass fluxes from observations. Let's assume you have N faces f1,f2,....fn located at the boundary of the domain. By definition, each face f_i  is connected to a single cell c_i  within the domain. The mass flux of solute through face f_i at a given time t is calculated as follows:

if water flows from cell c_i out of the domain (I think it is consider positive flux - double check):
    mass_flux_fi(t) = water_flux_fi(t) * total_concentration_ci(t-1)
if water flows from outside into the domain (negative flux):
    mass_flux_fi(t) = water_flux_fi(t) * total_concentration_specified_at_the_boundary(t-1)

Note that there is a time lag between the water_flux and the total concentration (tcc). This lag arises due to the weak coupling between hydrology and transport PKs. That means the calculation will be more accurate if the write interval in the observations is smaller. Ideally, you should write observations at every cycle.

In summary, if you write to observations the water_fluxes for N boundary faces and the tcc for N associated cells, you can post-process these values to estimate the total mass flux through the boundary faces.

Thanks
Phong

Yi Xiao

unread,
Jun 2, 2025, 6:13:13 PMJun 2
to Amanzi-ATS Users
Hi Phong,

Thank you for your reply and suggestion. It solved my issue partially, but I'm still observing a small mass imbalance when comparing the sum of all boundary mass fluxes with the change in mass content within the surface & subsurface domains.

Here is the hillslope model I'm working with.
- The water flow reached a steady state after an ATS flow spin-up, using constant precipitation, constant head at left boundary and right boundary.
- Next, a non-reactive tracer was added to the left subsurface boundary at a constant concentration. After a 10y simulation, it's converging to a concentration profile below.
fig2b-massdistribution-v2.png
I'm interested to get the mass fluxes at right surface and subsurface boundaries. However, for the case described above, my calculation show:
- Left subsurface boundary mass flux: 64811 molC/d
- Right subsurface boundary mass flux: 63427 molC/d
- Right surface boundary mass flux: 617 molC/d
Based on these values, the net mass flux for surface+subsurface is 768 molC/d.
Yet, the change of mass content within surface+subsurface domains indicates a net mass flux of 21 molC/d is needed to meet mass balance.

I wrote observation and visualization at every cycle for the calculation above. I also checked the mass flux through precipitation, bottom/front/back boundary face, they are all neglectable.

Did I miss anything here? This case was done under ats-1.5.2. I also tested it with ats-master, but got some other unexpected results, which I'll address in a separate conversion.

Thank you for your help.
Yi
Reply all
Reply to author
Forward
0 new messages