Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spatially variable spreading rates at ridges #617

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Added an option to use the plate model as the reference model for the mass conserving temperature of the slab. \[Haoyuan Li; 2024-02-02; [#471](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/471)\]
- Added a cookbook for making a transform fault and using this model in ASPECT. \[Juliane Dannberg; 2024-02-14; [#563](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/563)\]
- Added a system which allows users to tag features. The tag index can then be written out throught the gwb-dat program. \[Menno Fraters and Timo Heister; 2024-02-15; [[#598](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/598)]\]
- Added variable spreading for mid oceanic ridges. \[Daniel Douglas; 2024-02-16; [#617](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/617)\]

### Changed
- Unified the directories `cookbooks/` and `doc/sphinx/user_manual/cookbooks`. All information about cookbooks including the documentation is now bundled in the top-level `cookbooks/` directory. \[Rene Gassmoeller; 2024-02-14; [#558](github.com/GeodynamicWorldBuilder/WorldBuilder/pull/558)\]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ namespace WorldBuilder
const double feature_min_depth,
const double feature_max_depth) const override final;


private:
// plate model temperature submodule parameters
double min_depth;
Expand All @@ -90,8 +89,9 @@ namespace WorldBuilder
Objects::Surface max_depth_surface;
double top_temperature;
double bottom_temperature;
double spreading_velocity;
std::pair<std::vector<double>,std::vector<double>> spreading_velocities;
std::vector<std::vector<Point<2> > > mid_oceanic_ridges;
std::vector<std::vector<double>> spreading_velocities_at_each_ridge_point;
Operations operation;

};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ namespace WorldBuilder
Objects::Surface max_depth_surface;
double top_temperature;
double bottom_temperature;
double spreading_velocity;
std::pair<std::vector<double>,std::vector<double>> spreading_velocities;
std::vector<std::vector<Point<2> > > mid_oceanic_ridges;
std::vector<std::vector<double>> spreading_velocities_at_each_ridge_point;
Operations operation;

};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace WorldBuilder
const double min_temperature,
const double background_temperature,
const double temperature_,
const double plate_velocity,
const double effective_plate_age,
const double adjusted_distance) const;

Expand All @@ -109,7 +110,8 @@ namespace WorldBuilder
double min_depth;
double max_depth;
double density;
double plate_velocity;
std::pair<std::vector<double>,std::vector<double>> plate_velocities;
std::vector<std::vector<double>> plate_velocities_at_each_ridge_point;
double mantle_coupling_depth;
double forearc_cooling_factor;
double thermal_conductivity;
Expand Down
8 changes: 7 additions & 1 deletion include/world_builder/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ namespace WorldBuilder
const std::vector<Point<2> > &addition_points = {});

/**
* A specialized version of get which can return vectors/arrays.
* A specialized version of get which can return a values at times type.
* \param name The name of the entry to retrieved
*/
std::pair<std::vector<double>,std::vector<double>> get_value_at_array(const std::string &name);

/**
* A specialized verions of get which can return vectors/arrays.
* This version is designed for the plugin system.
* \param name The name of the entry to retrieved
*/
Expand Down
2 changes: 2 additions & 0 deletions include/world_builder/types/value_at_points.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ namespace WorldBuilder
* A constructor
*/
ValueAtPoints(const double default_value,
size_t max_values_in_array,
std::vector<Point<2>> default_points_ = std::vector<Point<2>>());

/**
Expand All @@ -61,6 +62,7 @@ namespace WorldBuilder
const std::string &documentation) const override final;

double default_value;
double max_values_in_array;
std::vector<Point<2> > default_points;

protected:
Expand Down
3 changes: 2 additions & 1 deletion include/world_builder/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,10 @@ namespace WorldBuilder
*/
std::pair<double, double>
calculate_ridge_distance_and_spreading(std::vector<std::vector<Point<2>>> mid_oceanic_ridges,
const double spreading_velocity,
std::vector<std::vector<double>> mid_oceanic_spreading_velocities,
const std::unique_ptr<WorldBuilder::CoordinateSystems::Interface> &coordinate_system,
const Objects::NaturalCoordinate &position_in_natural_coordinates_at_min_depth);

} // namespace Utilities
} // namespace WorldBuilder

Expand Down
4 changes: 2 additions & 2 deletions source/world_builder/features/continental_plate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ namespace WorldBuilder
{
prm.declare_entry("", Types::Object(required_entries), "Continental plate object. Requires properties `model` and `coordinates`.");

prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth from which this feature is present");
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth to which this feature is present");
prm.declare_entry("temperature models",
Types::PluginSystem("", Features::ContinentalPlateModels::Temperature::Interface::declare_entries, {"model"}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ namespace WorldBuilder
"Uniform compositional model. Sets constant compositional field.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("compositions", Types::Array(Types::UnsignedInt(),0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ namespace WorldBuilder
"to a single value or to a random distribution.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("compositions", Types::Array(Types::UnsignedInt(),0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ namespace WorldBuilder
"Uniform grains model. All grains start exactly the same.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("compositions", Types::Array(Types::UnsignedInt(),0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ namespace WorldBuilder
"Adiabatic temperature model. Uses global values by default.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("potential mantle temperature", Types::Double(-1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ namespace WorldBuilder
"Linear temperature model. Can be set to use an adiabatic temperature at the boundaries.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("top temperature", Types::Double(293.15),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ namespace WorldBuilder
"Uniform temperature model. Set the temperature to a constan value.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("temperature", Types::Double(293.15),
Expand Down
4 changes: 2 additions & 2 deletions source/world_builder/features/mantle_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ namespace WorldBuilder
{
prm.declare_entry("", Types::Object(required_entries), "Mantle layer object. Requires properties `model` and `coordinates`.");

prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth from which this feature is present");
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth to which this feature is present");
prm.declare_entry("temperature models",
Types::PluginSystem("", Features::MantleLayerModels::Temperature::Interface::declare_entries, {"model"}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ namespace WorldBuilder
"Uniform compositional model. Sets constant compositional field.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");
prm.declare_entry("compositions", Types::Array(Types::UnsignedInt(),0),
"A list with the labels of the composition which are present there.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ namespace WorldBuilder
"to a single value or to a random distribution.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("compositions", Types::Array(Types::UnsignedInt(),0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ namespace WorldBuilder
"Uniform grains model. All grains start exactly the same.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the composition of this feature is present.");
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the composition of this feature is present.");

prm.declare_entry("compositions", Types::Array(Types::UnsignedInt(),0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ namespace WorldBuilder
"Adiabatic temperature model. Uses global values by default.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the temperature of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the temperature of this feature is present.");

prm.declare_entry("potential mantle temperature", Types::Double(-1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ namespace WorldBuilder
"Linear temperature model. Can be set to use an adiabatic temperature at the boundaries.");

// Declare entries of this plugin
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0.))),
prm.declare_entry("min depth", Types::OneOf(Types::Double(0),Types::Array(Types::ValueAtPoints(0., 2.))),
"The depth in meters from which the temperature of this feature is present.");

prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max()))),
prm.declare_entry("max depth", Types::OneOf(Types::Double(std::numeric_limits<double>::max()),Types::Array(Types::ValueAtPoints(std::numeric_limits<double>::max(), 2.))),
"The depth in meters to which the temperature of this feature is present.");

prm.declare_entry("top temperature", Types::Double(293.15),
Expand Down
Loading
Loading