-
Notifications
You must be signed in to change notification settings - Fork 184
Add WEC-Sim MCR capability using MATLAB parallel computing toolbox #438
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
Conversation
|
@yuyihsiang is there any way for me to test this functionality? Also, can you allow me to push to your fork so that I can make a minor revision? I would like to change the name of the function to |
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.
I've made some minor revisions to this, including changing the name of the function.
But I'm unable to run this for all MCR cases from our MCR Application cases.
RM3_MCROPT1
waves.H = 1.5:1:2.5; % Wave Height [m]
waves.T = 6:2:8; % Wave Period [s]errors with:
Error using waveClass/waveSetup (line 201)
Matrix dimensions must agree.
Error in wecSim (line 151)
waves.waveSetup(body(1).hydroData.simulation_parameters.w, body(1).hydroData.simulation_parameters.water_depth,
simu.rampTime, simu.dt, simu.maxIt, simu.g, simu.rho, simu.endTime);
Error in wecSimFcn (line 4)
wecSim
Error in wecSimMATLABPCT (line 104)
parfor imcr=1:length(mcr.cases(:,1))RM3_MCROPT3 errors with:
Error using wecSim (line 348)
Unable to write to MAT-file
C:\Users\kmruehl\Documents\GitHub\WEC-Sim\WEC-Sim_Applications\Multiple_Condition_Runs\RM3_MCROPT3\output\RM3_matlabWorkspace.mat.
The file may be corrupt.
Error in wecSimFcn (line 4)
wecSim
Error in wecSimMATLABPCT (line 104)
parfor imcr=1:length(mcr.cases(:,1))|
@yuyihsiang What about storing the hydroData between runs like we do for MCR (see snippet from %% Store hydrodata in memory for reuse in future runs.
if simu.reloadH5Data == 0 && imcr == 1 % Off->'0', On->'1', (default = 0)
for ii = 1:simu.numWecBodies
hydroData(ii) = body(ii).hydroData;
end
end |
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.
@yuyihsiang please make changes to resolve the issue with RM3_MCROPT3_SeaState and then this is ready for a merge. Also, feel free to modify the docs/man/advanced_features.rst PCT section.
Fix the path issue for reading the two wave files when using PCT
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.
Testing RM3_MCROPT3_SeaState right now... @yuyihsiang it works, thanks!
Update the PCT documentation
|
@yuyihsiang can you review https://github.com/WEC-Sim/WEC-Sim/pull/438/conflicts and see which should be passed into Also, these lines don't seem to suppress the warning for me warning('off', 'MATLAB:MKDIR:DirectoryExists');
warning('off','MATLAB:DELETE:FileNotFound'); |
Add warning('off', 'MATLAB:MKDIR:DirectoryExists'); to wecSimPCT.m
Fix userDefineFunctions.
|
@yuyihsiang this looks great, thanks! I'm merging it right now. |
* Update Morison Elemnet with decomposed flow vector
* Update Morison Element with Decomposition
* Correct inputs to ME function
* Change Morrison to Morison
* Small ME block changes
* Update to Morison Element Implementation
This commit has verified the implementatino of the normal and tangential Morison Element written by the initial pull request developer. The WEC-Sim team has chosen to keep both implementations active for users. Therefore, additional code development was needed to make this possible for the end user.
* changing function name
* updating bodyClass comment
* end stop implementation
* Update advanced_features.rst
Updating the Morison Element documentation to reflect the two modeling approaches provided for the user.
* Update WECSim_Lib.slx
Updating the WECSim_Lib.slx.
It appears that the conflict resolution over wrote the updates in the Morison Element block. Therefore, had to reconfigure the ME and make a correction in the calculation as well.
* Fix MATLAB Parallel Computing Toolbox support issue
* Update advanced_features.rst
Adding to the documentation after being able to compile locally.
* adding PCT to docs
* Update WECSim_Lib.slx
Update the WECSim_Lib.slx to fix broken links in the Flex Body block.
* renamed to wecSimPCT and minor update to wecSimMCR
* cleaning up batch run scripts removing commented lines
* fixed library masks
* remove mask comment
* Update wecSim.m
Fix the path issue for reading the two wave files when using PCT
* save library as 2019a
* Update advanced_features.rst
Update the PCT documentation
* renaming to wecSimFcn
* adding drag bod and hardstop doc rsts
* minor edit hard stop doc
* Remove warning
Add warning('off', 'MATLAB:MKDIR:DirectoryExists'); to wecSimPCT.m
* updates
Remove the makewecSimFcn.m since it has been renamed.
remove the "warning off" from wecSimFcn.m since they are no longer needed.
* Update bodyClass.m and wecSim.m to add a check on the
Code updates were made to the bodyClass.m and wecSim.m files to check when using option 1 for the Morison Element that the body(i).morisonElement.z vector is a unit normal vector.
* Update wecSim.m
Fix userDefineFunctions.
* library saved to 2015b
* Update WECSim_Lib.slx, bodyClass.m, simulationClass.m, and documentation
Updated the attached files to keep simu.morisonElement = 1 the same as the past implementation which setting simu.morisonElement = 2 for the new normal and tangential formulation.
* Add WEC-Sim MCR capability using MATLAB parallel computing toolbox (#438)
* Fix MATLAB Parallel Computing Toolbox support issue
* adding PCT to docs
* renamed to wecSimPCT and minor update to wecSimMCR
* cleaning up batch run scripts removing commented lines
* Update wecSim.m
Fix the path issue for reading the two wave files when using PCT
* Update advanced_features.rst
Update the PCT documentation
* renaming to wecSimFcn
* Remove warning
Add warning('off', 'MATLAB:MKDIR:DirectoryExists'); to wecSimPCT.m
* updates
Remove the makewecSimFcn.m since it has been renamed.
remove the "warning off" from wecSimFcn.m since they are no longer needed.
* Update wecSim.m
Fix userDefineFunctions.
Co-authored-by: Kelley Ruehl <kmruehl@sandia.gov>
* minor doc updates
* initializing with NaNs and adding warnings
* Update WECSim_Lib.slx
Update the WECSim_Lib.slx Flex Body block. The wave diffraction and excitation block as well as the hydrostatic restoring block cannot be linked to their equivalent block in the rigid body block.
* adding warning flags and changing ME properties to NaN
Co-authored-by: Lily Nguyen <lily.nguyen@nrel.gov>
Co-authored-by: nathanmtom <nathan.tom@nrel.gov>
Co-authored-by: Kelley Ruehl <kmruehl@sandia.gov>
Co-authored-by: yuyihsiang <yi-hsiang.yu@nrel.gov>
Modified the
wecSim.mfile and createdwecSimMATLABPCT.mandwecSimFcn.mfilesThis allows the user to run MCR using the MATLAB Parallel Computing Toolbox Execute this feature by running:
wecSimMATLABPCT