Jump to content
Geochemist's Workbench Support Forum

Dino

Members
  • Posts

    34
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Dino's Achievements

Newbie

Newbie (1/14)

0

Reputation

  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!
×
×
  • Create New...