MarkerMaterials
The MarkerMaterials module is used to initialize the material model used in the EarthBox simulation.
Material Models
- UniformComposition
- RayleighTaylorInstabilityBenchmark
- ViscousBlockBenchmark
- SandboxShortening
- SandboxExtension
- ElasticSlab
- LithosphericExtensionWeakSeed
- LithosphericExtensionNoSeed
- PlasticityBenchmark
- PlasticityBenchmarkWeakNotchKaus10
- FlexureTriangularHole
- LithosphericExtensionWeakFault
- LithosphericExtensionLateralStrongZones
- LithosphericExtensionMantlePlume
- SeafloorSpreading
- SimplePlume
- FractureZone
- SimpleSediment
- StickyOnMantle
Highlight a material model name in the list above and use Ctl-F + Enter to navigate to a detailed description in the Material Models section below.
Initialization
EarthBox.Markers.MarkerMaterials.initialize! — Function
initialize!(
model::ModelData;
material_model::Union{Int, String, Symbol, Nothing}=nothing,
paths::Union{Dict{String, String}, Nothing}=nothing,
materials_input_dict::Union{MaterialsDictType, Nothing}=nothing,
kwargs...
)::NothingInitialize marker materials.
Arguments
model::ModelData: The model data object containing model parameters and arrays.material_model::Union{Int, String, Symbol, Nothing}: Controls the type of material model used to define material properties for each marker. See the Material Models section below for information on available material models. The material model is stored in the model data container as an integer ID (itype_mat) and a corresponding string name (stype_mat). Ifmaterial_modelis nothing, the current material model defined in the model data container will be used. Material model parameters can be accessed from the model data container as follows:itype_mat = model.materials.parameters.material_description.itype_mat.valuestype_mat = model.materials.parameters.material_description.stype_mat.value
paths::Union{Dict{String, String}, Nothing}: The paths to the materials library and material input files. Dictionary keys and value descriptions are as follows:"materials_library_file": Path to a yaml formatted material collection library file with material properties for each material. The materiallibraryfile path is required. SeeMaterialLibraryfor more information about using material collection packaged with EarthBox. See Material Collection Files for more information about creating a custom material collection file."materials_input_file": Path to a material input file with yaml formatted material input definitions for each material used in the model including material ID, material name from the material library, material type, material domain, and red, green and blue color values. This key is optional. If not provided, thematerials_input_dictmust be provided. See Material Input Files for more information about material input files.
materials_input_dict::Union{MaterialsDictType, Nothing}: The materials input dictionary containing material input definitions for each material used in the model including material ID, material name from the material library, material type, material domain, and red, green and blue color values. This key is optional. If not provided, thematerials_input_filemust be provided. See Material Input Dictionaries for more information about material input dictionaries.
Keyword Arguments
viscosity_min::Float64:- Minimum viscosity
viscosity_max::Float64:- Maximum viscosity
iuse_fluid_pressure_for_yield::Int:- Flag to use fluid pressure for yield stress calculation
plastic_healing_rate::Float64:- Rate of plastic healing in 1/s
Material Models
This section provides a detailed description of each material model available in EarthBox including alternative material_model values that can be used to initialize the material model, a description of the material model, and the required domains and geometries for each material model. For more information about required domains see MaterialDomainsRegistry. See the links for required geometries for more information about setting required geometric parameters for each material model.
If the domain "MantleLithosphere" is defined in the material model then the domains "UpperMantleLithosphere", "MiddleMantleLithosphere" and "LowerMantleLithosphere" will have properties assigned to them automatically from the "MantleLithosphere" domain.
UniformComposition
material_modelvalue:"UniformComposition",:UniformComposition, or 0- Description: Material model type with uniform composition.
- Required Domains: GeneralDomain
- Required Geometries:
- None
RayleighTaylorInstabilityBenchmark
material_modelvalue:"RayleighTaylorInstabilityBenchmark",:RayleighTaylorInstabilityBenchmark, or 1- Description: Material model type for the Rayleigh-Taylor instability benchmark from Ramberg.
- Required Domains: Layer1RayleighTaylor, Layer2RayleighTaylor
- Required Geometries:
ViscousBlockBenchmark
material_modelvalue:"ViscousBlockBenchmark",:ViscousBlockBenchmark, or 2- Description: Material model type for viscous block benchmark.
- Required Domains: GeneralDomain
- Required Geometries:
- None
SandboxShortening
material_modelvalue:"SandboxShortening",:SandboxShortening, or 3- Description: Material model type for sandbox shortening experiments.
- Required Domains: Atmosphere, SandA, SandB, Microbeads, MobileWall
- Required Geometries:
SandboxExtension
material_modelvalue:"SandboxExtension",:SandboxExtension, or 4- Description: Material model type for sandbox extension experiments.
- Required Domains: Atmosphere, SandA, SandB, PDMSLayer, MobileWall, PlateExtension
- Required Geometries:
ElasticSlab
material_modelvalue:"ElasticSlab",:ElasticSlab, or 5- Description: Material model type for elastic slab benchmark. This material involves an elastic slab with a checkerboard structure composed of two material domains called
ElasticSlabAandElasticSlabBsurrounded by two fluid domains calledFluidAroundElasticSlabAandFluidAroundElasticSlabB. Materials A and B have equivalent properties but different colors to visualize the checkerboard structure - Required Domains: FluidAroundElasticSlabA, FluidAroundElasticSlabB, ElasticSlabA, ElasticSlabB
- Required Geometries:
- None
LithosphericExtensionWeakSeed
material_modelvalue:"LithosphericExtensionWeakSeed",:LithosphericExtensionWeakSeed, or 6- Description: Material model type for lithospheric extension similar to Liao et al. (2014)
- Required Domains: Atmosphere, Ocean, UpperContinentalCrust, LowerContinentalCrust, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, Asthenosphere, WeakSeedMantle
- Required Geometries:
LithosphericExtensionNoSeed
material_modelvalue:"LithosphericExtensionNoSeed",:LithosphericExtensionNoSeed, or 7- Description: Material model type for lithospheric extension model similar to Brune et al. (2014).
- Required Domains: Atmosphere, Ocean, UpperContinentalCrust, LowerContinentalCrust, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, Asthenosphere
- Required Geometries:
PlasticityBenchmark
material_modelvalue:"PlasticityBenchmark",:PlasticityBenchmark, or 8- Description: Material model type for plasticity benchmark.
- Required Domains: Atmosphere, UpperContinentalCrust, LowerContinentalCrust, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, Asthenosphere, WeakSeedMantle
- Required Geometries:
- None
PlasticityBenchmarkWeakNotchKaus10
material_modelvalue:"PlasticityBenchmarkWeakNotchKaus10",:PlasticityBenchmarkWeakNotchKaus10, or 9- Description: Material model type for plasticity benchmark of Kaus (2010) with sticky air, crust and weak notch
- Required Domains: Atmosphere, UpperContinentalCrust, LowerContinentalCrust, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, Asthenosphere, WeakSeedMantle
- Required Geometries:
FlexureTriangularHole
material_modelvalue:"FlexureTriangularHole",:FlexureTriangularHole, or 10- Description: Material model type for flexure with a triangular hole benchmark.
- Required Domains: Atmosphere, Ocean, UpperContinentalCrust, LowerContinentalCrust, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, Asthenosphere
- Required Geometries:
LithosphericExtensionWeakFault
material_modelvalue:"LithosphericExtensionWeakFault",:LithosphericExtensionWeakFault, or 11- Description: Material model type for lithospheric extension using a weak fault similar to Davis et al. (2017).
- Required Domains: Atmosphere, Ocean, UpperContinentalCrust, LowerContinentalCrust, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, Asthenosphere, WeakMantleFaultZone, WeakCrustalFaultZone
- Required Geometries:
LithosphericExtensionLateralStrongZones
material_modelvalue:"LithosphericExtensionLateralStrongZones",:LithosphericExtensionLateralStrongZones, or 12- Description: Material model type for lithospheric extension using lateral strong zones similar to (Naliboff et al., 2017).
- Required Domains: Atmosphere, Ocean, UpperContinentalCrust, UpperContinentalCrustStrongZone, LowerContinentalCrust, LowerContinentalCrustStrongZone, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, LithosphericMantleStrongZone, Asthenosphere
- Required Geometries:
LithosphericExtensionMantlePlume
material_modelvalue:"LithosphericExtensionMantlePlume",:LithosphericExtensionMantlePlume, or 13- Description: Material model type for lithospheric extension with mantle plume.
- Required Domains: Atmosphere, Ocean, SedimentaryBasin, UpperContinentalCrust, UpperContinentalCrustStrongZone, LowerContinentalCrust, LowerContinentalCrustStrongZone, UpperMantleLithosphere, MiddleMantleLithosphere, LowerMantleLithosphere, LithosphericMantleStrongZone, Asthenosphere, WeakSeedMantle, MantlePlume
- Required Geometries:
SeafloorSpreading
material_modelvalue:"SeafloorSpreading",:SeafloorSpreading, or 14- Description: Material model type for seafloor spreading benchmark.
- Required Domains: Atmosphere, Ocean, MantleLithosphere, Asthenosphere
- Required Geometries:
SimplePlume
material_modelvalue:"SimplePlume",:SimplePlume, or 15- Description: Material model for a simple plume head.
- Required Domains: Atmosphere, Ocean, Asthenosphere, MantlePlume
- Required Geometries:
FractureZone
material_modelvalue:"FractureZone",:FractureZone, or 16- Description: Material model type for a fracture zone.
- Required Domains: Atmosphere, Ocean, SedimentaryBasin, BasalticOceanicCrust, GabbroicOceanicCrust, MantleLithosphere, WeakMantleLithosphere, Asthenosphere
- Required Geometries:
SimpleSediment
material_modelvalue:"SimpleSediment",:SimpleSediment, or 17- Description: Material model for simple sediment on mantle setup.
- Required Domains: Atmosphere, SedimentaryBasin, Asthenosphere
- Required Geometries:
StickyOnMantle
material_modelvalue:"StickyOnMantle",:StickyOnMantle, or 18- Description: Material model for sticky air/water on mantle.
- Required Domains: Ocean, Asthenosphere
- Required Geometries:
Example
This example illustrates how to initialize marker material definitions for a case using the LithosphericExtensionLateralStrongZones material model with an upper and lower continental crust, layered continental mantle lithosphere, and lateral zones with stronger frictional plastic properties. Note that this material model requires certain material domains and material geometry input parameters. See description provided for LithosphericExtensionLateralStrongZones in the Material Models section of MarkerMaterials.initialize! for more details. Also see Material Domains and Material Types for more information about material domains and types, respectively.
# Copy and paste this code into the Julia REPL.
using EarthBox
using CairoMakie
# Initialize EarthBox including model data container.
eb = EarthBoxState(
xsize=500000.0, ysize=160000.0,
xnum=250, ynum=80,
dx_marker=500.0, dy_marker=500.0);
# Unpack the model data container.
model = eb.model_manager.model;
# Initialize the staggered grid.
StaggeredGrid.initialize!(model, grid_type=:UniformGrid);
# Initialize marker coordinates.
Markers.MarkerCoordinates.initialize!(model, marker_distribution=:Regular);
# Define the material collection with material names and associated properties
collection = MaterialLibrary().lithospheric_deformation.lithospheric_deformation_eb1;
# You can inspect the material collection being used by opening the collection
# file associated with the following path. You can also make a local copy of this
# file and create a custom material collection. For this custom case the you will
# need to update the custom_path variable to your custom location.
collection_path = collection.path
# Unpack material names from the collection, names for material types and names
# for material domains.
mat_names = collection.materials;
types = MaterialTypesRegistry();
domains = MaterialDomainsRegistry();
# Define the material input taking into account the required material domains
# for the LithosphericExtensionLateralStrongZones material model that will be
# initialize during material initialization.
materials_input_dict = MaterialsDictType(
# Sticky Domain
Int16(1) => MaterialDictType(
"mat_name" => mat_names.sticky_air,
"mat_type" => types.sticky_air,
"mat_domain" => domains.atmosphere,
"red_fraction" => 255/255,
"green_fraction" => 255/255,
"blue_fraction" => 255/255,
),
Int16(2) => MaterialDictType(
"mat_name" => mat_names.sticky_water,
"mat_type" => types.sticky_water,
"mat_domain" => domains.ocean,
"red_fraction" => 0/255,
"green_fraction" => 255/255,
"blue_fraction" => 255/255,
),
# Felsic Continental Crust
Int16(3) => MaterialDictType(
"mat_name" => mat_names.felsic_continental_crust,
"mat_type" => types.felsic_continental_crust_fertile,
"mat_domain" => domains.upper_continental_crust,
"red_fraction" => 255/255,
"green_fraction" => 153/255,
"blue_fraction" => 153/255,
),
Int16(4) => MaterialDictType(
"mat_name" => mat_names.felsic_continental_crust_strong_zone,
"mat_type" => types.felsic_continental_crust_fertile,
"mat_domain" => domains.upper_continental_crust_strong_zone,
"red_fraction" => 255/255,
"green_fraction" => 163/255,
"blue_fraction" => 163/255,
),
# Mafic Continental Crust
Int16(5) => MaterialDictType(
"mat_name" => mat_names.mafic_continental_crust,
"mat_type" => types.mafic_continental_crust_fertile,
"mat_domain" => domains.lower_continental_crust,
"red_fraction" => 255/255,
"green_fraction" => 200/255,
"blue_fraction" => 200/255,
),
Int16(6) => MaterialDictType(
"mat_name" => mat_names.mafic_continental_crust_strong_zone,
"mat_type" => types.mafic_continental_crust_fertile,
"mat_domain" => domains.lower_continental_crust_strong_zone,
"red_fraction" => 255/255,
"green_fraction" => 210/255,
"blue_fraction" => 210/255,
),
# Continental Mantle Lithosphere
Int16(7) => MaterialDictType(
"mat_name" => mat_names.ultramafic_continental_lithosphere,
"mat_type" => types.ultramafic_mantle_fertile,
"mat_domain" => domains.upper_mantle_lithosphere,
"red_fraction" => 0.0,
"green_fraction" => 153/255,
"blue_fraction" => 153/255,
),
Int16(8) => MaterialDictType(
"mat_name" => mat_names.ultramafic_continental_lithosphere,
"mat_type" => types.ultramafic_mantle_fertile,
"mat_domain" => domains.middle_mantle_lithosphere,
"red_fraction" => 0.0,
"green_fraction" => 153/255,
"blue_fraction" => (153+25)/255,
),
Int16(9) => MaterialDictType(
"mat_name" => mat_names.ultramafic_continental_lithosphere,
"mat_type" => types.ultramafic_mantle_fertile,
"mat_domain" => domains.lower_mantle_lithosphere,
"red_fraction" => 0.0,
"green_fraction" => 153/255,
"blue_fraction" => 153/255,
),
Int16(10) => MaterialDictType(
"mat_name" => mat_names.ultramafic_continental_lithosphere_strong_zone,
"mat_type" => types.ultramafic_mantle_fertile,
"mat_domain" => domains.lithospheric_mantle_strong_zone,
"red_fraction" => 0.0,
"green_fraction" => 163/255,
"blue_fraction" => 163/255,
),
# Asthenosphere
Int16(11) => MaterialDictType(
"mat_name" => mat_names.ultramafic_asthenosphere_dry_fertile,
"mat_type" => types.ultramafic_mantle_fertile,
"mat_domain" => domains.asthenosphere,
"red_fraction" => 0.0,
"green_fraction" => 200/255,
"blue_fraction" => 153/255,
)
);
# Initialize the required material geometry parameters for the
# LithosphericExtensionLateralStrongZones material model
MaterialGeometry.StickyAirGeometry.initialize!(model, thick_air=10000.0);
MaterialGeometry.EarthLayering.initialize!(
model, thick_lith=125000.0, thick_crust=35000.0, thick_upper_crust=22000.0);
MaterialGeometry.LithoStrongZones.initialize!(
model, iuse_strong_zones=1, x_left_strong=150000.0, x_right_strong=350000.0);
# Initialize the material model
Markers.MarkerMaterials.initialize!(
model,
material_model = material_model_names.LithosphericExtensionLateralStrongZones,
paths = Dict("materials_library_file" => collection_path),
materials_input_dict = materials_input_dict,
viscosity_min = 1e18,
viscosity_max = 1e25
);
# Get the marker arrays for material ID's and x- and y-coordinates and convert
# from meters to kilometers
marker_matid = model.obj_dict["marker_matid"].array;
marker_x_km = model.obj_dict["marker_x"].array./1000.0;
marker_y_km = model.obj_dict["marker_y"].array./1000.0;
# Get size parameters and convert from meters to kilometers
xsize_km = model.obj_dict["xsize"].value/1000.0;
ysize_km = model.obj_dict["ysize"].value/1000.0;
# Decimate the marker arrays for faster plotting
decimation_factor = 2;
indices = 1:decimation_factor:length(marker_matid);
marker_matid = marker_matid[indices];
marker_x_km = marker_x_km[indices];
marker_y_km = marker_y_km[indices];
# Plot using CairoMakie
dpi = 150.0;
fig = Figure(size = (10.0*dpi, 3.0*dpi)); # 10 inches x 3 inches @ 150 dpi
ax = Axis(
fig[1, 1]; limits = (0.0, xsize_km, 0.0, ysize_km), yreversed = true,
xticks = collect(0.0:25.0:xsize_km), yticks = collect(0.0:10.0:ysize_km),
xlabel = "X (km)", ylabel = "Y (km)",
title = "Earth Layering with Lateral Strong Zones",
titlesize = 12, xlabelsize = 12, ylabelsize = 12,
xticklabelsize = 12, yticklabelsize = 12
);
plt = scatter!(
ax, marker_x_km, marker_y_km, color = marker_matid,
colormap = model.materials.colors.color_map,
colorrange = model.materials.colors.colorrange,
marker=:circle, markersize = 4, rasterize = true
);
cb = Colorbar(
fig[1,2], plt; label = "Marker Materials",
ticks = (model.materials.colors.ticks, model.materials.colors.labels),
ticklabelsize = 10
);
fig