Skip to content

Conversation

@salhus
Copy link
Contributor

@salhus salhus commented Aug 24, 2022

This PR follows #880 .
If the added-mass infinity was missing from the BEM run, radiationIRF function calculates the Added-mass at infinity.
However, this only happens for non-WAMIT BEM codes.
This PR generates the added-mass at infinity, if it is missing from the BEM run regardless of the BEM code.

kmruehl and others added 13 commits May 20, 2022 11:16
adding dev and master build status to README
* Update tutorials to fix OSWEC inertia

* Update terminology.rst

* Update tutorials.rst

changed OSWEC Iyy and added note

Co-authored-by: Kelley Ruehl <kmruehl@sandia.gov>
…h | Add 2021b to MATLAB versions (#862)

* Split docs CI into test and build jobs

This PR splits the docs CI workflow into two independent jobs. The
first "test" job checks the current branch with any warnings
triggering a failure. The second jobs builds and deploys the
production docs, allowing any warnings to pass. This allows the
commit author to see any new issues they may be adding to the docs
while not stopping the docs being published.

* Try to get color output in log

* Remove redundant steps for branch test

* Fix duplicate targets using anonymous references

* Cancel previous runs if new commits are made

* Fix spelling mistake to test concurrency

* Limit concurrency to pull requests for the unit tests

This is to ensure all commits on the master and dev branches are
tested, which will be important if we are going to measure
coverage using an external service like codecov.

* Fix another spelling mistake

* Add R2021b to explicit MATLAB versions tested
* Moved simulationClass.outputDir to public.

* Replaced paths with fullfile paths in CompareBEMIO.m. The paths didd not work on Mac due to file separator.

* Update line 38 in reaadAQWA.m so it works on a Mac.

* change filesep in BEMIO examples, update readAQWA fileparts

* Update stopWecSim.m

Replaced hardcoded 'output' string with simu.outputDir.

* Removed clc and close all from initializeWecSim.

It should be up to the user to clear the command windows and close the figures.

Co-authored-by: Lermart96 <anders.brandt@oceanharvesting.com>
Co-authored-by: akeeste <akeeste@sandia.gov>
* Update stopWecSim.m

* Update initializeWecSim.m

* Update wecSimPCT.m
* update to v5.0 citation

* moving citation page to release notes

* adding some news articles

Co-authored-by: kmruehl <kmruehl@sandia.gov>
* fix cable implementation

* z-elv in nl hydro calc

* adding cable library
@salhus salhus changed the title )_AInf_using radiationIRF Ainf using radiationIRF for all BEM software Aug 24, 2022
@salhus salhus requested a review from nathanmtom August 24, 2022 18:48
@nathanmtom
Copy link

@salhus Thank you for re-submitting this PR after pulling in the latest versions of WEC-Sim into your branch.

Unfortunately, the changes you have implemented for using the Fourier transform to generate the infinite frequency added mass only apply when hydro.Ainf is not present in the hydro structure. This works for the WAMIT example you have listed; however, under our current readNEMOH and normalizeBEM functions after running readNEMOH the hydro structure does have an Ainf variable defined so the updates made in the calculation in radiationIRF are not implemented. If you want to keep the radiationIRF unchanged then you may want to just remove line 61 in normalizeBEM so we are not pulling the added mass at the highest frequency simulated in the BEM code.

Therefore, we cannot merge this PR until changes are made and checked across the other BEM import scripts.

ra_Ainf_temp = zeros(length(hydro.w),1); %Initialize the variable
[~,F] = size(hydro); %Last data set in
if strcmp(hydro(F).code,'WAMIT')==0
if isfield(hydro,'Ainf') == 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@salhus So this change will not update the infinite frequency added mass value for readNEMOH since this is populated in the normalizeBEM function. We either need to add a check here to see if Ainf is empty or the code is not WAMIT to implement the fourier transform to estimate the infinite frequency added mass. Or remove a line in normalizeBEM to not pre-populate the infinite frequency added mass.

Copy link
Contributor Author

@salhus salhus Aug 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathanmtom
Sorry I didnt realize normalizeBEM was doing that. I think I like the approach where normalizeBEM is not prepopulating the infinite added mass. This would make future debugging easier.
I removed the redundant line 61 in normalizeBEM.m

@kmruehl kmruehl added the BEM/BEMIO related to BEMIO or BEM hydro data label Sep 7, 2022
@salhus salhus marked this pull request as draft September 7, 2022 21:21
@nathanmtom
Copy link

@salhus Thanks for some updates to this PR. Unfortunately right now all of the tests appear to be failing so we will need to resolve that issue before we can finalize updating this PR.

@salhus
Copy link
Contributor Author

salhus commented Sep 8, 2022

@salhus Thanks for some updates to this PR. Unfortunately right now all of the tests appear to be failing so we will need to resolve that issue before we can finalize updating this PR.

@nathanmtom
I was using an obsolete version of dev. I am closing this PR and putting in another PR #946 with just the required changes.

@salhus salhus closed this Sep 8, 2022
kmruehl pushed a commit that referenced this pull request Sep 21, 2022
* Calculation_of_Ainf_using_radiationIRF.m

This PR follows #880 and #938
If the added-mass infinity was missing from the BEM run, radiationIRF function calculates the Added-mass at infinity.
However, this only happens for non-WAMIT BEM codes.
This PR generates the added-mass at infinity, if it is missing from the BEM run regardless of the BEM code.

* check_normalizeBEM

* check_for_modified_readWAMIT

* only_change_radiationIRF
@salhus salhus deleted the Ainf-fixes-for-hydro-and-h5-files branch October 12, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BEM/BEMIO related to BEMIO or BEM hydro data

Projects

None yet

Development

Successfully merging this pull request may close these issues.