Commit 7a0f7291 authored by renchao.lu's avatar renchao.lu
Browse files

wip.

parent 4b6023ef
...@@ -51,6 +51,10 @@ void ChemicalSystem::initialize(std::size_t const num_chemical_systems) ...@@ -51,6 +51,10 @@ void ChemicalSystem::initialize(std::size_t const num_chemical_systems)
std::fill(kinetic_reactant.amount->begin(), std::fill(kinetic_reactant.amount->begin(),
kinetic_reactant.amount->end(), kinetic_reactant.amount->end(),
kinetic_reactant.initial_amount); kinetic_reactant.initial_amount);
for (unsigned i = 0; i < 4; ++i)
{
(*kinetic_reactant.amount)[i] = 60;
}
} }
} }
......
...@@ -1037,7 +1037,33 @@ ...@@ -1037,7 +1037,33 @@
<name>Cox2Fe</name> <name>Cox2Fe</name>
<initial_amount>0.00</initial_amount> <initial_amount>0.00</initial_amount>
</exchange_phase> </exchange_phase>
</exchange> </exchange>
<kinetic_reactants>
<kinetic_reactant>
<name>Steel</name>
<initial_amount>0</initial_amount>
<parameters>2.2e-8 2.2e-8 0.01</parameters>
</kinetic_reactant>
</kinetic_reactants>
<rates>
<rate>
<kinetic_reactant>Steel</kinetic_reactant>
<expression>
<statement>If (M &lt;= 0) then goto 12</statement>
<statement>If (LM("O2") &lt; -6.0) then goto 8</statement>
<statement>rate = parm(1)</statement>
<statement>rate = rate*PARM(3)</statement>
<statement>moles = rate*TIME</statement>
<statement>if (moles &gt; M) then moles=M</statement>
<statement>Goto 12</statement>
<statement>rate = parm(2)</statement>
<statement>rate = rate*PARM(3)</statement>
<statement>moles = rate*TIME</statement>
<statement>if (moles &gt; M) then moles=M</statement>
<statement>SAVE moles</statement>
</expression>
</rate>
</rates>
<equilibrium_reactants> <equilibrium_reactants>
<phase_component> <phase_component>
<name>Calcite</name> <name>Calcite</name>
...@@ -1122,7 +1148,8 @@ ...@@ -1122,7 +1148,8 @@
<parameter> <parameter>
<name>c0_Fe</name> <name>c0_Fe</name>
<type>Constant</type> <type>Constant</type>
<value>4.98e-5</value> <!--value>4.98e-5</value-->
<value>0</value>
</parameter> </parameter>
<parameter> <parameter>
<name>c0_I</name> <name>c0_I</name>
...@@ -1207,7 +1234,8 @@ ...@@ -1207,7 +1234,8 @@
<parameter> <parameter>
<name>c_Fe_Dirichlet_left</name> <name>c_Fe_Dirichlet_left</name>
<type>Constant</type> <type>Constant</type>
<value>4.98e-5</value> <!--value>4.98e-5</value-->
<value>0</value>
</parameter> </parameter>
<parameter> <parameter>
<name>c_I_Dirichlet_left</name> <name>c_I_Dirichlet_left</name>
...@@ -1274,7 +1302,7 @@ ...@@ -1274,7 +1302,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Al_Dirichlet_left</parameter> <parameter>c_Al_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1287,7 +1315,7 @@ ...@@ -1287,7 +1315,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_B_Dirichlet_left</parameter> <parameter>c_B_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1300,7 +1328,7 @@ ...@@ -1300,7 +1328,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Br_Dirichlet_left</parameter> <parameter>c_Br_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1313,7 +1341,7 @@ ...@@ -1313,7 +1341,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Ca_Dirichlet_left</parameter> <parameter>c_Ca_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1326,7 +1354,7 @@ ...@@ -1326,7 +1354,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Cl_Dirichlet_left</parameter> <parameter>c_Cl_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1352,7 +1380,7 @@ ...@@ -1352,7 +1380,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_I_Dirichlet_left</parameter> <parameter>c_I_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1365,7 +1393,7 @@ ...@@ -1365,7 +1393,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_K_Dirichlet_left</parameter> <parameter>c_K_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1378,7 +1406,7 @@ ...@@ -1378,7 +1406,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Li_Dirichlet_left</parameter> <parameter>c_Li_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1391,7 +1419,7 @@ ...@@ -1391,7 +1419,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Mg_Dirichlet_left</parameter> <parameter>c_Mg_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1404,7 +1432,7 @@ ...@@ -1404,7 +1432,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Na_Dirichlet_left</parameter> <parameter>c_Na_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1443,7 +1471,7 @@ ...@@ -1443,7 +1471,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Sr_Dirichlet_left</parameter> <parameter>c_Sr_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1456,7 +1484,7 @@ ...@@ -1456,7 +1484,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_Si_Dirichlet_left</parameter> <parameter>c_Si_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1469,7 +1497,7 @@ ...@@ -1469,7 +1497,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_C_Dirichlet_left</parameter> <parameter>c_C_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
...@@ -1482,7 +1510,7 @@ ...@@ -1482,7 +1510,7 @@
<boundary_conditions> <boundary_conditions>
<boundary_condition> <boundary_condition>
<mesh>CBILeftBoundary</mesh> <mesh>CBILeftBoundary</mesh>
<type>Dirichlet</type> <type>ChemicalDirichlet</type>
<parameter>c_H_Dirichlet_left</parameter> <parameter>c_H_Dirichlet_left</parameter>
</boundary_condition> </boundary_condition>
</boundary_conditions> </boundary_conditions>
......
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
# #
# -analytic # -analytic
PHASES
Steel
Fe = Fe+2 +2e-
log_k 12.75 # without importance
-delta_h -94.218 # without importance
SOLUTION_MASTER_SPECIES SOLUTION_MASTER_SPECIES
#element species alk gfw_formula element_gfw #element species alk gfw_formula element_gfw
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment