32 using namespace Utilities;
36 namespace SubductingPlateModels
42 min_depth(NaN::
DSNAN),
43 max_depth(NaN::
DSNAN),
44 top_temperature(NaN::
DSNAN),
45 bottom_temperature(NaN::
DSNAN),
49 this->
name =
"linear";
61 "Linear temperature model. Can be set to use an adiabatic temperature at the boundaries.");
65 "todo The depth in meters from which the composition of this feature is present.");
68 "todo The depth in meters to which the composition of this feature is present.");
71 "The temperature at the top in degree Kelvin of this feature." 72 "If the value is below zero, the an adiabatic temperature is used.");
75 "The temperature at the bottom in degree Kelvin of this feature. " 76 "If the value is below zero, an adiabatic temperature is used.");
84 WBAssert(max_depth >=
min_depth,
"max depth needs to be larger or equal to min depth.");
94 const double gravity_norm,
103 const double min_depth_local =
min_depth;
104 const double max_depth_local =
max_depth;
108 if (top_temperature_local < 0)
112 this->world->specific_heat) * min_depth_local);
116 if (bottom_temperature_local < 0)
120 this->world->specific_heat) * max_depth_local);
123 const double new_temperature = top_temperature_local +
125 ((bottom_temperature_local - top_temperature_local) / (max_depth_local - min_depth_local));
WorldBuilder::World * world
double potential_mantle_temperature
double bottom_temperature
double get_temperature(const Point< 3 > &position, const double depth, const double gravity, double temperature, const double feature_min_depth, const double feature_max_depth, const WorldBuilder::Utilities::PointDistanceFromCurvedPlanes &distance_from_planes, const AdditionalParameters &additional_parameters) const override final
Operations string_operations_to_enum(const std::string &operation)
static void declare_entries(Parameters &prm, const std::string &parent_name="")
#define WBAssert(condition, message)
double distance_from_plane
#define WB_REGISTER_FEATURE_SUBDUCTING_PLATE_TEMPERATURE_MODEL(classname, name)
double thermal_expansion_coefficient
void parse_entries(Parameters &prm) override final
double apply_operation(const Operations operation, const double old_value, const double new_value)
void declare_entry(const std::string &name, const Types::Interface &type, const std::string &documentation)
T get(const std::string &name)