Skip to content

Commit

Permalink
Merge branch 'develop' into dev_pip2
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-l-p authored Nov 2, 2023
2 parents 1b0f8af + 4b5a520 commit 4937efe
Show file tree
Hide file tree
Showing 85 changed files with 14,816 additions and 9,009 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- develop
- master
- main
tags:
- 'v*'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test Docker image build
on:
pull_request:
branches:
- master
- main
- develop
- 'rc*'
push:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The related to the SHARPy tests that run the `SHARPy Tests` job are:
* `sharpy_no_test_needed.yaml`: otherwise

This avoids running the full set of tests for changes in the documentation etc.
Since the merge to `develop` and `master` is protected by the tests passing, the
Since the merge to `develop` and `main` is protected by the tests passing, the
second workflow ensures a positive result for those PRs that did not change the
Python code, hence allowing the merge.

Expand All @@ -19,5 +19,5 @@ Python code, hence allowing the merge.
Two nearly identical workflows, the only difference is that one pushes the Docker
image to the SHARPy packages. Therefore:

* `docker_build.yaml`: Builds the Docker image but does not push. Runs on changes to the `docker*` workflows, changes to the `utils/` directory (environments) and changes to the `Dockerfile`. Required test for PRs to merge to `develop` and `master`.
* `docker_build.yaml`: Builds and pushes the Docker image. Runs on pushes to `develop`, `master` and annotated tags.
* `docker_build.yaml`: Builds the Docker image but does not push. Runs on changes to the `docker*` workflows, changes to the `utils/` directory (environments) and changes to the `Dockerfile`. Required test for PRs to merge to `develop` and `main`.
* `docker_build.yaml`: Builds and pushes the Docker image. Runs on pushes to `develop`, `main` and annotated tags.
2 changes: 1 addition & 1 deletion .github/workflows/sharpy_no_test_needed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: SHARPy Tests
on:
pull_request:
branches:
- master
- main
- develop
- 'rc*'
paths-ignore:
Expand Down
29 changes: 13 additions & 16 deletions .github/workflows/sharpy_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '.github/workflows/sharpy*'
pull_request:
branches:
- master
- main
- develop
- 'rc*'

Expand All @@ -31,28 +31,25 @@ jobs:
with:
version: 10
platform: x64
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.9
#Swapped from Conda to Mamba due to Github runner memory constraint
- name: Setup Mamba
uses: mamba-org/setup-micromamba@v1
- name: Pre-Install dependencies
run: |
gfortran --version
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
# wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O mamba.sh
bash mamba.sh -b -p $HOME/mamba
export PATH="$HOME/mamba/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
# conda config --append channels conda-forge
conda update --name base conda
conda list --name base conda
conda init bash
mamba config --set always_yes yes --set changeps1 no
mamba update --name base mamba
mamba list --name base mamba
mamba init bash
hash -r
export QT_QPA_PLATFORM='offscreen'
sudo apt install libeigen3-dev
conda env create -f utils/environment_new.yml
conda init bash
mamba env create -f utils/environment.yml
mamba init bash
source activate sharpy
git submodule init
git submodule update
Expand Down
26 changes: 26 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

python:
install:
- requirements: docs/requirements_rtd

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion .version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "release version",
"message": "2.1",
"message": "2.2",
"color": "green"
}
38 changes: 36 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
# Changelog

## [2.0.1](https://github.com/imperialcollegelondon/sharpy/tree/2.0.1) (2023-05-31)
## [2.2](https://github.com/imperialcollegelondon/sharpy/tree/2.2) (2023-10-18)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/2.0...2.0.1)
[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/2.1...2.2)

**Implemented enhancements:**

- Added environment for Apple Silicon \(ARM64\) [\#254](https://github.com/ImperialCollegeLondon/sharpy/pull/254) ([ben-l-p](https://github.com/ben-l-p))
- New Fuselage Model plus Minor Improvements [\#249](https://github.com/ImperialCollegeLondon/sharpy/pull/249) ([sduess](https://github.com/sduess))

**Fixed bugs:**

- fix polars concatenation in assembly of aeroinformation - develop [\#253](https://github.com/ImperialCollegeLondon/sharpy/pull/253) ([kccwing](https://github.com/kccwing))
- fix polars concatenation in assembly of aeroinformation - main [\#252](https://github.com/ImperialCollegeLondon/sharpy/pull/252) ([kccwing](https://github.com/kccwing))
- Minor bug fixes in aero util functions and save data postprocessor [\#247](https://github.com/ImperialCollegeLondon/sharpy/pull/247) ([sduess](https://github.com/sduess))

**Closed issues:**

- Automated tests failed : UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 47: ordinal not in range\(128\) [\#245](https://github.com/ImperialCollegeLondon/sharpy/issues/245)
- Wrong key in settings for /cases/templates/flying\_wings.py [\#205](https://github.com/ImperialCollegeLondon/sharpy/issues/205)

**Merged pull requests:**

- merging develop into main for v2.2 [\#259](https://github.com/ImperialCollegeLondon/sharpy/pull/259) ([kccwing](https://github.com/kccwing))
- fix \[docker\] use correct environment name in docker bashrc [\#257](https://github.com/ImperialCollegeLondon/sharpy/pull/257) ([sduess](https://github.com/sduess))
- Update docker environment [\#255](https://github.com/ImperialCollegeLondon/sharpy/pull/255) ([sduess](https://github.com/sduess))
- Update README.md [\#246](https://github.com/ImperialCollegeLondon/sharpy/pull/246) ([rafapalacios](https://github.com/rafapalacios))
- bringing commits to main into develop [\#244](https://github.com/ImperialCollegeLondon/sharpy/pull/244) ([rafapalacios](https://github.com/rafapalacios))
- Updates to plotutils.py and the cantilever\_wing demo [\#242](https://github.com/ImperialCollegeLondon/sharpy/pull/242) ([boltyboi](https://github.com/boltyboi))
- Small additions to the installation guide. [\#241](https://github.com/ImperialCollegeLondon/sharpy/pull/241) ([boltyboi](https://github.com/boltyboi))
- Tutorial for closed-Loop Simulation with SHARPy as a hardware-in-the-loop system [\#240](https://github.com/ImperialCollegeLondon/sharpy/pull/240) ([sduess](https://github.com/sduess))

## [2.1](https://github.com/imperialcollegelondon/sharpy/tree/2.1) (2023-05-31)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/2.0...2.1)

**Implemented enhancements:**

Expand All @@ -17,10 +48,13 @@

**Closed issues:**

- No such file or directory during: source bin/sharpy\_vars.sh [\#233](https://github.com/ImperialCollegeLondon/sharpy/issues/233)
- Twist direction inconsistent [\#212](https://github.com/ImperialCollegeLondon/sharpy/issues/212)

**Merged pull requests:**

- Version number updates for 2.1 from develop [\#237](https://github.com/ImperialCollegeLondon/sharpy/pull/237) ([kccwing](https://github.com/kccwing))
- Merge to main for version 2.0.1 release [\#236](https://github.com/ImperialCollegeLondon/sharpy/pull/236) ([kccwing](https://github.com/kccwing))
- Updates to Goland wing example [\#234](https://github.com/ImperialCollegeLondon/sharpy/pull/234) ([rafapalacios](https://github.com/rafapalacios))
- A bit of clean-up of the readme file of the repo [\#231](https://github.com/ImperialCollegeLondon/sharpy/pull/231) ([rafapalacios](https://github.com/rafapalacios))
- Dev internals [\#223](https://github.com/ImperialCollegeLondon/sharpy/pull/223) ([ACea15](https://github.com/ACea15))
Expand Down
36 changes: 19 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM centos:8
ENV PYTHONDONTWRITEBYTECODE=true
ENV BASH_ENV ~/.bashrc
SHELL ["/bin/bash", "-c"]
ENV PATH=${PATH}:/miniconda3/bin
ENV PATH=${PATH}:/mamba/bin

# CENTOS 8 has reached end of life - Not yet an updated Docker base for CentOS stream
# Point to the CentOS 8 vault in order to download dependencies
Expand All @@ -17,30 +17,32 @@ RUN yum groupinstall "Development Tools" -y --nogpgcheck && \
yum install -y --nogpgcheck mesa-libGL libXt libXt-devel wget gcc-gfortran lapack vim tmux && \
yum clean all

# Install miniconda
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /miniconda.sh && \
chmod +x /miniconda.sh && \
/miniconda.sh -b -p /miniconda3/ && \
rm /miniconda.sh && hash -r
# Install Mamba
# Swapped from Conda to Mamba due to Github runner memory constraint
RUN wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O /mamba.sh && \
chmod +x /mamba.sh && \
/mamba.sh -b -p /mamba/ && \
rm /mamba.sh && hash -r

ADD / /sharpy_dir/

# Update conda and make it run with no user interaction
# Cleanup conda installation
RUN conda init bash && \
conda config --set always_yes yes --set changeps1 no && \
conda update -q conda && \
conda config --set auto_activate_base false && \
conda env create -f /sharpy_dir/utils/environment_minimal.yml && conda clean -afy && \
find /miniconda3/ -follow -type f -name '*.a' -delete && \
find /miniconda3/ -follow -type f -name '*.pyc' -delete && \
find /miniconda3/ -follow -type f -name '*.js.map' -delete
# Update mamba and make it run with no user interaction
# Cleanup mamba installation
RUN mamba init bash
RUN mamba config --set always_yes yes --set changeps1 no
RUN mamba update -q conda
RUN mamba config --set auto_activate_base false
RUN mamba env create -f /sharpy_dir/utils/environment.yml && mamba clean -afy && \

find /mamba/ -follow -type f -name '*.a' -delete && \
find /mamba/ -follow -type f -name '*.pyc' -delete && \
find /mamba/ -follow -type f -name '*.js.map' -delete

#COPY /utils/docker/* /root/
RUN ln -s /sharpy_dir/utils/docker/* /root/

RUN cd sharpy_dir && \
conda activate sharpy_minimal && \
mamba activate sharpy && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Simulation of High Aspect Ratio aeroplanes in Python [SHARPy]

![Version badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2FImperialCollegeLondon%2Fsharpy%2Fmaster%2F.version.json)
![Version badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2FImperialCollegeLondon%2Fsharpy%2Fmain%2F.version.json)
![Build Status](https://github.com/ImperialCollegeLondon/sharpy/actions/workflows/sharpy_tests.yaml/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/ic-sharpy/badge/?version=master)](https://ic-sharpy.readthedocs.io/en/master/?badge=master)
[![codecov](https://codecov.io/gh/ImperialCollegeLondon/sharpy/branch/master/graph/badge.svg)](https://codecov.io/gh/ImperialCollegeLondon/sharpy)
[![Documentation Status](https://readthedocs.org/projects/ic-sharpy/badge/?version=main)](https://ic-sharpy.readthedocs.io/en/main/?badge=main)
[![codecov](https://codecov.io/gh/ImperialCollegeLondon/sharpy/branch/main/graph/badge.svg)](https://codecov.io/gh/ImperialCollegeLondon/sharpy)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![status](https://joss.theoj.org/papers/f7ccd562160f1a54f64a81e90f5d9af9/status.svg)](https://joss.theoj.org/papers/f7ccd562160f1a54f64a81e90f5d9af9)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3531965.svg)](https://doi.org/10.5281/zenodo.3531965)

SHARPy is a nonlinear aeroelastic analysis package originally developed at the Department of Aeronautics, Imperial
College London. It can be used for the structural, aerodynamic and aeroelastic analysis of flexible wings, aircraft and wind turbines.
College London. It can be used for the structural, aerodynamic and aeroelastic analysis of flexible wings, aircraft and wind turbines. It is shared here under a BSD 3-Clause permissive license.

![XHALE](./docs/source/_static/XHALE-render.jpg)

Expand All @@ -33,6 +33,8 @@ vortex ring lattice with the boundary conditions enforced at the collocation poi
The Kutta condition is also enforced at the trailing edge. The wake can be simulated by either additional vortex rings
or by infinitely long horseshoe vortices, which are ideally suited for steady simulations only.

The aerodynamic model has recently been extended by a linear source panel method (SPM) to model nonlifting bodies for example fuselages. The SPM and UVLM can be coupled to model fuselage-wing configuration and a junction handling approach, based on phantom panels and circulation interpolation, has been added.

The input problems can be structural, aerodynamic or coupled, yielding an aeroelastic system.

## [Capabilities](http://ic-sharpy.readthedocs.io/en/latest/content/capabilities.html)
Expand All @@ -42,7 +44,7 @@ wings and wind turbines. In addition, it supports linearisation of these nonline
arbitrary conditions and includes various tools such as: model reduction or frequency analysis.

In short, SHARPy offers (amongst others) the following solutions to the user:
* Static aerodynamic, structural and aeroelastic solutions
* Static aerodynamic, structural and aeroelastic solutions including fuselage effects
* Finding trim conditions for aeroelastic configurations
* Nonlinear, dynamic time domain simulations under a large number of conditions such as:
+ Prescribed trajectories.
Expand Down Expand Up @@ -115,7 +117,7 @@ journal = {Journal of Open Source Software}
SHARPy uses Continuous Integration to control the integrity of its code. The status in the release and develop branches
is:

Master
Main
![Build Status](https://github.com/ImperialCollegeLondon/sharpy/actions/workflows/sharpy_tests.yaml/badge.svg)
![Docker Status](https://github.com/ImperialCollegeLondon/sharpy/actions/workflows/docker_build.yaml/badge.svg)

Expand Down
2 changes: 1 addition & 1 deletion docs/JOSS/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ structural or aerodynamic simulation are supported natively.
The nonlinear system can also be linearised taking an arbitrary reference condition. The linearised system can be used
for frequency domain analysis, linear model order reduction methods and controller design.

![Aerodynamic grid and forces in the static aeroelastic equilibrium configuration on the XHALE aircraft [@del2019ifasd]](https://github.com/ImperialCollegeLondon/sharpy/raw/master/docs/source/_static/XHALE-render.jpg)
![Aerodynamic grid and forces in the static aeroelastic equilibrium configuration on the XHALE aircraft [@del2019ifasd]](https://github.com/ImperialCollegeLondon/sharpy/raw/main/docs/source/_static/XHALE-render.jpg)


# Acknowledgements
Expand Down
5 changes: 3 additions & 2 deletions docs/requirements_rtd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sphinx>=3.0
sphinx>=3.0,<7
ipykernel
nbsphinx
sphinx-rtd-theme==0.5.0
sphinx-rtd-theme>=1.2.2
recommonmark
5 changes: 3 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'sphinx.ext.napoleon',
'nbsphinx',
'sphinx.ext.autosectionlabel',
'sphinxcontrib.jquery',
'recommonmark'
]

Expand Down Expand Up @@ -82,9 +83,9 @@
# built documents.
#
# The short X.Y version.
version = '2.1'
version = '2.2'
# The full version, including alpha/beta/rc tags.
release = '2.1'
release = '2.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
49 changes: 49 additions & 0 deletions docs/source/content/casefiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,55 @@ Item by item:
should be included for each airfoil defined. Each entry consists of a 4-column table. The first column corresponds
to the angle of attack (in radians) and then the ``C_L``, ``C_D`` and ``C_M``.

Nonlifting Body file
-----------------

All the nonlifting body data is contained in ``case.nonlifting_body.h5``.

The idea behind the structure of the model definition of nonlifting bodies in SHARPy is similiar to the aerodynamic
one for lifting surfaces. Again for each node or element we define several parameters.

Item by item:

* ``shape``: Type of geometrical form of 3D nonlifting body.

In the ``nonlifting_body.h5`` file, there is a Group called ``shape``. The shape indicates the geometrical form of the
nonlifting body. Common options for this parameter are ``'cylindrical'`` and ``'specific'``. For the former, SHARPy
expects rotational symmetric cross-section for which only a radius is required for each node. For the ``'specific'``
option, SHARPy can create a more unique nonlifting body geometry by creating an ellipse at each fuselage defined by
:math:`\frac{y^2}{a^2}+\frac{z^2}{b^2}=1` with the given ellipse axis lengths :math:`a` and :math:`b`. Further, SHARPy
lets define the user to create a vertical offset from the node with :math:`z_0`.

* ``radius [num_node]``: Cross-sectional radius.

Is an array with the radius of specified for each fuselage node.

* ``a_ellipse [num_node]``: Elliptical axis lengths along the local y-axis.

Is an array with the length of the elliptical axis along the y-axis.

* ``b_ellipse [num_node]``: Elliptical axis lengths along the local z-axis.

Is an array with the length of the elliptical axis along the z-axis.

* ``z_0_ellipse [num_node]``: Vertical offset of the ellipse center from the beam node.

Is an array with the vertical offset of the center of the elliptical cross-sectoin from the fuselage node.

* ``surface_m [num_surfaces]``: Radial panelling.

Is an integer array with the number of radial panels for every surface.

* ``nonlifting_body_node [num_node]``: Nonlifting body node definition.

Is a boolean (``True`` or ``False``) array that indicates if that node has a nonlifting body
attached to it.

* ``surface_distribution [num_elem]``: Nonlifting Surface integer array.

It contains the index of the surface the element belongs to. Surfaces need to be continuous, so please note
that if your beam numbering is not continuous, you need to make a surface per continuous section.


Time-varying force input file (``.dyn.h5``)
-------------------------------------------
Expand Down
Loading

0 comments on commit 4937efe

Please sign in to comment.