def run(self): plot_opts = dict( range=(0,1500)) crust = continental_crust.to_layer(interface_depth) solver = FiniteSolver(crust, constraints=(u(0,"degC"),u(600,"degC"))) # Assume arbitrarily that interface is at 600 degC crust_section = solver.steady_state() mantle = oceanic_mantle.to_layer(total_depth-interface_depth) mantle = Section([mantle]) # Set starting state section = stack_sections(crust_section, mantle) adiabat = AdiabatSolver( section, start_depth=self.underplating_depth, start_temp=asthenosphere_temperature) self.t = self.start_time self.section = adiabat() self.record("initial") self.do_underplating() self.solve_to_present()
def pre_subduction(self): """ Get an oceanic geotherm at emplacement and just before subduction begins. """ self.log("Start age", self.start_time) self.log("Subduction", self.subduction_time) oceanic = Section( [oceanic_mantle.to_layer(total_depth - interface_depth)]) ocean_model = GDHSolver(oceanic, T_max=solver_constraints[1]) t = u(0, "s") self.set_state(self.start_time, ocean_model(t)) self.record("initial") dt = self.t - self.subduction_time self.set_state(self.subduction_time, ocean_model(dt)) self.record("before-subduction")
def underplating(): name = "Underplating" print(name) start = u(20,"Myr") slab_window_upwelling = Section([ oceanic_mantle.to_layer(u(100,"km")) ], uniform_temperature=u(1300,"degC")) final_section = stack_sections( forearc, slab_window_upwelling) solver = AdvancedFiniteSolver( final_section, constraints=solver_constraints) return solver.solution( duration=start-present, steps=200, plotter=Plotter(range=(0,1400), title=name))
#!/usr/bin/env python from geotherm.units import u from geotherm.materials import oceanic_mantle, continental_crust from geotherm.models.geometry import Section, Layer, stack_sections from geotherm.solvers import HalfSpaceSolver, FiniteSolver, AdiabatSolver from geotherm.plot import Plotter Layer.defaults["grid_spacing"] = u(100, "m") mantle_section = Section([oceanic_mantle.to_layer(u(100, "km"))]) apply_adiabat = AdiabatSolver() starting_mantle = apply_adiabat(mantle_section) from IPython import embed embed() # Initialize oceanic crust (analytical) oceanic = HalfSpaceSolver(mantle_layer) evolved_oceanic = oceanic(u(30, "Myr")) # Will put royden solver here. # Initialize continental crust (analytical) evolved_forearc = Section([continental_crust.to_layer(u(30, "km"))], uniform_temperature=u(200, "degC")) # Stack the two of them final_section = stack_sections(
# Set starting state section = stack_sections(crust_section, mantle) adiabat = AdiabatSolver( section, start_depth=self.underplating_depth, start_temp=asthenosphere_temperature) self.t = self.start_time self.section = adiabat() self.record("initial") self.do_underplating() self.solve_to_present() steady_state_section = Section([ continental_crust.to_layer(interface_depth), oceanic_mantle.to_layer(total_depth-interface_depth)]) class SteadyState(ModelRunner): """ Steady-state case for 30 km of crust atop 270 km of oceanic mantle """ name = 'steady-state' def setup_recorder(self): self.session = db.session() n_deleted = self.session.query(StaticProfile).delete() if n_deleted > 0: secho("Deleting data from previous run", fg='red') self.session.commit()
from geotherm.solvers import HalfSpaceSolver from geotherm.solvers.finite import AdvancedFiniteSolver args = docopt(__doc__) solution = args["<solution>"] present = u(1.65,"Myr") # K-Ar age for Crystal Knob xenoliths solver_constraints = ( u(25,"degC"), # Surface temperature u(1400,"degC")) #u(48,"mW/m**2")) # Globally averaged mantle heat flux from Pollack, et al., 1977 oceanic_section = Section([oceanic_mantle.to_layer(u(200,"km"))]) oceanic_solver = HalfSpaceSolver(oceanic_section) forearc = Section([ continental_crust.to_layer(u(30,"km")) ], uniform_temperature=u(400,"degC")) # This is obviously over-simplified def subduction_case(name, start_time, subduction_time): """Both the Monterey and Farallon-Plate scenarios involve the same basic steps, just with different timing. """ print(name) underplated_oceanic = oceanic_solver.solution(start_time-subduction_time) final_section = stack_sections( forearc,
#!/usr/bin/env python from geotherm.units import u from geotherm.plot import ComparisonPlotter, Plotter from geotherm.models.geometry import Section from geotherm.materials import oceanic_mantle from geotherm.solvers import HalfSpaceSolver, AdvancedFiniteSolver layer = oceanic_mantle.to_layer(u(100, "km")) section = Section([layer], uniform_temperature=u(1500, "degC")) finite = AdvancedFiniteSolver(section) half_space = HalfSpaceSolver(section) plotter = ComparisonPlotter(half_space.profile, title="Half-space test", range=(0, 2000)) #plotter = Plotter(range=(0,2000)) finite.solution(u(3, "Myr"), plotter=plotter)
def stepped_subduction(self, **kwargs): """ Method to subduct crust under a forearc with a geotherm modeled over a period of time, and capture a snapshot of underplating. The `velocity` option defines a subduction velocity that is used to move the subducting slab down the channel. If the `final_temperature` option is not set, the procedure will infer the final temperature of the subducted slab from a steady-state subduction geometery, using the method of Royden (1992). If the `final_temperature` option is set, the procedure will target that temperature at the final conditions of the interface. In this case, the Royden model parameters for this temperature will be found via optimization. """ final_distance = kwargs.pop("final_distance", underplating_distance) velocity = kwargs.pop("velocity", convergence_velocity) final_depth = kwargs.pop("final_depth", interface_depth) final_temperature = kwargs.pop("final_temperature", None) optimization_depth = kwargs.pop("optimization_depth", final_depth) # Thickness of foreland lithosphere # at the time of subduction # Presumably, foreland in this case refers # to the lower plate of the thrust advancing # into the subduction zone # The Royden model assumes that the foreland # is in thermal equilibrium, and the lithospheric # depth is being maintained, which is likely a # reasonable approximation for the timescales involved. self.log("Subduction velocity", velocity) dip = N.arctan(final_depth / final_distance).to("degrees") self.log("Dip of subduction zone", dip) # distance along subduction channel sub_distance = N.sqrt(final_distance**2 + final_depth**2) duration = (sub_distance / velocity).to("Myr") self.log("Duration of subduction", duration) echo("Beginning to subduct slab") kwargs.update(l=lithosphere_depth(self.section).into("m"), v=velocity.into("m/s")) self.log("Lithosphere depth", kwargs['l']) if final_temperature is None: royden = forearc_solver(**kwargs) else: # Optimize on rate of accretion royden = optimized_forearc( final_temperature, final_distance, # Optimize temperature above subduction # interface optimization_depth, **kwargs) self.log("Modeled upper-plate heat generation", royden.args[kwargs['vary']]) def on_step(solver, **kwargs): """ Function to change finite solver boundary conditions at each step """ self.step_function(solver, **kwargs) step = kwargs.pop("step") steps = kwargs.pop("steps") # How complete we will be at the # end of this step completion = (step + 1) / steps sz_depth = final_depth * completion # Decrease depth offset self.depth_offset = final_depth - sz_depth self._top_depth = sz_depth # Set temperature at the subduction # interface T = royden( (final_distance * completion).into("m"), sz_depth.into("m"), # Depth of interest sz_depth.into("m")) # Depth of subduction interface solver.set_constraints(upper=u(T, "degC")) # Set up finite solving for underplated slab kwargs['step_function'] = on_step i = self.section.profile[-1] solver = FiniteSolver(self.section, constraints=(u(0, 'degC'), i)) underplated = solver.final_section(duration=duration, **kwargs) # Construct the forearc geotherm forearc = Section(continental_crust.to_layer(final_depth)) temperatures = royden(final_distance.into("m"), forearc.cell_centers.into("m"), final_depth.into("m")) forearc.profile = u(temperatures, "degC") self.log( "Temperature at subduction interface " "at the time of underplating", forearc.profile[-1]) self.log("Subduction took", duration.to("Myr")) self.section = stack_sections(forearc, underplated) self.t -= duration self._top_depth = u(0, 'km') self.depth_offset = u(0, 'km') self.record("after-subduction")