34 using namespace Utilities;
38 namespace OceanicPlateModels
44 min_depth(NaN::
DSNAN),
45 max_depth(NaN::
DSNAN),
46 top_temperature(NaN::
DSNAN),
47 bottom_temperature(NaN::
DSNAN),
51 this->
name =
"plate model constant age";
63 "Plate model, but with a fixed age.");
67 "The depth in meters from which the temperature of this feature is present.");
70 "The depth in meters to which the temperature of this feature is present.");
73 "The temperature in degree Kelvin which this feature should have");
76 "The temperature in degree Kelvin which this feature should have");
79 "The age of the plate in year. " 80 "This age is assigned to the whole plate. ");
102 const double gravity_norm,
107 if (depth <= max_depth && depth >=
min_depth)
111 if (depth <= max_depth_local && depth >= min_depth_local)
115 if (bottom_temperature_local < 0)
119 this->world->specific_heat) * depth);
121 const int sommation_number = 100;
130 for (
int i = 1; i<sommation_number+1; ++i)
132 temperature = temperature + (bottom_temperature_local -
top_temperature) *
137 WBAssert(!std::isnan(temperature),
"Temperature inside plate model constant age is not a number: " << temperature
138 <<
". Relevant variables: bottom_temperature_local = " << bottom_temperature_local
141 <<
", thermal_diffusivity = " << thermal_diffusivity
143 WBAssert(std::isfinite(temperature),
"Temperature inside plate model constant age is not a finite: " << temperature <<
". Relevant variables: bottom_temperature_local = " << bottom_temperature_local
145 <<
", thermal_diffusivity = " << thermal_diffusivity
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 bottom_temperature
double potential_mantle_temperature
Objects::Surface min_depth_surface
void parse_entries(Parameters &prm, const std::vector< Point< 2 >> &coordinates) override final
Operations string_operations_to_enum(const std::string &operation)
#define WBAssert(condition, message)
#define WB_REGISTER_FEATURE_OCEANIC_PLATE_TEMPERATURE_MODEL(classname, name)
Objects::Surface max_depth_surface
double thermal_diffusivity
WorldBuilder::World * world
Point< 2 > get_surface_point() const
SurfaceValueInfo local_value(const Point< 2 > &check_point) const
double thermal_expansion_coefficient
double apply_operation(const Operations operation, const double old_value, const double new_value)
double sin(const double raw_angle)
~PlateModelConstantAge() override final
void declare_entry(const std::string &name, const Types::Interface &type, const std::string &documentation)
T get(const std::string &name)
static void declare_entries(Parameters &prm, const std::string &parent_name="")