-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QTF calculation back to each sea state + MCF and KAY less strick
- Basically reverted commit 49079c9. I had moved the QTFs to be computed before solving for the different sea states, but this can be achieved by precomputing the QTFs with a previous RAFT run and using that as if the QTFs were computed from WAMIT. So, the QTFs are back to being computed for each sea state. This is more computationally expensive, but more versatile. The user have both options and can decide which one they prefer. - MacCamy-Fuchs correction and Kim and Yue correction (MCF for second-order) are less strict now. They just required the member to be cylindrical. It can be inclined, tapered, or submerged. Clearly, they work worse for cases that are far from the original hypothesis of a vertical surface piercing circular cylinder. - Moved Kim and Yue correction to member class - Output name for the QTFs and RAOs now include Case and head in the name We still need to include the mean drift for the second-order force component due to the quadratic acceleration.
- Loading branch information
1 parent
f6f15f6
commit af2c41c
Showing
7 changed files
with
453 additions
and
10,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,33 +7,25 @@ | |
import os.path as path | ||
|
||
# open the design YAML file and parse it into a dictionary for passing to raft | ||
flNm = 'OC3spar-SlenderBodyQTF' | ||
flNm = 'OC4semi-slenderBodyQTF' | ||
with open('./examples/' + flNm + '.yaml') as file: | ||
design = yaml.load(file, Loader=yaml.FullLoader) | ||
|
||
# Create the RAFT model (will set up all model objects based on the design dict) | ||
model = raft.Model(design) | ||
model = raft.Model(design) | ||
|
||
# Evaluate the system properties and equilibrium position before loads are applied | ||
model.analyzeUnloaded() | ||
|
||
# Compute natural frequencie | ||
model.solveEigen() | ||
|
||
# Simule the different load cases | ||
# Due to the linearization of the quadratic drag term in RAFT, the QTFs depend | ||
# on the sea state specified in the input file. | ||
# If more than one case is analyzed, the outputs are numbered sequentially. | ||
# Two output files are generated: | ||
# - The QTF, following WAMIT .12d file format. File name is qtf-slender_body-total_Head#p##[email protected] | ||
# - The RAOs used to computed the QTFs, following WAMIT .4 file format. | ||
# The #p## in the file name indicates the wave heading in degrees and @ is used to differentiate | ||
# between different cases. | ||
model.analyzeCases(display=1) | ||
|
||
# Plot the power spectral densities from the load cases | ||
model.plotResponses() | ||
|
||
# Visualize the system in its most recently evaluated mean offset position | ||
model.plot(hideGrid=True) | ||
|
||
# Save the response to a given output folder | ||
outFolder = './examples/' | ||
model.saveResponses(path.join(outFolder, flNm)) | ||
|
||
plt.show() | ||
|
||
# 0.02 | ||
# 12.37 |
Oops, something went wrong.