From 6b069acdde80738be45327357770047516edf596 Mon Sep 17 00:00:00 2001 From: Menno Fraters Date: Wed, 27 Oct 2021 15:13:10 -0700 Subject: [PATCH 1/3] Fix mass conservative ridge coordinates which where interally not converted to radians. --- .../subducting_plate_models/temperature/mass_conserving.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/features/subducting_plate_models/temperature/mass_conserving.cc b/source/features/subducting_plate_models/temperature/mass_conserving.cc index e1ddfd065..c6aea25f4 100644 --- a/source/features/subducting_plate_models/temperature/mass_conserving.cc +++ b/source/features/subducting_plate_models/temperature/mass_conserving.cc @@ -173,6 +173,11 @@ namespace WorldBuilder surface_temperature = this->world->surface_temperature; ridge_coordinates = prm.get_vector>("ridge coordinates"); + const double dtr = prm.coordinate_system->natural_coordinate_system() == spherical ? const_pi / 180.0 : 1.0; + for (auto &ridge_coordinate : ridge_coordinates) + { + ridge_coordinate *= dtr; + } } double From 440389582cc4ccb30f5bd3b0e1ec62163a33b2f3 Mon Sep 17 00:00:00 2001 From: Menno Fraters Date: Thu, 28 Oct 2021 18:13:37 -0700 Subject: [PATCH 2/3] Add spherical test for mass conservative slab temperature model. --- ..._slab_mass_conserving_slab_temperature.dat | 32 ++++++++++++++++++ ...l_slab_mass_conserving_slab_temperature.wb | 25 ++++++++++++++ .../screen-output.log | 33 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 tests/app/spherical_slab_mass_conserving_slab_temperature.dat create mode 100644 tests/app/spherical_slab_mass_conserving_slab_temperature.wb create mode 100644 tests/app/spherical_slab_mass_conserving_slab_temperature/screen-output.log diff --git a/tests/app/spherical_slab_mass_conserving_slab_temperature.dat b/tests/app/spherical_slab_mass_conserving_slab_temperature.dat new file mode 100644 index 000000000..9c65dbfd0 --- /dev/null +++ b/tests/app/spherical_slab_mass_conserving_slab_temperature.dat @@ -0,0 +1,32 @@ +6150000 900000 1e6 75565 10 +6100000 900000 1e6 124400 10 +6050000 900000 1e6 173218 10 +6000000 900000 1e6 173218 10 +6100000 950000 1200000 81922 10 +6100000 950000 1200000 178867 10 +5950000 950000 1200000 227304 10 +5900000 950000 1200000 275714 10 +5800000 950000 1200000 372458 10 +5800000 1100000 1200000 346881 10 +5800000 1100000 1300000 326167 10 +5800000 1100000 1400000 303875 10 +6000000 1100000 1400000 112405 10 +6000000 1100000 1300000 134013 10 +6000000 1100000 1200000 154087 10 +6000000 1100000 1100000 172613 10 +6060000 -128000 515000 100000 10 +6060000 -128000 515000 150000 10 +6060000 -128000 515000 200000 10 +6060000 -128000 515000 260000 10 +6060000 -128000 515000 275000 10 +6060000 -128000 515000 280000 10 +6060000 -128000 515000 287809 10 +6060000 -128000 515000 299000 10 +5930600 -388800 533000 300000 10 +5930600 -388800 533000 200000 10 +5930600 -388800 533000 300000 10 +5930600 -388800 533000 350000 10 +5930600 -388800 533000 400000 10 +5930600 -388800 533000 403817 10 +5930600 -388800 533000 405000 10 +5930600 -388800 533000 500000 10 \ No newline at end of file diff --git a/tests/app/spherical_slab_mass_conserving_slab_temperature.wb b/tests/app/spherical_slab_mass_conserving_slab_temperature.wb new file mode 100644 index 000000000..598f1d939 --- /dev/null +++ b/tests/app/spherical_slab_mass_conserving_slab_temperature.wb @@ -0,0 +1,25 @@ +{ + "version":"0.5", + "coordinate system":{"model":"spherical", "depth method":"starting point"}, + "cross section":[[0,0],[1000e3,0]],"surface temperature":273, "force surface temperature":true, + "potential mantle temperature":1673, "thermal expansion coefficient":3.1e-5, + "specific heat":1000, "thermal diffusivity":1.0e-6, + "features": + [ + { "model":"subducting plate", "name":"Slab", "dip point":[-10,10], + "coordinates":[[0,0],[10,10],[25,15],[35,35]], + "segments": + [ + {"length":450e3, "thickness":[100e3], "angle":[20]}, + {"length":450e3, "thickness":[100e3], "angle":[40]} + ], + "temperature models":[{"model":"mass conserving", "density":3300, "thermal conductivity":3.3, + "adiabatic heating":true,"plate velocity":0.125, + "ridge coordinates":[[0,0],[40,40]], + "coupling depth":100e3, "shallow dip":90.0, "taper distance":100e3, + "min distance slab top":-300e3, "max distance slab top":300e3}], + "composition models":[ + {"model":"uniform", "compositions":[0], "max distance slab top":100e3}] + } + ] +} diff --git a/tests/app/spherical_slab_mass_conserving_slab_temperature/screen-output.log b/tests/app/spherical_slab_mass_conserving_slab_temperature/screen-output.log new file mode 100644 index 000000000..6be189a3f --- /dev/null +++ b/tests/app/spherical_slab_mass_conserving_slab_temperature/screen-output.log @@ -0,0 +1,33 @@ +# x y z d g T +6150000 900000 1e6 75565 10 1712.65 +6100000 900000 1e6 124400 10 1738.78 +6050000 900000 1e6 173218 10 1765.29 +6000000 900000 1e6 173218 10 1765.29 +6100000 950000 1200000 81922 10 1625.14 +6100000 950000 1200000 178867 10 1768.39 +5950000 950000 1200000 227304 10 1795.14 +5900000 950000 1200000 275714 10 1822.28 +5800000 950000 1200000 372458 10 1877.76 +5800000 1100000 1200000 346881 10 1862.93 +5800000 1100000 1300000 326167 10 1851.01 +5800000 1100000 1400000 303875 10 1838.26 +6000000 1100000 1400000 112405 10 817.247 +6000000 1100000 1300000 134013 10 1743.96 +6000000 1100000 1200000 154087 10 1754.85 +6000000 1100000 1100000 172613 10 1764.96 +6060000 -128000 515000 100000 10 1725.68 +6060000 -128000 515000 150000 10 1752.63 +6060000 -128000 515000 200000 10 1182.21 +6060000 -128000 515000 260000 10 1811.75 +6060000 -128000 515000 275000 10 1821.71 +6060000 -128000 515000 280000 10 1824.63 +6060000 -128000 515000 287809 10 1829.11 +6060000 -128000 515000 299000 10 1835.48 +5930600 -388800 533000 300000 10 1836.05 +5930600 -388800 533000 200000 10 1780.01 +5930600 -388800 533000 300000 10 1836.05 +5930600 -388800 533000 350000 10 2834 +5930600 -388800 533000 400000 10 1815.6 +5930600 -388800 533000 403817 10 1838.65 +5930600 -388800 533000 405000 10 1844.76 +5930600 -388800 533000 500000 10 1953.49 From 7c84044e4e03fd9627dde612e1eee36d70a1239f Mon Sep 17 00:00:00 2001 From: Menno Fraters Date: Wed, 27 Oct 2021 15:22:41 -0700 Subject: [PATCH 3/3] Make changelog entry. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06f4d2c71..916ea96e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Fixed - Using slabs and faults beyond the -180 to 180 range gave issues. These are now fixed and it now works and is tested for the -380 to 380 range. \[Menno Fraters; 2021-10-22;[#338](https://github.com/GeodynamicWorldBuilder/WorldBuilder/issues/338), [#340](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/340) and [#342](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/342)] +- The ridge coordinates for the mass conservative slab temperature model where not convered to radians interally. \[Menno Fraters; 2021-10-27;[#352](https://github.com/GeodynamicWorldBuilder/WorldBuilder/issues/352)\] ## [0.4.0] - 2021-06-22 ### Added