Jump to content
Geochemist's Workbench Support Forum

Dino

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Dino

  1. Thanks, Jia. I'm sure this will help. I saw the Plugin feature, but I must admit it would take quite some time to understand it. Denis
  2. JIa, I wrote wrote a post last week about using the 'remote' technique to solve the problem of accessing the rate constant from Min A in the Min B script. However, it occurred to me that running two react simulations simultaneously might also be a possibility. I installed Visual Studio and imported RC_example2.app and, after making the appropriate change to the RC_helper.h directory and pasting the script into the Visual edit screen, encountered no less than 450 errors when I tested jus the first line of the code!! I would have thought that this would have been a more straight forward operation. My colleague is going to try FORTRAN with with he has more experience. What I was hoping to do is run the first REACT (script 1 in the example of Chapter 11.2) and before calling script 2, get the value of the rate from Min A, perform a simple calculation to get a value for the rate constant for script 2, then calling script 2. Is this likely to work or is it doomed to failure? Thanks for your help. Denis
  3. Jia, It looks like I should be able to use a controlling script to do what I want...correct? If, as part of the controlling script, I read the dissolution rate for Min A at the current time step and use that to calculate a new rate constant for Min B, will that work? I assume here that at each time step in REACT, both Min A and Min B are run and the existing "React_Output..." file is updated to the current time step...correct? If so, can I interrogate that file and extract the last reported value for the dissolution rate and use it in the calculation of a new rate constant for Min B (it may be a time step off, but if the rates are changing slowly then the error should be small)? From what I read in the manual on Tcl and controlling scripts I should be able to do this, but my working knowledge is, admittedly, limited. Or, is there a way to print the needed data to a file at each time step and read that file? Denis
  4. Thanks, Jia. your suggestions are very good. I had thought of using one of the elements to calculate the input I need for Min B, but you have put it in a much better context. This should be particularly useful since there are elements that are not common between the two minerals. I’ll give it a try. having you as a resource is invaluable. Thanks again and I wish you and your family a very happy new year. Denis
  5. Jia Thanks for your response. I believe the problem is that the REACTANTS input has two reactants Min A and Min B. The script appears in the rate law input for Min B, but the first rate that I want to calculate is Min A because the input that I need to calculate the Min B rate is a constant (conversion to m/s) times the rate from Min A. I was trying to avoid confusion by indicating that the rate I need is that of Min A. Is there a way of determining this without invoking the Min A rate equation in the Min B script? If I use your suggestion, does the rate calculated in MinA_rate = (surface*rate_con*(T1 + T2 + T3))*(1.000-QoverK) that of MIn A (as I mean it to be) or is there confusion and that is why the context bombs?
  6. I am trying to react two mineral with kinetic rate laws. The dissolution rate of the first mineral (Min A) is used in the calculation of the rate in the second mineral. I've tried several routes with scripts, but each attempt indicate I have an error in line 9 (script shown below and line in red). The error is probably obvious, but.... I know the rate laws alone for Min A and Min B work under a separate scripts. I can run both minerals together when I just use just the last two lines for MIn B. The REACTANTS in the React input file are both Min A and MIn B with the custom rate law for Min B pointing to the file containing the script below. I've tried several versions of line 9 with no success (error = syntax). etaa = 1 Ea = 44400 Ew = 67800 etab = 0.75 Eb = 49700 T1 = activity("H+")^(etaa)*exp(-Ea/(8.314*TK)) T2 = exp(-Ew/(8.314*TK)) T3 = (activity("OH-")^(etab))*exp(-Eb/(8.314*TK)) kinetic "Min A" rate law = "(surface*rate_con*(T1 + T2 + T3))*(1.000-QoverK)" a = rate*23.089 kinetic "Min B" rate = surface*rate_con*a*(Time)^(-0.79) RETURN rate
  7. Jia, Thanks again for the help. I think this should work well. We will still have to do some calculations within the script, but those should be possible by accessing the information passed to the next iteration of React. Now down to the work at hand. I'll let you know how it comes out. Denis
  8. Thanks, Jia I hadn't thought of the pick-up option. There are a few parameters that I need to carry forward from one simulation to the next. These are the ending time, the mass of material dissolved, and one or two similar parameters. The ending time is needed so that I can vary the length of time of the simulation. If the reactions have high rates, I'll need to decrease the length of time of the next simulation; if the reactions are slow, I can increase the simulation time. Are these parameters available through the pick-up file. I've used the pick-up option more to obtain a solution after some initial reactions, but I have not tried to harvest information to be used in a script that iterates React and changes the input parameters as needed. Thanks for you help. I really appreciate your and Brian's knowledge and help. BTW, please say 'hi' to Brian. Denis
  9. I want to be able to carry forward values that are calculated from the output of React forward to the next iteration of React. For example, I would like to calculate the depth of material dissolved in one iteration of React forward to the next iteration. This is essentially calculating the diffusion of an element from the solid where the solid surface is retreating. Is there a way to carry values forward in a script and use them in the next iteration of React? Or, do I need to run React as a subrouting within an external C++ or fortran program? Denis
  10. Thanks, Jia. I am sorry for bothering you. I appears to be a bonehead mistake on my part...after you called it out. I went back a looked at my Excel graph and...I had not coverted from 'mol' to 'mmol'. Again sorry to have bothered you ...and wasted a bunch of my own time chasing something that I should have checked at the start.
  11. Jia, I still seem to be hung up. I've attached the files you need to run this simulation. I seem to have solve some of the problems, but the simulation does not seem to progress beyond xi = 0. Denis WAK IX.bas WAK IX.1.rea P0798 One k Rate b.bas WAK IX.2.rea thermo.com.v8.r6+(dms-8).tdat
  12. Hmmm. I've still got something wrong. I get a report of the time, but it does not vary. Eventually something becomes unstable and the calculated rate goes from a large positive number to an equally large, but negative number. This probably something quite simple, but I'm stumped. I've attached the .bas file. What i'm trying to do is to react a glass that normally contains Li and Na. I've changed the composition of the glass so that it has no alkali and another 'glass' that is just the alkali. The glass without alkali behaves correctly, but the one without alkali does not. If i change the alkali glass to a simple reactant and allow x nmol to react over the time period, I get the results I expect. It is only when i try to use the rate law for the alkali that i get in trouble. If you need the complete data set let me know. WAK IX.bas
  13. Jia, Thanks for the clues. I'll try again. I believe I've tried "t", "time", and "Time," but i'll try again. I've included print statements like "Print "Step 1", Time" and such. Every time the parameter Time is shown as 0. As I say, I'll try again. Denis
  14. I am trying to dissolve two phases in water. In one I use a first order dissolution rate law. For the other, I want to use a rate law that is independent of the solution concentrations and depends only on the time since the start of dissolution process, e.g. something like diffusion with a square root of time dependence. I have not found a way of accessing the 'time' parameter that is used outside of the script environment. For example, I'd like to use something like '...t = time...rate = rate_con*t^0.5...' All attempts to date have failed and a search of the users group failed to turn up anything definitive. I am using GWB standard. Thanks for your help, Denis
  15. It seems the problem resolved by an unknown path. I'd still like to find out what the probable cause was, but... The problem was resolved after shutting down, updating the MS windows (automatic), and restarting, all the following day. Strange!
  16. I am getting an incorrect format error when I try to plot a react output. I've gone back and retrieved an old react input that i know worked and get the same error. The printed output looks normal. When I open the .gtp file with notebook, the only 'text' is "-x-".
  17. I tried to rerun the simulation after deleting the .gtp file...no soap. However, I just tried your suggestion of running an earlier simulation. That worked without error, but there were just as many minerals in the earlier one as in the troublesome one. I then set the graph for pH and reran the troublesome simulation and was able to get the graph without error. Thanks. Denis
  18. I have a simulation of glass dissolving in water with xaffin set to SiO2(am). The SiO2 is kinetic - has a rate equation associated with it. The simulation runs fine until Q/K approaches 1. It then slows dramatically and the slow down appears to be related to changes in Q/K. After letting the simulation run over night, I aborted it and looked at the values of Q/K. These were changing by less than 1 part in 10^7 (see the table below where the first col is the days of reaction, the second is the dissolution rate of the glass and the third is the Q/K. d - 4174.975215 R - 1.33E-17 Q/K - 0.999999219 4199.950368 1.22E-17 0.999999283 4224.926398 1.12E-17 0.999999342 I then picked up the 'system' from this simulation and started a new simulation at 4000 d. Again the simulation slowed at about 4200 d. I then increased theta to 0.6 and ran into the problem outlined in my other recent post. With theta set to 0.6, the simulation ran to its end at 5000 d, but I was unable to look at the output so I can't say how the results looked. Is this the best approach for these simulations that appear to be hung with Q/K changing very slowly (larger theta, pickup system, start where the simulation left off)?
  19. I just ran a long simulation. When I tried to graph the results, I got an error that there were too many minerals to plot. I tried many ways to get around this error, including deleting the two gtplot default files, to no avail. When both gtplot files are absent, I get the message that they do not exist and do I care to choose another file. Answering 'yes' gets me a graph of some previous simulation, but clicking the 'plot results' button gives the same result. I'm caught in a do loop. Additionally, clicking the 'view results' button gives me nothing...no file comes up. I've tried 'cntl-shift-L' and other menu options to no avail. I need someway out of this predicament.
  20. here they are. I use a modified (phases added and TRIS) version of the LLNL data base. it is too big to attach. you'll have to change the P0798 rate file since the link would not allow me to upload that type of file (even with the 'txt' extension). BTW, how do you generate a '.bas' file? I've done it in the past, but probably by accident... Denis P0798wSiO2add.9.rea amorphsilica.txt copy P0798 Rate.txt
  21. I have a file with a custom rate law for the dissolution of glass. in separate files, i have custom rate laws for the precipitation of alteration products. I recently added a rate law for the precipitation of amorphous silica and i get a react errro "bad rate law type". However, this rate law is nearly exactly the same as the others that work fine. The only difference is that the glass rate is connected to the amorphous silica through xaffin. Is that the problem? How would i get around that problem? Perhaps use chalcedony as the precipitating phase but with the same thermo properties as SiO2(am)? I can provide the appropriate files if needed. Thanks for your help.
  22. I see that this question was asked back in 2012, but I did not find a response with an answer. So... I tried launching React from GSS. After running the simulation and trying to look at the results with 'view results', I get the following error "Usage react [-i input_script] [-d thermos_dat] [-s surface_data] [-cd] [-nocd]" Displaying graphs is not a problem. This is a simulation in which the temperature of a solution is increased from 25 to 90, equilibrated with CO2, and the resulting solution decrease to 25. I get the error at any stage when trying to 'view results'. Figuring that there was some disconnect between GSS and React, I saved the file after running several simulations to get the answer I needed. I then opened the saved file with WordPad and copied and pasted the steps into the Command tab. Everything loaded and the simulations worked as before, however, requesting a 'view results' gave the same error. Where is the error and how to fix it? Thanks, Dino
  23. I have written a script file for a reaction rate equation. I wrote it in Wordpad, but it gets saved as a '.txt' file. How do you change this to a '.bas' file? I have used the '.txt' file with success, but REACT forgets that I used that file after saving the REACT simulation (on reopening, it reverts to the built-in rate equation). I've searched both the manuals and the user forum to no avail.
  24. This post covers two topics: charge balance and slide. Charge balance: I have tried a very simple solution pH 9, SiO2(aq) 1 mmol, precip on, suppress all, unsuppress SiO2(am) [i'm using the LLNL database]. When i run the solution in REACT or SPECI8, I get the message that the charge balance can not be determined because Cl is not in the input solution despite the solution being anion rich. Putting Cl in with it as charge balance gives the expected overload. Putting Na in gives me the same error but with Na as the problem. I have tried sneaking up on the solution by using no charge balance and determining the amount of cation (Na in this case) needed to get close to charge balance. With that amount of Na with charge balance gives me the same error. So, there is something I'm overlooking...but what? Slide: Ive tried to slide SiO2(aq) in the above and similar solutions only to be greeted with the error message "Exit: React stop: passem: bad basloc call" What is would like to do is to be able to slide SiO2(aq) from 1 umol to SiO2(am) saturation at constant pH (stabilized with a buffer e.g. TRIS) while calculating the initial reaction rate at each step for a silicate glass. I don't seem to be able to get beyond this error message even with a simple solution and no glass reacting just the simple solution from above. Thanks for your help.
  25. Has anyone successfully added the TRIS buffer [(CH2OH)3CNH2] to the LLNL data base? I have a vague idea as to how to do it, but if someone has done this and checked it out, I would be happy to save the time...an grateful for the info. What is unclear is if I have to add a new basis species, either TRIS or TRISH+, and a new solution species. Or do I just add two new solution species. Thanks for your help. Dino
×
×
  • Create New...