Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
USER_PUNCH/USER_GRAPH
»
SELECTED_OUTPUT
»
Back to Back Selected Output
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Back to Back Selected Output (Read 785 times)
ricoenrico
Contributor
Posts: 3
Back to Back Selected Output
«
on:
September 27, 2023, 05:59:16 PM »
I have the below selected output statements that follow one another, however, only the first one prints output to the designated file. The other one prints the headers, but no output.
What gives?
SELECTED_OUTPUT
-file RxnFront.dat
USER_PUNCH
-headings C(4) S(6) Ca\
5CA INFCA T2C-CNASHss T5C-CNASHss TobH-CNASHss Portlandite Cal\
Brc M4A-OH-LDH AlOHmic Maghemite Mag monocarbonate C4AH13 Gp\
ettringite Ferrihydrite Amor-Sl Py Kln hemicarbonat10.5 monocarbonate\
SysCa CNASHss kg_H2O
-start
1000 PUNCH TOT("C(4)") TOT("S(6)") TOT("Ca")\
S_S("5CA") S_S("INFCA") S_S("T2C-CNASHss") S_S("T5C-CNASHss") S_S("TobH-CNASHss")\
EQUI("Portlandite") EQUI("Cal") EQUI("Brc") EQUI("M4A-OH-LDH") EQUI("AlOHmic")\
EQUI("Maghemite") EQUI("Mag") EQUI("monocarbonate") EQUI("C4AH13") EQUI("Gp")\
EQUI("ettringite") EQUI("Ferrihydrite") EQUI("Amor-Sl") EQUI("Py") EQUI("Kln")\
EQUI("hemicarbonat10.5") EQUI("monocarbonate") SYS("Ca") SYS("s_s") TOT("water")
-end
SELECTED_OUTPUT
-file SolidMass.dat
USER_PUNCH
-start
#USER_PRINT
10 s = SYS("equi", count , name$ , type$ , moles )
#20 PRINT "Phase grams"
20 PUNCH "Phase grams"
30 FOR i = 1 TO count
40 formula$ = PHASE_FORMULA(name$(i))
#50 PRINT PAD$(name$(i), 15), STR_F$(EQUI(name$(i))*GFW(formula$), 10, 2)
50 PUNCH PAD$(name$(i), 15), STR_F$(EQUI(name$(i))*GFW(formula$), 10, 2)
60 NEXT i
70 END
-end
END
Logged
dlparkhurst
Top Contributor
Posts: 3619
Re: Back to Back Selected Output
«
Reply #1 on:
September 27, 2023, 06:25:36 PM »
I think both files would be created, but the second definition would actually write data to the specified file.
You only get one definition for a given user number. User number 1 is the default, so you have defined two SELECTED_OUTPUT 1/USER_PUNCH 1; the second one replaces the first definition.
Simply use another user number for the second definitions SELECTED_OUTUPUT 2/USER_PUNCH 2. Then, both files will be written.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
USER_PUNCH/USER_GRAPH
»
SELECTED_OUTPUT
»
Back to Back Selected Output