Skip to content

Commit

Permalink
Merge pull request #161 from ImperialCollegeLondon/update_submodules
Browse files Browse the repository at this point in the history
Update submodules and conda environments
  • Loading branch information
sduess authored Jun 11, 2021
2 parents c3b09a0 + 65eed82 commit ef4b5af
Show file tree
Hide file tree
Showing 20 changed files with 77 additions and 53 deletions.
6 changes: 3 additions & 3 deletions docs/source/content/casefiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ Item by item:

Same here, just a rotation around :math:`z`.

* ``airfoil_distribution_input [num_elem, num_node_elem]``: Airfoil distribution.
* ``airfoil_distribution [num_elem, num_node_elem]``: Airfoil distribution.

Contains the indices of the airfoils that you put previously in ``airfoils``.

* ``surface_distribution_input [num_elem]``: Surface integer array.
* ``surface_distribution [num_elem]``: 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
Expand All @@ -274,7 +274,7 @@ Item by item:

Is a string with the chordwise panel distribution. In almost all cases, leave it at ``uniform``.

* ``aero_node_input [num_node]``: Aerodynamic node definition.
* ``aero_node [num_node]``: Aerodynamic node definition.

Is a boolean (``True`` or ``False``) array that indicates if that node has a lifting
surface attached to it.
Expand Down
3 changes: 3 additions & 0 deletions docs/source/content/publications.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Here we present a list of past papers which have used SHARPy for research purpos

## 2021

* Artola, M., Goizueta, N., Wynn, A., & Palacios, R. (2021). Aeroelastic Control and Estimation with a Minimal
Nonlinear Modal Description. AIAA Journal, 1–17. [https://doi.org/10.2514/1.j060018](https://doi.org/10.2514/1.j060018)

* Artola, M., Goizueta, N., Wynn, A., & Palacios, R. (2021). Proof of Concept for a Hardware-in-the-Loop Nonlinear.
In AIAA SciTech Forum (pp. 1–26). [https://doi.org/10.2514/6.2021-1392](https://doi.org/10.2514/6.2021-1392)

Expand Down
5 changes: 5 additions & 0 deletions docs/source/includes/aero/utils/airfoilpolars/Polar.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Polar
-----

.. autoclass:: sharpy.aero.utils.airfoilpolars.Polar
:members:
4 changes: 4 additions & 0 deletions docs/source/includes/aero/utils/airfoilpolars/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. toctree::
:glob:

./Polar
5 changes: 3 additions & 2 deletions docs/source/includes/aero/utils/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Utilities
---------
Aerodynamic Utilities
---------------------


.. toctree::
:maxdepth: 1

./airfoilpolars/index
./mapping/index

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/includes/aero/utils/mapping/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ Force Mapping Utilities
:glob:

./aero2struct_force_mapping
./aero2struct_total_force_mapping
7 changes: 7 additions & 0 deletions docs/source/includes/postprocs/Cleanup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Cleanup
-------



.. autoclass:: sharpy.postproc.cleanup.Cleanup
:members:
7 changes: 7 additions & 0 deletions docs/source/includes/postprocs/LiftDistribution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LiftDistribution
----------------



.. autoclass:: sharpy.postproc.liftdistribution.LiftDistribution
:members:
1 change: 1 addition & 0 deletions docs/source/includes/utils/algebra/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Note:
./multiply_matrices
./norm3d
./normsq3d
./panel_area
./quadskew
./quat2euler
./quat2rotation
Expand Down
4 changes: 4 additions & 0 deletions docs/source/includes/utils/algebra/panel_area.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
panel_area
----------

.. automodule:: sharpy.utils.algebra.panel_area
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NotRecognisedSetting
--------------------

.. autoclass:: sharpy.utils.exceptions.NotRecognisedSetting
:members:
1 change: 1 addition & 0 deletions docs/source/includes/utils/exceptions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ SHARPy Exception Classes

./DocumentationError
./NotConvergedSolver
./NotRecognisedSetting
./NotValidSetting
2 changes: 1 addition & 1 deletion lib/UVLM
2 changes: 1 addition & 1 deletion lib/xbeam
Submodule xbeam updated 1 files
+1 −1 src/xbeam_solv.f90
13 changes: 9 additions & 4 deletions sharpy/generators/straightwake.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ class StraightWake(generator_interface.BaseGenerator):
r"""
Straight wake shape generator
``StraightWake`` class inherited from ``BaseGenerator``
The object creates a straight wake shedding from the trailing edge based on
This generator creates a straight wake shedding from the trailing edge based on
the time step ``dt``, the incoming velocity magnitude ``u_inf`` and
direction ``u_inf_direction``
direction ``u_inf_direction``. It is to be used as ``wake_generator`` in
:class:`~sharpy.solvers.aerogridloader.AerogridLoader`.
A wake where panels grow downstream is supported by using the settings ``dx1``, ``ndx1``,
``r`` and ``dxmax`` as described below. Note that the wake will always have ``m_star`` panels, as specified in
:class:`~sharpy.solvers.aerogridloader.AerogridLoader`, thus these settings will modify the effective length
of the wake. Once the maximum size of panel ``dxmax`` is achieved, all panels are size ``dxmax`` thereinafter
until ``m_star`` panels are created.
"""
generator_id = 'StraightWake'
generator_classification = 'wake'
Expand Down
2 changes: 1 addition & 1 deletion sharpy/linear/assembler/linearaeroelastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LinearAeroelastic(ss_interface.BaseElement):
settings_description['track_body'] = 'UVLM inputs and outputs projected to coincide with lattice at linearisation'

settings_types['use_euler'] = 'bool'
settings_default['use_euler'] = False
settings_default['use_euler'] = True
settings_description['use_euler'] = 'Parametrise orientations in terms of Euler angles'

settings_table = settings.SettingsTable()
Expand Down
18 changes: 0 additions & 18 deletions sharpy/linear/src/linuvlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,6 @@
settings_types_dynamic['use_sparse'] = 'bool'
settings_default_dynamic['use_sparse'] = True

settings_types_dynamic['density'] = 'float'
settings_default_dynamic['density'] = 1.225

settings_types_dynamic['velocity_field_generator'] = 'str'
settings_default_dynamic['velocity_field_generator'] = 'SteadyVelocityField'

settings_types_dynamic['velocity_field_input'] = 'dict'
settings_default_dynamic['velocity_field_input'] = {}

settings_types_dynamic['physical_model'] = 'bool'
settings_default_dynamic['physical_model'] = True

settings_types_dynamic['track_body'] = 'bool'
settings_default_dynamic['track_body'] = False

settings_types_dynamic['track_body_number'] = 'int'
settings_default_dynamic['track_body_number'] = -1

settings_types_dynamic['vortex_radius'] = 'float'
settings_default_dynamic['vortex_radius'] = vortex_radius_def

Expand Down
7 changes: 4 additions & 3 deletions sharpy/presharpy/presharpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class PreSharpy(object):
settings_description['log_folder'] = 'A folder with the case name will be created at this directory ' \
'containing the SHARPy log and output folders'

settings_types['log_file'] = 'str'
settings_default['log_file'] = 'log'
settings_description['log_file'] = 'Name of the log file'

settings_types['save_settings'] = 'bool'
settings_default['save_settings'] = False
settings_description['save_settings'] = 'Save a copy of the settings to a ``.sharpy`` file in the output ' \
Expand All @@ -79,9 +83,6 @@ def __init__(self, in_settings=None):

self.ts = 0

self.settings_types['log_file'] = 'str'
self.settings_default['log_file'] = 'log'

if self._settings:
self.settings = in_settings
self.settings['SHARPy']['flow'] = self.settings['SHARPy']['flow']
Expand Down
33 changes: 18 additions & 15 deletions sharpy/solvers/aerogridloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ class AerogridLoader(BaseSolver):
Generates aerodynamic grid based on the input data
The initial wake shape is now defined in SHARPy (instead of UVLM) through a wake shape generator
``wake_shape_generator`` and the required inputs ``wake_shape_generator_input``. The supported wake generators are
:class:`sharpy.generators.straightwake.StraighWake` and :class:`sharpy.generators.helicoidalwake.HelicoidalWake`.
The ``control_surface_deflection`` setting allows the user to use a time specific control surface deflection,
should the problem include them. This setting takes a list of strings, each for the required control
surface generator.
The ``control_surface_deflection_generator_settings`` setting is a list of dictionaries, one for each control
surface. The dictionaries specify the settings for the generator ``DynamicControlSurface``. If the relevant control
surface is simply static, an empty string should be parsed. See the documentation for ``DynamicControlSurface``
generators for accepted key-value pairs as settings.
Args:
data (PreSharpy): ``ProblemData`` class structure
Expand All @@ -28,26 +41,14 @@ class AerogridLoader(BaseSolver):
aero_data_dict (dict): key-value pairs of aerodynamic data
wake_shape_generator (class): Wake shape generator
Notes:
The ``control_surface_deflection`` setting allows the user to use a time specific control surface deflection,
should the problem include them. This setting takes a list of strings, each for the required control
surface generator.
The ``control_surface_deflection_generator_settings`` setting is a list of dictionaries, one for each control
surface. The dictionaries specify the settings for the generator ``DynamicControlSurface``. If the relevant control
surface is simply static, an empty string should be parsed. See the documentation for ``DynamicControlSurface``
generators for accepted key-value pairs as settings.
The initial wake shape is now defined in SHARPy (instead of UVLM) through a wake shape generator ``wake_shape_generator`` and the
required inputs ``wake_shape_generator_input``
"""
solver_id = 'AerogridLoader'
solver_classification = 'loader'

settings_types = dict()
settings_default = dict()
settings_description = dict()
settings_options = dict()

settings_types['unsteady'] = 'bool'
settings_default['unsteady'] = False
Expand Down Expand Up @@ -77,13 +78,15 @@ class AerogridLoader(BaseSolver):
settings_types['wake_shape_generator'] = 'str'
settings_default['wake_shape_generator'] = 'StraightWake'
settings_description['wake_shape_generator'] = 'ID of the generator to define the initial wake shape'
settings_options['wake_shape_generator'] = ['StraightWake', 'HelicoidalWake']

settings_types['wake_shape_generator_input'] = 'dict'
settings_default['wake_shape_generator_input'] = dict()
settings_description['wake_shape_generator_input'] = 'Dictionary of inputs needed by the wake shape generator'

settings_table = settings_utils.SettingsTable()
__doc__ += settings_table.generate(settings_types, settings_default, settings_description)
__doc__ += settings_table.generate(settings_types, settings_default, settings_description,
settings_options=settings_options)

def __init__(self):
self.data = None
Expand All @@ -104,7 +107,7 @@ def initialise(self, data):
# init settings
settings_utils.to_custom_types(self.settings,
self.settings_types,
self.settings_default)
self.settings_default, options=self.settings_options)

# read input file (aero)
self.read_files()
Expand Down

0 comments on commit ef4b5af

Please sign in to comment.