From 7808cff691c9020872922e6d19a96a35de7fded0 Mon Sep 17 00:00:00 2001 From: BA Kayra <kayra.yazici@rwth-aachen.de> Date: Sat, 22 Mar 2025 19:01:03 +0100 Subject: [PATCH] some changes and corrections --- .../src/methods/liftingLineForTandem.cpp | 28 +++---- .../src/methods/liftingLineForTandem.h | 4 +- .../src/methods/tandemHighLiftAdaption.cpp | 8 +- .../src/methods/tandemHighLiftAdaption.h | 2 +- .../src/tandem/tandemCalculatePolarConfig.cpp | 2 +- .../src/tandem/tandemDefaultStrategy.cpp | 78 +++++++++---------- .../src/tandem/tandemDefaultStrategy.h | 8 +- 7 files changed, 65 insertions(+), 65 deletions(-) diff --git a/aerodynamic_analysis/src/methods/liftingLineForTandem.cpp b/aerodynamic_analysis/src/methods/liftingLineForTandem.cpp index 65378f03..84b60e65 100644 --- a/aerodynamic_analysis/src/methods/liftingLineForTandem.cpp +++ b/aerodynamic_analysis/src/methods/liftingLineForTandem.cpp @@ -61,22 +61,21 @@ LiLiforTandemInitialization::LiLiforTandemInitialization() } liftingLineForTandem::liftingLineForTandem(const std::shared_ptr<RuntimeIO>& rtIO, const std::string& liftingLinePath, - const LiLiforTandemInitialization& LiLiPolarInit) + const LiLiforTandemInitialization& LiLiInit) : - stepWidthCL(LiLiPolarInit.stepWidthCL), - initialMachCruise(LiLiPolarInit.initialMachCruise), - cruiseMachID(LiLiPolarInit.cruiseMachID), + stepWidthCL(LiLiInit.stepWidthCL), + initialMachCruise(LiLiInit.initialMachCruise), + cruiseMachID(LiLiInit.cruiseMachID), designCL(0.2), - bestCruiseCL(LiLiPolarInit.bestCruiseCL), - CLModeAirfoilSelection(LiLiPolarInit.CLModeAirfoilSelection), - indDragCtCorrForCalibration(LiLiPolarInit.indDragCtCorrForCalibration), - factorDragCleanPolar(LiLiPolarInit.factorDragCleanPolar), - liftingSurfaces(LiLiPolarInit.liftingSurfaces), - flightConditions(LiLiPolarInit.flightConditions), + bestCruiseCL(LiLiInit.bestCruiseCL), + CLModeAirfoilSelection(LiLiInit.CLModeAirfoilSelection), + indDragCtCorrForCalibration(LiLiInit.indDragCtCorrForCalibration), + factorDragCleanPolar(LiLiInit.factorDragCleanPolar), + liftingSurfaces(LiLiInit.liftingSurfaces), + flightConditions(LiLiInit.flightConditions), rtIO_(rtIO), - delta_CM0(LiLiPolarInit.delta_CM0), - delta_dCMdCL(LiLiPolarInit.delta_dCMdCL), - currentIStabSetting(0.), + delta_CM0(LiLiInit.delta_CM0), + delta_dCMdCL(LiLiInit.delta_dCMdCL), myLiftingLine(liftingLineInterface(liftingLinePath, rtIO->acxml.getName())), myLiftingLine_compr(liftingLineInterface(liftingLinePath, rtIO->acxml.getName())) { wingDesignPoint = new LiftDistributionPolarPoint(); @@ -85,6 +84,7 @@ liftingLineForTandem::liftingLineForTandem(const std::shared_ptr<RuntimeIO>& rtI IOFilePath = rtIO_->acxml.getName(); config = rtIO_->aircraft_configuration_type(); airfoilPath = rtIO_->getAirfoilDataDir(); + currentBackWingAngle = convertUnit(RADIAN, DEGREE, liftingSurfaces.back().sections.front().get_twist_angle()); } void liftingLineForTandem::run(const Point& aCOG) { @@ -627,7 +627,7 @@ void liftingLineForTandem::calculateCleanPolarForMach(const double& Mach, const } theCleanPolars.back().Points.back().AoA = (aLiftCoefficient - myLL_vec.at(Mach_id).theLLOutputPt->CLatAoA0) / dCLtodAoA_corr; theCleanPolars.back().Points.back().CL = aLiftCoefficient; - theCleanPolars.back().Points.back().iStabPolar = currentIStabSetting; + theCleanPolars.back().Points.back().iStabPolar = currentBackWingAngle; // Calculate induced drag from LiftingLine myRuntimeInfo->debug << " - Calculate drag ..." << endl; this->calculateInducedDrag(Mach_id); diff --git a/aerodynamic_analysis/src/methods/liftingLineForTandem.h b/aerodynamic_analysis/src/methods/liftingLineForTandem.h index a3e97c84..460a7c6b 100644 --- a/aerodynamic_analysis/src/methods/liftingLineForTandem.h +++ b/aerodynamic_analysis/src/methods/liftingLineForTandem.h @@ -64,7 +64,7 @@ class liftingLineForTandem{ double bestCruiseCL; double indDragCtCorrForCalibration; double factorDragCleanPolar; - double currentIStabSetting; + double currentBackWingAngle; double delta_CM0; double delta_dCMdCL; // geometry @@ -213,7 +213,7 @@ class liftingLineForTandem{ std::vector <double> yPositionsLL; /**< Vector of y positions used in Lifting Line calculations (subdivision of lifting surfaces) [m] */ /* Objects and functions for lifting line */ explicit liftingLineForTandem(const std::shared_ptr<RuntimeIO>& rtIO, const std::string& liftingLinePath, - const LiLiforTandemInitialization& LiLiPolarInit); + const LiLiforTandemInitialization& LiLiInit); virtual ~liftingLineForTandem() {} // Polars LiLiPolar aPolar(); diff --git a/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.cpp b/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.cpp index c6ac78d1..e6f28658 100644 --- a/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.cpp +++ b/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.cpp @@ -88,7 +88,7 @@ void tandemHighLiftAdaption::setHighLiftDevices() { if (wingDevices.at(deviceID).name == "slat" || wingDevices.at(deviceID).name == "krueger" || wingDevices.at(deviceID).name == "droop_nose" || - wingDevices.at(deviceID).name == "morphing_droop_mose" ) { + wingDevices.at(deviceID).name == "morphing_droop_nose" ) { leadingEdgeHighLiftDevices.push_back(wingDevices.at(deviceID)); } } @@ -133,7 +133,7 @@ void tandemHighLiftAdaption::processHighLiftDevices() { double chordOutboard = getLocalChordLength(theFrontWing, trailingEdgeHighLiftDevices.at(deviceID).outerSpan_abs) * fabs(trailingEdgeHighLiftDevices.at(deviceID).outerRelAftChordPosition - trailingEdgeHighLiftDevices.at(deviceID).outerRelFwdChordPosition); // area is calculated for both devices, because symmetry - trailingEdgeHighLiftDevices.at(deviceID).coveredA = leadingEdgeHighLiftDevices.at(deviceID).span * (chordInboard + chordOutboard); + trailingEdgeHighLiftDevices.at(deviceID).coveredA = trailingEdgeHighLiftDevices.at(deviceID).span * (chordInboard + chordOutboard); } } @@ -218,7 +218,7 @@ void tandemHighLiftAdaption::setDeltaCLMaxDevices() { } } -Polar tandemHighLiftAdaption::calculateHighLiftPolar(std::string config, const double CoG_X_position, const double currentIStabAngle) { +Polar tandemHighLiftAdaption::calculateHighLiftPolar(std::string config, const double CoG_X_position, const double currentIBackWingAngle) { this->theHighliftAdaption = this->setRaymerHighLiftAdaptionValues(); Polar aHighLiftPolar; aHighLiftPolar.extrapolationMargin = theCleanPolar.extrapolationMargin; @@ -360,7 +360,7 @@ Polar tandemHighLiftAdaption::calculateHighLiftPolar(std::string config, const d } aHighLiftPolar.PolarPoints.back().CM = (dCMtodCL_inc * aHighLiftPolar.PolarPoints.back().CL) + CMatCL0_inc + 0.5 * (factorLE + factorTE) * deltaHighLift; - aHighLiftPolar.PolarPoints.back().iStabPolar = currentIStabAngle; + aHighLiftPolar.PolarPoints.back().iStabPolar = currentIBackWingAngle; } return aHighLiftPolar; } diff --git a/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.h b/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.h index d7cd818e..132a209a 100644 --- a/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.h +++ b/aerodynamic_analysis/src/methods/tandemHighLiftAdaption.h @@ -92,7 +92,7 @@ class tandemHighLiftAdaption{ void processHighLiftDevices(); void setDeltaCLMaxDevices(); auto setRaymerHighLiftAdaptionValues() -> std::unordered_map<std::string, highLiftAdaption>; - Polar calculateHighLiftPolar(std::string config, const double CoG_X_position, const double currentIStabAngle); + Polar calculateHighLiftPolar(std::string config, const double CoG_X_position, const double currentIBackWingAngle); double getDeltaCMHighLift(const double CoG_X_Position, double Clift, double Mach, double CLmaxClean, double CLmaxHighLift); double getAlphaAtCL(Polar aPolar, double aCL); double getCLMax(Polar aPolar); diff --git a/aerodynamic_analysis/src/tandem/tandemCalculatePolarConfig.cpp b/aerodynamic_analysis/src/tandem/tandemCalculatePolarConfig.cpp index 3c4223d0..9fadb7c1 100644 --- a/aerodynamic_analysis/src/tandem/tandemCalculatePolarConfig.cpp +++ b/aerodynamic_analysis/src/tandem/tandemCalculatePolarConfig.cpp @@ -178,7 +178,7 @@ void tandemCalculatePolarConfig::initializeTrimSettings() { //backWingAngles = {90, 90, 90}; //TODO kayra:sadece fuselage ici kisma twist koyuyordu kodu degistirdim neutralBackWingAngleID = 1; } else if (backWingAngleGridMode.value() == "mode_1") { - backWingAngles = {-6.0, -4.0, -2.0, 0.0, 0.2, 0.4, 0.6}; + backWingAngles = {-6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0}; neutralBackWingAngleID = 3; } else if (backWingAngleGridMode.value() == "mode_2") { myRuntimeInfo->out << "read out custom angles not implemented yet, tschüss!" << endl; diff --git a/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.cpp b/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.cpp index 7707e394..2b5f06bc 100644 --- a/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.cpp +++ b/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.cpp @@ -171,7 +171,7 @@ void tandemDefaultStrategy::createAircraftGeometry(const double backWingAngle) { CGAL::IO::write_STL("tandemWing_mesh.stl", fuselage_mesh); //TODO kayra: cok yanlis suan:update geldi mi? } -void tandemDefaultStrategy::runAeroCalculations(const Point CoGPosition, const double currentIStabAngle) { +void tandemDefaultStrategy::runAeroCalculations(const Point CoGPosition, const double currentIBackWingAngle) { // lifting line for tandem LiLiforTandemInitialization myLiLiInit; this->initializeLiLiforTandem(&myLiLiInit); @@ -195,7 +195,7 @@ void tandemDefaultStrategy::runAeroCalculations(const Point CoGPosition, const d this->copyWingDevicesAndStabilizer(myTandemHLAdaption); this->copyCleanPolarForHLCalculation(myTandemHLAdaption, myLiftingLineForTandem); myTandemHLAdaption->runHighLiftAdaption(); - this->calculateHighLiftPolars(myTandemHLAdaption, CoGPosition.xCoordinate, currentIStabAngle); + this->calculateHighLiftPolars(myTandemHLAdaption, CoGPosition.xCoordinate, currentIBackWingAngle); } void tandemDefaultStrategy::initializeLiLiforTandem(LiLiforTandemInitialization *myLiLiInit) { @@ -442,10 +442,10 @@ void tandemDefaultStrategy::copyCleanPolarForHLCalculation(tandemHighLiftAdaptio myTandemHLAdaption->CMatAoA0 = myLiftingLineForTandem->theAnalyticalPolarData.CMatAoA0.at(0); } -void tandemDefaultStrategy::calculateHighLiftPolars(tandemHighLiftAdaption *myTandemHLAdaption, const double CoG_X_Position, const double currentIStabAngle) { +void tandemDefaultStrategy::calculateHighLiftPolars(tandemHighLiftAdaption *myTandemHLAdaption, const double CoG_X_Position, const double currentIBackWingAngle) { for (size_t configID(0); configID < HLconfigs.size(); ++configID) { myRuntimeInfo->out << "Calculate high lift polar for " << HLconfigs.at(configID) << endl; - Polar aPolar = myTandemHLAdaption->calculateHighLiftPolar(HLconfigs.at(configID), CoG_X_Position, currentIStabAngle); + Polar aPolar = myTandemHLAdaption->calculateHighLiftPolar(HLconfigs.at(configID), CoG_X_Position, currentIBackWingAngle); currentPolarSet.highLiftPolars[HLconfigs.at(configID)] = tandemDefaultPolar(); // copy polar data currentPolarSet.highLiftPolars.at(HLconfigs.at(configID)).Config = HLconfigs.at(configID); @@ -465,8 +465,8 @@ void tandemDefaultStrategy::calculateHighLiftPolars(tandemHighLiftAdaption *myTa } } -void tandemDefaultStrategy::copyPolarsToCGMap(const size_t CGID, const size_t stabID) { - polarDataCGMap[CGID][stabID] = currentPolarSet; +void tandemDefaultStrategy::copyPolarsToCGMap(const size_t CGID, const size_t backWingID) { + polarDataCGMap[CGID][backWingID] = currentPolarSet; } void tandemDefaultStrategy::clearDataForNextCalculationRun() { @@ -481,26 +481,26 @@ void tandemDefaultStrategy::doTrimInterpolation() { // copy polar data into the generalized interpolation container for (size_t polarID(0); polarID < polarDataCGMap.at(CGID).at(0).cleanPolars.size(); ++polarID) { myRuntimeInfo->out << "Interpolate trim for clean polars at " << config_->CGPositions.at(CGID) << " CoG at Ma " << config_->machNumbers.at(polarID) << "..." << endl; - for (size_t stabID(0); stabID < config_->backWingAngles.size(); ++stabID) { + for (size_t backWingID(0); backWingID < config_->backWingAngles.size(); ++backWingID) { vector<trimInterpolation::interpolationPoint> aStabPolar; - for (size_t pointID(0); pointID < polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.size(); ++pointID) { + for (size_t pointID(0); pointID < polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.size(); ++pointID) { trimInterpolation::interpolationPoint anInterpolationPoint; - anInterpolationPoint.CL = polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).CL; - anInterpolationPoint.CM = polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).CM; - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).CD); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).AoA); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).iStabPolar); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).CD_ind); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).CD_visc); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).Points.at(pointID).CD_wave); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).CD_wave); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).PointsBackWing.at(pointID).CD_ind); - anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).PointsBackWing.at(pointID).CD_wave); + anInterpolationPoint.CL = polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).CL; + anInterpolationPoint.CM = polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).CM; + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).CD); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).AoA); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).iStabPolar); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).CD_ind); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).CD_visc); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).Points.at(pointID).CD_wave); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).CD_wave); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).PointsBackWing.at(pointID).CD_ind); + anInterpolationPoint.values.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).PointsBackWing.at(pointID).CD_wave); // interpolate additional values for cruise mach polar - if (accuracyCheck(data_->initialCruiseMachNumber, polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).MachNumber, ACCURACY_HIGH)) { - anInterpolationPoint.vectorValues.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).Cl_distr); - anInterpolationPoint.vectorValues.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).Lift_distr); - anInterpolationPoint.vectorValues.push_back(polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).yStations); + if (accuracyCheck(data_->initialCruiseMachNumber, polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).MachNumber, ACCURACY_HIGH)) { + anInterpolationPoint.vectorValues.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).Cl_distr); + anInterpolationPoint.vectorValues.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).Lift_distr); + anInterpolationPoint.vectorValues.push_back(polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(polarID).PointsFrontWing.at(pointID).yStations); } aStabPolar.push_back(anInterpolationPoint); } @@ -862,12 +862,12 @@ void tandemDefaultStrategy::writePolarData() { void tandemDefaultStrategy::writeViscDragData() { ofstream plot; for (size_t CGID(0); CGID < polarDataCGMap.size(); ++CGID) { - for (size_t stabID(0); stabID < polarDataCGMap.at(CGID).size(); ++stabID) { - for (size_t machID(0); machID < polarDataCGMap.at(CGID).at(stabID).cleanPolars.size(); ++machID) { + for (size_t backWingID(0); backWingID < polarDataCGMap.at(CGID).size(); ++backWingID) { + for (size_t machID(0); machID < polarDataCGMap.at(CGID).at(backWingID).cleanPolars.size(); ++machID) { stringstream machNumber; stringstream iStabStream; - machNumber << setprecision(2) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).MachNumber; - iStabStream << setprecision(2) << fixed << Rounding(config_->backWingAngles.at(stabID), 2); + machNumber << setprecision(2) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).MachNumber; + iStabStream << setprecision(2) << fixed << Rounding(config_->backWingAngles.at(backWingID), 2); std::string csvFile = "viscDrag_M" + replaceAll(machNumber.str(), ".", "") + "_" + CoGnames.at(CGID) + "_" + replaceAll(iStabStream.str(), ".", "") +"_plot.csv"; plot.open(csvFile.c_str()); @@ -876,20 +876,20 @@ void tandemDefaultStrategy::writeViscDragData() { exit(1); } else { plot << "# " + csvFile << endl; - plot << "# Reynolds Number" << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).ReynoldsNumber << endl; + plot << "# Reynolds Number" << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).ReynoldsNumber << endl; plot << "# Clean Polar" << endl; - plot << "# Mach Number " << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).MachNumber << endl; + plot << "# Mach Number " << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).MachNumber << endl; plot << "AoA; C_L; C_D_visc; C_D_visc_Wing; C_D_visc_Stab; C_D_visc_Fin; C_D_visc_Fuselage; C_D_visc_Nacelles; C_D_visc_Misc;" << endl; - for (size_t i(0); i < polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).Points.size(); ++i) { - plot << setprecision(3) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).Points.at(i).AoA << ";"; - plot << setprecision(3) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).Points.at(i).CL << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).Points.at(i).CD_visc << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).PointsFrontWing.at(i).CD_visc << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).PointsBackWing.at(i).CD_visc << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).PointsFin.at(i).CD_visc << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).PointsFuselage.at(i).CD_visc << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).PointsNacelles.at(i).CD_visc << ";"; - plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(stabID).cleanPolars.at(machID).PointsMisc.at(i).CD_visc << ";"; + for (size_t i(0); i < polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).Points.size(); ++i) { + plot << setprecision(3) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).Points.at(i).AoA << ";"; + plot << setprecision(3) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).Points.at(i).CL << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).Points.at(i).CD_visc << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).PointsFrontWing.at(i).CD_visc << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).PointsBackWing.at(i).CD_visc << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).PointsFin.at(i).CD_visc << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).PointsFuselage.at(i).CD_visc << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).PointsNacelles.at(i).CD_visc << ";"; + plot << setprecision(6) << fixed << polarDataCGMap.at(CGID).at(backWingID).cleanPolars.at(machID).PointsMisc.at(i).CD_visc << ";"; plot << endl; } } diff --git a/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.h b/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.h index 5038ee53..19658cb0 100644 --- a/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.h +++ b/aerodynamic_analysis/src/tandem/tandemDefaultStrategy.h @@ -95,7 +95,7 @@ class tandemDefaultStrategy { /** \brief Function witch executes all aero calculation methods * \param CoGPosition the 3D center of gravity coordinate as reference for the aero moments [m] */ - void runAeroCalculations(const Point CoGPosition, const double currentIStabAngle); + void runAeroCalculations(const Point CoGPosition, const double currentIBackWingAngle); /** \brief Function to copy the polar set from liftingLinePolar to the strategyClass * \param liftingLinePolar the lifting line for TAW method, which generated the clean polar set */ @@ -111,12 +111,12 @@ class tandemDefaultStrategy { void sumUpDragComponents(); void copyWingDevicesAndStabilizer(tandemHighLiftAdaption *myTandemHLAdaption); void copyCleanPolarForHLCalculation(tandemHighLiftAdaption *myTandemHLAdaption, liftingLineForTandem *myLiftingLineForTandem); - void calculateHighLiftPolars(tandemHighLiftAdaption *myTandemHLAdaption, const double CoG_X_Position, const double currentIStabAngle); + void calculateHighLiftPolars(tandemHighLiftAdaption *myTandemHLAdaption, const double CoG_X_Position, const double currentIBackWingAngle); /** \brief Copy the temporary current polar set to the permanent polarDataCGMap * \param CGID index of the current center of gravity position - * \param stabID index of the current stabilizer angle + * \param backWingID index of the current stabilizer angle */ - void copyPolarsToCGMap(const size_t CGID, const size_t stabID); + void copyPolarsToCGMap(const size_t CGID, const size_t backWingID); /** \brief Function to delete temporary data befor next aero calculation run */ void clearDataForNextCalculationRun(); -- GitLab