33 using namespace Utilities;
37 namespace OceanicPlateModels
43 min_depth(NaN::
DSNAN),
44 max_depth(NaN::
DSNAN),
45 top_temperature(NaN::
DSNAN),
46 bottom_temperature(NaN::
DSNAN),
50 this->
name =
"linear";
62 "Linear temperature model. Can be set to use an adiabatic temperature at the boundaries.");
66 "The depth in meters from which the temperature of this feature is present.");
69 "The depth in meters to which the temperature of this feature is present.");
72 "The temperature at the top in degree Kelvin of this feature." 73 "If the value is below zero, the an adiabatic temperature is used.");
76 "The temperature at the top in degree Kelvin of this feature. " 77 "If the value is below zero, an adiabatic temperature is used.");
87 WBAssert(max_depth >= min_depth,
"max depth needs to be larger or equal to min depth.");
98 const double gravity_norm,
100 const double feature_min_depth,
101 const double feature_max_depth)
const 103 if (depth <= max_depth && depth >=
min_depth)
107 if (depth <= max_depth_local && depth >= min_depth_local)
109 const double min_depth_local_local = std::max(feature_min_depth, min_depth_local);
110 const double max_depth_local_local = std::min(feature_max_depth, max_depth_local);
113 if (top_temperature_local < 0)
117 this->world->specific_heat) * min_depth_local_local);
121 if (bottom_temperature_local < 0)
125 this->world->specific_heat) * max_depth_local_local);
128 const double new_temperature = top_temperature_local + (max_depth_local_local - min_depth_local_local < 10.0*std::numeric_limits<double>::epsilon() ? 0.0 :
129 (depth - min_depth_local_local) *
130 ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local)));
Objects::Surface max_depth_surface
double potential_mantle_temperature
double bottom_temperature
static void declare_entries(Parameters &prm, const std::string &parent_name="")
Operations string_operations_to_enum(const std::string &operation)
#define WBAssert(condition, message)
#define WB_REGISTER_FEATURE_OCEANIC_PLATE_TEMPERATURE_MODEL(classname, name)
WorldBuilder::World * world
void parse_entries(Parameters &prm, const std::vector< Point< 2 >> &coordinates) override final
Point< 2 > get_surface_point() const
Objects::Surface min_depth_surface
SurfaceValueInfo local_value(const Point< 2 > &check_point) const
double get_temperature(const Point< 3 > &position, const Objects::NaturalCoordinate &position_in_natural_coordinates, const double depth, const double gravity, double temperature, const double feature_min_depth, const double feature_max_depth) const override final
double thermal_expansion_coefficient
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)