diff --git a/systems_design/CMakeLists.txt b/systems_design/CMakeLists.txt index 9dff873871c8a00d2f07fd12e3204c60e1d0dd87..226e80779b18710ed25176e6a31215ed96ea7a08 100644 --- a/systems_design/CMakeLists.txt +++ b/systems_design/CMakeLists.txt @@ -40,7 +40,6 @@ set(MODULE_SOURCES src/common/aircraftSystems/conventionalATA30.cpp src/common/aircraftSystems/conventionalATA32.cpp src/common/aircraftSystems/conventionalATA33.cpp - src/common/aircraftSystems/conventionalATA35.cpp src/common/aircraftSystems/conventionalATA36.cpp src/common/aircraftSystems/conventionalATA49.cpp src/common/aircraftSystems/conventionalATA70.cpp diff --git a/systems_design/src/common/aircraftSystems/conventionalATA35.cpp b/systems_design/src/common/aircraftSystems/conventionalATA35.cpp deleted file mode 100644 index 2c274738984656fb256608d187cdf1ef4885fca7..0000000000000000000000000000000000000000 --- a/systems_design/src/common/aircraftSystems/conventionalATA35.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * UNICADO - UNIversity Conceptual Aircraft Design and Optimization - * - * Copyright (C) 2025 UNICADO consortium - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * Description: - * This file is part of UNICADO. - */ - -#include "conventionalATA35.h" - -#include <runtimeInfo/runtimeInfo.h> - -conventionalATA35::conventionalATA35(const std::string& systemName, bool systemIsOperating, std::shared_ptr<systemsIOData> data, const RuntimeIO& rtIO) - : - aircraftSystem(systemName, systemIsOperating, data, rtIO) { - ATA = "ATA-35"; - myRuntimeInfo->out << " Create: " << Name << " -> " << ATA << std::endl; - //ctor -} - -conventionalATA35::~conventionalATA35() { - //dtor -} - -/* Reading system specific parameters of configuration xml file */ -void conventionalATA35::readParameters(const node& config) { - scaling_factor = EndnodeReadOnly<double>("/module_configuration_file/program_settings/scaling_factors/oxygen_system").read(config).value(); -} - -/* Updating system specific parameters in aircraft xml file */ -void conventionalATA35::updateXML() { - updateMass("oxygen_system", Mass, ATA); -} - -void conventionalATA35::calculateSystemsPower(const powerProfile& allPreviousSystemsBleed, - const std::vector<powerProfile>& allPreviousSystemsHydraulic, - const std::vector<powerProfile>& allPreviousSystemsElectric, - const powerProfile& allPreviousSystemsHeat) { - /* Define unused function parameters to avoid linter warnings */ - UNUSED(allPreviousSystemsBleed); - UNUSED(allPreviousSystemsHydraulic); - UNUSED(allPreviousSystemsElectric); - UNUSED(allPreviousSystemsHeat); - /* Calculate Systems Power */ - initializePowerProfile(); - if (Operating == true) { - getPower(); - } - calculateMaxMissionPower(); -} -void conventionalATA35::calculateSinkMass(const powerProfile& sourceBleed, - const std::vector<powerProfile>& sourceElectric, - const std::vector<powerProfile>& sourceHydraulic) { - /* Define unused function parameters to avoid linter warnings */ - UNUSED(sourceBleed); - UNUSED(sourceElectric); - UNUSED(sourceHydraulic); - /* Calculate Systems Mass */ - Mass = scaling_factor * getMass(); - refPoint = getRefPoint(); -} -void conventionalATA35::getPower() { - /*Loop over hydraulic circuits*/ - for (size_t n(0); n < Hydraulic.size(); n++) { - Hydraulic.at(n).designPower = 0.0; - } - for (size_t n(0); n < Electric.size(); n++) { - Electric.at(n).designPower = 0.0; - } - bleedAir.designPower = 0.0; - for (size_t i = 0; i < data_->mission.Steps.size(); i++) { - bleedAir.missionPower.at(i).baseLoad = 0.0; - heatLoad.missionPower.at(i).baseLoad = 0.0; - for (size_t n(0); n < Electric.size(); n++) { - Electric.at(n).missionPower.at(i).baseLoad = 0.0; - } - /*Loop over hydraulic circuits*/ - for (size_t n(0); n < Hydraulic.size(); n++) { - Hydraulic.at(n).missionPower.at(i).baseLoad = 0.0; - } - } -} - -double conventionalATA35::getMass() { - int PAX = data_->data.Accommodation.PAX; - int flightCrew = data_->data.Accommodation.flightCrew; - int cabinCrew = data_->data.Accommodation.cabinCrew; - int nrPAX = PAX + flightCrew + cabinCrew; - std::vector<double> m_ATA35; - /* [Ros89] (Toreenbeek Method) **/ - if (data_->data.Performance.designRange < 6000. * 1000.) { //[m] - m_ATA35.push_back(13.6 + 0.544 * nrPAX); - } else { - m_ATA35.push_back(18.1 + 1.09 * nrPAX); - } -// /** [Ros89] (GD Method): m_ATA35 = 7 * (PAX+Crew)^0.702 (lb)**/ -// m_ATA35.push_back( 7. * pow(nrPAX, 0.702) ); -// m_ATA35.back() = m_ATA35.back() * 0.4535924; //lb -> kg - double massATA35(0.); - for (size_t i = 0; i < m_ATA35.size(); i++) { - massATA35 += m_ATA35.at(i); - } - massATA35 = massATA35 / static_cast<int>(m_ATA35.size()); - return massATA35; -} - -Vec3 conventionalATA35::getRefPoint() { - /* Assumption: center of gravity at 45% fuselage length **/ - double fuselage_length = geom2::measure::length(data_->theFuselage.back()); - return Vec3(data_->theFuselage.back().origin[0] + 0.45 * fuselage_length, data_->theFuselage.back().origin[1], data_->theFuselage.back().origin[2]); -} diff --git a/systems_design/src/common/aircraftSystems/conventionalATA35.h b/systems_design/src/common/aircraftSystems/conventionalATA35.h deleted file mode 100644 index 0ad7a1e305ca0b20fe8de576708fc4ed7f7aa1ab..0000000000000000000000000000000000000000 --- a/systems_design/src/common/aircraftSystems/conventionalATA35.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * UNICADO - UNIversity Conceptual Aircraft Design and Optimization - * - * Copyright (C) 2025 UNICADO consortium - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * Description: - * This file is part of UNICADO. - */ - -#ifndef SYSTEMS_DESIGN_SRC_COMMON_AIRCRAFTSYSTEMS_CONVENTIONALATA35_H_ -#define SYSTEMS_DESIGN_SRC_COMMON_AIRCRAFTSYSTEMS_CONVENTIONALATA35_H_ - -/* The following statements import necessary libraries */ -#include <string> // Import c++ standard library for using string -#include <vector> // Import c++ standard library for using vector -#include <memory> // Import c++ standard library for using memory - -/* The following statements import necessary header files */ -#include <svl/SVL.h> // Import of header file from src folder for SVL -#include "../aircraftSystem.h" // Import of header file from src folder for aircraft system -#include "../powerProfile.h" // Import of header file from src folder for power profile -#include "../systemsIOData.h" // Import of header file from systemsIOData for accessing data_. Can't be included in - // aircraftSystem.h because that would lead to circular dependencies - -/** \class conventionalATA35 - * \brief class that contains all properties of the oxygen system (ATA35) - */ -class conventionalATA35: public aircraftSystem { - public: - /** - * \brief function for reading the system specific parameters from the config - * - * \param config const node&: systemsDesign configuration file - */ - void readParameters(const node& config) override; - /** - * \brief function for updating the system specific values in the aircraft xml - */ - void updateXML() override; - void calculateSystemsPower(const powerProfile& allPreviousSystemsBleed, - const std::vector<powerProfile>& allPreviousSystemsHydraulic, - const std::vector<powerProfile>& allPreviousSystemsElectric, - const powerProfile& allPreviousSystemsHeat) override; - void calculateSinkMass(const powerProfile& sourceBleed, - const std::vector<powerProfile>& sourceElectric, - const std::vector<powerProfile>& sourceHydraulic) override; - - /** \brief calculates the power demand of the oxygen system (ATA35) - * \return void - */ - void getPower(); - - /** \brief calculates the mass of the oxygen system (ATA35) - * \return double massATA35: mass of the oxygen system[kg] - */ - double getMass(); - - /** \brief calculates the reference point of the oxygen system (ATA35) - */ - Vec3 getRefPoint(); - - /** \brief Constructor - * \param systemName string - * \param systemIsOperating bool: switch whether system is operating (1) or not(0) - * \param theSettings const systemsDesignSettings& - * \param myAircraft aircraft - */ - conventionalATA35(const std::string& systemName, bool systemIsOperating, std::shared_ptr<systemsIOData> data, const RuntimeIO& rtIO); - virtual ~conventionalATA35(); -}; - -#endif // SYSTEMS_DESIGN_SRC_COMMON_AIRCRAFTSYSTEMS_CONVENTIONALATA35_H_ diff --git a/systems_design/src/standard/standardReport.cpp b/systems_design/src/standard/standardReport.cpp index 916183ba71174a9fa1fce467155b5a832a0200d5..ae31738bd2da98c191e391a1953125f3abd99ee4 100644 --- a/systems_design/src/standard/standardReport.cpp +++ b/systems_design/src/standard/standardReport.cpp @@ -130,12 +130,6 @@ void standardSystemsDesign::setHtmlBody() { << "</tr>" << std::endl << "<tr>" << std::endl; } - if (data_->Systems.systemExists("ATA-35")) { - report_.htmlReportStream() << std::setprecision(4) << "<td>ATA-35</td><td>Oxygen</td><td>" << - data_->Systems.allSystems.at(data_->Systems.getSpecificSystem("ATA-35"))->Mass << " kg</td>" << std::endl - << "</tr>" << std::endl - << "<tr>" << std::endl; - } if (data_->Systems.systemExists("ATA-38")) { report_.htmlReportStream() << std::setprecision(4) << "<td>ATA-38</td><td>Water & Waste</td><td>" << data_->Systems.allSystems.at(data_->Systems.getSpecificSystem("ATA-38"))->Mass << " kg</td>" << std::endl @@ -247,8 +241,6 @@ void standardSystemsDesign::setTexBody() { << "& $\\kilogram$ \\\\" << std::endl << " Lighting & ATA-33 & " << Rounding(data_->Systems.allSystems.at(data_->Systems.getSpecificSystem("ATA-33"))->Mass, 0) << "& $\\kilogram$ \\\\" << std::endl - << " Oxygen & ATA-35 & " << Rounding(data_->Systems.allSystems.at(data_->Systems.getSpecificSystem("ATA-35"))->Mass, 0) - << "& $\\kilogram$ \\\\" << std::endl << " Bleed Air & ATA-36 & " << Rounding(data_->Systems.allSystems.at(data_->Systems.getSpecificSystem("ATA-36"))->Mass, 0) << "& $\\kilogram$ \\\\" << std::endl << " Auxiliary Power Unit (APU) & ATA-49 & " diff --git a/systems_design/src/standard/standardSystemsDesign.cpp b/systems_design/src/standard/standardSystemsDesign.cpp index 15f226a3e3b9284a75e23095a5c22b466ecb3061..91ed3498ed6aa20437b8c141ce5c0ef2ea0e5081 100644 --- a/systems_design/src/standard/standardSystemsDesign.cpp +++ b/systems_design/src/standard/standardSystemsDesign.cpp @@ -42,7 +42,6 @@ #include "../common/aircraftSystems/electricATA30.h" #include "../common/aircraftSystems/conventionalATA32.h" #include "../common/aircraftSystems/conventionalATA33.h" -#include "../common/aircraftSystems/conventionalATA35.h" #include "../common/aircraftSystems/conventionalATA36.h" #include "../common/aircraftSystems/conventionalATA49.h" #include "../common/aircraftSystems/conventionalATA70.h" @@ -174,9 +173,6 @@ void standardSystemsDesign::initializeSystems() { } else if (data_->configuration.Sinks.at(i).systemName == "conventionalLighting") { //ATA-33 data_->Systems.energySink.push_back( new conventionalATA33(data_->configuration.Sinks.at(i).systemName, data_->configuration.Sinks.at(i).systemOperating, data_, *rtIO_)); - } else if (data_->configuration.Sinks.at(i).systemName == "conventionalOxygenSystem") { // ATA-35 - data_->Systems.energySink.push_back( - new conventionalATA35(data_->configuration.Sinks.at(i).systemName, data_->configuration.Sinks.at(i).systemOperating, data_, *rtIO_)); } else if (data_->configuration.Sinks.at(i).systemName == "electricIceRainProtection") { //ATA-30 data_->Systems.energySink.push_back( new electricATA30(data_->configuration.Sinks.at(i).systemName, data_->configuration.Sinks.at(i).systemOperating, data_, *rtIO_)); diff --git a/systems_design/systems_design_conf.xml b/systems_design/systems_design_conf.xml index d1a942dd840d560689845cb93afe84089ee40483..4c64428c887aba0ed1d52e2b06f11971f87715a1 100644 --- a/systems_design/systems_design_conf.xml +++ b/systems_design/systems_design_conf.xml @@ -112,13 +112,6 @@ <upper_boundary>inf</upper_boundary> <default>1</default> </lighting_system> - <oxygen_system description="Scaling factor for the oxygen system."> - <value>1</value> - <unit>1</unit> - <lower_boundary>0</lower_boundary> - <upper_boundary>inf</upper_boundary> - <default>1</default> - </oxygen_system> <bleed_air_system description="Scaling factor for the bleed air system."> <value>1</value> <unit>1</unit> @@ -159,7 +152,7 @@ <aircraft_systems> <energy_sinks> <number_of_sinks description="Number of energy sinks"> - <value>9</value> + <value>8</value> <default>20</default> </number_of_sinks> <system ID="0"> @@ -208,15 +201,6 @@ </operating_switch> </system> <system ID="5"> - <system_description description="Type of oxygen system"> - <value>conventionalOxygenSystem</value> - </system_description> - <operating_switch description="Switch whether the system is operated. Switch: true (on) / false (off, mass is determined anyway!)"> - <value>true</value> - <default>true</default> - </operating_switch> - </system> - <system ID="6"> <system_description description="Type of gear system"> <value>conventionalGear</value> </system_description> @@ -225,7 +209,7 @@ <default>true</default> </operating_switch> </system> - <system ID="7"> + <system ID="6"> <system_description description="Type of flight control system"> <value>conventionalFlightControl</value> </system_description> @@ -234,7 +218,7 @@ <default>true</default> </operating_switch> </system> - <system ID="8"> + <system ID="7"> <system_description description="remaining consumer system"> <value>remainingConsumers</value> </system_description>