Skip to content
Snippets Groups Projects
Commit 442b6443 authored by Lukas Neuerburg's avatar Lukas Neuerburg
Browse files

fixed the fuselage witdthdth problem

parent 1be751df
No related branches found
No related tags found
1 merge request!44Fix/lifting line without fuselage
......@@ -81,7 +81,7 @@ class LIFTINGLINEINTERFACEDLLEXPORT liftingLineWing {
* \return void
*/
void generateLILIgeometry(const geom2::MultisectionSurface<geom2::AirfoilSection>& anAircraftLiftingSurface,
const std::vector<double>& fuselageWidths,
const double& fuselageWidth,
const double& reductionFactorHTPpanels, const bool& untwistFslgSeg);
/** \brief Method to set panel distribution.
* \details The member variables N_PW_Chord, N_PW_Span, numberSegments, N_P, totalPanel are initialized.
......@@ -99,7 +99,7 @@ class LIFTINGLINEINTERFACEDLLEXPORT liftingLineWing {
* \return void
*/
void setPanelProperties(const geom2::MultisectionSurface<geom2::AirfoilSection>& anAircraftLiftingSurface,
const std::vector<double>& fuselageWidths, const double& myScaleSpanErrors, const bool& untwistFslgSeg);
const double& fuselageWidth, const double& myScaleSpanErrors, const bool& untwistFslgSeg);
/** \brief Method to set panel camberline.
* \param anAircraftLiftingSurfaceSegment Object holding data of liftingSurfaceSegment
* \return camberLine struct holding {x,y,z}-coordinates, [m]
......
......@@ -47,7 +47,7 @@ void liftingLineInput::createLiftingLineInput(const std::vector<geom2::Multisect
this->theLILIWingGeometries.push_back(liftingLineWing());
// Initialize struct liftingLinePanels to be used in liftingLineWingGeometry::setPanelDistribution
this->theLILIWingGeometries.back().theInputPanelDistribution = this->setInputPanelDistribution();
this->theLILIWingGeometries.back().generateLILIgeometry(liftingSurfaces.at(liftingSurfaceID), fuselageWidths, myLLsettings.reductionFactorHTP, myLLsettings.untwistFslgSeg);
this->theLILIWingGeometries.back().generateLILIgeometry(liftingSurfaces.at(liftingSurfaceID), fuselageWidths.at(liftingSurfaceID), myLLsettings.reductionFactorHTP, myLLsettings.untwistFslgSeg);
}
this->checkLILIinput();
// Write LILI input file .inp
......
......@@ -44,14 +44,14 @@ liftingLineWing::liftingLineWing()
}
void liftingLineWing::generateLILIgeometry(const geom2::MultisectionSurface<geom2::AirfoilSection>& anAircraftLiftingSurface,
const std::vector<double>& fuselageWidths,
const double& fuselageWidth,
const double& reductionFactorHTPpanels, const bool& untwistFslgSeg) {
double scaleSpanErrors = 1.0;
// Set panel distribution
myRuntimeInfo->out << "Set panel distribution for the " << anAircraftLiftingSurface.name << " lifting surface ..." << std::endl;
this->setPanelDistribution(anAircraftLiftingSurface, reductionFactorHTPpanels);
// Set panel properties (chord, referencePoint, coupling condition for each panel)
this->setPanelProperties(anAircraftLiftingSurface, fuselageWidths, scaleSpanErrors, untwistFslgSeg);
this->setPanelProperties(anAircraftLiftingSurface, fuselageWidth, scaleSpanErrors, untwistFslgSeg);
}
void liftingLineWing::setPanelDistribution(const geom2::MultisectionSurface<geom2::AirfoilSection>& anAircraftLiftingSurface, const double& reductionFactorHTPpanels) {
......@@ -89,7 +89,7 @@ void liftingLineWing::setPanelDistribution(const geom2::MultisectionSurface<geom
}
void liftingLineWing::setPanelProperties(const geom2::MultisectionSurface<geom2::AirfoilSection>& anAircraftLiftingSurface,
const std::vector<double>& fuselageWidths,
const double& fuselageWidth,
const double& myScaleSpanErrors, const bool& untwistFslgSeg) {
int theLiftingSurfaceSegmentSize(anAircraftLiftingSurface.sections.size() - 1);
// dont throw a range error for 1 segment wings YET !
......@@ -157,9 +157,7 @@ void liftingLineWing::setPanelProperties(const geom2::MultisectionSurface<geom2:
this->panelRight.panelCamberLine.back(), this->panelRight.absoluteChord_PW.back()) * (-1.));
// Check if segment is within the fuselage
if (untwistFslgSeg) { // Fuselage segment
double fuselage_width_left_segment(fuselageWidths.at(anLiftingSurfaceSectionID));
double fuselage_width_right_segment(fuselageWidths.at(anLiftingSurfaceSectionID));
if (fabs(LE_point_outboard.yCoordinate - fuselage_width_right_segment / 2.) < ACCURACY_LOW) {
if (fabs(LE_point_outboard.yCoordinate) - (fabs(fuselageWidth) / 2.) < ACCURACY_LOW) {
tmpTwist_left = 0.;
tmpTwist_right = 0.;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment