MODFLOW-USGS / mt3d-usgs

MT3D-USGS Repository
23 stars 12 forks source link

Multiple solid phases for kinetic ED/EA reactions #86

Closed cneyens closed 3 years ago

cneyens commented 3 years ago

Hello,

Currently, MT3D-USGS supports the use of a single solid phase as electron acceptor when simulating kinetic reactions between electron donors and electron acceptors (IREACTION = 2). This is achieved by specifying the keyword 'SOLID' in the reaction module file and simulating an additional immobile phase as the NCOMPth species. As stated in the manual, this represent the reservoir of e.g. Fe(III) which is then reduced to Fe(II). Specifying multiple solid phases is not possible however - unless I'm missing something. For example, I'd like to model the reduction of Mn(IV) to Mn(II) as well as Fe(III) to Fe(II) using solid phases to represent both oxidized forms as separate species; not as a combined phase nor using separate "expressed capacity" parameters.

I tried to adapt the source code to accommodate this. This basically involved expanding the NSOLID variable to a 1D matrix and tracking which EA is linked to which immobile phase. If you feel this is within the scope of the software, I can set up a PR.

Attached are figures of the 2ED5EA example model to which I added 1 additional EA (Mn). Oxidized Fe and Mn are represented by two immobile solid-phase species.

Figures ![ts_multiplesolids_mobile](https://user-images.githubusercontent.com/29357265/100754624-94b2a980-33eb-11eb-8b57-82beaf6ab85c.png) ![ts_mass_solids](https://user-images.githubusercontent.com/29357265/100754629-954b4000-33eb-11eb-884c-eceefa7f9cd2.png) ![ts_multiplesolids](https://user-images.githubusercontent.com/29357265/100754631-954b4000-33eb-11eb-8985-1be97ea8b2b5.png)
vivekbedekar commented 3 years ago

Hi Cas - What you shared is a good idea. Making NSOLID a 1-D array is a neat way to accommodate multiple solid phases. As a way to QA, I will review the changes you have made before incorporating those in the main code.

Eric - What is the best way to get Cas' changes? Is it best to get those changes through the repository or would it work best if he sends the files over via e-mail?

Vivek

Sent from Outlookhttp://aka.ms/weboutlook


From: Cas Neyens notifications@github.com Sent: Tuesday, December 1, 2020 9:56 AM To: MODFLOW-USGS/mt3d-usgs mt3d-usgs@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [MODFLOW-USGS/mt3d-usgs] Multiple solid phases for kinetic ED/EA reactions (#86)

Hello,

Currently, MT3D-USGS supports the use of a single solid phase as electron acceptor when simulating kinetic reactions between electron donors and electron acceptors (IREACTION = 2). This is achieved by specifying the keyword 'SOLID' in the reaction module file and simulating an additional immobile phase as the NCOMPth species. As stated in the manual, this represent the reservoir of e.g. Fe(III) which is then reduced to Fe(II). Specifying multiple solid phases is not possible however - unless I'm missing something. For example, I'd like to model the reduction of Mn(IV) to Mn(II) as well as Fe(III) to Fe(II) using solid phases to represent both oxidized forms as separate species; not as a combined phase nor using separate "expressed capacity" parameters.

I think I've managed to change the source code to accommodate this. This basically involved expanding the NSOLID variable to a 1D matrix and tracking which EA is linked to which immobile phase. If you feel this is within the scope of the software, I can set up a PR.

Attached are figures of the 2ED5EA example model to which I added 1 additional EA (Mn). Oxidized Fe and Mn are represented by two immobile solid-phase species.

Figures

[ts_multiplesolids_mobile]https://user-images.githubusercontent.com/29357265/100754624-94b2a980-33eb-11eb-8b57-82beaf6ab85c.png

[ts_mass_solids]https://user-images.githubusercontent.com/29357265/100754629-954b4000-33eb-11eb-884c-eceefa7f9cd2.png

[ts_multiplesolids]https://user-images.githubusercontent.com/29357265/100754631-954b4000-33eb-11eb-8985-1be97ea8b2b5.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/MODFLOW-USGS/mt3d-usgs/issues/86, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA5YRSCBLWKQ2Z3NBHZQQ3LSST7ZZANCNFSM4UJENXBA.

emorway-usgs commented 3 years ago

@cneyens, are you familiar with the GitHub "Pull Request" functionality? I think that would be a great way to log your contribution to the code, and it offers @vivekbedekar a way to review your suggested code changes and request further modifications or to go ahead and merge your suggested modifications into the most recent beta version of the code until the next release occurs. I would like to request that you provide a summary of the enhancement so that it may be described in the release notes associated with the next release.

If you're not familiar with how to do a pull request, you can peruse the link provided above, do some further googling, and if it is still unclear, I could show you how if you contact me at my USGS email.

Of course, if you prefer to send Vivek the modified files by email, you are welcome to do so, the trade-off being that your contribution to the code base won't show up in Git (because it would appear that Vivek installed the change), but would of course be mentioned in the release notes.

cneyens commented 3 years ago

Yes, I'll set up a pull request into the 'develop' branch; hopefully sometime this week.

vivekbedekar commented 3 years ago

Hi Cas,

Thanks for sharing the example. I have merged your code changes through GitHub so that your contributions are tracked properly and have included your example in the suite of test examples that MT3D-USGS uses. You have done a nice job with the code changes. Thanks!

Vivek