Bug in multi-continuum capability

63 views
Skip to first unread message

Hammond, Glenn E

unread,
Jan 29, 2025, 11:56:14 AMJan 29
to pflotran-dev (pflotran-dev@googlegroups.com), Pau Márquez Martín

Rosie,

 

The attached input deck crashes on my Mac and fails to converge on Linux. The issue is that secondary condition does not consider immobile species. All the arrays and matrices are allocated to naqcomp instead of ncomp whereas the primary continuum is ncomp. The error surfaced when I turned on arrays bounds checking. “jac_transport” below is sized to naqcomp while all the Jup is sized to ncomp. But the issue is throughout the secondary continuum routines.

 

Glenn

 

----------------------------------------------------------

== REACTIVE TRANSPORT ==========================================================

0 2r: 2.88E+01 2x: 0.00E+00 2u: 0.00E+00 ir: 2.68E-01 iu: 0.00E+00 irsec: 0.00E+00 rsn: 0, 0

At line 3243 of file reactive_transport.F90

Fortran runtime error: Array bound mismatch for dimension 1 of array 'jac_transport' (17/18)

 

Error termination. Backtrace:

#0 0x7ffff7c23960 in ???

#1 0x7ffff7c244d9 in ???

#2 0x7ffff7c24ad6 in ???

#3 0x5555559b79ec in rtjacobiannonflux

at /home/hamm495/software/pflotran/src/pflotran/reactive_transport.F90:3243

#4 0x5555559c1319 in __reactive_transport_module_MOD_rtjacobian

at /home/hamm495/software/pflotran/src/pflotran/reactive_transport.F90:2910

 

----------------------------------------------------------

 

From: Pau Márquez Martín <pau.m...@amphos21.com>
Date: Wednesday, January 29, 2025 at 6:58
AM
To: Hammond, Glenn E <glenn....@pnnl.gov>
Subject: RE: Discuss reaction issue

Check twice before you click! This email originated from outside PNNL.

 

Sure, here it is.

 

Thanks

Pau

 


De: Hammond, Glenn E <glenn....@pnnl.gov>
Enviado: martes, 28 de enero de 2025 18:00
Para: Pau Márquez Martín <pau.m...@amphos21.com>
Asunto: Re: Discuss reaction issue

 

Please re-send me the problematic input deck.

 

Glenn

 

From: glenn....@pnnl.gov
When: 8:00 AM - 8:30 AM January 29, 2025
Subject: Discuss reaction issue
Location: Microsoft Teams Meeting

 

 

 

________________________________________________________________________________

Microsoft Teams Need help?

Meeting ID: 242 245 975 291

Passcode: UE9aE3tN


Dial in by phone

+1 509-408-1681,,21378502# United States, Liberty Lake

Phone conference ID: 213 785 02#

________________________________________________________________________________

database.dat
pflotran.in

Pau Márquez Martín

unread,
Feb 13, 2025, 4:28:34 AMFeb 13
to pflotran-dev
Dear Rosie and Glenn,

I hope you are doing very well! 

I was wondering whether there are has been any progress on this issue, or if there is anything I can do to help Rosie solve the bug. I can spend some time on this if you give me some directions. 
On the other hand, I tried changing biomass to a mobile species but it has not worked so far. 

Thank you!

Pau

El dia dimecres, 29 de gener del 2025 a les 17:56:14 UTC+1, Hammond, Glenn E va escriure:

Leone, Rosie

unread,
Feb 13, 2025, 4:04:17 PMFeb 13
to pflotr...@googlegroups.com
Hi Pau,
I apologize for the delay—I haven’t had a chance to work on the issue yet, but I plan to look at it next week. I’m not certain I’ll be able to solve the problem, but Glenn and I have a meeting scheduled next week where we can discuss it further.
Thanks for your offer to help, I’ll keep you updated on any developments.
Rosie


From: pflotr...@googlegroups.com <pflotr...@googlegroups.com> on behalf of Pau Márquez Martín <pmarq...@gmail.com>
Sent: Thursday, February 13, 2025 2:28 AM
To: pflotran-dev <pflotr...@googlegroups.com>
Subject: [EXTERNAL] [pflotran-dev: 6309] Re: Bug in multi-continuum capability
 
--
You received this message because you are subscribed to the Google Groups "pflotran-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pflotran-dev/fb167552-0b75-4136-8f4c-f0c33017310an%40googlegroups.com.

Pau Márquez Martín

unread,
Mar 3, 2025, 9:42:42 AMMar 3
to Hammond, Glenn E, pflotran-dev (pflotran-dev@googlegroups.com), Orlando Silva
Hi Rosie and Glenn,
I wanted to get back to you concerning the implementation of microbial reactions within the secondary continuum. Is there any progress on this topic from your side? Again, should you need our help to work on the extension of these capabilities, just let me know.
On the other hand, we are working on an alternative approach, which consists of representing the biomass as another primary species with a close-to-zero diffusion coefficient (which in theory can be done by using our Nernst-Planck version of PFLOTRAN). Also, the immobile_decay_reaction that uses the immobile biomass variable could be replaced by an equivalent general reaction. In theory, the approach should work provided PFLOTRAN allows to apply microbial reactions in the secondary continuum, although we are getting numerical convergence problems during the initialisation of the model.
Another alternative could be neglecting completely microbial reactions within the secondary continuum. For that purpose, we would like to understand and be sure that with the released PFLOTRAN version is possible implementing a model that includes the secondary continuum and microbial reactions are applied only in the primary continuum. We are asking this question because some of our simulation tests for the above case also display segmentation faults (not initialising at all or crashing at the first timestep). We have implemented simple 1D and 3D models that allow to apply microbial reaction only in the primary continuum and the simulations run. However, when trying to use the same approach with our complex heterogeneous 3D model (3D distributions of permeability, porosity and matrix length, and initial profiles for prescribing the chemical composition), the simulation crashes at the first timestep of transport with the common pointer errors that we have been observing so far. 
Looking forward to hearing from you
All the best
Pau



De: Hammond, Glenn E <glenn....@pnnl.gov>
Enviado: miércoles, 29 de enero de 2025 17:56
Para: pflotran-dev (pflotr...@googlegroups.com) <pflotr...@googlegroups.com>
Cc: Pau Márquez Martín <pau.m...@amphos21.com>
Asunto: Bug in multi-continuum capability
 

Hammond, Glenn E

unread,
Mar 3, 2025, 4:43:28 PMMar 3
to Pau Márquez Martín, pflotran-dev (pflotran-dev@googlegroups.com), Orlando Silva

Pau,

 

Please see my answers in red.

 

Glenn

 

From: Pau Márquez Martín <pau.m...@amphos21.com>
Date: Monday, March 3, 2025 at 6:42
AM
To: Hammond, Glenn E <glenn....@pnnl.gov>, pflotran-dev (pflotr...@googlegroups.com) <pflotr...@googlegroups.com>
Cc: Orlando Silva <orland...@amphos21.com>
Subject: Re: Bug in multi-continuum capability

Hi Rosie and Glenn,

I wanted to get back to you concerning the implementation of microbial reactions within the secondary continuum. Is there any progress on this topic from your side? Again, should you need our help to work on the extension of these capabilities, just let me know.

We are working on it. Peter is currently documenting equations for such. The key issue is that immobile species are not considered in the equations implemented for the secondary continuum. It has nothing to do with microbial reactions other than the use of an immobile species.

On the other hand, we are working on an alternative approach, which consists of representing the biomass as another primary species with a close-to-zero diffusion coefficient (which in theory can be done by using our Nernst-Planck version of PFLOTRAN). Also, the immobile_decay_reaction that uses the immobile biomass variable could be replaced by an equivalent general reaction. In theory, the approach should work provided PFLOTRAN allows to apply microbial reactions in the secondary continuum, although we are getting numerical convergence problems during the initialisation of the model.

 

Seems like a good work around.

Another alternative could be neglecting completely microbial reactions within the secondary continuum. For that purpose, we would like to understand and be sure that with the released PFLOTRAN version is possible implementing a model that includes the secondary continuum and microbial reactions are applied only in the primary continuum. We are asking this question because some of our simulation tests for the above case also display segmentation faults (not initialising at all or crashing at the first timestep). We have implemented simple 1D and 3D models that allow to apply microbial reaction only in the primary continuum and the simulations run. However, when trying to use the same approach with our complex heterogeneous 3D model (3D distributions of permeability, porosity and matrix length, and initial profiles for prescribing the chemical composition), the simulation crashes at the first timestep of transport with the common pointer errors that we have been observing so far. 

 

I do not see this working properly as you would need a completely separate option, reaction and rt_parameter  objects.

Pau Márquez Martín

unread,
Apr 1, 2025, 4:43:30 AMApr 1
to pflotran-dev

Dear Rosie and Glenn,

Thank you very much for your detailed response and for sharing the current status of your work. We really appreciate the insights. Unfortunately, our own attempts to implement an alternative approach to define biomass as a primary species did not work out well when applied to large scale models with high heterogeneity. We're assuming you might still be working on the issue, and we’d be very interested to hear about any progress or conclusions you've reached since your last update.

Thanks again for your collaboration, and please don’t hesitate to let us know if there’s anything we can do to support.

Best regards,
Pau

El dia dilluns, 3 de març del 2025 a les 22:43:28 UTC+1, Hammond, Glenn E va escriure:

Hammond, Glenn E

unread,
Apr 1, 2025, 11:59:32 AMApr 1
to pflotr...@googlegroups.com

Pau,

 

There has been no progress since the last response. Peter Lichtner is currently documenting a revised form of the multi-continuum approach with immobile species included. After that, someone will need to update the code. But we are waiting on the equations.

 

Glenn

 

From: pflotr...@googlegroups.com <pflotr...@googlegroups.com> on behalf of Pau Márquez Martín <pmarq...@gmail.com>
Date: Tuesday, April 1, 2025 at 1:43

AM

--

You received this message because you are subscribed to the Google Groups "pflotran-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-dev...@googlegroups.com.

Hammond, Glenn E

unread,
Jul 29, 2025, 11:23:12 AMJul 29
to pflotr...@googlegroups.com, Orlando Silva

Rosie,

 

Please remind me. Have there been any update to this issue? Did Peter every provide the equations that include immobile species?

 

Glenn

 

Leone, Rosie

unread,
Jul 29, 2025, 4:35:27 PMJul 29
to pflotr...@googlegroups.com, Orlando Silva
The equations have been written out but no updates to the code have been implemented yet.

Rosie

From: 'Hammond, Glenn E' via pflotran-dev <pflotr...@googlegroups.com>
Sent: Tuesday, July 29, 2025 9:23 AM
To: pflotr...@googlegroups.com <pflotr...@googlegroups.com>
Cc: Orlando Silva <orland...@amphos21.com>
Subject: [EXTERNAL] Re: [pflotran-dev: 6344] Re: Bug in multi-continuum capability
 

Orlando Silva

unread,
Jul 30, 2025, 2:59:01 AMJul 30
to Leone, Rosie, pflotr...@googlegroups.com, Albert Costa

Hi Rosie, Glenn

 

Thank you for your feedback. We need this capability urgently for one of our projects. I think maybe we could take your equations and try to produce a first “customized” version for our purposes and share with you, so you can further refine it and produce the released version. What do you think?

 

I include Albert Costa in the cc, who would help to update the code.

 

All the best

Orlando

Reply all
Reply to author
Forward
0 new messages