From 656fa5732c7eaba9ebab0a08ae1305c07a23fa7f Mon Sep 17 00:00:00 2001 From: tobi <tobias.weckenmann@tum.de> Date: Mon, 2 Dec 2024 18:20:06 +0100 Subject: [PATCH 1/2] Changes the engine integration including nacelle and pylon in accordance to Ata 10. The engine will be higher up. --- .../src/integration/default/turbofan.cpp | 7 +++---- .../src/nacelle/default/turbofan.cpp | 4 ++-- .../src/pylon/default/turbofan.cpp | 18 ++++++++++++------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/propulsion_design/src/integration/default/turbofan.cpp b/propulsion_design/src/integration/default/turbofan.cpp index ecabd09f..47875e59 100644 --- a/propulsion_design/src/integration/default/turbofan.cpp +++ b/propulsion_design/src/integration/default/turbofan.cpp @@ -155,13 +155,12 @@ namespace design geom2::Vector_3{0.25 * wing_chord, 0, 0}; /* Wing local x position of engine */ - const double length_factor = this->n_engines_.wing == 2 ? 0.9 : 0.85; - const double chord_engine = wing_quarter.x() - 0.15 * wing_chord - - length_factor * engine.dimension().length; // \cite Ata10 p. 83 + const double chord_engine = -0.1 * wing_chord; // \cite Ata10 p. 48f /* Wing local y position of engine */ const double height_engine = wing_quarter.y() - - 0.7 * geom2::measure::height_max(engine.nacelle()); + 0.5 * geom2::measure::height_max(engine.nacelle()) - + 0.1 * wing_chord; // \cite Ata10 p. 48f adapted to geometry_lib /* Adjust whether the engine is left or right */ auto position = geom2::Point_3{chord_engine, height_engine, span_engine}; diff --git a/propulsion_design/src/nacelle/default/turbofan.cpp b/propulsion_design/src/nacelle/default/turbofan.cpp index 1282e09f..d7eb37f6 100644 --- a/propulsion_design/src/nacelle/default/turbofan.cpp +++ b/propulsion_design/src/nacelle/default/turbofan.cpp @@ -60,11 +60,11 @@ namespace geometry builder.insert_back(shape, {0.0, 0.0, 0.0}); /* Section 1 */ - shape.set_scale(1.25); + shape.set_scale(1.21); // \cite Ata10 p. 45 builder.insert_back(shape, {0.0, 0.0, engine.dimension().length * 0.25}); /* Section 2 */ - shape.set_scale(1.25); + shape.set_scale(1.21); // \cite Ata10 p. 45 builder.insert_back(shape, {0.0, 0.0, engine.dimension().length * 0.50}); /* Section 3 */ diff --git a/propulsion_design/src/pylon/default/turbofan.cpp b/propulsion_design/src/pylon/default/turbofan.cpp index ec763830..c4abb2fc 100644 --- a/propulsion_design/src/pylon/default/turbofan.cpp +++ b/propulsion_design/src/pylon/default/turbofan.cpp @@ -31,7 +31,9 @@ #include <cmath> #include <set> #include <utility> - +using Kernel = CGAL::Simple_cartesian<double>; +using Point_3 = Kernel::Point_3; +using Vector_3 = CGAL::Vector_3<CGAL::Bbox_2::R>; /* === Design implementations === */ namespace geometry { @@ -51,6 +53,7 @@ namespace geometry /* Get the start and end points of pylon */ const auto attachment = this->get_attachment_points( engine.position(), engine.nacelle(), engine.parent_component()); + std::cout << "HALELUJA" << std::endl; /* Get profile of each section */ auto profile = this->get_section_profile(engine.id()); @@ -65,10 +68,13 @@ namespace geometry /* * The offset of the engine to the origin since - * the pylon origin relative to the engine position. + * the pylon origin relative to the position of + * the second segment of the nacelle. */ - const auto offset = engine.position() - CGAL::ORIGIN; - + const auto offset = engine.position() - CGAL::ORIGIN - Vector_3( + engine.dimension().length*0.25, 0, ((engine.dimension().height)*0.21/2)); + const auto offset2 = engine.position() - CGAL::ORIGIN; + /* Section at nacelle attachment */ pylon.sections.emplace_back(profile); pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.first - offset); @@ -76,8 +82,8 @@ namespace geometry /* Section attaching to the parent component */ pylon.sections.emplace_back(profile); - pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.second - offset); - pylon.sections.back().set_chord_length(engine.dimension().length); + pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.second -offset2); + pylon.sections.back().set_chord_length(engine.dimension().length); /* Add the pylon to the engine */ engine.set_pylon(pylon); -- GitLab From 541ee4b989d5ef878ce6fc242974921bc0cbe6ca Mon Sep 17 00:00:00 2001 From: tobi <tobias.weckenmann@tum.de> Date: Tue, 3 Dec 2024 14:16:16 +0100 Subject: [PATCH 2/2] Removes the Obi-ously already included includes, adapts naming and formatting --- .../src/pylon/default/turbofan.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/propulsion_design/src/pylon/default/turbofan.cpp b/propulsion_design/src/pylon/default/turbofan.cpp index c4abb2fc..8c79ca2e 100644 --- a/propulsion_design/src/pylon/default/turbofan.cpp +++ b/propulsion_design/src/pylon/default/turbofan.cpp @@ -31,9 +31,7 @@ #include <cmath> #include <set> #include <utility> -using Kernel = CGAL::Simple_cartesian<double>; -using Point_3 = Kernel::Point_3; -using Vector_3 = CGAL::Vector_3<CGAL::Bbox_2::R>; + /* === Design implementations === */ namespace geometry { @@ -53,7 +51,6 @@ namespace geometry /* Get the start and end points of pylon */ const auto attachment = this->get_attachment_points( engine.position(), engine.nacelle(), engine.parent_component()); - std::cout << "HALELUJA" << std::endl; /* Get profile of each section */ auto profile = this->get_section_profile(engine.id()); @@ -69,20 +66,22 @@ namespace geometry /* * The offset of the engine to the origin since * the pylon origin relative to the position of - * the second segment of the nacelle. + * the second segment of the nacelle. Therefore, + * the pylon is also elevated to the second of + * the nacelle height. */ - const auto offset = engine.position() - CGAL::ORIGIN - Vector_3( - engine.dimension().length*0.25, 0, ((engine.dimension().height)*0.21/2)); - const auto offset2 = engine.position() - CGAL::ORIGIN; + const auto offset_start = engine.position() - CGAL::ORIGIN - geom2::Vector_3( + engine.dimension().length * 0.25, 0, (engine.dimension().height)*0.21/2); + const auto offset_end = engine.position() - CGAL::ORIGIN; /* Section at nacelle attachment */ pylon.sections.emplace_back(profile); - pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.first - offset); + pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.first - offset_start); pylon.sections.back().set_chord_length(engine.dimension().length); /* Section attaching to the parent component */ pylon.sections.emplace_back(profile); - pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.second -offset2); + pylon.sections.back().origin = geom2::transform::to_local(pylon, attachment.second -offset_end); pylon.sections.back().set_chord_length(engine.dimension().length); /* Add the pylon to the engine */ -- GitLab