Skip to content

Commit 261a534

Browse files
committed
Merge branch 'dev' into anchor_clean - geography.py still needs cleanup!!!!
-- WIP merge -- !!!! geography.py still has unresolved conflicts because this needs to be discussed with team (Felipe and Stein) to ensure this is done properly !!!! -- added small change to anchor.py to make anchor names not case-sensitive and print out anchor type name in error message if not part of anchor -- small change to examples/OntologySample200m.yaml to make anchor type names match new system (suction_pile -> suction) -- pushing this now so we can track progress towards final merge.
2 parents 21bf46a + b424d93 commit 261a534

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1604
-1827
lines changed

README.md

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,37 @@ estimate the holding capacity of each anchor.
1616
The library works in conjunction with the tools RAFT, MoorPy, and FLORIS to model floating
1717
wind turbines, mooring systems, and array wakes respectively.
1818

19-
In addition to the code, this repository defines a
20-
[Floating Array Ontology](https://github.com/FloatingArrayDesign/FAModel/tree/main/famodel/ontology),
21-
which provides a standardized description format for floating wind farms.
22-
23-
An example of use of these tools to model three mooring lines over the bathymetry
24-
of the Humboldt lease area is shown below.
25-
26-
![Humboldt](famodel/seabed/images/slopeview4.PNG)
27-
28-
See example use cases in our [examples](https://github.com/FloatingArrayDesign/FAModel/tree/main/examples/README.md) folder.
19+
Layered on top of the floating array model is a set of design tools that can
20+
be used for algorithmically adjusting or optimizing parts of the a floating
21+
array. Specific tools existing for mooring lines, shared mooring systems,
22+
dynamic power cables, static power cable routing, and overall array layout.
23+
These capabilities work with the design representation and evaluation functions
24+
in FAModel, and they can be applied by users in various combinations to suit
25+
different purposes.
26+
27+
In addition to standalone uses of the FAD Toolset, a coupling has been made with
28+
[Ard](https://github.com/WISDEM/Ard), a sophisticated and flexible wind farm
29+
optimization tool. This coupling allows Ard to use certain mooring system
30+
capabilities from FAD to perform layout optimization of floating wind farms
31+
with Ard's more advanced layout optimization capabilities.
32+
33+
The FAD Toolset works with the [IEA Wind Task 49 Ontology](https://github.com/IEAWindTask49/Ontology),
34+
which provides a standardized format for describing floating wind farm sites
35+
and designs.
36+
37+
See example use cases in our [examples](./examples/README.md) folder.
2938

3039
## Pre-installation Requirements
31-
The FAModel package is built entirely in Python. It is recommended that users familiarize themselves with basic Python commands before use.
32-
It is important to understand the general structure of FAModel and how to access models and stored information. Please see the model structure
33-
document (./famodel/README.md).
40+
The FAD Toolset is built entirely in Python. It is recommended that users
41+
familiarize themselves with basic Python commands before use.
42+
For working with the library, it is important to understand the floating array
43+
model structure, which is described more [here](./famodel/README.md).
3444

3545

3646
## Installation
37-
To install FAModel itself, first clone the FAModel repository.
47+
To install the FAD Toolset itself, first clone this FAD-Toolset repository.
3848

39-
The dependencies required by FAModel depend on how it is used. To install all
49+
The dependencies required by FAD depend on how it is used. To install all
4050
possible required dependencies, you can create a
4151
new python virtual environment based on the included yaml listing the required
4252
dependencies.
@@ -47,24 +57,25 @@ run the following command:
4757

4858
conda env create -f famodel-env.yaml
4959

50-
This command will install all the dependencies required to run FAModel.
51-
Activate your virtual environment before using FAModel with ```conda activate famodel-env```
60+
This command will install all the dependencies required to run FAD.
61+
Activate your virtual environment before using FAD with ```conda activate famodel-env```
5262

53-
To install the FAModel package in your environment, enter the
54-
following in the command line from the FAModel directory.
63+
To install the FAD Toolset package in your environment, enter the
64+
following in the command line from the FAD-Toolset directory.
5565

5666
For development use:
5767

58-
run ```python setup.py develop``` or ```pip install -e .``` from the command line in the main FAModel directory.
68+
run ```python setup.py develop``` or ```pip install -e .``` from the command
69+
line in the main FAD-Toolset directory.
5970

6071
For non-development use:
6172

62-
run ```python setup.py``` or ```pip install .``` from the command line in the main FAModel directory.
73+
run ```python setup.py``` or ```pip install .``` from the command line in
74+
the main FAD-Toolset directory.
6375

64-
** At this time, FAModel requires the latest MoorPy development branch version to be used. **
65-
Therefore, you must install MoorPy with ```git clone https://github.com/NREL/MoorPy.git```
66-
then navigate to the MoorPy folder and checkout the development branch with ```git checkout dev```
67-
Finally, install this version into your environment with ```pip install -e .```.
76+
FAD requires MoorPy and we currently install it separately. If you don't already have it,
77+
you can install MoorPy with ```git clone https://github.com/NREL/MoorPy.git```
78+
then navigate to the MoorPy folder and install with ```pip install .```.
6879
Make sure your virtual enviroment is activated before installing MoorPy.
6980

7081

@@ -74,19 +85,30 @@ The library has a core Project class for organizing information, classes for eac
7485
collection of subpackages for specific functions. The current subpackages are:
7586

7687
- anchors: contains modules for anchor capacity calculations, in addition to the anchor class
77-
- failures: contains modules for failure modeling with graph theory, and allows for enactment of a failure mode in integrated FAModel tools such as MoorPy and RAFT.
88+
- failures: contains modules for failure modeling with graph theory, and allows for enactment of a failure mode.
7889
- seabed: contains modules for seabed bathymetry and boundary information
90+
- design: contains various tools for performing design steps.
7991

8092
Please navigate into the subfolders above for additional information.
8193

8294
## Getting Started
83-
The easiest way to create an FAModel project is to provide the array information in an ontology yaml file. FAModel has been designed to work with a specific ontology yaml setup, which is described in detail in the [Ontology ReadMe](./famodel/ontology/README.md).
84-
85-
The [example driver file](./famodel/example_driver.py) creates an FAModel project from a pre-set ontology file and shows the syntax and outputs of various capabilities. For guidance on creating your own ontology yaml file, it is recommended to read through the [Ontology ReadMe](./famodel/ontology/README.md), then either adapt one of the ontology samples or fill in the ontology template.
86-
87-
The [FAModel core readme](./famodel/README.md) describes the FAModel class structure, as well as the properties and methods of each component class.
88-
89-
There are some limited helper functions to auntomatically fill in sections of a yaml from a moorpy system or a list of platform locations. See [FAModel helpers](./famodel/helpers.py) for the full list of yaml writing capabilities. Many of these are a work in progress.
95+
The easiest way to create a FAD project is to provide the array
96+
information in an ontology yaml file. FAD has been designed
97+
to work with a specific ontology yaml setup, which is described
98+
in detail in the [Ontology ReadMe](./famodel/ontology/README.md).
99+
100+
The [example driver file](./famodel/example_driver.py) creates a FAD Project
101+
object from a pre-set ontology file and shows the syntax and outputs of
102+
various capabilities. For guidance on creating your own ontology yaml file,
103+
it is recommended to read through the [Ontology ReadMe](./famodel/ontology/README.md),
104+
then either adapt one of the ontology samples or fill in the ontology template.
105+
106+
The [core model readme](./famodel/README.md) describes the Project class structure,
107+
as well as the properties and methods of each component class.
108+
109+
There are some limited helper functions to automatically fill in sections
110+
of a yaml from a MoorPy system or a list of platform locations.
111+
See [helpers](./famodel/helpers.py) for the full list of yaml writing capabilities.
90112

91113

92114
## Authors

examples/01_Visualization/01_2D-visual_turbine_locations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '01_2D-visual_turbine_locations.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'01_2D-visual_turbine_locations.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=False)

examples/01_Visualization/02_visual_moorings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
from famodel import Project
1111
import matplotlib.pyplot as plt
12+
import os
1213

1314
# define name of ontology input file
14-
input_file = '02_visual_moorings.yaml'
15+
dir = os.path.dirname(os.path.realpath(__file__))
16+
input_file = os.path.join(dir,'02_visual_moorings.yaml')
1517

1618
# initialize Project class with input file, we don't need RAFT for this so mark False
1719
project = Project(file=input_file,raft=False)

examples/01_Visualization/03_visual_cables.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
from famodel import Project
1111
import matplotlib.pyplot as plt
12+
import os
1213

1314
# define name of ontology input file
14-
input_file = '03_visual_cables.yaml'
15+
dir = os.path.dirname(os.path.realpath(__file__))
16+
input_file = os.path.join(dir,'03_visual_cables.yaml')
1517

1618
# initialize Project class with input file, we don't need RAFT for this so mark False
1719
project = Project(file=input_file,raft=False)

examples/01_Visualization/04_visual_bathymetry.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
from famodel import Project
1010
import matplotlib.pyplot as plt
11+
import os
1112

1213
# define name of ontology input file
13-
input_file = '04_visual_bathymetry.yaml'
14+
dir = os.path.dirname(os.path.realpath(__file__))
15+
input_file = os.path.join(dir,'04_visual_bathymetry.yaml')
1416

1517
# initialize Project class with input file, we don't need RAFT for this so mark False
1618
project = Project(file=input_file,raft=False)

examples/01_Visualization/06_2D-visual_misc_platforms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '06_2D-visual_misc_platforms.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'06_2D-visual_misc_platforms.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=False)

examples/01_Visualization/08_3D-visual_turbine.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '08_3D-visual_turbine.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'08_3D-visual_turbine.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=True)
1618

1719
# plot
18-
project.plot3d(fowt=True)
20+
project.plot3d(plot_fowt=True)
1921

2022
plt.show()

examples/02_Mooring_Analysis_MoorPy/01_moorings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
from famodel import Project
1212
import matplotlib.pyplot as plt
1313
import numpy as np
14+
import os
1415

1516
# define name of ontology input file
16-
input_file = '01_moorings.yaml'
17+
dir = os.path.dirname(os.path.realpath(__file__))
18+
input_file = os.path.join(dir,'01_moorings.yaml')
1719

1820
# initialize Project class with input file, we don't need RAFT for this so mark False
1921
project = Project(file=input_file,raft=False)

examples/02_Mooring_Analysis_MoorPy/02_moorings_cables.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
from famodel import Project
1212
import matplotlib.pyplot as plt
1313
import numpy as np
14+
import os
1415

1516
# define name of ontology input file
16-
input_file = '02_moorings_cables.yaml'
17+
dir = os.path.dirname(os.path.realpath(__file__))
18+
input_file = os.path.join(dir,'02_moorings_cables.yaml')
1719

1820
# initialize Project class with input file, we don't need RAFT for this so mark False
1921
project = Project(file=input_file,raft=False)

examples/02_Mooring_Analysis_MoorPy/03_platform-hydrostatics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
from famodel import Project
1212
import matplotlib.pyplot as plt
1313
import numpy as np
14+
import os
1415

1516
# define name of ontology input file
16-
input_file = '03_platform-hydrostatics.yaml'
17+
dir = os.path.dirname(os.path.realpath(__file__))
18+
input_file = os.path.join(dir,'03_platform-hydrostatics.yaml')
1719

1820
# initialize Project class with input file, we don't need RAFT for this so mark False
1921
project = Project(file=input_file,raft=False)

0 commit comments

Comments
 (0)