Jump to content
RockWare Support Forum


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Azra

  • Rank
  1. Tom, sorry for not being so clear earlier. I wish to populate the SpecE8 basis using tcl inside the script and script end commands. To be more exact, I am modifying the example Script.E8 file for multiple analysis according to my needs and I'd like to be able to fix CO2 to 1 atm during calculations and wasn't sure how to do it using tcl. I hope it is clear now. Thanks, Azra
  2. Hi, I'd like to do the same by using the Script.sp8 file and i am not sure how to insert these comments in there. Thanks for any help, Azra
  3. Hi Tom, You were rigth i needed to place the the script in the same directory as the input file. However the code will keep runnning and never quits. I tried to place the command in various places but wasn't able to solve the problem. script start # Set up the input and output. set in_id [open "SI Calculations Shallow Wells_thermov8.txt" r] set out_id [open "SI Calculations Shallow Wells Output-thermov8.txt" w] fconfigure $out_id -encoding unicode # First line contains column headers; check for Unicode. gets $in_id headers if {![string is ascii $headers]} { close $in_id set in_id [open "SI Calculations Shallow Wells-thermov8.txt" r] fconfigure $in_id -encoding unicode gets $in_id headers } puts $out_id "$headers\tSiderite SI\tCalcite SI\tGibbsite SI\tJarosite-K SI\tJarosite-Na SI\tAlunite SI\tFe(OH)3(ppd) SI\tCarnotite SI" # Loop through remaining lines. gets $in_id aline report set_digits 4 while {$aline != ""} { set i 0 reset; balance on Cl- data "thermo.com.v8.r6+.dat" # Set basis constraints from input data. foreach a [lrange $aline 1 end] { incr i 1 if {[lindex $headers $i] == "pH"} { pH = $a } else { $a = [lindex $headers $i] mg/kg } } # Run SpecE8 calculation and write data + results. data "thermo.com.v8.r6+.dat" go foreach a [lrange $aline 0 end] { puts -nonewline $out_id "$a\t" } if {[report success]} { puts $out_id \ "[report SI Siderite]\t[report SI Calcite]\t[report SI Gibbsite]\t[report SI Jarosite-K]\t[report SI Jarosite-Na]\t[report SI Alunite]\t[report SI Fe(OH)3(ppd)]\t[report SI Carnotite]" } else { puts $out_id "Did not converge" } # Next line of input. gets $in_id aline } # Clean up. close $out_id close $in_id quit SI_Calculations_Shallow_Wells_thermov8.txt
  4. Hello, I want to use the script file for multiple analyses calculations (in reference manul p.269) to calculate saturation indices for some minerals that i am interested in, but i'd like to use the thermo.com.v8.r6+.dat database file. Could some one tell me how to tell the code to use thermo.com.v8.r6+.dat database instead of the default thermo.dat ? Thanks, Azra
  • Create New...