Skip to content

Commit

Permalink
better organise docs and add some pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kieran-mackle committed Dec 12, 2023
1 parent a8ae8a7 commit d49c5b5
Show file tree
Hide file tree
Showing 20 changed files with 256 additions and 135 deletions.
2 changes: 1 addition & 1 deletion docs/source/apiref/components/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hypervehicle Components
# HyperVehicle Components


## Component Definitions
Expand Down
103 changes: 0 additions & 103 deletions docs/source/documentation/components.md

This file was deleted.

30 changes: 30 additions & 0 deletions docs/source/documentation/components/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# General Component Types

The following defines the general component types of <tt>HyperVehicle</tt>. These are not
vehicle-specific.

## Revolved Component
Revolved geometries can be constructed using the {py:class}`.RevolvedComponent`.
This component is defined primarily by the line to be revolved.


## Swept Component
Swept geometries can be constructed using a {py:class}`.SweptComponent` type. This
component requires a series of cross-sectional patches to be defined.


## Cube Component
A cube can be constructed via the {py:class}`.Cube` class. It only requires the cube side
length to be provided.

## Sphere Component
A sphere can be constructed using the {py:class}`.Sphere` class. Like the cube, it
only requires a radius to be defined.


## Composite Component
In some advanced instances, you may wish to combine the patches of various components
into a single component. Or, you may have defined your own patch types. For this purpose,
the {py:class}`.CompositeComponent` class is available. This class allows a user to stack
individual {py:class}`.Component` objects to form a composite, which can then be added to
the {py:class}`.Vehicle`, for example.
14 changes: 14 additions & 0 deletions docs/source/documentation/components/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# HyperVehicle Components

As described in the [<tt>HyperVehicle</tt> overview](overview), a component-based approach is
used to construct geometries. We classify two types of components: general components and vehicle components. The former refers to components defined by operations you may already be familiar
with from a CAD context, while the latter refers to components made specifically to help define
hypersonic vehicle geometries.


```{toctree}
:maxdepth: 1
General Components <general>
Vehicle Components <vehicle>
```
57 changes: 57 additions & 0 deletions docs/source/documentation/components/vehicle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Vehicle Specific Component Types

The following section describes the component types defined for helping specifically
with vehicle geometries.

## Wing Components
For constructing wings, the {py:class}`.Wing` component
function is available. A wing component is constructed
by first defining the planform according to the points
defined in the schematic below.

![Wing planform](../../images/components/wing_planform.png "Wing planform")

Next, thickness is added to the wing using user-defined
thickness functions. These function can be as simple as
providing a constant thickness, or as complex as
providing 3-dimensionally varying thickness.

![Wing thickness functions](../../images/components/wing_thickness.png "Wing thickness functions")


A trailing-edge flap can easily be added to a wing component
by defining the flap length and flap type. The flap angle can
also be provided to deflect the flap.

![Wing flap](../../images/components/flap.png "Wing flap")



## Fin Components
Another helper component is the {py:class}`.Fin`.
Fin components are very similar to wing components, but
offer a few convenient options to assist in positioning.
As with a wing, a fin is first defined by its planform
according to the points shown below.

![Fin planform definition](../../images/components/fin_planform.png "Fin planform definition")

A rudder can also be added to the trailing-edge of a fin,
producing something like that shown below.

![Rudder length](../../images/components/rudder_length.png "Rudder length")


To assist in fin positioning, the fin angle argument can
be used to specify the angle of the fin, as rotated about
the vehicles longitudinal (x) axis.

![Fin angle](../../images/components/fin_angle.png "Fin angle definition")


The pivot angle of the fin can also be controlled using
the pivot angle argument. The pivot point can also be
specified.

![Fin pivot angle](../../images/components/fin_pivot.png "Fin pivot angle")

8 changes: 4 additions & 4 deletions docs/source/documentation/overview.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
(overview)=
# Overview of HyperVehicle

The *hypervehicle* package employs a component build up approach.
The <tt>HyperVehicle</tt> package employs a component build up approach.
Using the core component types, a wide range of geometries can
be constructed. While there is an upfront cost associated with
constructing a good parametric model, the generalised nature of
*hypervehicle* allows you to programmatically define relationships
<tt>HyperVehicle</tt> allows you to programmatically define relationships
between geometric components.


## The *HyperVehicle* Workflow
## The HyperVehicle Workflow
Before diving into the component definitions, this section provides
an overview of the *hypervehicle* workflow, and how geometries are
an overview of the <tt>HyperVehicle</tt> workflow, and how geometries are
created from arbitrary definitions.

A vehicle is constructed by stacking a collection of *components*
Expand Down
12 changes: 10 additions & 2 deletions docs/source/documentation/sensitivity.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Generating Geometry Sensitivities

The *hypervehicle* tool also features the generation of
<tt>HyperVehicle</tt> also features the generation of
geometry sensitivities via method of finite differences.
This page outlines how to use this capability.

## Nomenclature

| Symbol | Description |
| ------ | ----------- |
| $\theta$ | The set of design parameters defining a geometry |
| $\mathcal{G}$ | The geometry |



## Theory

1. A *hypervehicle* parameterised geometry generator is
1. A <tt>HyperVehicle</tt> parameterised geometry {py:class}`.Generator` is
supplied, along with the parameters to be varied.
2. STL files for the nominal geometry $G_{nominal}$ are generated.
3. For each parameter to be varied:
Expand Down
11 changes: 11 additions & 0 deletions docs/source/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# HyperVehicle Examples

Take a look at the examples below to see how <tt>HyperVehicle</tt> can be used to
generate 3D geometries.

```{toctree}
:maxdepth: 1
Sharp Wedge <wedge>
NASA X-43A Demonstrator <x43>
```
4 changes: 2 additions & 2 deletions docs/source/examples/sensitivity.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(sensitivities)=
# Generating Parameter Sensitvities
This tutorial will demonstrate how to generate geometric parameter
sensitivities using *hypervehicle*.
sensitivities using <tt>HyperVehicle</tt>.

```{seealso}
This example follows on from the [sharp wedge](sharpwedge) tutorial.
Expand All @@ -25,7 +25,7 @@ The next step is to refactor the geometry generation code into a
the {py:meth}`.Generator.__init__` method,
where all geometric parameters are passed as arguments, and the
{py:meth}`.create_instance` method, which returns a
[`Vehicle`](vehicle) object ready to be {py:meth}`.generate`'d.
{py:class}`.Vehicle` object ready to be {py:meth}`.generate`'d.


The code below provides an example of this class. Note that the
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/wedge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(sharpwedge)=
# Sharp Wedge Tutorial
This page provides a simple example to get started with *hypervehicle*.
This page provides a simple example to get started with <tt>HyperVehicle</tt>.
It will cover how to construct the sharp wedge shown below.

```{seealso}
Expand Down
40 changes: 27 additions & 13 deletions docs/source/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Getting Started with *hypervehicle*
# Getting Started with HyperVehicle

## Dependencies

### GDTK
*Hypervehicle* depends on the
[GDTK](https://github.com/gdtk-uq/gdtk) Python
package for its geometric toolkit. Note that a full install is
not required. Instead, do a
<tt>HyperVehicle</tt> depends on the
[GDTK](https://github.com/gdtk-uq/gdtk) Python package for its geometric toolkit.
Note that a full install of GDTK is not required. Instead, simply do a
[sparse checkout](https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository)
of the relevant files, using the commands below.

Expand All @@ -23,23 +22,38 @@ python3 -m pip install .
cd ../../../
```

## Optional Dependencies

### PyMESH

To access more advanced features of <tt>HyperVehicle</tt>, such as compeonent mesh merging
and cleaning, [PyMesh](https://github.com/PyMesh/PyMesh) is required. You do not need to install
this to use <tt>HyperVehicle</tt>, but it can come in handy, especially when extracting
sensitivities for multi-component geometries.


## Installation


### Installation from PyPi

```
pip install hypervehicle
```

### Installation from source
First clone the repository, then install via pip.

```
git clone https://github.com/kieran-mackle/hypervehicle
cd hypervehicle
python3 -m pip install ./
pip install git+https://github.com/kieran-mackle/hypervehicle
```


### Testing the installation

To check that everything has been installed properly and <tt>HyperVehicle</tt> is
ready to go, run the command below.

```
python3 -m pytest tests/
```


## Example
See an example of using *hypervehicle* to generate geometry,
check out the [X-43A tutorial](examples/x43.md).
2 changes: 1 addition & 1 deletion docs/source/hangar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HyperVehicle Hangar

This page is a showcase of vehicle geometries possible using *hypervehicle*.
This page is a showcase of vehicle geometries possible using <tt>HyperVehicle</tt>.
Note that all of these vehicles can be accessed via the `hypervehicle.hangar`
namespace. For example, to generate the X-43A geometry shown below, the following
code can be used.
Expand Down
Loading

0 comments on commit d49c5b5

Please sign in to comment.