{"id":16579711,"url":"https://github.com/nomad-vagabond/cq-uav","last_synced_at":"2025-04-13T23:09:54.526Z","repository":{"id":210725020,"uuid":"726832609","full_name":"nomad-vagabond/cq-uav","owner":"nomad-vagabond","description":"Generative UAV models based on CadQuery","archived":false,"fork":false,"pushed_at":"2025-03-17T22:07:28.000Z","size":1359,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T23:09:42.446Z","etag":null,"topics":["aerodynamics","airfoil","cadquery","generative-design","structural-design","uav","wing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomad-vagabond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-03T14:38:05.000Z","updated_at":"2025-03-17T22:06:51.000Z","dependencies_parsed_at":"2024-11-15T20:43:56.953Z","dependency_job_id":"1117e927-d00b-4cf7-bf40-2fd6f7023126","html_url":"https://github.com/nomad-vagabond/cq-uav","commit_stats":null,"previous_names":["nomad-vagabond/cq-uav"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-vagabond%2Fcq-uav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-vagabond%2Fcq-uav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-vagabond%2Fcq-uav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-vagabond%2Fcq-uav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomad-vagabond","download_url":"https://codeload.github.com/nomad-vagabond/cq-uav/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794571,"owners_count":21162615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aerodynamics","airfoil","cadquery","generative-design","structural-design","uav","wing"],"created_at":"2024-10-11T22:19:03.345Z","updated_at":"2025-04-13T23:09:54.491Z","avatar_url":"https://github.com/nomad-vagabond.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CQ-UAV\n\nGenerative UAV models with CadQuery and SplineCloud\n\n![CadQuery](./docs/img/cq-plus-sc.png)\n\n![CQ-UAV](./docs/img/rect_wing_preview.png)\n\n\n# Installation\n\n```\npip install git+https://github.com/nomad-vagabond/cq-uav.git@\u003cversion_tag\u003e\n```\nReplace `\u003cversion_tag\u003e` with the recent tag\n\n\n# Wing Model\n\n\n## Airfoil data\n\nAirfoil geometry and aerodynamic coefficients are collected from the open [SplineCloud](https://splinecloud.com/explore/) repositories.\n\nThe airfoil collection can be loaded this way:\n\n```python\n\nfrom cquav.wing.airfoil import load_airfoils_collection\n\nairfoils_collection = load_airfoils_collection()\nairfoil_data = airfoils_collection[\"NACA 6 series airfoils\"][\"NACA 64(3)-218 (naca643218-il)\"]\n```\n\n## Retangular Wing Console\n\nThe wing model with a constant chord.\n\n### Geometry\n\nAirfoil shapes are approximated with smoothing B-Splines, while sharp tails are thickened to avoid malformed geometry.\n\nWing console consists of three parts:\n\n- three-chamber box compartment (made of construction material, such as carbon or fiberglass);\n- shaper (XPS foam, PLA, or other lightweight material);\n- shell (coating layer: fiberglass or other).\n\nGeometry is generated based on the airfoil type and wing size.\nCurrently, box thickness is selected automatically based on the profile height.\n\n### Instantiating model\n\n```python\nfrom cquav.wing.airfoil import Airfoil\nfrom cquav.wing.profile import AirfoilSection\nfrom cquav.wing.rect_console import RectangularWingConsole\n\nairfoil = Airfoil(airfoil_data)\nairfoil_section = AirfoilSection(airfoil, chord=200)\nwing_console = RectangularWingConsole(airfoil_section, length=800)\n```\n\nDisplaying wing model in Jupyter Notebook (requires [jupyter-cadquery](https://github.com/bernhard-42/jupyter-cadquery) ):\n\n```python\nimport cadquery as cq\nfrom jupyter_cadquery import show\n\nassy = cq.Assembly()\nassy.add(wing_console.foam, name=\"foam\", color=cq.Color(\"lightgray\"))\nassy.add(wing_console.front_box, name=\"left_box\", color=cq.Color(\"yellow\"))\nassy.add(wing_console.central_box, name=\"central_box\", color=cq.Color(\"yellow\"))\nassy.add(wing_console.rear_box, name=\"right_box\", color=cq.Color(\"yellow\"))\nassy.add(wing_console.shell, name=\"shell\", color=cq.Color(\"lightskyblue2\"))\nshow(assy, angular_tolerance=0.1)\n```\n\n### Assigning materials, calculating and displaying wing console properties\n\n```python\nfrom cquav.materials import IsotropicMaterial, FluidProperties\n\nair_density = 1.225 # [kg/m^3]\nvelocity = 35 # [m/s]\nkinematic_viscosity = 1.460*1e-5 ## [m^2/s]\n\nair_props = FluidProperties(air_density, velocity, kinematic_viscosity)\nalpha = 5 # [degrees] - angle of attack\n\nXPS_foam = IsotropicMaterial(30, 1e3, 25*1e6) # (density, tensile strength, tensile modulus)\nFiberglass_laminate = IsotropicMaterial(1800, 290*1e6, 12.4*1e9) # I know it is not isotropic - just another assumption )\nmaterials = {\"box\": Fiberglass_laminate, \"shell\": Fiberglass_laminate, \"foam\": XPS_foam}\n\nwing_console.assign_materials(materials)\nwing_console.stats(alpha, air_props)\n```\n\n```\n============================\nLength: 1457.6691355004075, [mm]\nChord: 150, [mm]\nAspect ratio: 9.717794236669384\nArea: 0.2186503703250611, [m^2]\n----------\nMass: 1.5465428361878988, [kg] (box: 0.9566951728265329, foam: 0.027119495312970882, shell: 0.562728168048395)\nAngle of attack: 0.3604633440024395, [degrees]\nExcess lift force: 32.73014596820137, [N]\nConsole bend force: 35.77102468212604, [N]\nDrag force: 1.3201885631129033, [N]\nLift to weight ratio: 2.7983907782328705\nCenter of aerodynamic pressure (lift): (37.5, 728.8345677502037), [mm, mm]\n----------\nReinforcement box thickness: 1.427, [mm]\nShell thickness: 1, [mm]\nBend stress: 26.0240758429659, [MPa]\nShear stress: 0.6649548985267989, [MPa]\nVon Mises stress: 26.049549296133048, [MPa]\nSafety factor: 11.132630231074645\n===========================\n```\n\n### Building wing model with lattice shaper body\n\n```python\nwing_console = RectangularWingConsole(airfoil_section, length=800, make_lattice=True)\n```\n\n### Solving for wing properties\n\nFinding wing span with the desired relative tip deflection (takes much time for lattice shaper)\n\n```python\nsolved_console_length = wing_console.fit_length_to_required_tip_deflection(\n    alpha, air_props, tip_delta_max=0.1\n)\n```\n\nFinding wing span with the desired relative tip deflection and desired excess lift force (unstable, work in progress)\n\n```python\nlift_force = 100 # [N]\n\nsolved_console_chord = wing_console.fit_chord_to_required_lift_force(\n    alpha, air_props, lift_force, tip_delta_max=0.1\n)\n```\n\n### Other Examples\n\nMore detailed examples are covered in the Jupyter notebooks in the 'examples' directory.\n\n### Assumptions\n- considered uniform distribution of pressure along the wing span (which is not true in reality);\n- UAV pitch angle = 0, meaning horizontal flight mode with arbitrary angle of attack;\n- only the wing box accepts aerodynamic load, which is applied along its central line;\n- pure box bending is considered to calculate tip deflection;\n- wing console is fixed on one of its ends, another end is free;\n- no torque is analyzed;\n- wing materials are considered to be isotropic;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomad-vagabond%2Fcq-uav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomad-vagabond%2Fcq-uav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomad-vagabond%2Fcq-uav/lists"}