Skip to content

Commit

Permalink
Merge pull request #259 from ImperialCollegeLondon/develop
Browse files Browse the repository at this point in the history
merging develop into main for v2.2
  • Loading branch information
kccwing authored Oct 18, 2023
2 parents 9ae084b + 86cdeba commit 39c4a57
Show file tree
Hide file tree
Showing 64 changed files with 3,016 additions and 1,300 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sharpy_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
hash -r
export QT_QPA_PLATFORM='offscreen'
sudo apt install libeigen3-dev
conda env create -f utils/environment_new.yml
conda env create -f utils/environment.yml
conda init bash
source activate sharpy
git submodule init
Expand Down
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"
}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ 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 && \
conda env create -f /sharpy_dir/utils/environment.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
Expand All @@ -40,7 +41,7 @@ RUN conda init bash && \
RUN ln -s /sharpy_dir/utils/docker/* /root/

RUN cd sharpy_dir && \
conda activate sharpy_minimal && \
conda activate sharpy && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,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
4 changes: 2 additions & 2 deletions docs/source/content/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you are submitting a bug report:
same branch.

2. Double check that your python distribution is updated by comparing with
the `utils/environment_*.yml` file.
the `utils/environment.yml` file.

3. Try to assemble a minimal working example that can be run quickly and easily.

Expand Down Expand Up @@ -212,7 +212,7 @@ In the release candidate branch:
2. Update `version.json` file
3. Update version in `sharpy/__init__.py` file
3. Update version in `sharpy/version.py` file
4. Commit, push and wait for tests to pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2368,18 +2368,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Run SHARPy Simulation\n",
"Before running SHARPy, we remove the old linear system generated if existing. It would cause an error that still needs to be fixed (your first contribution?)."
]
},
{
"cell_type": "code",
"### Run SHARPy Simulation"
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"if os.path.isfile(os.path.join(output_folder, pazy_model_ROM.case_name, 'savedata', pazy_model_ROM.case_name + '.linss.h5')):\n",
" os.remove(os.path.join(output_folder, pazy_model_ROM.case_name, 'savedata', pazy_model_ROM.case_name + '.linss.h5'))"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/source/content/example_notebooks/wind_turbine.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@
" inode_in_elem = sharpy_output.structure.node_master_elem[node_global_index, 1]\n",
" CAB = algebra.crv2rotation(tstep.psi[ielem, inode_in_elem, :])\n",
"\n",
" c[iblade][inode] = sharpy_output.aero.aero_dict['chord'][ielem,inode_in_elem]\n",
" c[iblade][inode] = sharpy_output.aero.data_dict['chord'][ielem,inode_in_elem]\n",
"\n",
" forces_AFoR = np.dot(CAB, forces[iblade][inode, 0:3])\n",
"\n",
Expand Down
20 changes: 9 additions & 11 deletions docs/source/content/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SHARPy v2.0 Installation Guide
__Last revision 27 June 2023__
__Last revision 9 October 2023__

The following step by step tutorial will guide you through the installation process of SHARPy. This is the updated process valid from v2.0.

Expand All @@ -11,7 +11,8 @@ SHARPy is being developed and tested on the following operating systems:
* CentOS 7 and CentOS 8
* Ubuntu 18.04 LTS
* Debian 10
* MacOS Mojave and Catalina
* MacOS Mojave and Catalina (Intel)
* MacOS Sonoma (Apple Silicon M2)

Windows users can also run it by first installing the Windows Subsystem for Linux (https://learn.microsoft.com/en-us/windows/wsl/install) and a XServer such as GWSL, which can be installed through the Microsoft Store. SHARPy is also available to the vast majority of operating systems that are supported by Docker

Expand Down Expand Up @@ -71,16 +72,14 @@ or running any SHARPy cases.
conda install python=3.10
```

4. Create the conda environment that SHARPy will use. Change `environment_new.yml` to read `environment_macos.yml`
if you are installing SHARPy on Mac OS (Intel), or `environment_macos_arm64.yml` if installing on Mac OS (Apple Silicon).
4. Create the conda environment that SHARPy will use:

```bash
cd sharpy/utils
conda env create -f environment_new.yml
conda env create -f environment.yml
cd ../..
```
This should take approximately 15 minutes to complete (Tested on Ubuntu 22.04.1). We also provide a
lightweight environment with the minimum required dependencies. If you'd like to use it, create the
conda environment using `environment_minimal.yml`.
This should take approximately 15 minutes to complete (Tested on Ubuntu 22.04.1).

5. Activate the `sharpy` conda environment:
```bash
Expand Down Expand Up @@ -155,11 +154,10 @@ to your taste.
```
This command will check out the `develop` branch and set it to track the remote origin. It will also set the submodules (xbeam and UVLM) to the right commit.

2. Create the conda environment that SHARPy will use. Change `environment_new.yml` to read `environment_macos.yml`
if you are installing SHARPy on Mac OS X.
2. Create the conda environment that SHARPy will use:
```bash
cd sharpy/utils
conda env create -f environment_new.yml
conda env create -f environment.yml
cd ../..
```

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SHARPy is an aeroelastic analysis package currently under development at the Dep
Imperial College London. It can be used for the structural, aerodynamic, aeroelastic and flight dynamics
analysis of flexible aircraft, flying wings and wind turbines. Amongst other capabilities_, it offers 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:

Expand Down
Loading

0 comments on commit 39c4a57

Please sign in to comment.