Jump to content
RockWare Support Forum

Reading Text tables into X2t


TMernagh
 Share

Recommended Posts

I am running X2t Release Version 6.0.5 on Windows XP SP2. I am trying to model fluid flow through 2 different rock types - a sandstone and a basalt and need to set up a gridded domain to show the spatial variation of the 2 rock types. For large grids I prefer to set them up in Microsoft Excel in order to make use of their simple copy&paste tools. So I have set up the grids for each mineral in Excel and then saved them as text files. However, when I try to import them into X2t using the Table option in "Reactants" it doesn't work. I've tried saving the files as both Tab Delimited Text and Unicode Text but neither works.

Does X2t require the tables is a specific format in order to import them correctly. If so can somebody tell me what the format is? Otherwise can somebody tell me the best way to import a table into X2t?

Link to comment
Share on other sites

Does X2t require the tables is a specific format in order to import them correctly. If so can somebody tell me what the format is? Otherwise can somebody tell me the best way to import a table into X2t?

Hello:

I'm attaching a script and text table that shows how this can be done, as well as a PDF file with Xtplot output showing the distribution of mineral volume across the domain. The latter allows you to evaluate how X2t assigns values over the domain from the text file, since domain indexing occurs from bottom to top.

I recommend that you also take a look at the Heterogeneity appendix in the v8 GWB Reactive Transport Modeling guide, especially section A.2.

It looks like the main issue is that you need to constrain your mineral volumes by swapping the mineral in for the basis species it constrains in the Initial pane, not the Reactants pane.

I hope that helps,

Tom Meuzelaar

RockWare, Inc.

mineral_volume_table.x2t

x2t_mineral_volume_table.txt

mineral_distribution.pdf

Link to comment
Share on other sites

Thanks Tom,

I think I have GWB reading the tables properly now although it is hard to verify this until you have a working model.

Also as you have correctly indicated the minerals should be added to the Initial (Basis) species as the Reactants tab will titrate the minerals in small amounts at each iteration which is not what I want to model. However, and we've discussed this before, the problem with doing this is that you can only add one mineral for each element in the Basis set which is a severe limitation when trying to model natural rock compositions. For my model I want to have a sandstone of the following composition:

Quartz + K-Feldspar + Albite + Anorthite + Muscovite + Kaolinite + Magnetite + Pyrite

and a basalt of the following composition:

Albite + Anorthite + Forsterite + Fayalite + Ferrosilite + Diopside + Hedenbergite + Chamosite + Pargasite + Ilmenite + Magnetite

so the problem arises when I want to add more than one mineral containing Fe or Al for example (i.e. for Fe: Magnetite + Pyrite + Fayalite + Ferrosilite etc). Although these rocks may be altered this is the composition I would like to react with a fluid.

Anyway, I've attached the X2t model that I have developed so far. Another problem I've encountered is that if you do put lots of minerals in the Basis set then you typically get the error message "Initial Soln is too concentrated" when you try to run the model. I can overcome this problem by increasing the water content to 1,000,000 kg but I don't think this is realistic.

My final question with the attached model is that I have set up a symmetric 10 x 5 node domain with a high porosity section in the central (y=3) row representing a fault or aquifer. I was expecting a symmetric dispersion of minerals around the central zone but instead most of the precipitation occurred in the lower right hand corner of the domain (i.e. nodes 5,0 to 9,0 and 5,1 to 9,1). Is this caused by the fact that the calculations are done on these nodes before the higher numbered nodes (i.e. 5,4 to 9,4)?

quartz 4.txtK feldspar 4.txtU into WMC + Seigals Ver 4.x2talbite 4.txtanorthite 4.txtmuscovite 4.txtforsterite 4.txtmagnetite 4.txtWMC Seigals Porosity.txtU into WMC + Seigals Ver 4.x2t

Hello:

I'm attaching a script and text table that shows how this can be done, as well as a PDF file with Xtplot output showing the distribution of mineral volume across the domain. The latter allows you to evaluate how X2t assigns values over the domain from the text file, since domain indexing occurs from bottom to top.

I recommend that you also take a look at the Heterogeneity appendix in the v8 GWB Reactive Transport Modeling guide, especially section A.2.

It looks like the main issue is that you need to constrain your mineral volumes by swapping the mineral in for the basis species it constrains in the Initial pane, not the Reactants pane.

I hope that helps,

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

Thanks Tom,

Also as you have correctly indicated the minerals should be added to the Initial (Basis) species as the Reactants tab will titrate the minerals in small amounts at each iteration which is not what I want to model. However, and we've discussed this before, the problem with doing this is that you can only add one mineral for each element in the Basis set which is a severe limitation when trying to model natural rock compositions. For my model I want to have a sandstone of the following composition:

Quartz + K-Feldspar + Albite + Anorthite + Muscovite + Kaolinite + Magnetite + Pyrite

and a basalt of the following composition:

Albite + Anorthite + Forsterite + Fayalite + Ferrosilite + Diopside + Hedenbergite + Chamosite + Pargasite + Ilmenite + Magnetite

so the problem arises when I want to add more than one mineral containing Fe or Al for example (i.e. for Fe: Magnetite + Pyrite + Fayalite + Ferrosilite etc). Although these rocks may be altered this is the composition I would like to react with a fluid.

Anyway, I've attached the X2t model that I have developed so far. Another problem I've encountered is that if you do put lots of minerals in the Basis set then you typically get the error message "Initial Soln is too concentrated" when you try to run the model. I can overcome this problem by increasing the water content to 1,000,000 kg but I don't think this is realistic.

My final question with the attached model is that I have set up a symmetric 10 x 5 node domain with a high porosity section in the central (y=3) row representing a fault or aquifer. I was expecting a symmetric dispersion of minerals around the central zone but instead most of the precipitation occurred in the lower right hand corner of the domain (i.e. nodes 5,0 to 9,0 and 5,1 to 9,1). Is this caused by the fact that the calculations are done on these nodes before the higher numbered nodes (i.e. 5,4 to 9,4)?

Hi:

The problem is not so much a limitation with GWB and the Basis, as it is a limitation imposed by thermodynamics and the phase rule. The large number of mineral phases you see in your system indicate a metastable or disequilibrium assemblage. While you could proceed with building this (complex) simulation using mineral dissolution/precipitation kinetics, I'd first ask two questions:

1). Does the model objective require that you include every single one of these mineral phases, or is it possible to simplify the system?

2). Have you worked out a stable chemistry in React before proceeding to the reactive transport simulation?

IMO, the most useful geochemical models are often very simple in scope...

I'm not sure how to answer your question about precipitation/porosity distribution, because it doesn't seem like the script runs at this point. Do you have an output set from a model that has completed?

Best regards,

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

While you could proceed with building this (complex) simulation using mineral dissolution/precipitation kinetics

Hi,

Just as an expansion to my previous answer- the way that you go about setting up a heterogeneous mineral distribution in your domain is as follows:

  1. Swap minerals that are in equilibrium with the fluid into your Basis, and use the field variable to describe its distribution

  • For each mineral not in equilibrium initially, add it as a kinetic mineral in the Reactants pane. You can again set its initial mass as a field variable.

I hope that helps,

Tom

Link to comment
Share on other sites

Thanks Tom,

Following from your advice I have created two sets of equilibrium systems in react which convert the original minerals into alteration minerals in equilibrium with the fluid (not exactly what I wanted but it will have to do). One for the sandstone [u into WMC ver 4] and one for the basalt [u into Seigals ver 7] using the thermo.com.V8.Rb+.dat database. Now I would like to set up a heterogeneous mineral distribution in my domain as you have suggested but have again run into the problem of the limited number of components in the Basis. For example in the sandstone I want quartz (for SiO2), muscovite (for Al+++), Hematite (for O2) etc while in the basalt I want grossular (for SiO2), diaspore (for Al+++), andradite (for O2) etc. however you cannot have more than one mineral per element. I do not want to leave out SiO2, Al+++ and O2 from one of the rocks as this will drastically affect the alteration minerals that are formed. I've attached the model I've developed so far.U into Seigals 25C Ver 7.reaU into WMC Ver 4.reaU into WMC + seigals Ver 1.x2t

I guess it may be possible to create two models, one for the sandstone and one for the basalt but I would have to manually extract the residual fluid from each iteration of the sandstone model and then manually enter it into the basalt model to simulate fluid flowing from one rock type into the other. Is there a better way to do this?

With thanks,

Terry M

Hi,

Just as an expansion to my previous answer- the way that you go about setting up a heterogeneous mineral distribution in your domain is as follows:

  1. Swap minerals that are in equilibrium with the fluid into your Basis, and use the field variable to describe its distribution

  • For each mineral not in equilibrium initially, add it as a kinetic mineral in the Reactants pane. You can again set its initial mass as a field variable.

I hope that helps,

Tom

Link to comment
Share on other sites

Thanks Tom,

I guess it may be possible to create two models, one for the sandstone and one for the basalt but I would have to manually extract the residual fluid from each iteration of the sandstone model and then manually enter it into the basalt model to simulate fluid flowing from one rock type into the other. Is there a better way to do this?

With thanks,

Terry M

Hi Terry:

Here's where I would use the kinetic titration approach- for each of the three components, Al, Si and O, decide which is the stable, equilibrium phase, and then add the metastable phases at kinetic minerals in the Reactants panel. You'll need rate constants and rate law data, which might be hard to come by, but this gets around the swap limitation in the Basis.

Regards,

Tom

Link to comment
Share on other sites

Thanks Tom,

I have set up a model using kinetic minerals as you have suggested. I have managed to find most of the rate constants in the short course manual you gave us. Thanks for including them in the notes. However, I think the complexity of the system has beaten me as I still can't get it to converge!

Regards,

Terry

Hi Terry:

Here's where I would use the kinetic titration approach- for each of the three components, Al, Si and O, decide which is the stable, equilibrium phase, and then add the metastable phases at kinetic minerals in the Reactants panel. You'll need rate constants and rate law data, which might be hard to come by, but this gets around the swap limitation in the Basis.

Regards,

Tom

Link to comment
Share on other sites

Thanks Tom,

I have set up a model using kinetic minerals as you have suggested. I have managed to find most of the rate constants in the short course manual you gave us. Thanks for including them in the notes. However, I think the complexity of the system has beaten me as I still can't get it to converge!

Regards,

Terry

Hi Terry:

Assuming you are doing this in React, have you tried titrating the minerals in one at a time? Convergence issues can arise, for instance, when setting kinetic rate laws for reactions that proceed very fast relative to the overall simulation length.

Agreed- the more complexity you add to the system, the harder the convergence issues are to work out- this increases by several orders of magnitude when you migrate from reaction path to reactive transport.

You might try first creating individual React scripts where you titrate each kinetic mineral in individually, and get a sense of model stability over your simulation length.

Hope that helps,

Tom

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...