1+ """
2+
3+ Simple driver file to create a RAFT model of a 2-platform array with turbines.
4+ This file then adds a wave spectrum to run, analyzes that case, and plots the results.
5+
6+ For more information on using RAFT, please see RAFT documentation at https://github.com/WISDEM/RAFT
7+ """
8+
9+ from famodel import Project
10+ import matplotlib .pyplot as plt
11+ import os
12+
13+ # define name of ontology input file
14+ dir = os .path .dirname (os .path .realpath (__file__ ))
15+ input_file = os .path .join (dir ,'inputs' ,'sharedanch_example.yaml' )
16+
17+ # initialize Project class with input file
18+ project = Project (file = input_file ,raft = True )
19+
20+ project .plot3d (plot_fowt = True ) # plot the system
21+
22+
23+ #---Let's get the max anchor forces due to turbine thrust and wave displacement
24+
25+ # first apply a wave motion amplitude
26+ for platform in project .platformList .values ():
27+ platform .x_ampl = 10 # [m]
28+
29+ # now go through each anchor and run the worst-case scenarios (has considerations for shared anchors as well)
30+ print ('{:-^41}' .format ('Max Anchor Loads' ))
31+ print ('Anchor ID | Horizontal Max | Vertical Max' )
32+ for anchor in project .anchorList .values ():
33+ anchor .calcMudlineLoads ()
34+ print ('{0:s} {1:.2e} [N] {2:.2e} [N]' .format (anchor .id ,anchor .loads ["Hm" ],anchor .loads ["Vm" ]))
35+
36+ plt .show ()
0 commit comments