Jump to content
Geochemist's Workbench Support Forum

JohanFourie

Members
  • Content count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JohanFourie

  • Rank
    Member
  • Birthday 07/27/2019

Profile Information

  • Gender
    Male
  • Location
    Brisbane
  • Interests
    AMD, heat and gas......

Recent Profile Visitors

139 profile views
  1. JohanFourie

    Script in Chemplugin

    Thanks Dan, this is very helpful. I appreciate your quick feedback.
  2. JohanFourie

    Script in Chemplugin

    Hi Brian I have not come right with this yet and would appreciate if you can help. To make the problem more tangible I have edited the chemplugin example: Flowthrough1.py and attached it here. 1) The thermo database does not seem to need the escape character. In the attached python script I can run the 'surface data' without any escape character: 'surface_data = "C:\Program Files\ChemPlugin\Gtdata\FeOH.sdat"', However, if you deactivate it with # and activate the wateqdatabase (for instance), with or without the escape character it does not work: 'data = "C:\Program Files\Gwb\Gtdata\thermo_wateq4f.tdat" verify', or 'data = "C:\\Program Files\\Gwb\\Gtdata\\thermo_wateq4f.tdat" verify', I have tested it by changing a mineral name in the database i.e. calcite --> calcite2, however chemplugin couldn't read the database. 2) Then I also cant get the script to run. I have tried different ways but cant get it to run. I dont know where is the problem. It is not maybe at the "….RETURN rate" part? # "kinetic Calcite .1 volume% rate_law = script 'rate = (1.49e-02*EXP(-29000/(8.3144598*TK))*activity(\'H+\')^0.75 + 1.00e-02*EXP(-34800/(8.3144598*TK))*activity(\'H2CO3\')^0.75 + 2.20e-07*EXP(-52200/(8.3144598*TK))*activity(\'H2O\')^0.75) * surface * (1 - QoverK) RETURN rate' pre-exp = ??? act_eng = ??? surface = 200", My problem is that my real model have temperatures up to 220 C and I need to include to higher kinetic rate in some way or other. I have come right with the sliding temperature question I had in the other post and now my model can run at different temperature scenarios. I think chemplugin works great as it surely gives you a lot of flexibility to work with. Regards Johan FlowThrough_JF2.py
  3. JohanFourie

    Chemplugin: Pore Volume (PV) and Extendrun()

    Thanks Brian, this is very helpful
  4. JohanFourie

    Chemplugin: Pore Volume (PV) and Extendrun()

    "Hi Brian This works well for my model when changing the flowrate. But now I want to change a configuration of one of the instances also at a certain timestep. 1) Can I still do it before the time marching loop (this doesn't seem to work) or should I use extend run if I want to change the configuration 2) Have I done it correctly below or should I use the "remove" and "add" functions? Both temp and Br are already in the configuration - I just want to change their values..... 3) Can one also use the "slide" function in chemplugin? I also tried it but chemplugin ignored it. for n in range(0, var_ScenFlow): ………………………..for each flow scenario: if n == 1: ……………………….not at the 0 flow scenario but for the 1 one var_Temp2 = var_Temp1 cp_reactor[2].Config("Temperature = " + str(var_Temp2) + " C") ……………………...change the temperature in the configuration cp_reactor[2].Config("Br- = 1 mg/l") ……………………….change the tracer concentration # Time marching loop. while True: for c in cp_reactor: deltat = c.ReportTimeStep() …………….etc
  5. JohanFourie

    Script in Chemplugin

    Hi Brian I tried different ways with the quotation marks. If I use single quotes, then there is no error, however chemplugin just ignores the line. I may have a similar problem when I want to assign a different database when using python. There is no error but chemplugin just ignores this and use the default database anyway, e.g. cmds = ('data = "C:\Program Files\ChemPlugin\Gtdata\thermo.com.V8.R6+_MRM_JF.tdat" ', …...etc I have tried to use all different ways with the quotation marks but it doesn't help. Regards Johan
  6. JohanFourie

    Script in Chemplugin

    Hi Brian We struggle to write a script in Chemplugin for the reaction rate of kinetic minerals. The script for dolomite is given below. Python also don't like the double notation: "H+" for the parameters. "kinetic Dolomite-Mn 12.1 volume% rate_law = script 'rate = (1.49e-02*EXP(-29000/(8.3144598*TK))*activity("H+")^0.75 + 1.00e-02*EXP(-34800/(8.3144598*TK))*activity("H2CO3")^0.75 + 2.20e-7*EXP(-52200/(8.3144598*TK))*activity("H2O")^0.75) * surface * (1 - QoverK) RETURN rate' pre-exp = ??? act_eng = ??? surface = .65" We would appreciate your help. Regards Johan
  7. JohanFourie

    Script in Chemplugin

    Hi Brian We struggle to write a script in Chemplugin for the reaction rate of kinetic minerals. The script for dolomite is given below. Python also don't like the double notation: "H+" for the parameters. "kinetic Dolomite-Mn 12.1 volume% rate_law = script 'rate = (1.49e-02*EXP(-29000/(8.3144598*TK))*activity("H+")^0.75 + 1.00e-02*EXP(-34800/(8.3144598*TK))*activity("H2CO3")^0.75 + 2.20e-7*EXP(-52200/(8.3144598*TK))*activity("H2O")^0.75) * surface * (1 - QoverK) RETURN rate' pre-exp = ??? act_eng = ??? surface = .65" We would appreciate your help. Regards Johan
  8. From 1 user to another: GWB does not have the facility to include statistical distribution of parameters. Option 1: Manually run various scenarios with consideration of the statistical distribution of the most sensitive parameters. Let say the 50, 66 and 95 percentile of a parameter. Option 2: Write a code in Chemplugin that run several models for you with consideration of the statistical distribution of your parameter (which might even be a water balance component). I have not done it myself but think it is a great idea - but one would probably need a lot of time for the development of the code. If you have several parameters with several different distribution functions, I would say first try to simplify your conceptual model as much as possible...….
  9. JohanFourie

    number of kinetic minerals in GWB

    Thanks Brian, this worked quite well.
  10. Is there a limit to the number of kinetic mineral that could be added to X1t? We try to simluate a column but X2t does not accept more than ~16minerals?
  11. JohanFourie

    Optimizing kinetic parameters to fit experimental data

    Hi Vivek We also fit experimental data with GWB but the only way to do that is through manual calibration. We start with literature values for the rate constants and then use the surface area for calibration. You should also play around with the CO2 buffer as there might be some buildup of CO2 in the experiment I assume. Regards Johan
  12. JohanFourie

    Chemplugin: Pore Volume (PV) and Extendrun()

    Thank you Brian, I wil try this!
  13. JohanFourie

    Chemplugin: Pore Volume (PV) and Extendrun()

    Thank you Brian. After every run I update the flowrates between the instances and use Extendrun to start the new run. This is the only way I could see one can update the flowrates? I would like the new run to continue the model and not to change the composition of the previous run at endpoint. However, each run automatically starts with the original kinetic mineral content. As you can see in the figure above there is every 20 years an Extendrun() and with each run the calcite is at its original concentration. I suspect the pickup function works similiar to the other react functions in that it is not applicable to the chemplugin reactive transport model? I have tried to use all versions of pickpup (incl pickup system = entire) is it has no effect on the chemplugin transport model. I also see that commands like "add" and "remove" works for a mineral but not for kinetic minerals with ExtendRun(). In X1t the kinetic minerals at the endpoint of the previous run is retained when the run is extended but I couldnt see that it is the case in Chemplugin? Regards Johan
  14. JohanFourie

    Chemplugin: Pore Volume (PV) and Extendrun()

    Hi Brian No problem. On that note, what is the purpose of "flush" in chemplugin? When there is inflow and outflow at an instance, isnt the solution anyway replaced with the inflowing solution in a chemplugin instance? I am also not sure how chemplugin handles kinetic minerals when the run is extended. When I extend the model, it seems like it is using the original kinetic mineral mass and not the endpoint mineral mass of the previous run. However, extend in chemplugin does use the endpoint solution chemistry and retain secondary minerals. I have tried to use the "pickup reactants" before the ExtendRun or within the original configuration but that doesnt work. cp_dam.Config("pickup reactants") cp_dam.ExtendRun(timeExt, "days") I have also tried to remove the kinetic minerals and then let it perform the pickup. But that also doesnt work. To test this I have included pyrite and calcite in the reservoir described above and then calcite was consumed in the 1st run. ExtendRun then starts again with the original calcite (and pyrite)content. However, it seems that secondary minerals in the system (like hematite) is retained. See the gtplot image below. Regards Johan
  15. Hi I have constructed a chemplugin model where 2 streams flow into a reservoir (with volume 2000000 m3) and the outflow of the reservoir is the sum of the inflows. Everything seems to work fine except the reported pore volumes replaced (PV) which reports 0. See Por Vol below. The salt balance looks fine (after about 1 residence time the TDS in the dam is just above 50% of that of the streams), so I am wondering if PV is maybe just reporting incorrectly? Is PV only applicable to the initial reaction within a specific instance without consideration of the flow between the instances? SOME OUTPUT FROM FINAL STEPS FROM THE RESERVOIR Time = 2.68 pH = 6.04 TDS = 2615 SO4-- = 1654 Time = 2.71 pH = 6.04 TDS = 2629 SO4-- = 1663 Time = 2.74 pH = 6.04 TDS = 2644 SO4-- = 1673 Time = 2.74 BulkVol = 2000000 m3 SolnVol = 1998869 m3 RockVol = 0.028130 m3 RockMass = 71.93 kg Porosity = 1.00 Inert = 0.00 Permeability = 9999995142 Por Vol = 0.000000 nminerals = 3.0 Gibbsite Hematite Pyrolusite
×