Skip to content

Commit 7c4a7e5

Browse files
committed
Updating ReadMes
1 parent 4e8ab81 commit 7c4a7e5

File tree

6 files changed

+138
-25
lines changed

6 files changed

+138
-25
lines changed

famodel/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,26 @@ The Node class contains the following properties:
110110
'type': 'node'}
111111
- part_of : Edge object this node is a subcomponent of (if applicable)
112112
- r : xy position of Node [m]
113-
- theta : heading of Node [rad]
113+
- theta : heading of Node [rad], rotation is counter-clockwise +
114114
- R : rotation matrix
115+
- inst : installation status dictionary, set up as shown below:
116+
{'mobilized': bool,
117+
'installed': bool}
115118

116119

117120
The Node class methods are:
118121
- isAttached : check if an object is attached to the node
122+
- join : joins another node to this node, in a mutual way. i.e. connector to fairlead
123+
- isJoined : checks if a node is joined to anything else
124+
- separate : opposite of join (separates 2 nodes connected mutually)
119125
- attach : attach an object to this node
120126
- detach : detach a specified object from this node
121127
- getTopLevelEdge : returns higher-level edge this node is a part of, if applicable
122128
- setPosition : sets position of node, and heading if applicable
129+
- calculate_r_rel : calculates the relative position between node and object based on combined relative distances of the subordinate subcomponent nodes connecting them
123130

124131
### Edge Class
132+
Edge classes may connect to multiple Nodes on each end in the case of parallel sections such as a bridle for a mooring line.
125133
The Edge class contains the following properties:
126134
- id : unique ID of the edge object
127135
- attached_to : object(s) either end of the edge is attached to.
@@ -131,15 +139,24 @@ The Edge class contains the following properties:
131139
- rB : end B location [x,y]
132140
- part_of : Edge object this edge is a subcomponent of (if applicable)
133141
- subcomponents : chain of edges and nodes that make up this edge
142+
- subcons_A : subcomponent for end A (can be multiple)
143+
- subcons_B : subcomponent for end B (can be multiple)
144+
- inst : installation status dictionary. set up as follows:
145+
{'mobilized': bool,
146+
'installed': bool,
147+
'hookedUpA': bool,
148+
'hookedUpB': bool}
134149
- whole : boolean, false if sub edges/nodes aren't all connected
135150

136151
The Edge class methods are:
137152
- isAttachedTo : checks if specified node is attached to this edge
138153
- attachTo : attaches a specified node to end A or end B of this edge
139154
- detachFrom : detach a specified end of this edge from what it is attached to
140-
- addSubcomponents : adds a sequence of alternating nodes and edges as subcomponents of this edge, connecting the
155+
- addSubcomponents : adds a sequence of alternating nodes and edges as subcomponents
156+
of this edge, connecting the
141157
subcomponent objects in the process.
142-
- getTopLevelEdge : returns higher-level edge this edge is a part of, if applicable
158+
- findEnd : checks if object is a subcomponent of self and which end it's at
159+
- getSubcomponent : returns the subcomponent of the edge corresponding to the provided index. An index with multiple entries can be used for reference to parallel subcomponents
143160
- setEndPosition : sets the position of an edge end
144161
- delete : detach the edge from anything it is attached to
145162

famodel/cables/README.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ These subcomponents alternate between Edges (either a DynamicCable or StaticCabl
5959
Any connector costs in the cable cost dictionary are added twice (once for each end)
6060
- getL() : Get the total length of the cable (includes any routing for static cables)
6161
- updateSpan() : Change the lengths of subcomponents based on the new total span. For dynamic-static-dynamic configurations, just increase static span. For suspended cable, increase lengths of non-buoyant sections
62+
- makeLine(): make a 2D shapely linestring of the cable
63+
- dynamicCables(): returns a list of dynamic cables in this cable object
64+
- updateTensions(): updates the tensions stored in dynamic cable load dictionaries
65+
- updateSafetyFactors(): updates the safety factor dictionaries stored in dynamic cable objects
66+
- updateSpan: change the lengths of subcompoennts based on the new total span. For dynamic-static-dynamic configurations, just increase static span. For suspended cable, increase lengths of non-buoyant sections
6267

6368

6469

@@ -79,10 +84,7 @@ The DynamicCable class includes information on the bare cable properties as well
7984
- L_mid: location along the cable of the midpoint of the buoyancy section
8085
- module_props: buoyancy module properties
8186
- ss
82-
: pristine MoorPy subsystem associated with this dynamic cable
83-
- ss_mod
84-
: modified MoorPy subsystem associated with this dynamic cable.
85-
Often this is used for adding marine growth
87+
: MoorPy subsystem associated with this dynamic cable. Reflects the current state of the subsystem, which could include marine growth if addMarineGrowth/project.getMarineGrowth is called
8688
- rA
8789
: xyz location for end A of the dynamic cable
8890
- rB
@@ -188,10 +190,43 @@ Where
188190
The StaticCable class contains properties and methods for a static section of a power cable. The StaticCable class inherits from Edge.
189191

190192
### Static Cable Properties
193+
- dd : design description dictionary for static cable
194+
- voltage : cable voltage
195+
- n_sec : number of sections. Default is 1
196+
- cableType : cable type properties
197+
- L : static cable length
198+
- rA : coordinates of static cable end A
199+
- rB : coordinates of static cable end B
200+
- rho : density of water [kg/m^3]
201+
- g : acceleration due to gravity [m/s^2]
202+
- x : list of x coordinates of routing points
203+
- y : list of y coordiantes of routing points
204+
- burial : depth of cable buried
205+
- loads : dictionary of loads on static cable
206+
- reliability : dictionary of reliability information
207+
- cost : dictionary of cost information
208+
- failure_probability : probability of failure
191209

192210
### Static Cable Methods
211+
- getLength(): Compute the length of the cable based on the end point locations (rA, rB) and any routing information (self.x, self.y. self.rad)
212+
- makeCableType(): Processes dictionary info to make cableType dictionary
213+
- updateRouting(): updates routing parameters based on passed in coordinates or existing coordinates. Also re-calculates length of static cable and total length of overall cable object
214+
- getCost(): returns total cost of static cable based on length and cost per meter. Calls getLength at start to ensure updated length is used.
215+
193216

194217
[Back to Top](#the-cable-class)
195218
## Joint Class
219+
The Joint class provides a data structure for cable joint information.
220+
Joints occur at the transition between static and dynamic cables.
221+
222+
Joints inherit from dictionary and Node.
223+
### Joint Properties
224+
- mpConn : moorpy point object associated with this joint
225+
- r : 3D location of Joint
226+
### Joint Methods
227+
- makeMoorPyConnector(): creates a MoorPy point object for this joint. Essentially acts as an anchor point for dynamic cables in most cases.
228+
229+
## Jtube Class
230+
The Jtube class provides a data structure for J-tubes, which in this case are defined as any structure connecting a dynamic cable to a platform (does not necessarily need to be J-shaped). Inherits from Node and dictionary.
196231

197232
[Back to Top](#the-cable-class)

famodel/cables/static_cable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def makeCableType(self,cabDict):
114114
cableType=cabDict
115115
return(cableType)
116116

117-
117+
"""
118118
def initializeRoute(self):
119119
# Initially assume that the static portion of the cable goes straight
120120
# between the two ends of the dynamic cables.
@@ -137,7 +137,7 @@ def initializeRoute(self):
137137
self.r = np.array([0, 0])
138138
139139
# (fancier routing could be applied later by layout design methods)
140-
140+
"""
141141

142142
def resolveRoute(self):
143143
'''Takes established cable route points, considers seabed

famodel/mooring/README.md

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ The Mooring object contains subcomponent objects that represent each component o
4343
## Mooring Properties
4444
- dd
4545
: design description dictionary
46+
- lineProps
47+
: line property sizing function coefficients
4648
- n_sec
4749
: number of sections
4850
- i_con
@@ -82,6 +84,9 @@ The Mooring object contains subcomponent objects that represent each component o
8284

8385
## Mooring methods
8486

87+
### reset
88+
Resets the subsystem and the applied_states dictionary
89+
8590
### update
8691
Update the Mooring object based on the current state of the design dictionary, or, a new design dictionary.
8792

@@ -91,6 +96,10 @@ Sets length of the section, including in the subsystem if there is one
9196
### setSectionType
9297
Sets lineType of section, including in the subsystem if there is one
9398

99+
### adjustSectionType
100+
Adjusts the section line Type relative by specifying a new diameter
101+
and/or material, and looking up the resulting lineType from lineProps.
102+
94103
### reposition
95104
Adjusts mooring position based on changed platform location or heading, It can cll a custom "adjuster" function if one is provided. Otherwise it will just update the end positions.
96105

@@ -103,30 +112,61 @@ Finds the cost based on the MoorPy subsystem cost estimates
103112
### updateTensions
104113
Gets tensions from subsystem and updates the max tensions dictionaries of each Section object if it is larger than a previous tension
105114

115+
### updateSafetyFactors
116+
Update safety factors for desired factor type, load type, and property
117+
106118
### createSubsystem
107119

108120
Create a MoorPy subsystem for a line configuration from the design dictionary. Regular or suspended lines
109121
may be used.
110122

111-
### addMarineGrowth
112-
Re-creates sections part of design dictionary to account for marine growth on the subsystem, then calls createSubsystem() to recreate the line. For a detailed explanation of the function and modeling methods behind it, see [Marine Growth Modeling](#marine-growth-modeling)
123+
### positionSubcomponents
124+
Puts any subcomponent connectors/nodes along the mooring in
125+
approximate positions relative to the endpoints based on the
126+
section lengths.
113127

128+
### addMarineGrowth
129+
Updates subsystem to account for marine growth on the subsystem. For a detailed explanation of the function and modeling methods behind it, see [Marine Growth Modeling](#marine-growth-modeling)
114130

131+
### setCreep
132+
Elongates the lines that have the `creep_rate` feature in their MoorProps description (e.g. polyester).
115133

134+
### adjustPropertySets
135+
Switches the line type propertes to another set as defined in the MoorProps yaml.
116136

137+
### mirror
138+
Mirrors a half design to create a full line (symmetry assumption).
139+
Works with self.sections() and self.connectors() instead of self.dd.
117140

141+
### updateState
142+
Updates the state of the mooring system based on the provided state dictionary.
118143

119144
### setCorrosion
120145
Calculates MBL of chain line with corrosion included for those lines that have a corrosion_rate feature in their MoorProps dictionary.
121146

122-
### setCreep
123-
Elongates the length of a line that has a creep_rate feature in its MoorProps dictionary.
124-
125147
### getEnvelope
126148
Computes the motion envelope of the Mooring based on the watch
127149
circle(s) of what it's attached to. If those aren't already
128150
calculated, this method will call the relevant getWatchCircle method
129151

152+
### addSection
153+
Convenience function to add a section to the design
154+
155+
### addConnector
156+
Convenience function to add a connector to the design
157+
158+
### convertSubcomponents
159+
Creates Section and Connector objects from the subcomponents dict
160+
161+
### sections
162+
Returns a list of sections in the mooring in order from end A to end B
163+
164+
### connectors
165+
Returns a list of connectors in the mooring in order from end A to end B
166+
167+
### fairleads
168+
Returns a list of fairleads connected to the mooring at a specified end (A or B)
169+
130170
[Back to Top](#moorings-sections-and-connectors)
131171
## The Connector Class
132172

@@ -228,11 +268,13 @@ Where A is the area of the line defined as $A=length*diameter$, $\rho$ is the de
228268

229269
Since the drag force calculation depends on the diameter, DNVGL OS-E301_2018 specifies that the pristine nominal diameter should be used to determine the drag force in the area calculation, and only the drag coefficient should be changed to reflect the increase in drag from marine growth. However, MoorDyn utilizes the volume equivalent marine growth diameter for its calculations. To ensure that the resulting drag force will be equivalent, the drag coefficient entered into MoorDyn needs to use the pristine line nominal diameter in the numerator of the last ratio, rather than the marine growth nominal diameter.
230270

231-
### Marine Growth Dictionary
232-
The Marine growth dictionary is made of the following sections:
233-
- th : a list of lists. Each entry is a list with the following contents:
234-
[t, z_lower, z_upper] where t is the thickness of marine growth, z_lower is the lower limit of the depth this marine growth thickness is found at, and z_upper is the upper limit of the depth this marine growth thickness is found at.
235-
- rho : either a float or a list. If it is a float, this is the density of marine growth for all depths. If it is a list, the index corresponds index in the th list.
236-
- buoys : a list of marine growth thicknesses for buoyant sections of dynamic power cables. Marine growth on power cables is modeled differently than for mooring lines. See the Marine Growth on Dynamic Cables section in the [Cables ReadMe](../cables/README.md) for more information.
271+
### Marine Growth Input
272+
The Marine growth input is a list of dictionaries with the following keys:
273+
- thickness : marine growth thickness [m] added to nominal radius
274+
- lowerRange : lower z value of the range [m] for the corresponding thickness
275+
- upperRange : upper z value of the range [m] for the corresponding thickness
276+
- density : marine growth density, if this key is not use the default is 1325 kg/m^3
277+
278+
Marine growth on power cables is modeled differently than for mooring lines. See the Marine Growth on Dynamic Cables section in the [Cables ReadMe](../cables/README.md) for more information.
237279

238280
[Back to Top](#moorings-sections-and-connectors)

famodel/platform/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ The platform class contains properties and methods relating to a moored floating
55
Currently, RAFT information on the specific geometry and hydrostatic properties of the platform are not stored in the platform object. When a project is initialized, a RAFT model is created if directed to, and this information is stored in the RAFT model found in project.array.
66

77
## Platform Properties
8-
- **dd** : design dictionary of the platform, including
8+
- **dd** : design dictionary of the platform
99
- **r** : [x,y] coordinates of the platform
10-
- **phi** : heading offset of the platform
10+
- **phi** : heading offset of the platform [rad], clockwise positive
1111
- **rFair** : fairlead radius [m]
1212
- **zFair** : fairlead depth [m]
13-
- **body** : moorpy body object associated with this platform
13+
- **body** : moorpy body object associated with this platform. Filled in automatically when project.getMoorPyArray is called
1414
- **mooring_headings** : headings of associated mooring lines
1515
- **n_mooring** : number of mooring lines
16-
- **endB** : dictionary with key as mooring object names and values of booleans for if the end B of that mooring object is attached to the platform
16+
- **entity** : describes type of platform. Common options are 'FOWT' (floating wind turbine), 'Substation', 'WEC' (wave energy converter), but user may prescribe any string for the entity
1717
- **rc** : [row,column] informating location in a uniform grid array
1818
- **envelopes** : dictionary of 2D motion envelopes, buffers, etc. Each entry is a dict with x,y or shape
19-
- **loads** : dictionary of loads on platform
19+
- **x_ampl** : [m] expected wave-frequency motion amplitude about mean
20+
- **mean_loads** : dictionary of mean external load magnitudes on platform, default keys are 'current', 'wind', 'thrust', and 'waves'
2021
- **reliability** : dictionary of platform reliability information
2122
- **cost** : dictionary of platform costs
2223
- **failure_probability** : dictionary of platform failure probabilities
24+
- **raftResults** : dictionary containing raft simulation results for this platform
2325

2426

2527
## Platform Methods
@@ -30,3 +32,5 @@ Currently, RAFT information on the specific geometry and hydrostatic properties
3032
- **getCables()** : Creates list of cable objects connected to this platform
3133
- **getAnchors()** : Creates list of anchor objects associated with this platform
3234
- **getBufferZones()** : Calculates buffer zones around mooring lines and anchors, and saves buffer zones in envelopes dictionary.
35+
- **updateMooringPoints()** : updates end points of attached moorings based on midpoint of connected fairlead points
36+
- **calcThrustTotal()** : calculates the total thrust force on a platform by combining thrust forces of all associated turbines

famodel/turbine/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# The Turbine Class
2+
The turbine class contains properties and structures related to a turbine, for example a wind or water turbine. This class inherits from the Node class.
3+
4+
## Turbine Class Properties
5+
- dd : design description dictionary
6+
- D : rotor diameter of turbine
7+
- loads : dictionary of loads on the turbine
8+
- reliability : dictionary of turbine reliability factors
9+
- cost : dictionary of turbine costs
10+
- failure_probability : dictionary of turbine failure probabilities
11+
- thrust : maximum thrust force on the turbine
12+
13+
## Turbine Class Methods
14+
- makeRotor(): creates a RAFT rotor object for the turbine
15+
- calcThrustForces(): computes and stores the thrust force of the turbine based on rated speed

0 commit comments

Comments
 (0)