camurban / pterasoftware Goto Github PK
View Code? Open in Web Editor NEWPtera Software is a fast, easy-to-use, and open-source software package for analyzing flapping-wing flight.
License: MIT License
Ptera Software is a fast, easy-to-use, and open-source software package for analyzing flapping-wing flight.
License: MIT License
As pointed out by @RaphZufferey via email, installing Ptera Software's WebP dependency can be problematic on Windows. @RaphZufferey came up with the following useful workaround:
pip install conan
in the local Windows Terminal.conan profile update "settings.compiler=Visual Studio" default
in the local Windows Terminal.conan profile update "settings.compiler.version=14" default
in the local Windows Terminal.pip install pterasoftware
in the local Windows Terminal. If you've forked or cloned the repository, instead run pip install -r requirments.txt
.This procedure worked for me while running PteraSoftware-2.0.0 on Windows 11.
I'll open a new issue on the WebP package's repository to see if this process can be automated during the package's installation.
Hi,
I was running the 'unsteady_ring_vortex_lattice_method_solver_variable_example' but I can't see any 2D force/moment graphs once the simulation ends. On the other hand, I'm allowed to save the animation in the 'example' folder pressing 'q' from the visualizer. Have you ever had any similar trouble? I checked all the necessary requirements and 'testing' is set to 'False' in the code. Thanks a lot, this is an incredibly useful tool!!
We should make sure that all the integration tests compare output against expected results. This means getting rid of all the "test_method_does_not_throw" tests.
We could also implement PyTests or some other methodology with a simpler syntax.
After installing PteraSoftware through pip, (as stated in the README), Python is unable to import it. Running import pterasoftware as ps
raises an exception.
When looking in the packages listed in the virtual environment, there is not a folder for pterasoftware
, only PteraSoftware-1.2.0.dist-info
. This seems wrong.
Create a virtual environment and install PteraSoftware:
python -m venv .venv
".venv/scripts/activate"
pip install pterasoftware
python
Make sure you are using Python 3.8.
Python shell:
>>> import pterasoftware as ps
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pterasoftware'
I have tested this on two different Windows machines, both with Pip directly and with Poetry. All have had the same issue.
When I ran "steady_horseshoe_vortex_lattice_method_solver_example",the result I got was different with yours.The streamlines was confusion and the pressures was wrong. When I ran "unsteady_ring_vortex_lattice_method_solver_variable_example",I got "SystemError: PyEval_EvalFrameEx returned a result with an error set".I could not get the same result which is in docs/examples.
Hi, Cam. Today I went through your geometry.py and operating_point.py and areodynamic.py. Then I succefully customizied Operating Points and geometry following the rules and get the aerodynamic result. But I met problem in the method of "Customizable Aircraft Geometry".
In geometry.py, Wings can be defined as a collection of two or more wing cross sections of any dimensions and positions. And wing cross sections can be specified to match the mean camber line of an airfoil. In this way, the planform of wing is determined by a group of airfoils designer selected from the "Airfoil" file. It is good to divide into panel and run the solver.
However, I hope to define the Wings in a different way for more variations of shape. For example, wings is a curve like the insects' wing.
I tried to define the Wings directly. Such as, I input the wing planform which represented as a set of points(x,y), and set the wing thickness of wing as a constent number instead of a set of wing_cross_sections. Is that possible in Pterasoftware?
Codecov, Black, and Pre-commit, according to the README, are all required dependencies of PteraSoftware, even though these are only development tools and are not used during execution of software by a typical user.
In addition, I am uncertain if Codecov even possesses an open-source license, making its installation and usage ethically dubious for some.
Therefore, Codecov, Black, and Pre-commit should be removed as dependencies from the general pip package.
Hello Cam,
This is an awesome project. I was wondering at what flapping frequency do you expect the unsteady VLM solver to stop giving accurate results? Have you attempted any validation on the force outputs? I would imagine that at higher frequencies you'd need some leading edge vortex shedding to capture what is happening (but maybe not?!)
Dear developer, good evening,
I now have displacement data on the deformation of flexible thin films in experiments, hoping to reconstruct the mechanical characteristics of thin films such as strain energy and stress through deformation. I would like to know if this algorithm supports my idea?
If I could receive your reply, I would greatly appreciate it! Thank you!
Hi Cam, I read your description of this project, it's cool, thanks for your work.
But I try to run your example codes several times and meet this bug.
example_solver.run()'
Airplane 'object is iterable. and make this command run
example_solver = ps.steady_horseshoe_vortex_lattice_method.SteadyHorseshoeVortexLatticeMethodSolver(
steady_problem=example_problem
)
Hey there, when I run "unsteady_ring_vortex_lattice_method_solver_variable" in example, it shows:
Simulating: 1% |โ | Elapsed: 00:01, Remaining: 01:59
Traceback (most recent call last):
File "D:/soft/PteraSoftware/examples/unsteady_ring_vortex_lattice_method_solver_variable.py", line 432, in
example_solver.run(
File "D:\soft\PteraSoftware\pterasoftware\unsteady_ring_vortex_lattice_method.py", line 456, in run
self.calculate_near_field_forces_and_moments()
File "D:\soft\PteraSoftware\pterasoftware\unsteady_ring_vortex_lattice_method.py", line 962, in calculate_near_field_forces_and_moments
self.calculate_solution_velocity(points=self.panel_front_vortex_centers)
File "D:\soft\PteraSoftware\pterasoftware\unsteady_ring_vortex_lattice_method.py", line 816, in calculate_solution_velocity
velocities_from_wings = aerodynamics.collapsed_velocities_from_ring_vortices(
ZeroDivisionError: division by zero
Process finished with exit code 1
Can you have me with that? Thanks a lot.
Preparing for the release of V1.0.0
I am currently compiling a .exe installer using Inno Setup and PyInstaller.
If you could give me the ability to provide releases this would be a very much streamlined process. Get in touch with me via this or my email if you have any questions, however I will try and provide relevant documentation in case you aren't able to give me this level of access.
I will update this when there is something relevant! Hope you are well.
Hi Cameron. I had a doubt. How do you model flapping in UVLM? Do you just give a roll-rate to the wings or do you also change the geometry of the wing as the dihedral changes? Your help will be greatly appreciated.
Thanks
Bharath
We should create a command-line interface or GUI.
Frontend development is not something I know well, so I'd love some help on this feature!
I am getting dependency errors while installing PteraSoftware.
This is while installing Ptera using "pip install PteraSoftware"
ERROR: Cannot install -r requirements.txt (line 3) because these package versions have conflicting dependencies.
The conflict is caused by:
pyvista 0.36.1 depends on vtk
pyvista 0.36.0 depends on vtk<=9.2.0 and >=8.1.2; python_version < "3.10"
pyvista 0.35.2 depends on vtk
pyvista 0.35.1 depends on vtk
pyvista 0.34.2 depends on vtk
pyvista 0.34.1 depends on vtk
To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Issue #3 saw the removal of development dependencies from the requirements.txt
file. I agree with this decision, however, I do not agree with limiting their reference to only the README.
Instead, development dependencies should be added to a requirements_dev.txt
file.
James Murphy from the YouTube channel mCoding did a great video about packages that goes over this very concept (and others). See how he adds the requirements_dev.txt
here: https://youtu.be/DhUpxWjOhME?t=515.
We should create a setup tutorial video and link to it in the documentation. This should be geared toward a user who doesn't have Python, an IDE, or Ptera Software installed on their computer yet.
Thank you for this great software. @RaphZufferey and I am using it currently to analyse flapping flight with UVLM to incorporate Aeroelasticity effects. I observed an initial Negative spike in Lift Force after plotting results from Ptera. This spike makes no physical sense for a flapping wing, so I was wondering if this is a numerical issue that could potentially be solved.
Running the provided example
with the addition of
ps.output.plot_results_versus_time(
show=True,
save=True,
)
will reproduce the above results
No spike in the lift coefficient is observed in the README.
Please complete the following information.
A similar issue was being discussed about a year ago here #17 . I am wondering if any resolution was achieved to the same or any work is in progress. I am open to picking up some work towards this issue as I have been making myself familiar with Ptera's UVLM solver.
Firstly, I think PteraSoftware is very useful for analyzing flapping wings.But when I ran the "steady_horseshoe_vortex_lattice_method_solver_example", I can not get the same result with yours. And when I ran "unsteady_ring_vortex_lattice_method_solver_static_example", I got some errors. I do not change your codes. I need your help.
The Conda package manager allows easy installation of packages and, more importantly, independent environments for compartmentalization of dependencies. PteraSoftware could benefit greatly from the addition of a conda package, perhaps through conda-forge.
The PteraSoftware README recommends installing PteraSoftware through Anaconda, but only a pip package exists, even though Anaconda recommends against installing pip packages since these can create conflicts with the conda package manager.
Therefore, PteraSoftware should be released as a conda package, in addition to or as a replacement of its PyPi release.
Users with no familiarity of Python or IDE's will be unable to use this software. A fully packaged installer created at this stage will save hassle down the line.
Use of PyInstaller and Inno Setup to create package installer.
@RaphZufferey and I are working on a Flapping wing robot with flexible wings. Using PteraSoftware, we aim towards "closing the loop" in the UVLM solver by adding aeroelastic structural effects due to wing flexibility. We have a model that describes structural effects of the wing as wing torsion around the leading edge.
Currently, PteraSoftware predefines the movement of the wing cross-sections, wings and the airplane as a whole before the UVLM solver is called. The overall aim of our solver is to enable redefinition of the wing with dynamic movement parameters (such as wing twist) at every timestep. This will enhance the capabilities of PteraSoftware and introduce the potential framework for adding feedback loops within simulations.
Integrating this aeroelasticity solver in PteraSoftware this would require some changes to the current structuring of the "Movement" class, which would allow for the redefinition of wing movement at every timestep. We have implemented this change and would like to have an open discussion about whether this method seems feasible or if there are any other approaches currently being investigated.
We would like to add the Aeroelasticity Solver as another feature within the Unsteady Ring Vortex Lattice Solver. The deformation we are trying to express is a "Wing Cross-section Twist" that can be redefined at every timestep. To implement this, I have mirrored the existing logic of the "Movement" class in PteraSoftware. A short diagram explaining my implementation can be found below :
This solution is stable and convergent upto a certain extent. At large "twist" angles, the solver is unable to keep up with the sudden deformation. So we plan to further add a convergence layer to interpolate the twist till a stable solution is achieved. We will update you on our progress with the same.
To this end, I have created some bugs/issues in PteraSoftware regarding some force outputs that don't make physical sense, #27. I will like to actively work on this issue as well and am open to your ideas/suggestions on this implementation. I will be able to take on some work to implement the changes/additional features.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.