
Solid residue is in no way a PFLOTRAN thing, is not given to Alquimia or PFLOTRAN, and so it can have no effect on PFLOTRAN chemistry. It is simply a bucket to hold (nonreacting) mass of C in the solid phase when all the water goes away, until the point where there is water in that cell again and it is dumped back into the incoming water. We have to do something with it, because you evaporated the water away and so it isn’t in the aqueous phase anymore, so conservation of mass of C requires that we hold onto it somewhere.
That said, I’m not sure what happens in a surface cell when the water goes away in the ATS+Alquimia+PFLOTRAN case. We’ve tested that case for sure in the transport only case, but I’m not sure about the reactive case. Maybe Zexuan has seen this and knows how it works? His simulations with PFLOTRAN likely have wetting and drying cells, right? My assumption would have been that the reactions turn off when ponded depth goes to zero, so there is no singularity in PFLOTRAN because no reactions are called, but that “singular error” is a PFLOTRAN error…
Ethan
--
-------------------------------------------------------------------------
Ethan Coon
Senior Research Scientist
Oak Ridge National Laboratory
https://www.ornl.gov/staff-profile/ethan-t-coon
-------------------------------------------------------------------------
From: <ats-...@googlegroups.com> on behalf of Bing Li <lee19...@gmail.com>
Date: Wednesday, March 22, 2023 at 5:28 PM
To: Amanzi-ATS Users <ats-...@googlegroups.com>
Subject: [EXTERNAL] Questions on Solid residue mass
Hi ATS developer and users.
Recently, i am working on a 2D transect modeling using ATS and PFLOTRAN.
The simulation will fail when I consider the evaporation and reactions.
A singular error will happen after running the simulation for 14 cycles. (Please check the error.png)
After thinking and testing, I found it was caused by the surface-evaporation. If I remove surface-evaporation from surface water source, the simulation can be run smoothly.
<ParameterList name="surface-water_source" type="ParameterList">
<Parameter name="field evaluator type" type="string" value="additive evaluator" />
<Parameter name="evaluator dependencies" type="Array(string)" value="{canopy-throughfall_drainage_rain, snow-melt,surface-evaporation}" />
<Parameter name="surface-evaporation coefficient" type="double" value="-1" />
<Parameter name="units" type="string" value="m s^-1" />
</ParameterList>
You can find more information about the setup used in my case via 2dtransect_tempest_d18m,_11_v2_gw2-gw8.xml file.
Also, after comparing the different of simulation results in Paraview.
I also noticed that the high surface solid residue mass for each reactive species could be found in the case with surface evaporation.
But it does not exist in the case without surface evaporation. 
From the source code, I think solid residue mass has been considered or calculated for tcc (total concentration component) https://github.com/amanzi/ats/blob/c6ac6e4e50810911cbe0ec895af6683bfd99b70a/src/pks/transport/sediment_transport/sediment_transport_pk.cc.
Since we do not have solid residue mass in PFLOTRAN. Therefore, I would like to know how the solid residue mass is used in ATS-Alquimia-PFlotran.
Or, does anyone have any comments for my singular value issue?
We guess it may caused by the dry cell. After the water has been evaporated, the solid residue mass changed the local reaction equilibrium for specific cell. But i have not figure it out, yet. Any helps are welcomed.
Thanks,
Bing
--
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/34ba1fa5-d9f3-4659-a961-9d9aa335ad08n%40googlegroups.com.
I suspect that evaporation is the cause, but not the reason for, your error. By that I mean – the reactions are breaking as you remove water, but that doesn’t mean that removing water is the problem.
The only way solid residue should ever be nonzero in the subsurface is if you have a problem with your water retention curves that allow the saturation to go to zero. Does the problem go away if you ensure that all WRMs have a small residual saturation?
But it does not exist in the case without surface evaporation.
From the source code, I think solid residue mass has been considered or calculated for tcc (total concentration component) https://github.com/amanzi/ats/blob/c6ac6e4e50810911cbe0ec895af6683bfd99b70a/src/pks/transport/sediment_transport/sediment_transport_pk.cc.
Since we do not have solid residue mass in PFLOTRAN. Therefore, I would like to know how the solid residue mass is used in ATS-Alquimia-PFlotran.
Or, does anyone have any comments for my singular value issue?
We guess it may caused by the dry cell. After the water has been evaporated, the solid residue mass changed the local reaction equilibrium for specific cell. But i have not figure it out, yet. Any helps are welcomed.
Thanks,
Bing
--
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/34ba1fa5-d9f3-4659-a961-9d9aa335ad08n%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 on the web visit
https://groups.google.com/d/msgid/ats-users/1e4d5c6c-63e3-4df6-a0e6-b329a95fca18n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-users/ee6588f5-453b-49d0-99c5-e58d692b692cn%40googlegroups.com.
I’m not sure what you mean by “done in a second.”
Effectively the way the solid_mass_residue works is that every discrete timestep, we check:
Since both conditions cannot be satisfied in the same discrete timestep, these cannot conflict or happen at the same timestep. Flow is computed before transport, so the water content at the old and new times are known and fixed by the time transport and this check is done.
This is why you see that, for normal evaporation rates with no reactions and no flow of water, as we evaporate water, the concentration goes up and up and up until the water all goes away, at which point the concentration goes to zero. Then, if water returns due to a source of water (e.g. rain), even if there is no concentration in that source, the concentration immediately goes back up to nonzero.
If you’re imposing an evaporative flux and there is no surface water available, you require an equal flux of water from the top grid cell to move to the surface via Darcy flow. This flux should advect C with it… I have to admit I’m not entirely sure where that C goes. Maybe into the solid residue? Maybe it gets left behind in the top grid cell? It would be good for someone to look at the demo/regression problems around transport and see if we have a problem that does this, and investigate what happens in the code in this case (and see if it makes sense!). I’m not entirely sure what SHOULD happen in that case – probably it should be left behind in the top grid cell and therefore the top grid cell’s concentration should increase?
This may break reactions, but that sounds “right” to me if it does…
But it does not exist in the case without surface evaporation. Error! Filename not specified.
From the source code, I think solid residue mass has been considered or calculated for tcc (total concentration component) https://github.com/amanzi/ats/blob/c6ac6e4e50810911cbe0ec895af6683bfd99b70a/src/pks/transport/sediment_transport/sediment_transport_pk.cc.
Since we do not have solid residue mass in PFLOTRAN. Therefore, I would like to know how the solid residue mass is used in ATS-Alquimia-PFlotran.
Or, does anyone have any comments for my singular value issue?
We guess it may caused by the dry cell. After the water has been evaporated, the solid residue mass changed the local reaction equilibrium for specific cell. But i have not figure it out, yet. Any helps are welcomed.
Thanks,
Bing
--
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/34ba1fa5-d9f3-4659-a961-9d9aa335ad08n%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 on the web visit https://groups.google.com/d/msgid/ats-users/1e4d5c6c-63e3-4df6-a0e6-b329a95fca18n%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 on the web visit
https://groups.google.com/d/msgid/ats-users/ee6588f5-453b-49d0-99c5-e58d692b692cn%40googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/ats-users/acecacb8-a2de-4f00-a165-1436972177c2n%40googlegroups.com.
It’s a good point to check in both directions. In the case of precip, one would hope that the C brought in with the precip would go into the aqueous phase of the subsurface water, bypassing the surface. In the case of evap, one would hope the C would be left in the aqueous phase of the top grid cell, not put into the solid residue of the surface (I think?). It would be worth checking in both directions to see what actually happens. I’m fairly confident that the former is correct, because I remember checking the case of run-on into a dry grid cell that infiltrates, whereby C was advected with surface flow into a dry cell and infiltrated into the top grid cell in the same step, and that is correctly dealt with.
Either way, it’s likely that the solid residue itself is not the problem, since solid residue can’t crash PFLOTRAN. And since you say the crash is in the subsurface, not the surface, then clearly the surface solid residue isn’t the problem. Whether high concentrations are due to re-dissolved surface solid residue that infiltrates or evaporative concentration, either way the problem is probably high concentrations in the subsurface.
The right way to know for sure is to figure out:
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-users/4af71b44-42ac-4708-98f3-24608773e8cdn%40googlegroups.com.

Also, I am plotting the mass of surface residue in this surface cell. This indicates that the mass of solute remaining on the surface will continue to increase before the crash.
In this case, there is a steady source of external solute from rainfall. It then seeps into the soil and is transported back to the surface. So, we have an increased surface residual mass.
Once the water inundates the dry area, we would have an unusual concentration at that timestep.
Not sure if this situation will cause some numerical errors when we solve this reaction with the finite volume method. I guess it will and also might be related to the mesh too.
In previous 3D simulation, we also found some extremely large value for solute in some cells.
