Skip to contents

tag: chemical_system

Usage

prj_chemical_system(
  chemical_solver,
  mesh,
  linear_solver = NULL,
  database = NULL,
  solution = NULL,
  knobs = NULL,
  kinetic_reactants = NULL,
  rates = NULL,
  equilibrium_reactants = NULL,
  surface = NULL,
  user_punch = NULL,
  use_high_precision = NULL,
  exchangers = NULL,
  chemical_reactions = NULL,
  number_of_components = NULL
)

Arguments

chemical_solver

string: Either "Phreeqc" or "SelfContained".

mesh

string:

linear_solver

Optional: string:

database

string: Required if chemical_solver == "Phreeqc" .

solution

prj_solution: Required if chemical_solver == "Phreeqc".

knobs

Optional: list:

kinetic_reactants

Optional: list, prj_kinetic_reactant:

rates

Optional: list, prj_rate:

equilibrium_reactants

Optional: list, prj_phase_component:

surface

Optional:

user_punch

Optional:

use_high_precision

Optional:

exchangers

Optional: prj_exchangers

chemical_reactions

list: Required if chemical_solver == "SelfContained".

number_of_components

integer: Required if chemical_solver == "SelfContained".

Examples

prj_chemical_system(
    chemical_solver = "Phreeqc",
    database = "PSINA_12_07_110615_DAV_s.dat",
    solution = prj_solution(
        temperature = 25,
        pressure = 1,
        pe = 4,
        components = list(
            component = "C(4)",
            component = "Ca"
        ),
        charge_balance = "pH"
    ),
    mesh = "calcite_ReactiveDomain",
    knobs = list(
        max_iter = "100",
        relative_convergence_tolerance = "1e-12",
        tolerance = "1e-15",
        step_size = "100",
        scaling = "0"
    ),
    equilibrium_reactants = list(
        phase_component = prj_phase_component(
            name = "Calcite",
            saturation_index = 0,
            initial_amount = 0.000207
        )
    )
)
#> $chemical_solver
#> [1] "Phreeqc"
#> 
#> $mesh
#> [1] "calcite_ReactiveDomain"
#> 
#> $linear_solver
#> NULL
#> 
#> $database
#> [1] "PSINA_12_07_110615_DAV_s.dat"
#> 
#> $solution
#> $temperature
#> [1] 25
#> 
#> $pressure
#> [1] 1
#> 
#> $pe
#> [1] 4
#> 
#> $components
#> $components$component
#> [1] "C(4)"
#> 
#> $components$component
#> [1] "Ca"
#> 
#> 
#> $charge_balance
#> [1] "pH"
#> 
#> $fixing_pe
#> NULL
#> 
#> $xpath
#> [1] "chemical_system/solution"
#> 
#> $attr_names
#> [1] "fixing_pe"
#> 
#> $flatten_on_exp
#> character(0)
#> 
#> attr(,"class")
#> [1] "prj_solution"
#> 
#> $knobs
#> $knobs$max_iter
#> [1] "100"
#> 
#> $knobs$relative_convergence_tolerance
#> [1] "1e-12"
#> 
#> $knobs$tolerance
#> [1] "1e-15"
#> 
#> $knobs$step_size
#> [1] "100"
#> 
#> $knobs$scaling
#> [1] "0"
#> 
#> 
#> $kinetic_reactants
#> NULL
#> 
#> $rates
#> NULL
#> 
#> $equilibrium_reactants
#> $equilibrium_reactants$phase_component
#> $name
#> [1] "Calcite"
#> 
#> $saturation_index
#> [1] 0
#> 
#> $initial_amount
#> [1] 0.000207
#> 
#> $xpath
#> [1] "chemical_system/equilibrium_reactants/phase_component"
#> 
#> $attr_names
#> character(0)
#> 
#> $flatten_on_exp
#> character(0)
#> 
#> attr(,"class")
#> [1] "prj_phase_component"
#> 
#> 
#> $surface
#> NULL
#> 
#> $user_punch
#> NULL
#> 
#> $use_high_precision
#> NULL
#> 
#> $exchangers
#> NULL
#> 
#> $chemical_reactions
#> NULL
#> 
#> $number_of_components
#> NULL
#> 
#> $xpath
#> [1] "chemical_system"
#> 
#> $attr_names
#> [1] "chemical_solver" "site_unit"      
#> 
#> $flatten_on_exp
#> character(0)
#> 
#> attr(,"class")
#> [1] "prj_chemical_system"