Skip to content

Commit

Permalink
Merge pull request #352 from MFraters/fix_max_conservative_ridge_deg_…
Browse files Browse the repository at this point in the history
…to_rad

Fix mass conservative ridge coordinates which where interally not converted to radians.
  • Loading branch information
MFraters authored Oct 29, 2021
2 parents e73f0e0 + 7c84044 commit cef2812
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ namespace WorldBuilder
surface_temperature = this->world->surface_temperature;

ridge_coordinates = prm.get_vector<Point<2>>("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
Expand Down
32 changes: 32 additions & 0 deletions tests/app/spherical_slab_mass_conserving_slab_temperature.dat
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions tests/app/spherical_slab_mass_conserving_slab_temperature.wb
Original file line number Diff line number Diff line change
@@ -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}]
}
]
}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cef2812

Please sign in to comment.