planformcreator2 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. planformcreator2-4.0.0/.gitignore +183 -0
  2. planformcreator2-4.0.0/LICENSE +21 -0
  3. planformcreator2-4.0.0/PKG-INFO +58 -0
  4. planformcreator2-4.0.0/README.md +366 -0
  5. planformcreator2-4.0.0/doc/README_PyPi.md +36 -0
  6. planformcreator2-4.0.0/icons/PC2.ico +0 -0
  7. planformcreator2-4.0.0/icons/PC2_ico.pdn +0 -0
  8. planformcreator2-4.0.0/planformcreator2/PC2_ico.ico +0 -0
  9. planformcreator2-4.0.0/planformcreator2/__init__.py +3 -0
  10. planformcreator2-4.0.0/planformcreator2/__main__.py +11 -0
  11. planformcreator2-4.0.0/planformcreator2/app.py +282 -0
  12. planformcreator2-4.0.0/planformcreator2/app_model.py +495 -0
  13. planformcreator2-4.0.0/planformcreator2/app_modes.py +698 -0
  14. planformcreator2-4.0.0/planformcreator2/model/VLM.py +214 -0
  15. planformcreator2-4.0.0/planformcreator2/model/VLM_wing.py +1305 -0
  16. planformcreator2-4.0.0/planformcreator2/model/__init__.py +2 -0
  17. planformcreator2-4.0.0/planformcreator2/model/wing.py +4711 -0
  18. planformcreator2-4.0.0/planformcreator2/model/wing_exports.py +1273 -0
  19. planformcreator2-4.0.0/planformcreator2/resources.py +112 -0
  20. planformcreator2-4.0.0/planformcreator2/ui/__init__.py +2 -0
  21. planformcreator2-4.0.0/planformcreator2/ui/pc2_artists.py +2817 -0
  22. planformcreator2-4.0.0/planformcreator2/ui/pc2_diagrams.py +2942 -0
  23. planformcreator2-4.0.0/planformcreator2/ui/pc2_dialogs.py +1354 -0
  24. planformcreator2-4.0.0/planformcreator2/ui/pc2_panels.py +754 -0
  25. planformcreator2-4.0.0/pyproject.toml +64 -0
  26. planformcreator2-4.0.0/templates/ASW_17.png +0 -0
  27. planformcreator2-4.0.0/templates/Amokka.pc2 +95 -0
  28. planformcreator2-4.0.0/templates/Bow.pc2 +100 -0
  29. planformcreator2-4.0.0/templates/Elliptical.pc2 +89 -0
  30. planformcreator2-4.0.0/templates/F3B_F3F.pc2 +93 -0
  31. planformcreator2-4.0.0/templates/Scale_Glider.pc2 +85 -0
  32. planformcreator2-4.0.0/templates/Spitfire.png +0 -0
  33. planformcreator2-4.0.0/templates/Trapezoid.pc2 +50 -0
@@ -0,0 +1,183 @@
1
+ # PlanformCreator2
2
+ PlanformCreator2.settings
3
+ PlanformCreator2.code-workspace
4
+ README.pdf
5
+ Root_Example.dat
6
+ Tip_Example.dat
7
+ releases
8
+ T*.txt
9
+ tmp*.inp
10
+ test/*
11
+ test_VLM/*
12
+ *.xlsx
13
+ *_tmp
14
+ *_temp
15
+ *_dxf
16
+ *_xflr5
17
+ *_flz
18
+ *_exported
19
+ images/~*.pptx # tmp ppt
20
+ doc/rcn
21
+
22
+ .VSCodeCounter*
23
+
24
+ # Byte-compiled / optimized / DLL files
25
+ __pycache__/
26
+ *.py[cod]
27
+ *$py.class
28
+
29
+ # C extensions
30
+ *.so
31
+
32
+ # Distribution / packaging
33
+ .Python
34
+ build/
35
+ develop-eggs/
36
+ dist/
37
+ downloads/
38
+ eggs/
39
+ .eggs/
40
+ lib/
41
+ lib64/
42
+ parts/
43
+ sdist/
44
+ var/
45
+ wheels/
46
+ share/python-wheels/
47
+ *.egg-info/
48
+ .installed.cfg
49
+ *.egg
50
+ MANIFEST
51
+
52
+ # PyInstaller
53
+ # Usually these files are written by a python script from a template
54
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
55
+ *.manifest
56
+ *.spec
57
+
58
+ # Installer logs
59
+ pip-log.txt
60
+ pip-delete-this-directory.txt
61
+
62
+ # Unit test / coverage reports
63
+ htmlcov/
64
+ .tox/
65
+ .nox/
66
+ .coverage
67
+ .coverage.*
68
+ .cache
69
+ nosetests.xml
70
+ coverage.xml
71
+ *.cover
72
+ *.py,cover
73
+ .hypothesis/
74
+ .pytest_cache/
75
+ cover/
76
+
77
+ # Translations
78
+ *.mo
79
+ *.pot
80
+
81
+ # Django stuff:
82
+ *.log
83
+ local_settings.py
84
+ db.sqlite3
85
+ db.sqlite3-journal
86
+
87
+ # Flask stuff:
88
+ instance/
89
+ .webassets-cache
90
+
91
+ # Scrapy stuff:
92
+ .scrapy
93
+
94
+ # Sphinx documentation
95
+ docs/_build/
96
+
97
+ # PyBuilder
98
+ .pybuilder/
99
+ target/
100
+
101
+ # Jupyter Notebook
102
+ .ipynb_checkpoints
103
+
104
+ # IPython
105
+ profile_default/
106
+ ipython_config.py
107
+
108
+ # pyenv
109
+ # For a library or package, you might want to ignore these files since the code is
110
+ # intended to run in multiple environments; otherwise, check them in:
111
+ # .python-version
112
+
113
+ # pipenv
114
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
115
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
116
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
117
+ # install all needed dependencies.
118
+ #Pipfile.lock
119
+
120
+ # poetry
121
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
122
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
123
+ # commonly ignored for libraries.
124
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
125
+ #poetry.lock
126
+
127
+ # pdm
128
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
129
+ #pdm.lock
130
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
131
+ # in version control.
132
+ # https://pdm.fming.dev/#use-with-ide
133
+ .pdm.toml
134
+
135
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
136
+ __pypackages__/
137
+
138
+ # Celery stuff
139
+ celerybeat-schedule
140
+ celerybeat.pid
141
+
142
+ # SageMath parsed files
143
+ *.sage.py
144
+
145
+ # Environments
146
+ .env
147
+ .venv
148
+ env/
149
+ venv/
150
+ ENV/
151
+ env.bak/
152
+ venv.bak/
153
+
154
+ # Spyder project settings
155
+ .spyderproject
156
+ .spyproject
157
+
158
+ # Rope project settings
159
+ .ropeproject
160
+
161
+ # mkdocs documentation
162
+ /site
163
+
164
+ # mypy
165
+ .mypy_cache/
166
+ .dmypy.json
167
+ dmypy.json
168
+
169
+ # Pyre type checker
170
+ .pyre/
171
+
172
+ # pytype static type analyzer
173
+ .pytype/
174
+
175
+ # Cython debug symbols
176
+ cython_debug/
177
+
178
+ # PyCharm
179
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
180
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
181
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
182
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
183
+ #.idea/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jxjo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: planformcreator2
3
+ Version: 4.0.0
4
+ Summary: Design a wing planform
5
+ Project-URL: Homepage, https://github.com/jxjo/PlanformCreator2
6
+ Project-URL: Issues, https://github.com/jxjo/PlanformCreator2/issues
7
+ Author-email: Jochen Guenzel <jochen@jxjo.de>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Intended Audience :: End Users/Desktop
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Python: >=3.12
15
+ Requires-Dist: airfoileditor>=4.2.2
16
+ Requires-Dist: ezdxf>=1.4.0
17
+ Requires-Dist: numpy~=2.2.0
18
+ Requires-Dist: packaging>=24.0
19
+ Requires-Dist: pyqt6>=6.9.1
20
+ Requires-Dist: pyqtgraph>=0.13.7
21
+ Description-Content-Type: text/markdown
22
+
23
+ ![PC2](https://github.com/jxjo/PlanformCreator2/blob/main/images/PC2_logo.png?raw=true)
24
+
25
+ ### Version 4.0
26
+
27
+ ---
28
+
29
+ **PlanformCreator2** - short PC2 - is an app to design the planform of a wing focusing on model sailplanes.
30
+
31
+ #### Planform Design
32
+
33
+ * Define a planform based on a chord distribution and a reference line along wing span
34
+ * Import image of an existing wing as a background image for design
35
+ * Add wing sections with fixed position or relative chord length
36
+ * Define flaps hinge line and flaps
37
+ * Export planform as dxf file for use in CAD
38
+
39
+ #### Airfoils and Polars
40
+ * Define airfoil at wing sections and edit its properties using the [Airfoil Editor](https://github.com/jxjo/AirfoilEditor)
41
+ * Generate blended airfoils for intermediate wing sections ('strak')
42
+ * View polars of the airfoil based on xfoil polar generation
43
+
44
+ #### Wing Analysis
45
+ * Auto paneling of the planform as preparation for aerodynamic calculation
46
+ * VLM based lift calculation
47
+ * Determine critical sections where cl_max of airfoils will be reached
48
+ * Export wing definition to Xflr5 and FLZ_vortex for further analysis
49
+
50
+
51
+ The app, developed in Python with the Qt UI framework, runs on Windows, Linux, and MacOS.
52
+ Linux and MacOS users are required to compile Worker (polar generation) from the [Xoptfoil2](https://github.com/jxjo/Xoptfoil2) project.
53
+
54
+ Find more info about the **PlanformCreator2** on [Github](https://github.com/jxjo/PlanformCreator2).
55
+
56
+ ---
57
+
58
+ Find Release Information in [CHANGELOG](https://github.com/jxjo/PlanformCreator2/blob/main/CHANGELOG.md).
@@ -0,0 +1,366 @@
1
+
2
+ ![PC2](images/PC2_logo.png "Logo")
3
+
4
+
5
+ # v4.0
6
+
7
+ **PlanformCreator2** - short PC2 - is an app to design the planform of a wing focusing on model sailplanes.
8
+
9
+ #### Planform Design
10
+
11
+ * Define a planform based on a chord distribution and a reference line along wing span
12
+ * Import image of an existing wing as a background image for design
13
+ * Add wing sections with fixed position or relative chord length
14
+ * Define flaps hinge line and flaps
15
+ * Export planform as dxf file for use in CAD
16
+
17
+ #### Airfoils and Polars
18
+ * Define airfoil at wing sections and edit its properties using the [Airfoil Editor](https://github.com/jxjo/AirfoilEditor)
19
+ * Generate blended airfoils for intermediate wing sections ('strak')
20
+ * View polars of the airfoil based on xfoil polar generation
21
+
22
+ #### Wing Analysis
23
+ * Auto paneling of the planform as preparation for aerodynamic calculation
24
+ * VLM based lift calculation
25
+ * Determine critical sections where cl_max of airfoils will be reached
26
+ * Export wing definition to Xflr5 and FLZ_vortex for further analysis
27
+
28
+ The project was inspired by the 'Planform Creator' being part of [The Strak Machine](https://github.com/Matthias231/The-Strak-Machine).
29
+
30
+ ## Basic Concepts
31
+
32
+ The idea behind **PlanformCreator2** is to have a tool to design a new wing with a more graphical, playful approach. It tries to fill the gap between CAD based design and aerodynamic analysis tools like Xflr5.
33
+
34
+ <img src="images/PC2_usage.png" width="800" />
35
+
36
+ During the early design phase, **PlanformCreator2** serves as the single source of truth for wing geometry. It provides data for aerodynamic analysis and includes built-in lift and stall analysis capabilities.
37
+ More detailed performance assessments can be performed using external tools.
38
+
39
+ Once the design is finalized, the planform and airfoils are exported as DXF files to a CAD program for final 3D design work, such as creating molds.
40
+
41
+ Unlike a "paint program," the planform is defined parametrically using values such as 'span', 'root depth', and 'sweep angle'. The chord distribution along the span is controlled by mathematical functions with adjustable parameters.
42
+ This parametric approach allows independent parameter adjustments, enabling rapid iteration toward the desired wing planform.
43
+
44
+
45
+
46
+ ## Designing a Planform
47
+
48
+ 'Form follows Function' - this is especially true in PC2, where the planform results from a combination of mathematical functions and parameters.
49
+
50
+ ### Chord Distribution and Chord Reference
51
+ The most important element, typically defined first, is the chord distribution along the wing span. The geometric chord distribution directly determines the lift distribution, as the local lift coefficient depends on both the effective angle of attack (influenced by wing shape) and the local Reynolds number (which varies proportionally with chord length).
52
+
53
+ Two methods are available for defining the chord distribution:
54
+ - **Bezier curve**: The curve is defined by dragging control points with the mouse, using a start tangent at the root and an end tangent at the tip.<br>
55
+ Additional Bezier control points can be added to achieve a wide range of chord distributions.<br>
56
+ A constant chord area can be created by moving the Bezier start point toward the tip.
57
+ - **Trapezoid**: For single or multiple trapezoid wings, the chord is defined by the chord length at each wing section.
58
+
59
+ In PC2, the chord distribution is always displayed in normalized form, with both span and chord length ranging from 0 to 1. This enables direct comparison of chord distributions across different wing designs without distortion.
60
+
61
+ The second key element is the 'Chord Reference', which defines how the chord is distributed between the leading and trailing edges along a virtual 'Chord Reference Line'.
62
+
63
+ <img src="images/chord_distribution_reference.png" width="800" />
64
+
65
+ The final planform is created by combining these two functions, scaling the result to a half-wing span, and optionally applying a 'Sweep Angle' transformation.
66
+
67
+ <img src="images/planform_by_chord.png" width="800" />
68
+
69
+
70
+ #### Variations of the Chord Reference
71
+
72
+ The Chord Reference concept enables powerful planform variations. Since the chord distribution remains constant, all variations maintain the same wing area and nearly identical aerodynamic properties as a first approximation.
73
+
74
+ The following diagram demonstrates how different chord references affect the planform while maintaining a constant chord distribution.
75
+
76
+ <img src="images/planform_variations.png" width="800" />
77
+
78
+
79
+
80
+ #### The Banana Function
81
+
82
+ A unique feature is the "banana function," which bends the wing spanwise like a banana without altering the chord distribution or reference. This creates planforms similar to popular 'bow-style' flying wings.
83
+
84
+ Another application is fine-tuning flap depth along the span. Since the flap hinge line (described below) is straight, bending the planform directly affects flap depth.
85
+
86
+ <img src="./images/planform_banana.png" width="800" />
87
+
88
+ ### Background Image
89
+
90
+ To create a wing based on an existing image, you can load it as a background in the app. With a planform contour visible in the background, defining the chord distribution and chord reference for optimal fit is typically straightforward.
91
+
92
+ A built-in image editor allows you to scale the image and adjust colors to create a dark mode version best suited for use as a background.
93
+
94
+ Image scaling is performed by positioning two scale markers at the leading edge of the root and at the wing tip.
95
+
96
+ <img src="images/background_image.png" width="800" />
97
+
98
+
99
+
100
+ ### Wing Sections
101
+
102
+ Once the planform is defined, wing sections become the next key element. A wing section serves two main purposes:
103
+ * Define the position of an airfoil within the planform
104
+ * Define the flap hinge line position and the start of a 'flap group'
105
+
106
+ Every wing has at least two wing sections: root and tip. Additional sections can be added between them. Wing section locations can be defined in two ways:
107
+ - **By span position**: The wing section remains at a fixed relative span position, regardless of changes to wing span or chord distribution. This mode is useful for defining flaps.
108
+ - **By chord length**: The wing section maintains a constant relative chord length. When the chord distribution changes, the section repositions itself to preserve this chord length. This is particularly useful for maintaining an airfoil at a specific chord length (and thus Reynolds number).
109
+
110
+ <img src="images/wing_sections.png" width="800" />
111
+
112
+ <sup>In this example, wing section '1' at a fixed position is used to define the width of flap and aileron, while section '2' is the home of airfoil 'JX-GP-055' ensuring a certain chord. </sup>
113
+
114
+ A special case arises with trapezoidal planforms. Here wing sections are also used to define the chord distribution by having both: a fixed chord and a fixed span position.
115
+
116
+ <img src="images/wing_sections_trapezoidal.png" width="800" />
117
+
118
+ <sup>In this trapezoidal planform, wing sections 'root', '1' and 'tip' define the planform. Wing section '2' is just a helper section to have an additional flap at this position. </sup>
119
+
120
+
121
+
122
+ ### Hinge Line and Flap Depth
123
+
124
+ Flaps are defined by their hinge line and the wing sections that bound them on either side. A wing section can be assigned a 'flap group', and all subsequent wing sections with the same flap group form a single flap.
125
+
126
+ Typically, the hinge line coincides with the planform's reference line, which is also the default when defining flaps.
127
+
128
+ Greater flexibility can be achieved by defining a separate hinge line with hinge points at the root and tip sections.
129
+ In some cases, such as when using a curved reference line, kinks in the hinge line can be defined at specific wing sections.
130
+
131
+ <img src="images/flap_hinge_line.png" width="500" />
132
+
133
+ ### Export as DXF File
134
+ Once the wing design is complete, it can be exported to a CAD program as a DXF file. Airfoils can optionally be inserted into the drawing and/or exported separately as .dat files.
135
+
136
+ A useful feature allows you to define a common trailing edge thickness (trailing edge gap) in millimeters for all airfoils.
137
+ This eliminates the need for manual post-processing of airfoils in CAD.
138
+
139
+ <img src="images/dxf_view.png" width="800" />
140
+
141
+ **Note:** The generated planform contour is approximated by many small straight line segments (polyline) and should not be used directly for 3D construction. It is recommended to overlay splines on the leading and trailing edges in your CAD program for smooth surfaces.
142
+
143
+
144
+ ## Airfoils and Polars
145
+
146
+ ### Assignment of Airfoils
147
+
148
+ A wing section can be assigned either a fixed airfoil or left unassigned. When unassigned, a 'strak' (blended) airfoil is automatically created by blending the neighboring airfoils from adjacent sections. The blending ratio is determined by the relative chord lengths of the wing sections.
149
+
150
+ Root and tip sections require mandatory airfoil assignments. By default, example airfoils are initially assigned to these sections.
151
+
152
+ <img src="images/airfoil_names.png" width="800" />
153
+
154
+ <sup>Wing sections with the corresponding airfoils. The airfoil at 'section 2' is created by blending JX-GP-100 and JX-GP-055.</sup>
155
+
156
+
157
+ Airfoils can be viewed in normalized scale or in their actual scale within the wing sections.
158
+
159
+ **PlanformCreator2** includes the [AirfoilEditor](https://github.com/jxjo/AirfoilEditor), which provides common airfoil modification capabilities during wing design.
160
+
161
+ During the final design stage, all airfoil — including generated 'straked' airfoils — can be exported as .dat files. An optional feature allows setting a uniform trailing edge thickness ('TE gap') in millimeters for all airfoils, eliminating the manual rework typically required in CAD.
162
+
163
+
164
+ ### Airfoil Polars
165
+
166
+ **PlanformCreator2** uses the Worker tool from the [Xoptfoil2 project](https://jxjo.github.io/Xoptfoil2) to generate airfoil polars. One Worker capability is the multi-threaded creation of polar sets using Xfoil.
167
+
168
+ Polars are generated on-demand (lazily) when needed for display, running asynchronously in background tasks. Each polar is stored as a separate file in Xfoil format, enabling direct import into Xflr5.
169
+
170
+ The Worker's `auto_range` feature optimizes the alpha range to display the complete T1 polar from `cl_min` to `cl_max` for each airfoil.
171
+
172
+ A specific Reynolds number is defined for the root wing section. For other sections, the Reynolds number is automatically adjusted based on local chord length. All wing section polars are then generated as a unified set.
173
+
174
+ ![Polars](images/airfoil_polars.png "Screenshot of Polar Generation")
175
+ <sub>Airfoil and polar view showing auto-generated, Reynolds number-adjusted polars for airfoils at defined wing sections.</sub>
176
+
177
+ The spanwise polar distribution provides an initial assessment of the airfoil strak, particularly toward the tip where Reynolds numbers are lower.
178
+
179
+ ## Wing Analysis
180
+
181
+ ### Panel Generation
182
+
183
+ Aerodynamic analysis of a wing requires discretization into panels. PC2 provides several features to support this paneling process.
184
+
185
+ The paneled planform can be exported to Xflr5 and FLZ_vortex, or used for the integrated aerodynamic analysis described below.
186
+
187
+ The initial paneling step involves defining the number of x and y-panels for each section. With curved leading or trailing edges, this can produce significant geometric deviations between the original contour and the idealized panels, resulting in substantial inaccuracies in aerodynamic calculations.
188
+
189
+
190
+ <img src="./images/panelling_step_1.png" width="800" />
191
+
192
+ <sup>Initial panelling of a planform having a single wing section '1' between root and tip. The deviation between the original contour and the trapezoidal contour, marked with yellow lines, is way to high to achieve valid results in aerodynamic calculation. </sup>
193
+
194
+
195
+ Mesh optimization can then be applied using the following parameters:
196
+
197
+ * Minimum panel width – The number of y-panels per section is adjusted to achieve uniform panel width along the span
198
+ * Minimum chord deviation to planform** – Additional wing sections are inserted automatically until the deviation of the section trapezoids from the original planform falls below the defined threshold
199
+ * Minimum chord at tip – The tip is trimmed to achieve a Reynolds number that produces meaningful Xfoil results
200
+
201
+ ![PC2](images/panelling_steps.png "Panelling steps")
202
+
203
+ <sup>Auto-optimized paneling reduces deviation between original and idealized contour. The maximum chord deviation is now below 2%, sufficient to achieve reasonable results.</sup>
204
+
205
+ Like airfoil polar generation, panel generation occurs on-demand: a new mesh is initialized whenever the planform is modified.
206
+
207
+
208
+ #### Export to Xflr5
209
+
210
+ When using PC2 together with Xflr5 the major facilitation beside the definition of wing segments, is the automatic generation of all intermediate airfoils needed in Xflr5 at all wing sections. No further geometric work has to be done for wing definition and airfoils.
211
+
212
+ Please read [the short description](doc/PC2_export_to_Xflr5.md) of how it works.
213
+
214
+
215
+ #### Export to FLZ_vortex
216
+
217
+
218
+ PC2 generates a ready to use FLZ_vortex project file which can be loaded as a new 'flight scene' ('Flugszene') or FLZ_vortex can be launched directly from PC2 having the project file loaded. For direct launch the file extension .flz must be assigned to the app FLZ_vortex.
219
+
220
+ Do not forget to adjust the plane mass before running a calculation.
221
+
222
+ ### VLM Analysis
223
+
224
+ PC2 includes an integrated VLM (Vortex Lattice Method) module to calculate the lift distribution along the span based on the previously generated paneling.
225
+
226
+ <img src="./images/vlm_cp_panel.png" width="800" />
227
+
228
+ The primary objective of aerodynamic analysis in PC2 is to identify wing regions that will stall first when the angle of attack increases. For this assessment, 2D airfoil polar data and 3D lift aerodynamic data are combined in a viscous loop.
229
+
230
+ The 2D airfoil polar data is taken from the polar definitions described in the previous section. Airfoil polars are evaluated for each wing section. Wing analysis supports only T1 polars (constant speed).
231
+
232
+ The viscous loop calculates the effective Cl and alpha for each panel station along the span.
233
+
234
+ <img src="./images/vlm_viscous_loop.png" width="400" />
235
+
236
+ The maximum possible angle of attack (close to stall) is automatically evaluated and the critical area is marked within the paneling view and in the lift distribution view:
237
+
238
+ <img src="images/vlm_cl_max.png" width="800" />
239
+
240
+ <sup>Simple wing example showing the critical wing regions where local Cl reaches cl max of the airfoil.</sup>
241
+
242
+ By activating the chord distribution view, the chord and thus the area in which the wing will fail first can be changed interactively.
243
+
244
+ <img src="images/vlm_cl_max_with_chord.png" width="800" />
245
+
246
+ <sup>Interactive change in the chord distribution and thus the area in which the wing tends to stall first</sup>
247
+
248
+
249
+ ## The App - a quick look
250
+
251
+ **PlanformCreator2** provides a simple, intuitive UI for exploring the application and designing new wings.
252
+
253
+ ![PC2](images/PC2_app.png "PlanformCreator2")
254
+
255
+ - The upper tabs switch between different main views
256
+ - The panel on the left allows customization of settings for the current diagram
257
+ - The bottom left contains standard file and action functions
258
+
259
+ - The lower main panel provides input and modification of planform parameters. Key parameters can also be adjusted directly in the diagram using interactive control points
260
+
261
+ For new users, the 'Welcome' panel provides additional explanations and allows immediate modification of the sample planform. The 'New' function offers predefined templates that serve as good starting points for your project.
262
+
263
+
264
+ ## Software Aspects
265
+
266
+ `PlanformCreator2` is developed in [Python](https://www.python.org/) using [PyQt6](https://pypi.org/project/PyQt6/), which wraps and extends the Qt UI framework, and [PyQtGraph](https://www.pyqtgraph.org/), which wraps the Qt Graphics framework.
267
+
268
+ The main building blocks are:
269
+
270
+ * Model — Contains all geometry and mathematical helper routines to create and modify wing planforms. The model is independent of the UI.
271
+
272
+ * VLM — For lift distribution calculations, the Python VLM implementation [Panel Aero](https://github.com/DLR-AE/PanelAero) is used as the core module (thanks to Arne Voß, DLR).
273
+
274
+ * UI Framework — Base classes and a framework to ease implementation of forms based on widgets and diagrams. Plots in diagrams are handled by artists, each visualizing specific data aspects of a planform. The base classes are imported from the [Airfoil Editor](https://github.com/jxjo/AirfoilEditor) project as a package.
275
+
276
+ * Application — App modes and view panels handle presentation and user interaction.
277
+
278
+
279
+ # Installation
280
+
281
+ ### Windows Easy Setup
282
+
283
+ A Windows Installer including Worker for polar generation is available in the [releases section on GitHub](https://github.com/jxjo/PlanformCreator2/releases).
284
+
285
+ Download and run the setup program. During installation, you may define whether the file extension .pc2 (PlanformCreator2 project files) shall be assigned to the app.
286
+
287
+ When running the downloaded setup file, Windows SmartScreen may display a warning: "Windows protected your PC" with "Unknown publisher". **This is normal** for open-source software distributed without a code signing certificate.
288
+
289
+ To install in this case:
290
+ 1. Click "More info"
291
+ 2. Click "Run anyway"
292
+
293
+
294
+
295
+ ### Windows Setup using Python
296
+
297
+ If you already have installed Python version >=3.12, it is advantageous to install the PlanformCreator2 as a 'package'.
298
+ This will startup the app faster than using the standalone .exe file.
299
+ The package already includes Worker and Xoptfoil2.
300
+
301
+ Install the app:
302
+ ```
303
+ pip install planformcreator2
304
+ ```
305
+
306
+ To upgrade to the actual version use `pip install planformcreator2 -U`.
307
+
308
+ Run the app by typing `planformcreator2` on the command line.
309
+
310
+ The command `where planformcreator2.exe` will show, where Python installed the program within your filesystem.
311
+ This file path can be used to create a shortcut on your desktop or to assign the file extension '.dat' to the app, allowing to open an airfoil with a double click.
312
+
313
+ If you just want to try out the app and want to ensure, that the installation doesn't influence other packages, you may prefer to install the package in an 'virtual environment'. For daily use a 'normal' installation is more convenient.
314
+
315
+
316
+
317
+ ### Linux and MacOS
318
+
319
+ The app is installed as a Python 'package'. Please ensure to have a Python version >=3.12.
320
+
321
+ `pip3 install planformcreator2`
322
+
323
+ To upgrade to the actual version use
324
+
325
+ `pip3 install planformcreator2 -U`
326
+
327
+ Run the app by typing `planformcreator2` on the command line.
328
+
329
+ The command `which planformcreator2` will show, where Python installed the program within your filesystem.
330
+ This file path can be used to create a shortcut on your desktop or to assign the file extension '.dat' to the app, allowing to open an airfoil with a double click.
331
+
332
+
333
+ #### Preparing Worker
334
+ To use polar generation and wing analysis the program `worker` has to be compiled and made available for PlanformCreator2 by copying the program into /usr/local/bin.
335
+
336
+ Please have a look into [Xoptfoil2 README](https://github.com/jxjo/Xoptfoil2#Installation) for further information.
337
+
338
+ As a little reward for the extra effort polar generation will run 2-3 times faster on Linux compared to the Windows version.
339
+
340
+ #### Ubuntu
341
+
342
+ If there is warning message like "Failed to create wl_display" when starting the app, set a QT environment variable with `export QT_QPA_PLATFORM=xcb`.
343
+
344
+ ### Cloning from Github
345
+
346
+ If you want to clone the AirfoilEditor repo from GitHub for local development, the following package have to be installed in your (virtual) python environment
347
+
348
+ ```
349
+ pip install packaging
350
+ pip install numpy
351
+ pip install pyqt6
352
+ pip install pyqtgraph
353
+ pip install ezdxf
354
+ pip install airfoileditor
355
+ ```
356
+
357
+ ### Changelog
358
+
359
+ See [CHANGELOG.md](CHANGELOG.md) for history of changes.
360
+
361
+
362
+ # Finally
363
+
364
+ I hope you enjoy working with the **PlanformCreator2**.
365
+
366
+ jochen@jxjo.de
@@ -0,0 +1,36 @@
1
+ ![PC2](https://github.com/jxjo/PlanformCreator2/blob/main/images/PC2_logo.png?raw=true)
2
+
3
+ ### Version 4.0
4
+
5
+ ---
6
+
7
+ **PlanformCreator2** - short PC2 - is an app to design the planform of a wing focusing on model sailplanes.
8
+
9
+ #### Planform Design
10
+
11
+ * Define a planform based on a chord distribution and a reference line along wing span
12
+ * Import image of an existing wing as a background image for design
13
+ * Add wing sections with fixed position or relative chord length
14
+ * Define flaps hinge line and flaps
15
+ * Export planform as dxf file for use in CAD
16
+
17
+ #### Airfoils and Polars
18
+ * Define airfoil at wing sections and edit its properties using the [Airfoil Editor](https://github.com/jxjo/AirfoilEditor)
19
+ * Generate blended airfoils for intermediate wing sections ('strak')
20
+ * View polars of the airfoil based on xfoil polar generation
21
+
22
+ #### Wing Analysis
23
+ * Auto paneling of the planform as preparation for aerodynamic calculation
24
+ * VLM based lift calculation
25
+ * Determine critical sections where cl_max of airfoils will be reached
26
+ * Export wing definition to Xflr5 and FLZ_vortex for further analysis
27
+
28
+
29
+ The app, developed in Python with the Qt UI framework, runs on Windows, Linux, and MacOS.
30
+ Linux and MacOS users are required to compile Worker (polar generation) from the [Xoptfoil2](https://github.com/jxjo/Xoptfoil2) project.
31
+
32
+ Find more info about the **PlanformCreator2** on [Github](https://github.com/jxjo/PlanformCreator2).
33
+
34
+ ---
35
+
36
+ Find Release Information in [CHANGELOG](https://github.com/jxjo/PlanformCreator2/blob/main/CHANGELOG.md).
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ """
2
+ PlanformCreator2 Package
3
+ """