Closed cpaniaguam closed 1 year ago
boundary_conditions_new
will need tot_h2o_frac_in
and tot_co2_frac_in
https://github.com/CallieHsu/Chamber.jl/blob/0f3583202c2d6a9c9bc64b920c24c71d2d5e07b4/src/boundary_condition.jl#L30-L33
And the code should be modified like this:
# Calculate the water content (concentration) for inflowing magma contents
tot_h2o_frac_in = M_h2o_0/(rho_0*V_0) # CHANGE MASS FRACTION FROM XCO2_IN
tot_co2_frac_in = M_co2_0/(rho_0*V_0)
if param["fluxing"]
tot_co2_frac_in = param["XCO2_in"]*param["mm_co2"]/(param["XCO2_in"]*param["mm_co2"]+(1-param["XCO2_in"])*param["mm_h2o"])
tot_h2o_frac_in = 1-tot_co2_frac_in
end
param["tot_h2o_frac_in"] = tot_h2o_frac_in
param["tot_co2_frac_in"] = tot_co2_frac_in
Update these two variables before they saved in param
Is the code in these lines used? It seems like
tot_h2o_frac_in
andtot_co2_frac_in
are computed; then they are saved inparam
and updated ifparam["fluxing"]
is true. But nothing is done with these values afterwards.https://github.com/CallieHsu/Chamber.jl/blob/0f3583202c2d6a9c9bc64b920c24c71d2d5e07b4/scripts/runCode.jl#L127-L135