Conceptual Models > Database selection and modification

logk modify

(1/1)

Mr.white:
I want to treat them as inert relative to each other and to the rest of the carbon (C) system.
C1 = C1
        -log k   0
C2 = C2
        -log k   0 
C3 = C3
        -log k   0 
[13C1] = [13C1]
        -log k   0 
Error:Expecting log k

dlparkhurst:
Why did you change what I wrote? The way I had it is correct and all are inert relative to the rest of the carbon system. 

The brackets are necessary so that the numbers are not interpreted as stochiometric coefficients.

[C1]
[C2]
[C3]

Log_k has an underscore.

log_k

Mr.white:
"I'm sorry, I'm trying my best. I copied the log_k as you provided into the database, but after copying it there, the underscore disappeared. It still shows an error. Also, is there anything wrong with the expression in the analytical expression?"
[C1] = [C1]
        -log k 0
[C2] = [C2]
        -log k 0
Error:Expecting log k
I am sure that I cannot copy the underscore in log_k to the database. After copying, the position of the underscore is blank.
[C1](g)
        [C1] = [C1]
         -log_k -2.8
         -analytic 53.55  -0.00035  -8520.3  -6.51  980955.6
         -T_c  190.6 ; -P_c   45.40 ; -Omega 0.0108
[C2](g)
         [C2] = [C2]
         -log k -2.64
         -analytic   −60242  −7.4764  3787145.72 9241.95  −257468824
         -T_c  305.4 ; -P_c   48.16 ; -Omega 0.0998
ERROR:Expecting numeric values for anaiytical expression

dlparkhurst:
You can use logk instead of log_k.

The minus sign used in the analytical expression is a character that is not recognized by phreeqc.

The hyphen in "-analytic" is the correct character. You can either copy it and replace the unrecognized character or find some way to use it consistently for the minus signs.

Here is an alternate formulation that does the same calculations. You can use whichever you prefer.


--- Code: ---SOLUTION_MASTER_SPECIES
    Methane          Methane             0     12.0111              12.0111
    Ethane          Ethane             0     24.0222              24.0222             
    Propane          Propane             0     36.0333              36.0333     
    [13C_Methane]        [13C_Methane]             0     12.0111              12.0111
    [13C_Ethane]        [13C_Ethane]             0     24.0222              24.0222             
    [13C_Propane]        [13C_Propane]             0     36.0333              36.0333 
SOLUTION_SPECIES
   Methane = Methane
logk 0
   Ethane = Ethane
logk 0
   Propane = Propane
logk 0
   [13C_Methane] = [13C_Methane]
logk 0
   [13C_Ethane] = [13C_Ethane]
logk 0
   [13C_Propane] = [13C_Propane]
logk 0
ISOTOPES
Methane       
     -isotope        [13C_Methane]   permil  0.0111802             
Ethane       
     -isotope        [13C_Ethane]   permil  0.0111802   
Propane       
     -isotope        [13C_Propane]   permil  0.0111802         

ISOTOPE_RATIOS
R(13C)_C1(aq) [13C_Methane]
R(13C)_C2(aq) [13C_Ethane]
R(13C)_C3(aq) [13C_Propane]
CALCULATE_VALUES
R(13C)_C1(aq)
     -start
10 ratio = -9999.999
20 if (TOT("Methane") <= 0) THEN GOTO 100
30 total_13C1 = TOT("[13C_Methane]")
40 total_C1 = TOT("Methane")
50 ratio = total_13C1/total_C1
100 save ratio
-end
R(13C)_C2(aq)
     -start
10 ratio = -9999.999
20 if (TOT("Ethane") <= 0) THEN GOTO 100
30 total_13C2 = TOT("[13C_Ethane]")
40 total_C2 = TOT("Ethane")
50 ratio = total_13C2/total_C2
100 save ratio
-end
R(13C)_C3(aq)
     -start
10 ratio = -9999.999
20 if (TOT("Propane") <= 0) THEN GOTO 100
30 total_13C3 = TOT("[13C_Propane]")
40 total_C3 = TOT("Propane")
50 ratio = total_13C3/total_C3
100 save ratio
     -end

END
SOLUTION
Methane 1
[13C_Methane] 0
Ethane 1
[13C_Ethane] 10 permil
Propane 1
[13C_Propane] 20 permil
END
RUN_CELLS
-cell 1
END

--- End code ---

Navigation

[0] Message Index

Go to full version