Skip to content
Snippets Groups Projects

Feature/constraint analysis workshop updates

Merged Meric Taneri requested to merge feature/constraint_analysis_workshop_updates into develop
3 files
+ 9
32
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -335,17 +335,15 @@ void EnergyBased::assess_constraints(std::vector<double>& W_over_S_data, Mattin
Constraint Case(W_over_S_data, constraint_vector, constraint->name);
this->constraint_list.push_back(Case);
}
else if (constraint->name == "approach_speed")
else if (constraint->name == "landing_field_length")
{
double t_FR = constraint->at("free_roll_time/value");
double k_TD = constraint->at("k_TD/value");
double h_obs = constraint->at("obstacle_height/value");
double M = constraint->at("Mach/value");
double V_app = this->aircraft_xml()->at(
"aircraft_exchange_file/requirements_and_specifications/requirements/top_level_aircraft_requirements/flight_envelope/maximum_approach_speed/value");
double CL_max_L = this->aircraft_xml()->at("aircraft_exchange_file/analysis/aerodynamics/lift_coefficients/C_LmaxLanding/value");
double s_G_L = this->aircraft_xml()->at("aircraft_exchange_file/requirements_and_specifications/requirements/top_level_aircraft_requirements/landing_field_length/value");
double s_A = s_G_L * 0.4; // find a way to get the touchdown speed
double s_A = h_obs / std::tan(3. * std::numbers::pi / 180.);
readPolar landing_config(this->polar(), "landing", "linear", M);
double CD_max_L = landing_config.interpCD(CL_max_L);
double max_landing_weight = this->aircraft_xml()->at("aircraft_exchange_file/analysis/masses_cg_inertia/maximum_landing_mass/mass_properties/mass/value");
@@ -353,21 +351,10 @@ void EnergyBased::assess_constraints(std::vector<double>& W_over_S_data, Mattin
double weight_fraction = max_landing_weight / MTOM;
const auto approach = constraint_analysis_tool.approach_speed(V_app, CL_max_L, weight_fraction, s_A, CD_max_L, h_obs, k_TD, 0.0);
this->upper_boundaries.push_back(approach);
}
else if (constraint->name == "landing_field_length")
{
/* Landing */
double M = constraint->at("Mach/value");
double thrust_lapse = calculate_thrust_lapse(M, 0.0);
double CL_max_L = this->aircraft_xml()->at("aircraft_exchange_file/analysis/aerodynamics/lift_coefficients/C_LmaxLanding/value");
double my_B = this->aircraft_xml()->at("aircraft_exchange_file/requirements_and_specifications/requirements/additional_requirements/landing_gear/braking_coefficient/value");
double s_G_L = 0.6 * this->aircraft_xml()->at("aircraft_exchange_file/requirements_and_specifications/requirements/top_level_aircraft_requirements/landing_field_length/value");
// s_G_L as braking distance = 60% of landing field length
readPolar landing_config(this->polar(), "landing", "linear", M);
double CD_max_L = landing_config.interpCD(CL_max_L);
double max_landing_weight = this->aircraft_xml()->at("aircraft_exchange_file/analysis/masses_cg_inertia/maximum_landing_mass/mass_properties/mass/value");
double MTOM = this->aircraft_xml()->at("aircraft_exchange_file/analysis/masses_cg_inertia/maximum_takeoff_mass/mass_properties/mass/value");
double weight_fraction = max_landing_weight / MTOM;
double s_G_L = 0.6 * this->aircraft_xml()->at("aircraft_exchange_file/requirements_and_specifications/requirements/top_level_aircraft_requirements/landing_field_length/value") - s_A;
const auto constraint_border = constraint_analysis_tool.braking_roll(CD_max_L, CL_max_L, weight_fraction, thrust_lapse, M, 0.0, my_B, s_G_L);
this->upper_boundaries.push_back(constraint_border);
}
Loading