Skip to content

Commit c6f326e

Browse files
committed
Remove unused variable in chapman.cc
1 parent ac920d5 commit c6f326e

File tree

1 file changed

+9
-7
lines changed
  • source/world_builder/features/continental_plate_models/temperature

1 file changed

+9
-7
lines changed

source/world_builder/features/continental_plate_models/temperature/chapman.cc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace WorldBuilder
110110
const double gravity_norm,
111111
double temperature_,
112112
const double feature_min_depth,
113-
const double feature_max_depth) const
113+
const double /*feature_max_depth*/) const
114114
{
115115
if (depth <= max_depth && depth >= min_depth)
116116
{
@@ -119,7 +119,6 @@ namespace WorldBuilder
119119
if (depth <= max_depth_local && depth >= min_depth_local)
120120
{
121121
const double min_depth_local_local = std::max(feature_min_depth, min_depth_local);
122-
const double max_depth_local_local = std::min(feature_max_depth, max_depth_local);
123122

124123
double top_temperature_local = top_temperature;
125124

@@ -130,18 +129,21 @@ namespace WorldBuilder
130129
std::exp(((this->world->thermal_expansion_coefficient * gravity_norm) /
131130
this->world->specific_heat) * min_depth_local_local);
132131
}
133-
132+
133+
// calculate the temperature at depth z using steady-state 1-D heat conduction equation:
134134
// T(z) = t_top + (q_top / k) * (Δz) - (A / (2 * k)) * (Δz)^2
135135
const double new_temperature = top_temperature + (top_heat_flux / thermal_conductivity) * (depth-min_depth_local_local) - heat_production_per_unit_volume / (2. * thermal_conductivity) * (depth-min_depth_local_local)*(depth-min_depth_local_local);
136136

137137
WBAssert(!std::isnan(new_temperature), "Temperature is not a number: " << new_temperature
138138
<< ", based on a temperature model with the name " << this->name);
139139
WBAssert(std::isfinite(new_temperature), "Temperature is not a finite: " << new_temperature
140140
<< ", based on a temperature model with the name " << this->name
141-
<< ", top_temperature_local = " << top_temperature_local << ", depth = " << depth << ", min_depth_local = " << min_depth_local
142-
<< ", top_heat_flux = " << top_heat_flux << ", thermal_conductivity=" << thermal_conductivity
143-
<< ",max_depth_local_local=" << max_depth_local_local << ", min_depth_local_local =" << min_depth_local_local
144-
<< ", feature_max_depth = " << feature_max_depth << ", feature_max_depth = " << feature_max_depth);
141+
<< ", top_temperature_local = " << top_temperature_local
142+
<< ", depth = " << depth
143+
<< ", min_depth_local = " << min_depth_local
144+
<< ", top_heat_flux = " << top_heat_flux
145+
<< ", thermal_conductivity=" << thermal_conductivity
146+
<< ", min_depth_local_local =" << min_depth_local_local);
145147

146148
return apply_operation(operation,temperature_,new_temperature);
147149
}

0 commit comments

Comments
 (0)