|
| 1 | +/* |
| 2 | + Copyright (C) 2011, 2012 by the authors of the ASPECT code. |
| 3 | +
|
| 4 | + This file is part of ASPECT. |
| 5 | +
|
| 6 | + ASPECT is free software; you can redistribute it and/or modify |
| 7 | + it under the terms of the GNU General Public License as published by |
| 8 | + the Free Software Foundation; either version 2, or (at your option) |
| 9 | + any later version. |
| 10 | +
|
| 11 | + ASPECT is distributed in the hope that it will be useful, |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + GNU General Public License for more details. |
| 15 | +
|
| 16 | + You should have received a copy of the GNU General Public License |
| 17 | + along with ASPECT; see the file doc/COPYING. If not see |
| 18 | + <http://www.gnu.org/licenses/>. |
| 19 | +*/ |
| 20 | + |
| 21 | + |
| 22 | +#ifndef __aspect__initial_conditions_S40RTS_perturbation_h |
| 23 | +#define __aspect__initial_conditions_S40RTS_perturbation_h |
| 24 | + |
| 25 | +#include <aspect/simulator_access.h> |
| 26 | +#include <deal.II/base/std_cxx1x/array.h> |
| 27 | + |
| 28 | +namespace aspect |
| 29 | +{ |
| 30 | + namespace InitialConditions |
| 31 | + { |
| 32 | + using namespace dealii; |
| 33 | + |
| 34 | + namespace internal |
| 35 | + { |
| 36 | + |
| 37 | + class SphericalHarmonicsLookup; |
| 38 | + class SplineDepthsLookup; |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * A class that describes a perturbed initial temperature field for a spherical |
| 43 | + * shell geometry model. The perturbation is based on the S20RTS / S40RTS |
| 44 | + * global shear wave velocity model by Ritsema et al. |
| 45 | + * http://www.earth.lsa.umich.edu/~jritsema/research.html |
| 46 | + * |
| 47 | + * @ingroup InitialConditionsModels |
| 48 | + */ |
| 49 | + |
| 50 | + template <int dim> |
| 51 | + class S40RTSPerturbation : public Interface<dim>, public ::aspect::SimulatorAccess<dim> |
| 52 | + { |
| 53 | + public: |
| 54 | + /** |
| 55 | + * Initialization function. Loads the material data and sets up |
| 56 | + * pointers. |
| 57 | + */ |
| 58 | + void |
| 59 | + initialize (); |
| 60 | + |
| 61 | + /** |
| 62 | + * Return the initial temperature as a function of position. |
| 63 | + */ |
| 64 | + virtual |
| 65 | + double initial_temperature (const Point<dim> &position) const; |
| 66 | + |
| 67 | + /** |
| 68 | + * Declare the parameters this class takes through input files. |
| 69 | + */ |
| 70 | + static |
| 71 | + void |
| 72 | + declare_parameters (ParameterHandler &prm); |
| 73 | + |
| 74 | + /** |
| 75 | + * Read the parameters this class declares from the parameter file. |
| 76 | + */ |
| 77 | + virtual |
| 78 | + void |
| 79 | + parse_parameters (ParameterHandler &prm); |
| 80 | + |
| 81 | + |
| 82 | + private: |
| 83 | + |
| 84 | + /** |
| 85 | + * Returns spherical coordinates of a cartesian position. |
| 86 | + */ |
| 87 | + static std_cxx1x::array<double,dim> |
| 88 | + spherical_surface_coordinates(const dealii::Point<dim,double> &position); |
| 89 | + |
| 90 | + /** |
| 91 | + * File directory and names |
| 92 | + */ |
| 93 | + std::string datadirectory; |
| 94 | + std::string spline_depth_file_name; |
| 95 | + |
| 96 | + /** |
| 97 | + * This parameter allows setting the input file for the shear-wave perturbation. Options so far |
| 98 | + * are S20RTS.sph and S40RTS.sph. For S40RTS there are different versions available that differ |
| 99 | + * by the degree of damping in the seismic inversion. These models could be downloaded and used |
| 100 | + * as well. |
| 101 | + */ |
| 102 | + std::string harmonics_coeffs_file_name; |
| 103 | + |
| 104 | + /** |
| 105 | + * The parameters below describe the perturbation of shear wave velocity into a temperatures perturbation |
| 106 | + * The first parameter is constant so far but could be made depth dependent as constraint |
| 107 | + * by e.g. Forte, A.M. & Woodward, R.L., 1997. Seismic-geodynamic constraints on three- |
| 108 | + * dimensional structure, vertical flow, and heat transfer in the mantle, J. Geophys. Res. |
| 109 | + * 102 (B8), 17,981-17,994. |
| 110 | + */ |
| 111 | + double vs_to_density; |
| 112 | + double thermal_alpha; |
| 113 | + |
| 114 | + /** |
| 115 | + * This parameter allows to set the degree 0 component of the shear wave velocity perturbation to |
| 116 | + * zero, which guarantees that average temperature at a certain depth is the background temperature. |
| 117 | + */ |
| 118 | + bool zero_out_degree_0; |
| 119 | + |
| 120 | + /** |
| 121 | + * This parameter gives the reference temperature, which will be perturbed. In the compressional case |
| 122 | + * the background temperature will be the adiabat. |
| 123 | + */ |
| 124 | + double reference_temperature; |
| 125 | + |
| 126 | + /** |
| 127 | + * Pointer to an object that reads and processes the spherical harmonics |
| 128 | + * coefficients |
| 129 | + */ |
| 130 | + std_cxx1x::shared_ptr<internal::SphericalHarmonicsLookup> spherical_harmonics_lookup; |
| 131 | + |
| 132 | + /** |
| 133 | + * Pointer to an object that reads and processes the depths for the spline |
| 134 | + * knot points. |
| 135 | + */ |
| 136 | + std_cxx1x::shared_ptr<internal::SplineDepthsLookup> spline_depths_lookup; |
| 137 | + |
| 138 | + }; |
| 139 | + |
| 140 | + } |
| 141 | +} |
| 142 | + |
| 143 | +#endif |
0 commit comments