{"action":"created","comment":{"url":"https://api.github.com/repos/suavecode/SUAVE/pulls/comments/23988642","id":23988642,"diff_hunk":"@@ -0,0 +1,92 @@\n+# Tim Momose, January 2015\n+\n+\n+# imports\n+import numpy as np\n+from SUAVE.Structure import Data\n+from SUAVE.Components.Wings.Control_Surface import Control_Surface, Control_Surface_Section\n+\n+\n+def populate_control_sections(control_surface,span_fractions,chord_fractions,relative_twists,wing):\n+    \"\"\"\n+    Creates Control_Surface_Sections defining a control surface such that:\n+        -There are as many Control_Surface_Sections as the length of\n+        span_fractions\n+        -The i-th Control_Surface_Section has the local chord fraction\n+        given in chord_fractions[i], the twist given in twists[i], and is\n+        at the spanwise position, span_fractions[i]\n+        -The control surface origin is defined based on the geometry of the\n+        wing (i.e., dimensional projected span, LE sweep, root chord, taper)\n+\n+    Preconditions:\n+        -span_fractions has as many sections as will be used to define the\n+        control surface (at least two)\n+        -relative_twists has the same length as span_fractions and\n+        indicates the twist in the local chord frame of reference - twist\n+        is zero if the control surface chord line is parallel to the local\n+        chord line in the undeflected state.\n+        -span_fractions and chord_fractions have the same length and\n+        indicate the y- and x-coordinates of the section leading edge as\n+        fractions of wingspan and local chord, repsectively\n+\n+    Postconditions:\n+        -control_surface.sections contains len(span_fractions)\n+        Control_Surface_Sections with size and position parameters filled\n+        -Returns control_surface with the specified sections appended\n+\n+    Assumes a trailing-edge control surface\n+    \"\"\"\n+\n+    if len(span_fractions) < 2:\n+        raise ValueError('Two or more sections required for control surface definition')\n+\n+    sw   = wing.sweep\n+    di   = wing.dihedral\n+    span = wing.spans.projected\n+    c_r  = wing.chords.root\n+    tpr  = wing.taper\n+    orig = wing.origin\n+\n+    inboard = Control_Surface_Section()\n+    inboard.tag = 'Inboard_Section'","path":"trunk/SUAVE/Geometry/Two_Dimensional/Planform/populate_control_sections.py","position":51,"original_position":51,"commit_id":"c520b91ad59380b855acdda70c9d36b8b660994c","original_commit_id":"c520b91ad59380b855acdda70c9d36b8b660994c","user":{"login":"aerialhedgehog","id":4797553,"avatar_url":"https://avatars.githubusercontent.com/u/4797553?v=3","gravatar_id":"","url":"https://api.github.com/users/aerialhedgehog","html_url":"https://github.com/aerialhedgehog","followers_url":"https://api.github.com/users/aerialhedgehog/followers","following_url":"https://api.github.com/users/aerialhedgehog/following{/other_user}","gists_url":"https://api.github.com/users/aerialhedgehog/gists{/gist_id}","starred_url":"https://api.github.com/users/aerialhedgehog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerialhedgehog/subscriptions","organizations_url":"https://api.github.com/users/aerialhedgehog/orgs","repos_url":"https://api.github.com/users/aerialhedgehog/repos","events_url":"https://api.github.com/users/aerialhedgehog/events{/privacy}","received_events_url":"https://api.github.com/users/aerialhedgehog/received_events","type":"User","site_admin":false},"body":"lower_case_underscore","created_at":"2015-02-03T08:25:09Z","updated_at":"2015-02-03T08:25:09Z","html_url":"https://github.com/suavecode/SUAVE/pull/78#discussion_r23988642","pull_request_url":"https://api.github.com/repos/suavecode/SUAVE/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/suavecode/SUAVE/pulls/comments/23988642"},"html":{"href":"https://github.com/suavecode/SUAVE/pull/78#discussion_r23988642"},"pull_request":{"href":"https://api.github.com/repos/suavecode/SUAVE/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/suavecode/SUAVE/pulls/78","id":28053670,"html_url":"https://github.com/suavecode/SUAVE/pull/78","diff_url":"https://github.com/suavecode/SUAVE/pull/78.diff","patch_url":"https://github.com/suavecode/SUAVE/pull/78.patch","issue_url":"https://api.github.com/repos/suavecode/SUAVE/issues/78","number":78,"state":"open","locked":false,"title":"Feature avl","user":{"login":"tmomose","id":7093436,"avatar_url":"https://avatars.githubusercontent.com/u/7093436?v=3","gravatar_id":"","url":"https://api.github.com/users/tmomose","html_url":"https://github.com/tmomose","followers_url":"https://api.github.com/users/tmomose/followers","following_url":"https://api.github.com/users/tmomose/following{/other_user}","gists_url":"https://api.github.com/users/tmomose/gists{/gist_id}","starred_url":"https://api.github.com/users/tmomose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmomose/subscriptions","organizations_url":"https://api.github.com/users/tmomose/orgs","repos_url":"https://api.github.com/users/tmomose/repos","events_url":"https://api.github.com/users/tmomose/events{/privacy}","received_events_url":"https://api.github.com/users/tmomose/received_events","type":"User","site_admin":false},"body":"New code:\r\n-AVL analysis code (SUAVE.Methods.Aerodynamics.AVL)\r\n-Modified wing geometry code for control surface definition\r\n-Test script (scripts/experimental/test_callable_avl.py)","created_at":"2015-01-26T19:37:52Z","updated_at":"2015-02-03T08:25:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c121a00ef9e1d562eaee0decd91652fd75655cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/suavecode/SUAVE/pulls/78/commits","review_comments_url":"https://api.github.com/repos/suavecode/SUAVE/pulls/78/comments","review_comment_url":"https://api.github.com/repos/suavecode/SUAVE/pulls/comments/{number}","comments_url":"https://api.github.com/repos/suavecode/SUAVE/issues/78/comments","statuses_url":"https://api.github.com/repos/suavecode/SUAVE/statuses/c520b91ad59380b855acdda70c9d36b8b660994c","head":{"label":"suavecode:feature-avl","ref":"feature-avl","sha":"c520b91ad59380b855acdda70c9d36b8b660994c","user":{"login":"suavecode","id":7026233,"avatar_url":"https://avatars.githubusercontent.com/u/7026233?v=3","gravatar_id":"","url":"https://api.github.com/users/suavecode","html_url":"https://github.com/suavecode","followers_url":"https://api.github.com/users/suavecode/followers","following_url":"https://api.github.com/users/suavecode/following{/other_user}","gists_url":"https://api.github.com/users/suavecode/gists{/gist_id}","starred_url":"https://api.github.com/users/suavecode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suavecode/subscriptions","organizations_url":"https://api.github.com/users/suavecode/orgs","repos_url":"https://api.github.com/users/suavecode/repos","events_url":"https://api.github.com/users/suavecode/events{/privacy}","received_events_url":"https://api.github.com/users/suavecode/received_events","type":"Organization","site_admin":false},"repo":{"id":17993614,"name":"SUAVE","full_name":"suavecode/SUAVE","owner":{"login":"suavecode","id":7026233,"avatar_url":"https://avatars.githubusercontent.com/u/7026233?v=3","gravatar_id":"","url":"https://api.github.com/users/suavecode","html_url":"https://github.com/suavecode","followers_url":"https://api.github.com/users/suavecode/followers","following_url":"https://api.github.com/users/suavecode/following{/other_user}","gists_url":"https://api.github.com/users/suavecode/gists{/gist_id}","starred_url":"https://api.github.com/users/suavecode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suavecode/subscriptions","organizations_url":"https://api.github.com/users/suavecode/orgs","repos_url":"https://api.github.com/users/suavecode/repos","events_url":"https://api.github.com/users/suavecode/events{/privacy}","received_events_url":"https://api.github.com/users/suavecode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/suavecode/SUAVE","description":"An Aircraft Design Toolbox","fork":false,"url":"https://api.github.com/repos/suavecode/SUAVE","forks_url":"https://api.github.com/repos/suavecode/SUAVE/forks","keys_url":"https://api.github.com/repos/suavecode/SUAVE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/suavecode/SUAVE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/suavecode/SUAVE/teams","hooks_url":"https://api.github.com/repos/suavecode/SUAVE/hooks","issue_events_url":"https://api.github.com/repos/suavecode/SUAVE/issues/events{/number}","events_url":"https://api.github.com/repos/suavecode/SUAVE/events","assignees_url":"https://api.github.com/repos/suavecode/SUAVE/assignees{/user}","branches_url":"https://api.github.com/repos/suavecode/SUAVE/branches{/branch}","tags_url":"https://api.github.com/repos/suavecode/SUAVE/tags","blobs_url":"https://api.github.com/repos/suavecode/SUAVE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/suavecode/SUAVE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/suavecode/SUAVE/git/refs{/sha}","trees_url":"https://api.github.com/repos/suavecode/SUAVE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/suavecode/SUAVE/statuses/{sha}","languages_url":"https://api.github.com/repos/suavecode/SUAVE/languages","stargazers_url":"https://api.github.com/repos/suavecode/SUAVE/stargazers","contributors_url":"https://api.github.com/repos/suavecode/SUAVE/contributors","subscribers_url":"https://api.github.com/repos/suavecode/SUAVE/subscribers","subscription_url":"https://api.github.com/repos/suavecode/SUAVE/subscription","commits_url":"https://api.github.com/repos/suavecode/SUAVE/commits{/sha}","git_commits_url":"https://api.github.com/repos/suavecode/SUAVE/git/commits{/sha}","comments_url":"https://api.github.com/repos/suavecode/SUAVE/comments{/number}","issue_comment_url":"https://api.github.com/repos/suavecode/SUAVE/issues/comments/{number}","contents_url":"https://api.github.com/repos/suavecode/SUAVE/contents/{+path}","compare_url":"https://api.github.com/repos/suavecode/SUAVE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/suavecode/SUAVE/merges","archive_url":"https://api.github.com/repos/suavecode/SUAVE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/suavecode/SUAVE/downloads","issues_url":"https://api.github.com/repos/suavecode/SUAVE/issues{/number}","pulls_url":"https://api.github.com/repos/suavecode/SUAVE/pulls{/number}","milestones_url":"https://api.github.com/repos/suavecode/SUAVE/milestones{/number}","notifications_url":"https://api.github.com/repos/suavecode/SUAVE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/suavecode/SUAVE/labels{/name}","releases_url":"https://api.github.com/repos/suavecode/SUAVE/releases{/id}","created_at":"2014-03-21T20:37:01Z","updated_at":"2015-02-03T08:13:45Z","pushed_at":"2015-02-03T08:13:45Z","git_url":"git://github.com/suavecode/SUAVE.git","ssh_url":"git@github.com:suavecode/SUAVE.git","clone_url":"https://github.com/suavecode/SUAVE.git","svn_url":"https://github.com/suavecode/SUAVE","homepage":null,"size":11009,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":53,"forks":9,"open_issues":53,"watchers":9,"default_branch":"master"}},"base":{"label":"suavecode:master","ref":"master","sha":"1d0c059ea3fd200cd698ae278f9b96e88482d3e2","user":{"login":"suavecode","id":7026233,"avatar_url":"https://avatars.githubusercontent.com/u/7026233?v=3","gravatar_id":"","url":"https://api.github.com/users/suavecode","html_url":"https://github.com/suavecode","followers_url":"https://api.github.com/users/suavecode/followers","following_url":"https://api.github.com/users/suavecode/following{/other_user}","gists_url":"https://api.github.com/users/suavecode/gists{/gist_id}","starred_url":"https://api.github.com/users/suavecode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suavecode/subscriptions","organizations_url":"https://api.github.com/users/suavecode/orgs","repos_url":"https://api.github.com/users/suavecode/repos","events_url":"https://api.github.com/users/suavecode/events{/privacy}","received_events_url":"https://api.github.com/users/suavecode/received_events","type":"Organization","site_admin":false},"repo":{"id":17993614,"name":"SUAVE","full_name":"suavecode/SUAVE","owner":{"login":"suavecode","id":7026233,"avatar_url":"https://avatars.githubusercontent.com/u/7026233?v=3","gravatar_id":"","url":"https://api.github.com/users/suavecode","html_url":"https://github.com/suavecode","followers_url":"https://api.github.com/users/suavecode/followers","following_url":"https://api.github.com/users/suavecode/following{/other_user}","gists_url":"https://api.github.com/users/suavecode/gists{/gist_id}","starred_url":"https://api.github.com/users/suavecode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suavecode/subscriptions","organizations_url":"https://api.github.com/users/suavecode/orgs","repos_url":"https://api.github.com/users/suavecode/repos","events_url":"https://api.github.com/users/suavecode/events{/privacy}","received_events_url":"https://api.github.com/users/suavecode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/suavecode/SUAVE","description":"An Aircraft Design Toolbox","fork":false,"url":"https://api.github.com/repos/suavecode/SUAVE","forks_url":"https://api.github.com/repos/suavecode/SUAVE/forks","keys_url":"https://api.github.com/repos/suavecode/SUAVE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/suavecode/SUAVE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/suavecode/SUAVE/teams","hooks_url":"https://api.github.com/repos/suavecode/SUAVE/hooks","issue_events_url":"https://api.github.com/repos/suavecode/SUAVE/issues/events{/number}","events_url":"https://api.github.com/repos/suavecode/SUAVE/events","assignees_url":"https://api.github.com/repos/suavecode/SUAVE/assignees{/user}","branches_url":"https://api.github.com/repos/suavecode/SUAVE/branches{/branch}","tags_url":"https://api.github.com/repos/suavecode/SUAVE/tags","blobs_url":"https://api.github.com/repos/suavecode/SUAVE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/suavecode/SUAVE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/suavecode/SUAVE/git/refs{/sha}","trees_url":"https://api.github.com/repos/suavecode/SUAVE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/suavecode/SUAVE/statuses/{sha}","languages_url":"https://api.github.com/repos/suavecode/SUAVE/languages","stargazers_url":"https://api.github.com/repos/suavecode/SUAVE/stargazers","contributors_url":"https://api.github.com/repos/suavecode/SUAVE/contributors","subscribers_url":"https://api.github.com/repos/suavecode/SUAVE/subscribers","subscription_url":"https://api.github.com/repos/suavecode/SUAVE/subscription","commits_url":"https://api.github.com/repos/suavecode/SUAVE/commits{/sha}","git_commits_url":"https://api.github.com/repos/suavecode/SUAVE/git/commits{/sha}","comments_url":"https://api.github.com/repos/suavecode/SUAVE/comments{/number}","issue_comment_url":"https://api.github.com/repos/suavecode/SUAVE/issues/comments/{number}","contents_url":"https://api.github.com/repos/suavecode/SUAVE/contents/{+path}","compare_url":"https://api.github.com/repos/suavecode/SUAVE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/suavecode/SUAVE/merges","archive_url":"https://api.github.com/repos/suavecode/SUAVE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/suavecode/SUAVE/downloads","issues_url":"https://api.github.com/repos/suavecode/SUAVE/issues{/number}","pulls_url":"https://api.github.com/repos/suavecode/SUAVE/pulls{/number}","milestones_url":"https://api.github.com/repos/suavecode/SUAVE/milestones{/number}","notifications_url":"https://api.github.com/repos/suavecode/SUAVE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/suavecode/SUAVE/labels{/name}","releases_url":"https://api.github.com/repos/suavecode/SUAVE/releases{/id}","created_at":"2014-03-21T20:37:01Z","updated_at":"2015-02-03T08:13:45Z","pushed_at":"2015-02-03T08:13:45Z","git_url":"git://github.com/suavecode/SUAVE.git","ssh_url":"git@github.com:suavecode/SUAVE.git","clone_url":"https://github.com/suavecode/SUAVE.git","svn_url":"https://github.com/suavecode/SUAVE","homepage":null,"size":11009,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":53,"forks":9,"open_issues":53,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/suavecode/SUAVE/pulls/78"},"html":{"href":"https://github.com/suavecode/SUAVE/pull/78"},"issue":{"href":"https://api.github.com/repos/suavecode/SUAVE/issues/78"},"comments":{"href":"https://api.github.com/repos/suavecode/SUAVE/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/suavecode/SUAVE/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/suavecode/SUAVE/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/suavecode/SUAVE/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/suavecode/SUAVE/statuses/c520b91ad59380b855acdda70c9d36b8b660994c"}}}}