
<amanzi_input version="2.0.0" type="unstructured">
        
        <model_description name="F Area 2D">
                <comments>full chemistry</comments>
		 <model_id>ASCEM-F-Area</model_id>
	         <author>d3k870</author>
		 <units>
			<length_unit>m</length_unit>
			<time_unit>s</time_unit>
			<mass_unit>kg</mass_unit>
			<conc_unit>molar</conc_unit>
		</units>
	</model_description>    

	<definitions>
    		<macros>
			<cycle_macro name = "Every-1000-steps">
				<start>0</start>
				<timestep_interval>100</timestep_interval>
				<stop>-1</stop>
			</cycle_macro>

			<time_macro name = "Every two months">
				<start>6.16635504e+10</start>
				<timestep_interval>5.184e+06</timestep_interval>
				<stop>6.6271e+10</stop>
			</time_macro>

			<time_macro name = "Every year">
				<start>6.16635504e+10</start>
				<timestep_interval>3.155760000e+7</timestep_interval>
				<stop>6.627096000e+10</stop>
			</time_macro>
				
			<time_macro name = "Active basin">
				<start>6.16635504e+10</start>
				<timestep_interval>3.155760000e+7</timestep_interval>
				<stop>6.27365088e+10</stop>
			</time_macro>
				
			<time_macro name = "Plume evolution: every year">
				<start>1989 y</start>
				<timestep_interval>1 y</timestep_interval>
				<stop>2010 y</stop>
			</time_macro>

			<time_macro name = "Plume evolution: every five years">
				<start>2015 y</start>
				<timestep_interval>5 y</timestep_interval>
				<stop>2100 y</stop>
			</time_macro>
		</macros>
	</definitions>
				
	<process_kernels>
		<comments>This is a proposed comment field for process_kernels</comments>
	        <flow model="richards" state="on"/>
	        <transport algorithm="explicit first-order" state="on"/>
	        <chemistry engine="amanzi" process_model="implicit operator split" state="on"/>
	</process_kernels>
	

	<phases>
		<liquid_phase name="water">
			<eos>false</eos> 
			<viscosity>1.00E-03</viscosity>
			<density>997.16</density>
			<dissolved_components>
				<solutes> 
					<solute coefficient_of_diffusion="1.0E-9">H+</solute>
					<solute coefficient_of_diffusion="1.0E-9">Al+++</solute>
					<solute coefficient_of_diffusion="1.0E-9">Ca++</solute>
					<solute coefficient_of_diffusion="1.0E-9">Fe+++</solute>
					<solute coefficient_of_diffusion="1.0E-9">CO2(aq)</solute>
					<solute coefficient_of_diffusion="1.0E-9">K+</solute>
					<solute coefficient_of_diffusion="1.0E-9">Mg++</solute>
					<solute coefficient_of_diffusion="1.0E-9">Na+</solute>
					<solute coefficient_of_diffusion="1.0E-9">SiO2(aq)+</solute>
					<solute coefficient_of_diffusion="1.0E-9">SO4--</solute>
					<solute coefficient_of_diffusion="1.0E-9">Tritium</solute>
					<solute coefficient_of_diffusion="1.0E-9">NO3-</solute>
					<solute coefficient_of_diffusion="1.0E-9">UO2++-</solute>
					<solute coefficient_of_diffusion="1.0E-9">Cl-</solute>
					<solute coefficient_of_diffusion="1.0E-9">SiO2(aq)</solute>
					<solute coefficient_of_diffusion="1.0E-9">UO2++</solute>
				</solutes> 
			</dissolved_components>
		</liquid_phase>
		<!-- I changed this from the Calcite example; should it be minerals/sorption? -->
		<solid_phase>
			<minerals>
				<mineral>Quartz</mineral>
				<mineral>Goethite</mineral>
				<mineral>Kaolinite</mineral>
				<mineral>Schoepite</mineral>
				<mineral>Gibbsite</mineral>
				<mineral>Jurbanite</mineral>
				<mineral>Basaluminite</mineral>
				<mineral>Opal</mineral>
			</minerals>
		</solid_phase>
	</phases>

	<numerical_controls>
	</numerical_controls>

	<execution_controls>
		<comments>Switch time is Jan 1955; end time is Jan 2055 </comments>
		 <execution_control_defaults init_dt= "10"   max_dt="1 y"  reduction_factor="0.8"  increase_factor="1.25" mode="transient" method="bdf1"/>
		 	<!-- would method be picard for steady-state?  Use Picard was true in original file -->		
		 	<!-- F Area original file had 'steady max divergent iterations' - is it still needed? -->		
			<execution_control  start="0.0 y" end="1955.0 y"  init_dt= "1000000 s"        max_dt="100.0 y"   reduction_factor="0.5"  increase_factor="2.0"    mode = "steady"  method="picard" />
			<execution_control  start="1988 y" init_dt="10"/>
	</execution_controls>


        <mesh framework="mstk"> <!-- default is MSTK for unstructured; This had attribute verify="false" meaning what? -->
		<comments>The meshes are available in https://software.lanl.gov/ascem/trac/wiki/CodeMilestones/Phase2/F-Area</comments>
		<dimension>2</dimension>
		<read>
			<format>exodus ii</format>
			<file>f_area_mesh_2D.exo</file>
		</read>
	</mesh>

	<regions>
  		<comments>Regions: Each region is coincident  with those specified in the exodus II format.</comments>
	  	<region name= "Upper aquifer">
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="cell" label="50000"/>
 	   	</region>

  		<region name= "Lower aquifer">
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="cell" label="30000"/>
   	 	</region>

 	 	<region name= "tan clay">
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="cell" label="40000"/>
 	   	</region>

  		<region name= "natural recharge (left)">
		<comments>This face is corresponding to natural recharge (left side) (Bc1)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="1"/>
 	   	</region>

  		<region name= "natural recharge (right)">
			<comments>This face is corresponding to natural recharge (right side) (Bc3)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="3"/>
    		</region>
	  	<region name= "seepage basin">
		<comments>This face is corresponding to Seepage basin (Bc2)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="2"/>
    		</region>
  		<region name= "seepage face">
		<comments>This face is corresponding to seepage face (Bc4)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="4"/>
    		</region>
  		<region name= "UTRA upstream">
			<comments>This face is corresponding to UTRA (UUTRA + TCCZ + LUTRA) upstream side (Bc8)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="8"/>
    		</region>
		<region name= "UTRA downstream">
			<comments>This face is corresponding to UTRA (UUTRA + TCCZ + LUTRA) downstream side (Bc5)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="5"/>
    		</region>
		<region name= "VZ">
			<comments>This face is corresponding to vadose zone (Bc9, no flux)</comments>
			<region_file name = "f_area_mesh_2D.exo" type="labeled set" entity="face" label="9"/>
    		</region>

		<!-- TDS: To validate the coordinates using the current regexp, three values are required.  Here we have a 2D mesh,
			so maybe we need to allow 1-D or 2-D coordinates as well? Could have point_1d, point_2d, point_3d etc. ?
			For now, I have just added a third coordinate of zero so that it validates... -->

    		<point name = "Well_1"      coordinate ="(1866,58.1)"/>
    		<point name = "Well_2"      coordinate ="(1866,43.8)"/>
    		<point name = "Well_3"      coordinate ="(2072,58.1)"/>
    		<point name = "Basin_point" coordinate ="(1721,84.8)"/>

	</regions>
    
  	<geochemistry>
		<reaction_network file = "calcite_flow_and_tran.in" format = "simple"/>
		<constraints>
			<!-- Provide a list of constraints for various chemistry in system. -->
                        <!-- Chemistry input needs to be consolidated and migrated to xml file
                             as funding becomes available -->
			<!-- activity model, database specification, mineral kinetics, secondary species specified
			     in external file -->
			<constraint name="initial">
				<solute name="H+"            value="2.96e-6"         type="Free Ion Concentration"/>
				<solute name="Al+++"         value="2.21e-8"         type="Free Ion Concentration"/>
				<solute name="Ca++"          value="1.0e-5"           type="Free Ion Concentration"/>
				<solute name="Cl-"           value="9.98e-3"         type="Free Ion Concentration"/>
				<solute name="Fe+++"         value="2.52e-11"        type="Free Ion Concentration"/>
				<solute name="CO2(aq)"       value="1.21e-5"         type="Free Ion Concentration"/>
				<solute name="K+"            value="3.32e-5"         type="Free Ion Concentration"/>
				<solute name="Mg++"          value="5.34e-3"         type="Free Ion Concentration"/>
				<solute name="Na+"           value="2.78e-4"         type="Free Ion Concentration"/>
				<solute name="SiO2(aq)"      value="1.77e-4"         type="Free Ion Concentration"/>
				<solute name="SO4--"         value="2.25e-5"         type="Free Ion Concentration"/>
				<solute name="Tritium"       value="1.0e-15"          type="Free Ion Concentration"/>
				<solute name="NO3-"          value="1.0e-3"           type="Free Ion Concentration"/>
				<solute name="UO2++"         value="1.25e-10"        type="Free Ion Concentration"/>
				<mineral name="gibbsite"     volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="quartz"       volume_fraction="0.88"  surface_area ="3262.3"/>
				<mineral name="opal"         volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="jurbanite"    volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="basaluminite" volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="kaolinite"    volume_fraction="0.11"  surface_area ="59093.9"/>
				<mineral name="schoepite"    volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="goethite"     volume_fraction="0.016" surface_area ="11076.3"/>
				<!-- cation exchange capacity and surface site density are specified in the
				     external pflotran input file, and scaled by mineral volume fraction -->
			</constraint>
			<constraint name="F-3 basin">
				<solute name="H+"            value="9.73e-3"         type="Free Ion Concentration"/>
				<solute name="Al+++"         value="1.00e-8"         type="Free Ion Concentration"/>
				<solute name="Ca++"          value="1.0e-5"           type="Free Ion Concentration"/>
				<solute name="Cl-"           value="3.39e-5"         type="Free Ion Concentration"/>
				<solute name="Fe+++"         value="2.41e-6"         type="Free Ion Concentration"/>
				<solute name="CO2(aq)"       value="1.07e-5"         type="Free Ion Concentration"/>
				<solute name="K+"            value="1.72e-6"         type="Free Ion Concentration"/>
				<solute name="Mg++"          value="2.47e-6"         type="Free Ion Concentration"/>
				<solute name="Na+"           value="3.04e-4"         type="Free Ion Concentration"/>
				<solute name="SiO2(aq)"      value="1.18e-4"         type="Free Ion Concentration"/>
				<solute name="SO4--"         value="4.80e-5"         type="Free Ion Concentration"/>
				<solute name="Tritium"       value="2.17e-9"         type="Free Ion Concentration"/>
				<solute name="NO3-"          value="1.0e-2"           type="Free Ion Concentration"/>
				<solute name="UO2++"         value="3.01e-05"        type="Free Ion Concentration"/>
				<mineral name="gibbsite"     volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="quartz"       volume_fraction="0.88"  surface_area ="3262.3"/>
				<mineral name="opal"         volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="jurbanite"    volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="basaluminite" volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="kaolinite"    volume_fraction="0.11"  surface_area ="59093.9"/>
				<mineral name="schoepite"    volume_fraction="0.0"   surface_area ="0.1"/>
				<mineral name="goethite"     volume_fraction="0.016" surface_area ="11076.3"/>
				<!-- cation exchange capacity and surface site density are specified in the
				     external pflotran input file, and scaled by mineral volume fraction -->
			</constraint>
		</constraints>
  	</geochemistry>

	<materials>
    		<!-- Upper aquifer (UUTRA) -->
		<material name="Upper aquifer">
			<mechanical_properties>
                         	<porosity value="0.39"/>
                         	<particle_density value="2720.0"/>  <!-- TDS Added this - is there a default for particle_density? -->
			</mechanical_properties>
			<!-- permeability for 2D? -->
			<permeability x="5.0e-12" z="5.0e-12"/>
			<cap_pressure model="van_genuchten">
				<parameters alpha="4.0e-04" sr="0.18" m="0.27"/>
			</cap_pressure> 
			<rel_perm model="mualem">
				<optional_krel_smoothing_interval>0.0</optional_krel_smoothing_interval>
			</rel_perm>		
			<assigned_regions>Upper aquifer</assigned_regions>
		</material>

		<material name="Lower aquifer">
			<mechanical_properties>
                         	<porosity value="0.39"/>
                         	<particle_density value="2720.0"/>  <!-- TDS Added this - is there a default for particle_density? -->
			</mechanical_properties>
			<!-- permeability for 2D? -->
			<permeability x="5.0e-12" z="5.0e-12"/>
			<cap_pressure model = "van_genuchten">
				<parameters alpha="5.1e-05" sr="0.41" m="0.5"/>
			</cap_pressure>
			<rel_perm model="mualem">
				<optional_krel_smoothing_interval>0.0</optional_krel_smoothing_interval>
			</rel_perm>		
			<assigned_regions>Lower aquifer</assigned_regions>
		</material>

		<material name="tan clay">
			<mechanical_properties>
                         	<porosity value="0.39"/>
                         	<particle_density value="2720.0"/>  <!-- TDS Added this - is there a default for particle_density? -->
			</mechanical_properties>
			<!-- permeability for 2D? -->
			<permeability x="1.98e-14" z="1.98e-14"/>
			<cap_pressure model = "van_genuchten">
				<parameters alpha="5.1e-05" sr="0.39" m="0.5"/>
			</cap_pressure>
			<rel_perm model="mualem">
				<optional_krel_smoothing_interval>0.0</optional_krel_smoothing_interval>
			</rel_perm>		
			<assigned_regions>tan clay</assigned_regions>
		</material>
	</materials>

	<initial_conditions>
		<initial_condition name = "background aqueous">
			<assigned_regions>Upper aquifer,Lower aquifer,tan clay</assigned_regions>
			<liquid_phase name="water">
				<liquid_component name = "water">
					<linear_pressure value = "101325" reference_coord ="(0.0,60.0)" gradient="(0.0,-9793.5192)"/>
				</liquid_component>
				<geochemistry>
					<constraint name = "initial"/>
				</geochemistry>
			</liquid_phase>
			<solid_phase name="solid">
				<geochemistry>
					<constraint name = "initial"/>
				</geochemistry>
			</solid_phase>
		</initial_condition>
	</initial_conditions>

	<boundary_conditions>
		<boundary_condition name = "natural recharge (left side)">
    			<comments>Boundary corresponding to the Natural recharge (left side)</comments>
			<assigned_regions>natural recharge (left)</assigned_regions>
			<liquid_phase name = "water">
				<liquid_component name="water">
					<inward_mass_flux start="0"         function="constant"  value="4.743e-6"/>
					<inward_mass_flux start="3.1536e9"  function="constant"  value="4.743e-6"/>
				</liquid_component>
				<geochemistry>
					<constraint name="initial" start="0" function="constant"/>
				</geochemistry>
			</liquid_phase>
		</boundary_condition>

		<boundary_condition name = "natural recharge (right side)">
    			<comments>Boundary corresponding to the Natural recharge (right side)</comments>
			<assigned_regions>natural recharge (right)</assigned_regions>
			<liquid_phase name = "water">
				<liquid_component name="water">
					<inward_mass_flux start="0"         function="constant"  value="4.743e-6"/>
					<inward_mass_flux start="3.1536e9"  function="constant"  value="4.743e-6"/>
				</liquid_component>
				<geochemistry>
					<constraint name="initial" start="0" function="constant"/>
				</geochemistry>
			</liquid_phase>
		</boundary_condition>

		<boundary_condition name = "natural recharge (right side)">
    			<comments>Boundary corresponding to the seepage basin</comments>
			<assigned_regions>seepage basin</assigned_regions>
			<liquid_phase name = "water">
				<liquid_component name="water">
					<inward_mass_flux                    start="0"         function="constant"  value="4.743e-6"/>
					<inward_mass_flux                    start="1955 y"    function="constant"  value="1.2684e-4"/>
					<inward_mass_flux                    start="1988 y"    function="constant"  value="1.2684e-4"/>
					<inward_mass_flux                    start="2000 y"    function="linear"    value="4.743e-6"/>
				</liquid_component>
				<geochemistry>
					<constraint name="initial"           start="0"      function="constant"/>
				</geochemistry>
			</liquid_phase>
		</boundary_condition>

		<boundary_condition name = "f-3_basin">
    			<comments>Boundary corresponding to the seepage basin</comments>
			<assigned_regions>seepage basin</assigned_regions>
			<liquid_phase name = "water">
				<liquid_component name="water">
					<inward_mass_flux                    start="0"         function="constant"  value="4743e-6"/>
					<inward_mass_flux                    start="1955 y"    function="constant"  value="4.743e-6"/>
					<inward_mass_flux                    start="1988 y"    function="constant"  value="1.2684e-4"/>
					<inward_mass_flux                    start="2000 y"    function="linear"    value="4.743e-6"/>
				</liquid_component>
				<geochemistry>
					<constraint name="initial"           start="0"         function="constant"/>
					<constraint name="F-3 basin"         start="1955 y"    function="constant"/>
					<constraint name="initial"           start="1988 y"    function="constant"/>
					<constraint name="initial"           start="2000 y"    function="constant"/>
				</geochemistry>
			</liquid_phase>
		</boundary_condition>
		
		<boundary_condition name = "seepage_face">
    			<comments>Boundary corresponding to the seepage basin</comments>
			<assigned_regions>seepage face</assigned_regions>
			<liquid_phase name = "water">
				<liquid_component name="water">
					<inward_mass_flux                    start="0"         function="constant"  value="4.743e-6"/>
					<inward_mass_flux                    start="50 y"      function="constant"  value="4.743e-6"/>
				</liquid_component>
				<geochemistry>
					<constraint name="initial"           start="0"         function="constant"/>
					<constraint name="initial"           start="50 y"      function="constant"/>
				</geochemistry>
			</liquid_phase>
		</boundary_condition>

	</boundary_conditions>
	
	<sources>
	</sources>

	<output>
		<vis>
			<base_filename>plot</base_filename>
			<num_digits>5</num_digits>
			<time_macros>Active basin</time_macros>
			<time_macros>Plume evolution: every year</time_macros>
			<time_macros>Plume evolution: every five years</time_macros>
		</vis>

		<checkpoint>
			<base_filename>chk</base_filename>
			<num_digits>5</num_digits>
		</checkpoint>

		<observations>
   			<filename>amanzi.out</filename> 
			<liquid_phase name="water">
				<aqueous_conc solute ="H+">
					<assigned_regions>Well_1</assigned_regions>
					<functional>point</functional>
					<time_macro>Every year</time_macro>
				</aqueous_conc>
				<aqueous_conc solute ="UO2++">
					<assigned_regions>Well_1</assigned_regions>
					<functional>point</functional>
					<time_macro>Every year</time_macro>
				</aqueous_conc>
				<aqueous_conc solute ="Al+++">
					<assigned_regions>Well_1</assigned_regions>
					<functional>point</functional>
					<time_macro>Every year</time_macro>
				</aqueous_conc>
				<aqueous_conc solute ="NO3-">
					<assigned_regions>Well_1</assigned_regions>
					<functional>point</functional>
					<time_macro>Every year</time_macro>
				</aqueous_conc>
			</liquid_phase>
		</observations>
	</output>
</amanzi_input>

