Questions on Solid residue mass

113 views
Skip to first unread message

Bing Li

unread,
Mar 22, 2023, 5:27:14 PM3/22/23
to Amanzi-ATS Users
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. solid_residue_mass.png

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 



error.png
2dtransect_tempest_d18m_11_v2_gw2-gw8.xml

Coon, Ethan

unread,
Mar 22, 2023, 5:39:47 PM3/22/23
to Bing Li, Amanzi-ATS Users

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

 

865-241-1296

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.

Bing Li

unread,
Mar 22, 2023, 5:52:22 PM3/22/23
to Amanzi-ATS Users
Hi Ethans,
 Thanks for this reply. Yes, the error message was sent by PFLOTRAN, but the reason could be related to Evaporation process.

Because, i have simulated several reaction cases without vegetation (both evaporation and transpiration), there are no errors. 
Also, it is very interesting to see that if I remove the "surface-evaporation" from "surface_water-source" term, the error can also be fixed. 

I agree with you that if the depth of ponding becomes zero, the response is turned off. I also tested adding saturation tolerance values to the surface. If I use a relatively high value, this means that the surface reaction has been turned off for all time. Then, this error can be solved as well.

So, you mentioned the solid residue mass will be kept during dry period. Does ATS consider the solid residue mass when it do coupling for subsurface domain? Because the error happens in subsurface not the surface cell. 

Thanks,
Bing

Coon, Ethan

unread,
Mar 22, 2023, 5:55:56 PM3/22/23
to Bing Li, Amanzi-ATS Users

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. Image removed by sender.

 

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.

Bing Li

unread,
Mar 22, 2023, 6:15:52 PM3/22/23
to Amanzi-ATS Users

The solid residue mass is zero in my subsurface. What I have shown before is the solid residue in surface domain.  
The problem does not go away if I ensure that all WRMs have a small residual saturation.

It may be due to a very high concentration caused by evaporation over a certain period of time. 

You mentioned that "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"
I wonder if the holding process is done in a second and the dumping process is done in a second? How did ATS deal with that?


Best,
Bing

Sergi Molins Rafa

unread,
Mar 22, 2023, 6:26:17 PM3/22/23
to Bing Li, Amanzi-ATS Users
Does the surface ponded depth go to a small or very small value? What are the concentrations in the surface over time and just before the fail?



Coon, Ethan

unread,
Mar 22, 2023, 6:28:05 PM3/22/23
to Bing Li, Amanzi-ATS Users

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:

 

  1. Is the water content in mols at the old timestep == 0 and at the new timestep > 0?   If so, move all mass for each component from the “solid residue” to the “aqueous phase”
  2. Is the water content in mols at the old timestep > 0 and at the new timestep == 0?  If so, move all mass for each component from the “aqueous phase” to the “solid residue”

 

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.

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

Bing Li

unread,
Mar 22, 2023, 6:32:31 PM3/22/23
to Amanzi-ATS Users
Yes, the surface ponded depth in surface does small value, and concentration is increase at the ponded cell. the solid residue mass also increase at the dry cell.

dry-wet-cell.png

Sergi Molins Rafa

unread,
Mar 22, 2023, 6:46:39 PM3/22/23
to Bing Li, Amanzi-ATS Users
I don't think the residue has anything to do with it. It is only an indicator. 

If the solution becomes concentrated, the solver will likely fail. I really have not thought about how to deal with drying due to evaporation in the context of integrated hydrology. Zexuan runs were dominated by precipitation, snow melt, with smaller contributions from evaporation. So this issue may have not come up.

You could try removing kinetic reactions and mineral reactions in the surface PFLOTRAN model and see what happens. Maybe you can get the model to run with only speciation reactions. And get past the small ponded depth of the simulation. Are the microbes active in the surface water?

Sergi



Bing Li

unread,
Mar 22, 2023, 7:00:21 PM3/22/23
to Amanzi-ATS Users
Hi Ethan and Sergi,
Thanks for your explain. I think it is the solid residue mass problem for the source term from precipitation. 

You mentioned that:
  1. water content at the old timestep == 0 and at the new timestep > 0  ==> move all mass from the “solid residue” to the “aqueous phase”
  2. water content at the old timestep > 0 and at the new timestep == 0 ==>  move all mass  from the “aqueous phase” to the “solid residue”
In our case, we have source term (for each species from precipitation). Therefore, we will have an increased solid residue mass at the dry area if the precipitation is not large enough. 
But when the dry region because the wet region. Then a extremely large number will turn into aqueous phase. Therefore, i have a singularity problem for reaction matrix.  


I have tested this if i turn all the reaction species concentration value to small number. Now it can run. 

Best,
Bing

Coon, Ethan

unread,
Mar 22, 2023, 10:14:35 PM3/22/23
to Bing Li, Amanzi-ATS Users

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:

 

  1. What grid cell is crashing pflotran (not exactly sure how to do this, Sergi/Zexuan, do either of you know?)
  2. Add “debug cells” to the subsurface transport PK for that grid cell to track the water and C mass in that cell before it crashes.
  3. Also add a debug cell to the surface transport PK for the surface grid cell (assuming the failing subsurface grid cell is the top cell of a domain.
  4. Run, monitoring the log file to understand how and why concentrations are changing in those grid cells prior to being handed off to PFLOTRAN.

Bing Li

unread,
Mar 22, 2023, 11:37:00 PM3/22/23
to Amanzi-ATS Users
Thanks for your reply.  I have re-check the output file (log.txt).  The crash should happen in the surface domain. 
1. In the successful step, after the  "Alquimia_PK:domain |    min/avg/max Newton: 4/4/4, the maximum is in cell 1805", it should show the "Alquimia_PK:domain |    min/avg/max Newton: 4/4/4, the maximum is in cell 95."
    The cell 1805 is in subsurface, the cell 95 is in the surface domain.
2. While in the crashed step, we get singular value error after  " Alquimia_PK:domain |    min/avg/max Newton: 4/4/4, the maximum is in cell 1805."

Following your comments, the solute in rainfall has been directly infiltrated into the soil.  If I am imposing an evaporative flux  and there is no surface water available, 
I require an equal flux of water from the top grid cell to move to the surface via Darcy flow.  This flux should advect solute with it

It might the reason for my case. Based on the flow path below. The infiltrated solute from left side can be transport to right side driven by pressure gradient. 
The highest surface residue mass point (shown in red dashed line) have a upwelling flux from subsurface to surface. 

flowtracer.png

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. 

Surface_residue_mass.png
I am testing more cases and try to figure out the reason. I will let you know if there any updates. 

Best,
Bing
log.txt
Reply all
Reply to author
Forward
0 new messages