-
Notifications
You must be signed in to change notification settings - Fork 10
Mooring Offshore development #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mooring Offshore development #93
Conversation
* liberate python 3.13 * actually liberate python * update testing * version number inequality fix * walkback python for backdated wisdem * propogate to tests
…shore-development
…shore-development
…shore-development
…shore-development
… compute - buildFAModel() will initialize a floating array model from either an ontology file or a set of inputs - saves property called FAM to store FAModel project object - call FAM.repositionArray() in compute function
- buildFAModel is now part of the detailedMooringDesign class - for the ontology option, buildFAModel duplicates turbine 1 to reach desired number of turbines - repositionArray requires turbine positions in m, convert for that - created outputs dictionary to store anchor positions in km - analysis_demo example is updated with ontology filename stored for working example
…shore-development
…shore-development
-for now, passing settings through [modeling_options][mooring_setup] -"mooring_info" passes just the mooring and anchor sections of the ontology -edits to Leah's automatic adding of platforms, moorings, anchors to resolve errors -updated analysis_demo example for working example without ontology file
…shore-development
-- Added adjuster_settings dictionary to analysis_demo in mooring_setup dictionary -- Adjusted buildFAModel() to take in adjuster_settings and add to ontology file option as well as add to mooring objects with the FAModel project.addMooring() -- streamline a few things in buildFAModel()
…shore-development
-- remove cables from example ontology file -- streamline a few things in buildFAModel method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates the FAModel library into Ard for detailed mooring resizing and positioning.
- Added sample soil and bathymetry input files for offshore mooring examples
- Extended
analysis_demo.pyto configuremooring_setupwith the new adjuster - Updated
DetailedMooringDesign: addedbuildFAModel, initializedself.FAM, performed unit conversions, and repositioned moorings & anchors incompute()
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| examples/offshore-detailed/soil_sample.txt | Added a template soil input file |
| examples/offshore-detailed/bathymetry200m_sample.txt | Added a template bathymetry input file |
| examples/offshore-detailed/analysis_demo.py | Imported adjustMooring and added mooring_setup config |
| ard/offshore/mooring_design_detailed.py | Introduced buildFAModel, FAM initialization, reposition logic, and unit conversions |
Comments suppressed due to low confidence (4)
ard/offshore/mooring_design_detailed.py:130
- [nitpick] The attribute name
FAMis uppercase, which deviates from Python snake_case conventions; consider renaming it tofa_modelorfam_modelfor consistency.
self.FAM = self.buildFAModel(**self.options['modeling_options']['mooring_setup'])
ard/offshore/mooring_design_detailed.py:127
- [nitpick] The new
mooring_setuppath andbuildFAModellogic are not covered by existing tests; please add unit tests to verify correct model initialization and repositioning behavior.
if 'mooring_setup' not in self.options['modeling_options']:
ard/offshore/mooring_design_detailed.py:190
- The code uses
np.arraybut there is noimport numpy as npat the top of the file; please add the import to avoid a NameError.
self.FAM.repositionArray(np.array([[x_turbines[i],y_turbines[i]] for i in range(len(x_turbines))]),
ard/offshore/mooring_design_detailed.py:208
- Reassigning
outputsto a new dict shadows the OpenMDAO outputs object and prevents values from being recorded; remove this reassignment and write directly to the providedoutputsparameter.
outputs = {}
|
ok, let's start by applying this diff diff --git a/pyproject.toml b/pyproject.toml
index d3b36b2..5518d64 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -43,6 +43,8 @@ dependencies = [
"jax",
"optiwindnet",
"highspy",
+ "moorpy @ git+https://github.com/NREL/MoorPy.git@dev",
+ "famodel @ git+https://github.com/FloatingArrayDesign/FAModel.git@main",
]
[project.optional-dependencies]
dev = [I think that should get everything installed and allow the tests to be meaningful. @lsirkis can you apply this diff to your branch and push? |
-- add dependencies for MoorPy dev branch and FAModel
| from famodel.helpers import adjustMooring | ||
|
|
||
| class TestMooringDesignDetailed: | ||
| def setup_method(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's come context on how the test classes work: for each method of the class that begins with test_, a new test will be run. each test is run in a sandbox: it won't communicate with the scope outside that feature, with one major exception: before each test is run, setup_method will be re-run. it sets up the sandbox that a test is run in. so here, you've got this setup step happening but for the most part the objects created aren't being used in the tests so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUST KIDDING, you are definitely using these. REDACT REDACT REDACT
|
|
||
| self.D_rotor = 240.0 | ||
|
|
||
| # set turbine layout (3x3 grid 5D spacing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mismatch on spacing diameter count
* (prep to) liberate python 3.13 (NLRWindSystems#69) * liberate python 3.13 * actually liberate python * update testing * version number inequality fix * walkback python for backdated wisdem * propogate to tests * remove comments
* (prep to) liberate python 3.13 (NLRWindSystems#69) * liberate python 3.13 * actually liberate python * update testing * version number inequality fix * walkback python for backdated wisdem * propogate to tests * remove comments * constraint testing added * black reformatting * added updated pyrite * system test added but not complete for mooring packing * add forgotten file * Black reformat * switch to using OM derivative checks, clean up * black reformat * Update test/system/ard/geometry/test_constraints.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/system/ard/geometry/test_constraints.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/system/ard/offshore/test_mooring_packing.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/system/ard/offshore/test_mooring_packing.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/system/ard/geometry/test_constraints.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * tidy comments * fix the problem discovered by the not problem that jared pointed out hahahaha * barely avoided ragequitting due to black reformat --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0beb28e
into
NLRWindSystems:offshore-development
Overview
The proposed changes will integrate FAModel into Ard for mooring resizing.
Details