# Batch function # CapSim,4.0 # Batch simulation available functions # random() - returns a random value between 0 to 1 # exp() - exponential function # log() - natural logarithm # sin() - sine function # cos() - cosine function # pi - the constant pi # abs() - return absolute value # Batch simulation steps # 1. Define the type of batch function (self.type) # 1) 'Multiple Scenarios' generates multiple output files for each scenario # 2) 'Monte Carlo Simulation' generates one output file with the mean values for all scenarios. # 2. Determine the number of scenarios (i_num) in the batch function # 3. Define the output files in the batch function # 1) 'Multiple Scenarios': the number of names in the vector(self.filenames) should be the same as i_num # 2) 'Monte Carlo Simulation': the number of names in (self.filenames) should be 1 # 4. Assign the given values to the target parameter in each scenario # 1) Develop a vector with the same number of desired values # 2) Assign those values to the parameter # 5. Assign random values to the target parameter in each scenario # 1) use the function random() to generate a random number between 0 and 1 # Batch simulation parameters self.type = 'Multiple Scenarios' self.filenames = ['input_example_MS'] self.output_chemicals = ['Mercury','Methylmercury','phenanthrene'] i_num = 5 for i in range(i_num): systems.append(self.system.copy()) systems[i].initiallines = [] systems[i].iterativelines = [] # Sediment Processes # Parameter: # adv: advection option # bio: bioturbation option # hbio: bioturbation depth in uniform bioturbation option # psize: 1 - consider impact from particle size, 0 - do not consider particle size # Dbiop: biodiffusion coefficient of solid particles at the benthic surface(z[0]) # Dbiopw: biodiffusion coefficient of solutes at the benthic surface(z[0]) # con: consolidation option # Batch function guide: # Dbiop = Dbiop (z < hbio) systems[i].adv = 'None' systems[i].bio = 'Uniform' systems[i].hbio = 5.0 + i * 1.0 systems[i].Dbiop = i * 1.0 systems[i].Dbiopw = 50.0 systems[i].psize = 0 systems[i].con = 'None' systems[i].ero = 'None' systems[i].act = 'None' systems[i].hyp = 'None' systems[i].biotic = 'TEA inhibition' # Chemical Properties # chemicals: solute chemicals # nchemicals: the number of the chemicals # Parameters: # Dw: water diffusivity # MW: Molecular weight # Kdoc: log value of DOC-water partioning coefficient # charge: Ionic charge systems[i].nchemicals = 3 systems[i].chemicals = [] systems[i].chemicals.append(Chemical(1, 'Solute')) systems[i].chemicals[0].name ='Mercury' systems[i].chemicals[0].Dw =5e-06 systems[i].chemicals[0].Kdoc =0.0 systems[i].chemicals[0].charge =0 systems[i].chemicals.append(Chemical(2, 'Solute')) systems[i].chemicals[1].name ='Methylmercury' systems[i].chemicals[1].Dw =5e-06 systems[i].chemicals[1].Kdoc =0.0 systems[i].chemicals[1].charge =0 systems[i].chemicals.append(Chemical(3, 'Solute')) systems[i].chemicals[2].name ='phenanthrene' systems[i].chemicals[2].Dw =3.18e-06 systems[i].chemicals[2].Kdoc =4.25 systems[i].chemicals[2].charge =0 systems[i].nsolidchemicals = 0 systems[i].solidchemicals = [] systems[i].ngaschemicals = 0 systems[i].gaschemicals = [] # Material Properties # matrices: solid matrices # components: solid materials # nmatrices: the number of the matrices # Parameters: # e: porosity # rho: bulk density # foc: organic carbon fraction # mfraction: mass fraction of a component in the matrix # psize: particle size of the solid # Batch function guide: # 1. the same component that show up in various matrices should be consistent # 2. keep the sum of the mfractions to be 1 systems[i].nmatrices = 3 systems[i].matrices = [] systems[i].matrices.append(Matrix(1)) systems[i].matrices[0].name ='Activated Carbon' systems[i].matrices[0].components = [] systems[i].matrices[0].components.append(MatrixComponent(0)) systems[i].matrices[0].components[0].name ='Activated Carbon' systems[i].matrices[0].components[0].e =0.6 systems[i].matrices[0].components[0].rho =0.4 systems[i].matrices[0].components[0].foc =1.0 systems[i].matrices[0].components[0].mfraction =1.0 systems[i].matrices[0].components[0].psize =0.5 systems[i].matrices.append(Matrix(2)) systems[i].matrices[1].name ='Sand' systems[i].matrices[1].components = [] systems[i].matrices[1].components.append(MatrixComponent(0)) systems[i].matrices[1].components[0].name ='Sand' systems[i].matrices[1].components[0].e =0.5 systems[i].matrices[1].components[0].rho =1.25 systems[i].matrices[1].components[0].foc =0.001 systems[i].matrices[1].components[0].mfraction =1.0 systems[i].matrices[1].components[0].psize =0.2 systems[i].matrices.append(Matrix(3)) systems[i].matrices[2].name ='Sediment' systems[i].matrices[2].components = [] systems[i].matrices[2].components.append(MatrixComponent(0)) systems[i].matrices[2].components[0].name ='Sediment' systems[i].matrices[2].components[0].e =0.5 systems[i].matrices[2].components[0].rho =1.25 systems[i].matrices[2].components[0].foc =0.01 systems[i].matrices[2].components[0].mfraction =1.0 systems[i].matrices[2].components[0].psize =0.06 # Matrix Component Properties systems[i].component_list = [] systems[i].components = [] for matrix in systems[i].matrices: for component in matrix.components: try: systems[i].component_list.index(component.name) except: systems[i].component_list.append(component.name) systems[i].components.append(component) # Sorption Properties # sorptions: sorption # Parameters: # isotherm: isotherm option # kinetic: kinetic option # K: solid-water partitioning coefficient # Koc: organic carbon-water partitioning coefficient # Kf, N: Freundlich isotherm coefficients # qmax,b: Langmuir isotherm coefficients # ksorp: first-order sorption rate coefficient # Batch function guide: # 1. Available isotherms:['Linear--Kd specified','Linear--Kocfoc','Freundlich','Langmuir'] # 2. Available kinetic options:['Equilibrium', 'Transient'] # 3. Assign the sorption parameters under the selected isotherm, the rest will be ignored systems[i].sorptions = {} for component in systems[i].components: systems[i].sorptions[component.name]={} for chemical in systems[i].chemicals: systems[i].sorptions[component.name][chemical.name]= Sorption(component, chemical) systems[i].sorptions['Activated Carbon']['Mercury'].isotherm = 'Freundlich' systems[i].sorptions['Activated Carbon']['Mercury'].kinetic = 'Equilibrium' systems[i].sorptions['Activated Carbon']['Mercury'].Kf = 10000.0 systems[i].sorptions['Activated Carbon']['Mercury'].N = 1.3 systems[i].sorptions['Activated Carbon']['Methylmercury'].isotherm = 'Freundlich' systems[i].sorptions['Activated Carbon']['Methylmercury'].kinetic = 'Equilibrium' systems[i].sorptions['Activated Carbon']['Methylmercury'].Kf = 1000.0 systems[i].sorptions['Activated Carbon']['Methylmercury'].N = 1.3 systems[i].sorptions['Activated Carbon']['phenanthrene'].isotherm = 'Langmuir' systems[i].sorptions['Activated Carbon']['phenanthrene'].kinetic = 'Transient' systems[i].sorptions['Activated Carbon']['phenanthrene'].qmax = 50.0 systems[i].sorptions['Activated Carbon']['phenanthrene'].b = 100.0 systems[i].sorptions['Activated Carbon']['phenanthrene'].ksorp = 10.0 systems[i].sorptions['Sand']['Mercury'].isotherm = 'Linear--Kd specified' systems[i].sorptions['Sand']['Mercury'].kinetic = 'Equilibrium' systems[i].sorptions['Sand']['Mercury'].K = 2.0 systems[i].sorptions['Sand']['Methylmercury'].isotherm = 'Linear--Kd specified' systems[i].sorptions['Sand']['Methylmercury'].kinetic = 'Equilibrium' systems[i].sorptions['Sand']['Methylmercury'].K = 0.2 systems[i].sorptions['Sand']['phenanthrene'].isotherm = 'Linear--Kd specified' systems[i].sorptions['Sand']['phenanthrene'].kinetic = 'Equilibrium' systems[i].sorptions['Sand']['phenanthrene'].K = 100.0 systems[i].sorptions['Sediment']['Mercury'].isotherm = 'Linear--Kd specified' systems[i].sorptions['Sediment']['Mercury'].kinetic = 'Transient' systems[i].sorptions['Sediment']['Mercury'].K = 10000.0 systems[i].sorptions['Sediment']['Mercury'].ksorp = 0.693 systems[i].sorptions['Sediment']['Methylmercury'].isotherm = 'Linear--Kd specified' systems[i].sorptions['Sediment']['Methylmercury'].kinetic = 'Transient' systems[i].sorptions['Sediment']['Methylmercury'].K = 1000.0 systems[i].sorptions['Sediment']['Methylmercury'].ksorp = 0.6927 systems[i].sorptions['Sediment']['phenanthrene'].isotherm = 'Linear--Kocfoc' systems[i].sorptions['Sediment']['phenanthrene'].kinetic = 'Equilibrium' systems[i].sorptions['Sediment']['phenanthrene'].Koc = 4.22 # Layers Properties # nlayers: number of layer # Parameters: # type: solid matrix of the layer # h: layer thickness # tort: layer tortuosity model # alpha: hydrodynamic dispersion coefficient nomalized by Darcy velocity # doc: concentration of dissovled organic carbon [mg/L] # Batch function guide: # hydrodynamic dispersion coefficient: Ddisp = alpha * U systems[i].nlayers = 4 systems[i].layers = [] systems[i].layers.append(Layer(0)) systems[i].layers[0].name ='Deposition' systems[i].layers[0].type ='Sediment' systems[i].layers[0].h =0.1 systems[i].layers[0].alpha =1.0 systems[i].layers[0].alphatype ='% of thickness' systems[i].layers[0].doc =0.0 systems[i].layers.append(Layer(1)) systems[i].layers[1].name ='Layer 1' systems[i].layers[1].type ='Sand' systems[i].layers[1].h =10.0 systems[i].layers[1].alpha =1.0 systems[i].layers[1].alphatype ='% of thickness' systems[i].layers[1].doc =0.0 systems[i].layers.append(Layer(2)) systems[i].layers[2].name ='Layer 2' systems[i].layers[2].type ='Activated Carbon' systems[i].layers[2].h =2.0 systems[i].layers[2].alpha =1.0 systems[i].layers[2].alphatype ='% of thickness' systems[i].layers[2].doc =0.0 systems[i].layers.append(Layer(3)) systems[i].layers[3].name ='Layer 3' systems[i].layers[3].type ='Sediment' systems[i].layers[3].h =10.0 systems[i].layers[3].alpha =1.0 systems[i].layers[3].alphatype ='% of thickness' systems[i].layers[3].doc =0.0 # Equilibrium Properties # Parameter: # coef: stoichiochemical coefficients of reactants/products # index: rate index coefficients of reactants # Batch function guide: # 1. the rate of the equation is expressed as r = coef * reactant^index systems[i].equilibriums = [] # Reaction Properties # Parameter: # coef: stoichiochemical coefficients of reactants/products # index: rate index coefficients of reactants # Batch function guide: # 1. the rate of the equation is expressed as r = coef * reactant^index systems[i].reactions = [] systems[i].reactions.append(Reaction(1)) systems[i].reactions[0].name ='Methylation' systems[i].reactions[0].EA ='None' systems[i].reactions[0].ED ='None' systems[i].reactions[0].EAmin =0.0 systems[i].reactions[0].EAKin =0.0 systems[i].reactions[0].logK =1.0 systems[i].reactions[0].reactants = [] systems[i].reactions[0].products = [] systems[i].reactions[0].reactants.append(Reactant(1)) systems[i].reactions[0].reactants[0].name ='Mercury' systems[i].reactions[0].reactants[0].coef =1.0 systems[i].reactions[0].reactants[0].index =1.0 systems[i].reactions[0].reactants[0].K =0 systems[i].reactions[0].reactants[0].model ='Power' systems[i].reactions[0].products.append(Product(1)) systems[i].reactions[0].products[0].name ='Methylmercury' systems[i].reactions[0].products[0].coef =1.0 systems[i].reactions[0].products[0].index =0.0 systems[i].reactions[0].products[0].K =0 systems[i].reactions[0].products[0].model ='Power' systems[i].reactions.append(Reaction(2)) systems[i].reactions[1].name ='Demethylation' systems[i].reactions[1].EA ='None' systems[i].reactions[1].ED ='None' systems[i].reactions[1].EAmin =0.0 systems[i].reactions[1].EAKin =0.0 systems[i].reactions[1].logK =1.0 systems[i].reactions[1].reactants = [] systems[i].reactions[1].products = [] systems[i].reactions[1].reactants.append(Reactant(1)) systems[i].reactions[1].reactants[0].name ='Methylmercury' systems[i].reactions[1].reactants[0].coef =1.0 systems[i].reactions[1].reactants[0].index =1.0 systems[i].reactions[1].reactants[0].K =0 systems[i].reactions[1].reactants[0].model ='Power' systems[i].reactions[1].products.append(Product(1)) systems[i].reactions[1].products[0].name ='Mercury' systems[i].reactions[1].products[0].coef =1.0 systems[i].reactions[1].products[0].index =0.0 systems[i].reactions[1].products[0].K =0 systems[i].reactions[1].products[0].model ='Power' systems[i].reactions.append(Reaction(3)) systems[i].reactions[2].name ='phenanthrene decay' systems[i].reactions[2].EA ='None' systems[i].reactions[2].ED ='None' systems[i].reactions[2].EAmin =0.0 systems[i].reactions[2].EAKin =0.0 systems[i].reactions[2].logK =1.0 systems[i].reactions[2].reactants = [] systems[i].reactions[2].products = [] systems[i].reactions[2].reactants.append(Reactant(1)) systems[i].reactions[2].reactants[0].name ='phenanthrene' systems[i].reactions[2].reactants[0].coef =1.0 systems[i].reactions[2].reactants[0].index =1.0 systems[i].reactions[2].reactants[0].K =0 systems[i].reactions[2].reactants[0].model ='Power' #Reaction Rate Coefficients # Parameter: # lam: rate coefficient of the reaction systems[i].coefficients = {} for layer in systems[i].layers: systems[i].coefficients[layer.name]={} for reaction in systems[i].reactions: systems[i].coefficients[layer.name][reaction.name]= Coefficient(layer, reaction) systems[i].coefficients['Deposition']['Methylation'].lam = 0 systems[i].coefficients['Deposition']['Demethylation'].lam = 0.5 systems[i].coefficients['Deposition']['phenanthrene decay'].lam = 0.1 systems[i].coefficients['Layer 1']['Methylation'].lam = 0 systems[i].coefficients['Layer 1']['Demethylation'].lam = 0.5 systems[i].coefficients['Layer 1']['phenanthrene decay'].lam = 0.1 systems[i].coefficients['Layer 2']['Methylation'].lam = 0 systems[i].coefficients['Layer 2']['Demethylation'].lam = 0.5 systems[i].coefficients['Layer 2']['phenanthrene decay'].lam = 0.1 systems[i].coefficients['Layer 3']['Methylation'].lam = 0.004 systems[i].coefficients['Layer 3']['Demethylation'].lam = 0.5 systems[i].coefficients['Layer 3']['phenanthrene decay'].lam = 0.1 # Boundary Conditions # Parameter: # Co: fixed concentration at the top boundary # k: benthic surface mass transfer coefficient # Cw: initial concentration in the overlying water body # blcoefs['DOC']: the dissolved organic matter concentration in the overlying water body # blcoefs['vset']:the settling velocity of solids in the overlying water body # kdecay: first-order decay coefficient of the contaminant in the overlying water body # kevap: first-order evaporation coefficient of the contaminant in the overlying water body # Cb: fixed concentration or flux matched concentration at the bottom boundary # Batch function guide: # 'Fixed concentration' top boundary: C = Co # 'Mass transfer' top boundary: F = k*(C - Cw)*(1 + blcoefs['DOC']*10**chemical.Kdoc) # 'Finite mixed water column' top boundary: dCw/dt*(1 + blcoefs['DOC']*10**chemical.Kdoc) + qw = F/h ) # 'Fixed concentration' bottom boundary: C = Cb # 'Flux-matching' bottom boundary: F = U * Cb systems[i].BCs = {} systems[i].BCs['Mercury'] = BC('Mercury') systems[i].BCs['Mercury'].topBCtype = 'Mass transfer' systems[i].BCs['Mercury'].botBCtype = 'Flux-matching' systems[i].BCs['Mercury'].k = 8.77 systems[i].BCs['Mercury'].Cw = 0.0 systems[i].BCs['Mercury'].Cb = 0.0 systems[i].BCs['Methylmercury'] = BC('Methylmercury') systems[i].BCs['Methylmercury'].topBCtype = 'Mass transfer' systems[i].BCs['Methylmercury'].botBCtype = 'Flux-matching' systems[i].BCs['Methylmercury'].k = 8.77 systems[i].BCs['Methylmercury'].Cw = 0.0 systems[i].BCs['Methylmercury'].Cb = 0.0 systems[i].BCs['phenanthrene'] = BC('phenanthrene') systems[i].BCs['phenanthrene'].topBCtype = 'Mass transfer' systems[i].BCs['phenanthrene'].botBCtype = 'Flux-matching' systems[i].BCs['phenanthrene'].k = 8.77 systems[i].BCs['phenanthrene'].Cw = 0.0 systems[i].BCs['phenanthrene'].Cb = 0.0 systems[i].blcoefs = {} systems[i].blcoefs['DOC'] = 0.0 systems[i].blcoefs['vx'] = 1.0 systems[i].blcoefs['h'] = 5.0 systems[i].blcoefs['vset'] = 0.0 # Initial Conditions # Parameter: # ICtype: intial condition type # uniform: the layer intital concentration when ICtype is 'Uniform' # top: the initial concentration at top of a layer when ICtype is 'Linear' # bot: the initial concentration at bottom of a layer when ICtype is 'Linear' # Batch function guide: # initial uniform concentration C = uniform # initial linear concentration C = top + (bot-top)*(z-ztop)/(zbot-ztop) systems[i].ICs = {} for layer in systems[i].layers: systems[i].ICs[layer.name]={} for chemical in systems[i].chemicals + systems[i].solidchemicals + systems[i].gaschemicals: systems[i].ICs[layer.name][chemical.name]= IC(layer.name, chemical.name, [], layer.h) systems[i].ICs['Deposition']['Mercury'].ICtype ='Uniform' systems[i].ICs['Deposition']['Mercury'].ICinput ='Equilibrium' systems[i].ICs['Deposition']['Mercury'].z = [0.0,0.1] systems[i].ICs['Deposition']['Mercury'].C = [0.0,0.0] systems[i].ICs['Deposition']['Mercury'].qm = {} systems[i].ICs['Deposition']['Mercury'].qm['Sediment'] = [0.0,0.0] systems[i].ICs['Deposition']['Methylmercury'].ICtype ='Uniform' systems[i].ICs['Deposition']['Methylmercury'].ICinput ='Equilibrium' systems[i].ICs['Deposition']['Methylmercury'].z = [0.0,0.1] systems[i].ICs['Deposition']['Methylmercury'].C = [0.0,0.0] systems[i].ICs['Deposition']['Methylmercury'].qm = {} systems[i].ICs['Deposition']['Methylmercury'].qm['Sediment'] = [0.0,0.0] systems[i].ICs['Deposition']['phenanthrene'].ICtype ='Uniform' systems[i].ICs['Deposition']['phenanthrene'].ICinput ='Equilibrium' systems[i].ICs['Deposition']['phenanthrene'].z = [0.0,0.1] systems[i].ICs['Deposition']['phenanthrene'].C = [0.0,0.0] systems[i].ICs['Deposition']['phenanthrene'].qm = {} systems[i].ICs['Deposition']['phenanthrene'].qm['Sediment'] = [0.0,0.0] systems[i].ICs['Layer 1']['Mercury'].ICtype ='Uniform' systems[i].ICs['Layer 1']['Mercury'].ICinput ='Equilibrium' systems[i].ICs['Layer 1']['Mercury'].z = [0.0,10.0] systems[i].ICs['Layer 1']['Mercury'].C = [0.0,0.0] systems[i].ICs['Layer 1']['Mercury'].qm = {} systems[i].ICs['Layer 1']['Mercury'].qm['Sand'] = [0.0,0.0] systems[i].ICs['Layer 1']['Methylmercury'].ICtype ='Uniform' systems[i].ICs['Layer 1']['Methylmercury'].ICinput ='Equilibrium' systems[i].ICs['Layer 1']['Methylmercury'].z = [0.0,10.0] systems[i].ICs['Layer 1']['Methylmercury'].C = [0.0,0.0] systems[i].ICs['Layer 1']['Methylmercury'].qm = {} systems[i].ICs['Layer 1']['Methylmercury'].qm['Sand'] = [0.0,0.0] systems[i].ICs['Layer 1']['phenanthrene'].ICtype ='Uniform' systems[i].ICs['Layer 1']['phenanthrene'].ICinput ='Equilibrium' systems[i].ICs['Layer 1']['phenanthrene'].z = [0.0,10.0] systems[i].ICs['Layer 1']['phenanthrene'].C = [0.0,0.0] systems[i].ICs['Layer 1']['phenanthrene'].qm = {} systems[i].ICs['Layer 1']['phenanthrene'].qm['Sand'] = [0.0,0.0] systems[i].ICs['Layer 2']['Mercury'].ICtype ='Uniform' systems[i].ICs['Layer 2']['Mercury'].ICinput ='Equilibrium' systems[i].ICs['Layer 2']['Mercury'].z = [0.0,2.0] systems[i].ICs['Layer 2']['Mercury'].C = [0.0,0.0] systems[i].ICs['Layer 2']['Mercury'].qm = {} systems[i].ICs['Layer 2']['Mercury'].qm['Activated Carbon'] = [0.0,0.0] systems[i].ICs['Layer 2']['Methylmercury'].ICtype ='Uniform' systems[i].ICs['Layer 2']['Methylmercury'].ICinput ='Equilibrium' systems[i].ICs['Layer 2']['Methylmercury'].z = [0.0,2.0] systems[i].ICs['Layer 2']['Methylmercury'].C = [0.0,0.0] systems[i].ICs['Layer 2']['Methylmercury'].qm = {} systems[i].ICs['Layer 2']['Methylmercury'].qm['Activated Carbon'] = [0.0,0.0] systems[i].ICs['Layer 2']['phenanthrene'].ICtype ='Uniform' systems[i].ICs['Layer 2']['phenanthrene'].ICinput ='Equilibrium' systems[i].ICs['Layer 2']['phenanthrene'].z = [0.0,2.0] systems[i].ICs['Layer 2']['phenanthrene'].C = [0.0,0.0] systems[i].ICs['Layer 2']['phenanthrene'].qm = {} systems[i].ICs['Layer 2']['phenanthrene'].qm['Activated Carbon'] = [0.0,0.0] systems[i].ICs['Layer 3']['Mercury'].ICtype ='Uniform' systems[i].ICs['Layer 3']['Mercury'].ICinput ='Equilibrium' systems[i].ICs['Layer 3']['Mercury'].z = [0.0,10.0] systems[i].ICs['Layer 3']['Mercury'].C = [0.0,0.0] systems[i].ICs['Layer 3']['Mercury'].qm = {} systems[i].ICs['Layer 3']['Mercury'].qm['Sediment'] = [100.0,100.0] systems[i].ICs['Layer 3']['Methylmercury'].ICtype ='Uniform' systems[i].ICs['Layer 3']['Methylmercury'].ICinput ='Equilibrium' systems[i].ICs['Layer 3']['Methylmercury'].z = [0.0,10.0] systems[i].ICs['Layer 3']['Methylmercury'].C = [0.0,0.0] systems[i].ICs['Layer 3']['Methylmercury'].qm = {} systems[i].ICs['Layer 3']['Methylmercury'].qm['Sediment'] = [0.0,0.0] systems[i].ICs['Layer 3']['phenanthrene'].ICtype ='Uniform' systems[i].ICs['Layer 3']['phenanthrene'].ICinput ='Equilibrium' systems[i].ICs['Layer 3']['phenanthrene'].z = [0.0,10.0] systems[i].ICs['Layer 3']['phenanthrene'].C = [1.0,1.0] systems[i].ICs['Layer 3']['phenanthrene'].qm = {} systems[i].ICs['Layer 3']['phenanthrene'].qm['Sediment'] = [165.958690744,165.958690744] # Solver Options # Parameter: # tfinal: total simulation time # outputsteps: time steps in output files # delt: time step size # players: grid number in each layer # averageoption: average options for periodical advection or deposition # nlerror: error tolerance in each time step systems[i].tfinal = 20.0 systems[i].outputsteps = 100 systems[i].delt = 0.1 systems[i].players = [1.0, 100, 20, 100] systems[i].nlerror = 0.01 systems[i].averageoption = 'Instaneous' # The following lines define additional non-assignable parameters for the system # System Units systems[i].lengthunit = 'cm' systems[i].concunit = 'ug/L' systems[i].timeunit = 'yr' systems[i].diffunit = 'cm^2/s' # Chemical Properties systems[i].chemicals[0].MW =80.0 systems[i].chemicals[0].formula ='Hg' systems[i].chemicals[0].Ref ='0' systems[i].chemicals[0].Koc =0.0 systems[i].chemicals[0].Kf =0.0 systems[i].chemicals[0].N =0.0 systems[i].chemicals[0].charge =0 systems[i].chemicals[1].MW =95.0 systems[i].chemicals[1].formula ='MeHg' systems[i].chemicals[1].Ref ='0' systems[i].chemicals[1].Koc =0.0 systems[i].chemicals[1].Kf =0.0 systems[i].chemicals[1].N =0.0 systems[i].chemicals[1].charge =0 systems[i].chemicals[2].MW =178.0 systems[i].chemicals[2].formula ='C14H9NO2' systems[i].chemicals[2].Ref ='CapSim' systems[i].chemicals[2].Koc =4.22 systems[i].chemicals[2].Kf =0.0 systems[i].chemicals[2].N =1.0 systems[i].chemicals[2].charge =0 # Solid Material Properties systems[i].matrices[0].model ='By fraction' systems[i].matrices[0].components[0].sorp ='Freundlich' systems[i].matrices[0].components[0].tort ='Millington & Quirk' systems[i].matrices[1].model ='By fraction' systems[i].matrices[1].components[0].sorp ='Linear--Kd specified' systems[i].matrices[1].components[0].tort ='Millington & Quirk' systems[i].matrices[2].model ='By fraction' systems[i].matrices[2].components[0].sorp ='Linear--Kocfoc' systems[i].matrices[2].components[0].tort ='Boudreau' # Solid Layer Properties systems[i].layers[0].tort ='Boudreau' systems[i].layers[1].tort ='Millington & Quirk' systems[i].layers[2].tort ='Millington & Quirk' systems[i].layers[3].tort ='Boudreau' systems[i].reactions[0].model ='Fundamental' systems[i].reactions[0].equation =' Hg ==> MeHg ' systems[i].reactions[1].model ='Fundamental' systems[i].reactions[1].equation =' MeHg ==> Hg ' systems[i].reactions[2].model ='Fundamental' systems[i].reactions[2].equation =' C14H9NO2 Decay' systems[i].discrete = 'Specify manually' systems[i].ptype = 'User-defined' systems[i].tvariable = 'User-defined' systems[i].nonlinear = 'Newton method' systems[i].massoption = 'Track' systems[i].depgrid = 0.01 systems[i].tidalsteps = 1 systems[i].solidmin = 1e-05 systems[i].timeoption = 'Implicit' systems[i].FDMoption = '1-D mass balance' systems[i].temp = 'Excluded' systems[i].Tavg = 25.0 systems[i].Tseason = 5.0 systems[i].pseason = 1.0