Some usefull scripts for the Nastran's 145 solution (Flutter Analysis) using the pyNastran package.

Overview

DeepSource

nastran-aero-flutter

This project is intended to analyse the Supersonic Panel Flutter using the NASTRAN software.

The project uses the pyNastran and the python scientific packeges (i.e scipy, numpy, matplotlib).

Currently, the focus is to use the aerodynamic Piston Theory, available on NASTRAN with the CAERO5 element. But it can be extended to use with any aerodynamic element.

This software is result of a research project of the Department of Mechanical Engineering at the Federal University of Minas Gerais (UFMG).

Use

An exemple of utilization is on the run_analysis.py script.

First it generates the plate structure and required properties.

import numpy as np
from nastran.structures.panel import LaminatedStructuralPlate
from nastran.structures.composite import OrthotropicMaterial

a, b = 100, 100

p1 = np.array([0, 0, 0])
p2 = p1 + np.array([a, 0, 0])
p3 = p1 + np.array([a, b, 0])
p4 = p1 + np.array([0, b, 0])

cfrp = OrthotropicMaterial(1, 54000., 18000., 0.3, 7200., 2.6e-9)

nchord, nspan = 10, 10

lam = LaminatedStructuralPlate.create_sawyer_plate(p1, p2, p3, p4, nspan, nchord, 1, 45, 6, 0.1, cfrp)

Then you can add the analysis properties for SOL 145 Aeroelastic Dynamic Flutter. The PanelFlutterPistonAnalysisModel class is a wrapper of the pyNastran's BDF class.

from nastran.aero.analysis.panel_flutter import PanelFlutterPistonAnalysisModel

config = {
    'vref': 1000.,                      # used to calculate the non-dimensional dynamic pressure must be the same in control case (mm/s in the case)
    'ref_rho': 1.225e-12,               # air density reference (ton/mm^3 in the case)
    'ref_chord': 300.,                  # reference chord (mm in the case)
    'n_modes': 15,                      # number searched modes in modal analysis
    'frequency_limits': 
        [.0, 3000.],                    # the range of frequency (Hz) in modal analysis
    'method': 'PK',                     # the method for solving flutter (it will determine the next parameters
    'densities_ratio': [.5],            # rho/rho_ref -> 1/2 simulates the "one side flow" of the panel (? reference ?)
    'machs': [3.5, 4.5, 5.5, 6.5],      # Mach numbers
    'alphas': [.0, .0, .0, .0],         # AoA (°) -> 0 is more conservative (? reference ?)
    'reduced_frequencies': 
        [.001, .01, .1, .2, .4, .8],    # reduced frequencies (k) (check influence)
    'velocities':                       # velocities (mm/s in the case)
        np.linspace(10, 100, 10)*1000,
}

params =  {
    'VREF': 1000.0,
    'COUPMASS': 1,
    'LMODES': 20,
    # 'POST': [-1]
}

analysis = PanelFlutterPistonAnalysisModel(lam.bdf, params=params)
analysis.set_global_case_from_dict(config)

You can add "super" panels, that is just a wrapper of CAEROx elements that make one element.

from nastran.aero.superpanels import SuperAeroPanel5

spanel_p = SuperAeroPanel5(1, p1, p2, p3, p4, nchord, nspan, theory='VANDYKE')
analysis.add_superpanel(spanel_p)

You can set multiple subcases for example varing the boundary conditions.

cases_labels = {
    1: "Loaded edges SS & unloaded edges SS",
    2: "Loaded edges SS & unloaded edges CP",
    3: "Loaded edges SS & unloaded edges SS/CP",
}

spc_cases = {
    1: ('123', '123', '123', '123'),             # loaded edges SS, unloaded edges SS
    2: ('123', '123', '123456', '123456'),       # loaded edges SS, unloaded edges CP
    3: ('123', '123', '123', '123456'),          # loaded edges SS, unloaded edges SS/CP
}

for i, spcs in spc_cases.items():
    spc_id = analysis.idutil.get_next_sid()
    for comp, nds in zip(list(spcs), lam.limit_nodes()):
        if comp == '':
            continue
        analysis.model.add_spc1(spc_id, comp, nds, comment=cases_labels[i])
    sub_config = {
        'LABEL': cases_labels[i],
        'SPC': spc_id,
    }
    analysis.create_subcase_from_dict(PanelFlutterSubcase, i, sub_config)

Then you must write all cards to the BDF object and export the file.

analysis.write_cards()
analysis.model.write_bdf('pflutter.bdf', enddata=True)

Then you can run the analysis and post-processes.

Outputs

The postprocessing generates DataFrames objects from the .f06 result files.

from nastran.aero.post import read_f06, get_critical_roots, plot_vf_vg

df = read_f06("pflutter.f06")

critic_df = get_critical_roots(df)

fig = plot_vf_vg(df.xs((1,3.5))) # Subcase, Mach
fig.show()

And Plots

V-f

V-g

You might also like...
A step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.
A step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

This project has a step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

My solution for a MARL problem on a Grid Environment with Q-tables.

To run the project, run: conda create --name env python=3.7 pip install -r requirements.txt python run.py To-do: Add direction to the state space Take

LPCV Winner Solution of Spring Team

LPCV Winner Solution of Spring Team

A lightweight solution for local Particle development.
A lightweight solution for local Particle development.

neopo A lightweight solution for local Particle development. Features Builds Particle projects locally without any overhead. Compatible with Particle

Placeholders is a single-unit storage solution for your Frontend.
Placeholders is a single-unit storage solution for your Frontend.

Placeholder Placeholders is a single-unit file storage solution for your Frontend. Why Placeholder? Generally, when a website/service requests for fil

A simple solution for water overflow problem in Python

Water Overflow problem There is a stack of water glasses in a form of triangle as illustrated. Each glass has a 250ml capacity. When a liquid is poure

WildHack 2021 solution by Nuclear Foxes team (public version).

WildHack 2021 Nuclear Foxes Team This repo contains our project for the Wildberries Hackathon 2021. Task 2: Searching tags Implement an algorithm of r

Ballcone is a fast and lightweight server-side Web analytics solution.
Ballcone is a fast and lightweight server-side Web analytics solution.

Ballcone Ballcone is a fast and lightweight server-side Web analytics solution. It requires no JavaScript on your website. Screenshots Design Goals Si

Python solution of advent-of-code 2021

Advent of code 2021 Python solutions of Advent of Code 2021 written by Eric Bouteillon Requirements The solutions were developed and tested using Pyth

Comments
  • Bump pywin32 from 227 to 301

    Bump pywin32 from 227 to 301

    Bumps pywin32 from 227 to 301.

    Release notes

    Sourced from pywin32's releases.

    Release 301

    The changes

    If you use pip: pip install pywin32 --upgrade

    A number of things don't work via pip, so you may choose to install binaries - but you must choose both the correct Python version and "bittedness".

    Even if you have a 64bit computer, if you installed a 32bit version of Python you must install the 32bit version of pywin32.

    There is one binary per-version, per-bittedness. To determine what version of Python you have, start Python and look at the first line of the banner. Compare these 2:

    Python 2.7.2+ ... [MSC v.1500 32 bit (Intel)] on win32
    Python 2.7.2+ ... [MSC v.1500 64 bit (AMD64)] on win32
                                  ^^^^^^^^^^^^^^
    

    If the installation process informs you that Python is not found in the registry, it almost certainly means you have downloaded the wrong version - either for the wrong version of Python, or the wrong "bittedness".

    Release 300

    This is the first release to support only Python 3.5 and up - Python 2 is no longer supported. To celebrate, the build numbers have jumped to 300! There were significant changes in this release - you are encouraged to read CHANGES.txt carefully.

    To download pywin32 binaries you must choose both the correct Python version and "bittedness".

    Note that there is one download package for each supported version of Python - please check what version of Python you have installed and download the corresponding package.

    Some packages have a 32bit and a 64bit version available - you must download the one which corresponds to the Python you have installed. Even if you have a 64bit computer, if you installed a 32bit version of Python you must install the 32bit version of pywin32.

    To determine what version of Python you have, just start Python and look at the first line of the banner. A 32bit build will look something like

    Python 3.8.1+ ... [MSC v.1913 32 bit (Intel)] on win32

    While a 64bit build will look something like:

    Python 3.8.1+ ... [MSC v.1913 64 bit (AMD64)] on win32

    If the installation process informs you that Python is not found in the registry, it almost certainly means you have downloaded the wrong version - either for the wrong version of Python, or the wrong "bittedness".

    Release 228

    To download pywin32 binaries you must choose both the correct Python version and "bittedness".

    Note that there is one download package for each supported version of Python - please check what version of Python you have installed and download the corresponding package.

    Some packages have a 32bit and a 64bit version available - you must download the one which corresponds to the Python you have installed. Even if you have a 64bit computer, if you installed a 32bit version of Python you must install the 32bit version of pywin32.

    To determine what version of Python you have, just start Python and look at the first line of the banner. A 32bit build will look something like

    Python 2.7.2+ ... [MSC v.1500 32 bit (Intel)] on win32
    

    While a 64bit build will look something like:

    Python 2.7.2+ ... [MSC v.1500 64 bit (AMD64)] on win32
    

    ... (truncated)

    Changelog

    Sourced from pywin32's changelog.

    A changelog for recent builds as pasted into the sourceforge page.

    Generally created by hand after running: hg log -rb2xx: > log.out However contributors are encouraged to add their own entries for their work.

    Note that build 228 was the last version supporting Python 2.

    Since build 300:

    • Fix some confusion on how dynamic COM object properties work. The old code was confused, so there's a chance there will be some subtle regression here - please open a bug if you find anything, but this should fix #1427.

    • COM objects are now registered with the full path to pythoncomXX.dll, fixes #1704.

    • Creating a win32crypt.CRYPT_ATTRIBUTE object now correctly sets cbData.

    • Add wrap and unwrap operations defined in the GSSAPI to the sspi module and enhance the examples given in this module. (#1692, Emmanuel Coirier)

    • Fix a bug in win32profile.GetEnvironmentStrings() relating to environment variables with an equals sign (@​maxim-krikun in #1661)

    • Fixed a bug where certain COM dates would fail to be converted to a Python datetime object with ValueError: microsecond must be in 0..999999. Shoutout to @​hujiaxing for reporting and helping reproduce the issue (#1655)

    • Added win32com.shell.SHGetKnownFolderPath() and related constants.

    • CoClass objects should work better with special methods like len etc. (#1699)

    • Shifted work in win32.lib.pywin32_bootstrap to Python's import system from manual path manipulations (@​wkschwartz in #1651)

    • Fixed a bug where win32print.DeviceCapabilities would return strings containing the null character followed by junk characters. (#1654, #1660, Lincoln Puzey)

    Since build 228:

    • Fixed a bug where win32com.client.VARIANT params were returned in the reverse order. This only happened when win32com.client.VARIANT was explicitly used (ie, not when normal params were passed) For example:
          arg1 = VARIANT(pythoncom.VT_R4 | pythoncom.VT_BYREF, 2.0)
      

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pyyaml from 5.3.1 to 5.4

    Bump pyyaml from 5.3.1 to 5.4

    Bumps pyyaml from 5.3.1 to 5.4.

    Changelog

    Sourced from pyyaml's changelog.

    5.4 (2021-01-19)

    Commits
    • 58d0cb7 5.4 release
    • a60f7a1 Fix compatibility with Jython
    • ee98abd Run CI on PR base branch changes
    • ddf2033 constructor.timezone: _copy & deepcopy
    • fc914d5 Avoid repeatedly appending to yaml_implicit_resolvers
    • a001f27 Fix for CVE-2020-14343
    • fe15062 Add 3.9 to appveyor file for completeness sake
    • 1e1c7fb Add a newline character to end of pyproject.toml
    • 0b6b7d6 Start sentences and phrases for capital letters
    • c976915 Shell code improvements
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Chordwise camber geometry (curved panel)

    Chordwise camber geometry (curved panel)

    Piston Theory on Nastran has a set of parameters called Thickness Integrals, which is to account for foil thickness in an aerodynamic sense, but it must retain the chord rigidity assumption. For a panel, which has a chord-wise flexibility one element could not represent the behavior of the panel. Instead, if a set of elements is utilized it can achieve representation of the model and comply with the rigidity of the chord of the element at the same time.

    Currently, only a flat panel (plate) is implemented, but in theory, we can in implement curved panels too.

    enhancement 
    opened by vsdsantos 0
Releases(v0.2.1-alpha)
Owner
zuckberj
open source, aerospace
zuckberj
edgetest is a tox-inspired python library that will loop through your project's dependencies, and check if your project is compatible with the latest version of each dependency

Bleeding edge dependency testing Full Documentation edgetest is a tox-inspired python library that will loop through your project's dependencies, and

Capital One 16 Dec 07, 2022
Supply Chain will be a SAAS platfom to provide e-logistic facilites with most optimal

Shipp It Welcome To Supply Chain App [ Shipp It ] In "Shipp It" we are creating a full solution[web+app] for a entire supply chain from receiving orde

SAIKAT_CLAW 25 Dec 26, 2022
A tool that bootstraps your dotfiles ⚡️

Dotbot Dotbot makes installing your dotfiles as easy as git clone $url && cd dotfiles && ./install, even on a freshly installed system! Rationale Gett

Anish Athalye 5.9k Jan 07, 2023
An alternative site to emplea.do due to inconsistent service of the app.

feline a agile and fast alternative to emplea.do License: MIT Settings Moved to settings. Basic Commands Setting Up Your Users To create a normal user

Codetiger 8 Nov 10, 2021
A lightweight Python module to interact with the Mitre Att&ck Enterprise dataset.

enterpriseattack - Mitre's Enterprise Att&ck A lightweight Python module to interact with the Mitre Att&ck Enterprise dataset. Built to be used in pro

xakepnz 7 Jan 01, 2023
Find out where all films you want to watch are streaming

Just Watch Letterboxd Find out where all films you want to watch are streaming Ever wonder what films you want to watch are already on the streaming p

Jordan Oslislo 2 Feb 04, 2022
Cvdl-hw2 - Find Contour, Camera Calibration, Augmented Reality and Stereo Disparity Map

opevcvdl-hw2 This project uses openCV and Qt to achieve the requirements. Version Python 3.7 opencv-contrib-python 3.4.2.17 Matplotlib 3.1.1 pyqt5 5.1

Kenny Cheng 3 Aug 17, 2022
Discover and load entry points from installed packages

Entry points are a way for Python packages to advertise objects with some common interface. The most common examples are console_scripts entry points,

Thomas Kluyver 69 Jul 05, 2022
A funny alarm clock I made in python

Wacky-Alarm-Clock Basically, I kept forgetting to take my medications, so I thought it would be a fun project to code my own alarm clock and make it r

1 Nov 18, 2021
Geodesic Dome Math

dome Geodesic Dome Math Python dome tool dome.py calculates an icosahedron or 2v geodesic dome and creates 3d printable hubs as OpenSCAD sources. usag

Brian Olson 2 Feb 09, 2022
Prophet is a tool to discover resources detailed for cloud migration, cloud backup and disaster recovery

Prophet is a tool to discover resources detailed for cloud migration, cloud backup and disaster recovery

22 May 31, 2022
A Gura parser implementation for Python

Gura parser This repository contains the implementation of a Gura format parser in Python. Installation pip install gura-parser Usage import gura gur

JWare Solutions 19 Jan 25, 2022
An Notifier Program that Notifies you to relax your eyes Every 15 Minutes👀

Every 15 Minutes ⌛ Every 15 Minutes is an application that is used to Notify you to Relax your eyes Every 15 Minutes, This is fully made with Python a

FSP Gang s' YT 2 Oct 18, 2021
Configure request params such as text, color, size etc. And then download the image

Configure request params such as text, color, size etc. And then download the image

6 Aug 18, 2022
How to use Microsoft Bing to search for leaks?

Installation In order to install the project, you need install its dependencies: $ pip3 install -r requirements.txt Add your Bing API key to bingKey.t

Ernestas Kardzys 2 Sep 21, 2022
Use this function to get list of routes for particular journey

route-planner Functions api_processing Use this function to get list of routes for particular journey. Function has three parameters: Origin Destinati

2 Nov 28, 2021
MeerKAT radio telescope simulation package. Built to simulate multibeam antenna data.

MeerKATgen MeerKAT radio telescope simulation package. Designed with performance in mind and utilizes Just in time compile (JIT) and XLA backed vectro

Peter Ma 6 Jan 23, 2022
Cairo-math-64x61 - Fixed point 64.61 math library for Cairo / Starknet

Cairo Math 64x61 A fixed point 64.61 math library for Cairo & Starknet Signed 64

Influence 63 Dec 05, 2022
Write a program that works out whether if a given year is a leap year

Leap Year 💪 This is a Difficult Challenge 💪 Instructions Write a program that works out whether if a given year is a leap year. A normal year has 36

Rodrigo Santos 0 Jun 22, 2022
Blender Addon for Snapping a UV to a specific part of a Tilemap

UVGridSnapper A simple Blender Addon for easier texturing. A menu in the UV editor allows a square UV to be snapped to an Atlas texture, or Tilemap. P

2 Jul 17, 2022