Skip to content

Commit

Permalink
Merge pull request #610 from suavecode/feature-deflection
Browse files Browse the repository at this point in the history
Feature deflection
  • Loading branch information
planes committed Nov 8, 2022
2 parents 500a905 + ba1c42f commit f05ed3f
Show file tree
Hide file tree
Showing 10 changed files with 905 additions and 464 deletions.
2 changes: 1 addition & 1 deletion regression/scripts/aerodynamics/aerodynamics_results.res
@@ -1 +1 @@
{"lift": [[-0.5259630457894574], [-0.376045165022209], [-0.3475304054345649], [-0.2445269553593604], [-0.003967877629825047], [0.26347572623560594], [0.4659872285940803], [0.68891469707248], [1.011988813301734], [1.402096964504206], [1.3459572852905315]], "cd_c": [[0.0002108421379287749], [3.216025872653717e-08], [1.726668464210709e-22], [3.2904741044391774e-09], [0.0005339274184799225], [4.644407829982833e-05], [1.510847337568517e-09], [2.389286300579044e-11], [4.142547982113114e-05], [0.0026569168610349916], [4.881606383756077e-14]], "cd_i": [[0.01762882693688675], [0.01180805338416229], [0.01080346393615405], [0.006712611481656749], [0.002730454064621433], [0.00461481110503277], [0.01240199483878124], [0.026706118991120617], [0.052429898262938875], [0.09272374626030858], [0.10637378891727485]], "cd_m": [[0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587]], "cd_p_fuse": [[0.004946796492229381], [0.005779147627615916], [0.008926136636732203], [0.005664504686306866], [0.005781749578763487], [0.004836139656952647], [0.005932995796868884], [0.007354422551288761], [0.005775532561515405], [0.005181868350841586], [0.006015432386719305]], "cd_p_wing": [[0.005798868938543027], [0.005927946059650478], [0.009429864691794812], [0.005732597261818282], [0.0065300434752118205], [0.00501664506296736], [0.005990576383227908], [0.007597374507523542], [0.006009631658542192], [0.005562832184720839], [0.006025780055498028]], "cd_tot": [[0.036147187654302096], [0.03008317245390976], [0.03883981139911893], [0.02441306986617926], [0.022697230838449035], [0.02012239236926272], [0.030977263970692524], [0.05002292028102024], [0.07170011877105747], [0.11427879440259245], [0.12698531120248754]]}
{"lift": [[-0.5259630550568174], [-0.3760451720034401], [-0.3475304118160083], [-0.24452696114041383], [-0.003967881856492357], [0.26347572475103526], [0.46598722965669714], [0.6889146999385382], [1.0119888177923257], [1.4020969697893308], [1.3459572899206365]], "cd_c": [[0.00021084213592037642], [3.216025849507262e-08], [1.7266684526204684e-22], [3.2904740881154703e-09], [0.0005339274191304674], [4.644407858546013e-05], [1.5108473501523067e-09], [2.3892863212650703e-11], [4.142548005778556e-05], [0.0026569168600391714], [4.8816063850836635e-14]], "cd_i": [[0.017628827563233505], [0.011808053631861447], [0.010803464137949876], [0.0067126108543920735], [0.0027304524751980115], [0.004614811166757508], [0.012401997536030988], [0.026706125679655527], [0.052429912509830055], [0.09272377262369227], [0.10637381506803112]], "cd_m": [[0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587]], "cd_p_fuse": [[0.004946796492229381], [0.005779147627615916], [0.008926136636732203], [0.005664504686306866], [0.005781749578763487], [0.004836139656952647], [0.005932995796868884], [0.007354422551288761], [0.005775532561515405], [0.005181868350841586], [0.006015432386719305]], "cd_p_wing": [[0.005798868938543027], [0.005927946059650478], [0.009429864691794812], [0.005732597261818282], [0.0065300434752118205], [0.00501664506296736], [0.005990576383227908], [0.007597374507523542], [0.006009631658542192], [0.005562832184720839], [0.006025780055498028]], "cd_tot": [[0.036147188285001824], [0.030083172706561703], [0.038839811604950675], [0.024413069226369204], [0.02269722921446303], [0.020122392432332686], [0.030977266721887275], [0.05002292710332585], [0.07170013330317539], [0.11427882129980278], [0.12698533787625896]]}
@@ -1 +1 @@
{"CL": [[0.013174649413627046, 0.07820203553128037, 0.08248905161420242, 0.01630717317435415, 0.08051736796385944], [-0.12279614560369596, -0.046040610477049375, -0.04999506092340315, -0.12540510267532834, -0.0529977953587301], [0.04928037746905511, 0.09274113581028637, 0.10750962025133681, 0.054700992543346476, 0.14976066298353388]], "CDi": [[0.00811257011091528, 0.012755626818117663, 0.018952736781923146, 0.013183548208167814, 0.024532425123235516], [0.0165914880232681, 0.01149588747020304, 0.0019806420461911858, 0.011622871272093818, 0.027159670525909903], [0.22463707681957515, 0.25756716365900645, 0.20412475992811327, 0.19302630817491542, 0.4441338541203386]], "CM": [[-0.018353479770695104, -0.048962065087908985, -0.05126973068354324, -0.019186687456270436, -0.05222056066347399], [0.06907917412492855, 0.02900114411233292, 0.027583421549531063, 0.06840123998650846, 0.04103130943340309], [0.1351191652845285, 0.10587961906787927, 0.08494657473349781, 0.1226902738462738, 0.07024269462580239]], "CYTOT": [[-0.10643794040648893, -0.06560547361385648, -0.15380201886564152, -0.1602791740788092, -0.05275083672912788], [0.14198527470643307, 0.16364450729840765, 0.08396991121856759, 0.09285761798001178, 0.19882028442599042], [0.3411513680281888, 0.37981702298294645, 0.29441962147611417, 0.2868711627151078, 0.4677032231771263]], "CRMTOT": [[-0.10646698758057352, -0.0666389353764613, -0.11965174677916234, -0.14412823397440425, -0.07145598895622893], [0.08794239840726326, 0.08171192035441284, 0.04230135767684419, 0.059790679695355724, 0.09978427590945359], [0.10245669236121806, 0.08546270341055404, 0.03879789826117672, 0.06822070902303752, 0.11042152627281036]], "CYMTOT": [[0.14867425438121123, 0.10560246359865026, 0.23531717092254656, 0.2251964256504412, 0.09467132822472744], [-0.20028472637280495, -0.23896835662390017, -0.12230503791950406, -0.1300965696769207, -0.3038260638078376], [-0.31800731398165405, -0.38431631614151096, -0.2549482218124662, -0.24028332690597418, -0.5117438492472138]]}
{"CL": [[0.013174670194207325, 0.07820205126615973, 0.08248908021967562, 0.01630720183424886, 0.08051736419222094], [-0.12279612806525085, -0.04604059654884187, -0.04999504758014863, -0.12540508551715512, -0.05299778934256562], [0.0492804175639205, 0.09274118218461816, 0.10750965878284717, 0.0547010280737921, 0.14976067847343022]], "CDi": [[0.008112568031923234, 0.012755623640331521, 0.018952734102734913, 0.013183545803478101, 0.024532420968637704], [0.016591484197136443, 0.011495885291197258, 0.001980639916160508, 0.011622867813334901, 0.027159668309002773], [0.22463706581863424, 0.25756715465222724, 0.20412475815234102, 0.19302630212424873, 0.444133837821729]], "CM": [[-0.018353502436314777, -0.048962086112999466, -0.05126976526094993, -0.019186718320075007, -0.052220555480258835], [0.06907916498880329, 0.02900113659699455, 0.027583415691513343, 0.06840123187607128, 0.04103130516717989], [0.13511912813040194, 0.1058795782453576, 0.08494654733072422, 0.12269024484250553, 0.07024267612552108]], "CYTOT": [[-0.10643797432991016, -0.06560550970409049, -0.1538020673081178, -0.16027921576068443, -0.052750823784930435], [0.14198527877338243, 0.16364450993737661, 0.08396991296478834, 0.09285762157376888, 0.19882030522303323], [0.3411513275262071, 0.3798169820751252, 0.2944195947575368, 0.2868711311178748, 0.46770315138016366]], "CRMTOT": [[-0.10646702724045218, -0.06663897314261295, -0.11965179389538383, -0.14412828050038604, -0.07145598779220945], [0.08794238980200915, 0.08171191283646032, 0.04230135059593481, 0.059790671424579965, 0.09978428296657446], [0.10245663483099994, 0.08546265243894335, 0.03879785612797312, 0.06822065852249036, 0.11042151314968729]], "CYMTOT": [[0.14867431365283829, 0.10560253133967153, 0.23531725400421372, 0.22519649440586087, 0.09467131326471682], [-0.20028472651834864, -0.23896835694122323, -0.12230503822259695, -0.1300965700088331, -0.3038261039743468], [-0.3180072768346389, -0.38431627147902947, -0.2549481927861573, -0.2402832990222318, -0.511743769411163]]}
2 changes: 1 addition & 1 deletion regression/scripts/aerodynamics/control_surfaces_vlm.py
Expand Up @@ -29,7 +29,7 @@ def main():

# control surface cases
deflections = np.array([-10, 10, 20]) *Units.degrees

# get settings and conditions
conditions = get_conditions()
settings = get_settings()
Expand Down
@@ -1 +1 @@
{"CL": [-0.2972021451525994, 0.33834961020743776, 0.9595777547254952, -0.3167313093496657, 0.3094380152537914, 0.9157392375468818, -0.19146418875529844, 0.40939831018121803, 0.9819962352186914], "CDi": [0.021208486387736553, 0.013598577214220519, 0.06583304167768511, 0.04311918841119371, 0.02854999417312422, 0.0737082233563168, 0.10914031178732815, 0.09741044379650957, 0.14366926009431413], "CM": [0.20453041904871477, -0.6374103718741292, -1.4635781243131902, 1.2148333185204006, 0.38820819601620365, -0.4375666678174727, 1.5898544318437684, 0.7901586347366097, -0.0102478934750997]}
{"CL": [-0.29720186925002035, 0.33834971768961464, 0.9595777066043815, -0.3167309679838157, 0.30943821920666836, 0.9157391929138856, -0.1914640232768408, 0.4093977795624484, 0.9819953212211241], "CDi": [0.021208501808035806, 0.013598563518241147, 0.0658330743959147, 0.043118905010923914, 0.028550015888229776, 0.07370811948530372, 0.10914058053146088, 0.09741034034681852, 0.14366943311207356], "CM": [0.20453038484502795, -0.6374102387969508, -1.4635778378551703, 1.2148330984404698, 0.38820808150475056, -0.4375665458027248, 1.5898563244892279, 0.7901615069649182, -0.010244539859071405]}
Expand Up @@ -187,6 +187,9 @@ def VLM(conditions,settings,geometry):
# generate vortex distribution (VLM steps 1-9)
VD = generate_vortex_distribution(geometry,settings)

if not VD.is_postprocessed:
raise ValueError('postprocess_VD has not been called since the panels have been modified')

# Unpack vortex distribution
n_cp = VD.n_cp
n_sw = VD.n_sw
Expand Down
Expand Up @@ -9,7 +9,9 @@
from .generate_wing_wake_grid import generate_wing_wake_grid
from .compute_wing_wake import compute_wing_wake
from .compute_propeller_nonuniform_freestream import compute_propeller_nonuniform_freestream
from .generate_vortex_distribution import generate_vortex_distribution, compute_unit_normal
from .generate_vortex_distribution import generate_vortex_distribution
from .fuselage_correction import fuselage_correction
from .make_VLM_wings import make_VLM_wings
from .VLM import VLM
from .generate_VD_helpers import postprocess_VD, compute_panel_area, compute_unit_normal
from .VLM import VLM
from .deflect_control_surface import deflect_control_surface

0 comments on commit f05ed3f

Please sign in to comment.