Code Monkey home page Code Monkey logo

wec-sim's Introduction

Refer to WEC-Sim documentation for more information.

DOI Documentation Run MATLAB tests on main branch Run MATLAB tests on dev branch

WEC-Sim Repository

Refer to the WEC-Sim Applications repository for more applications of WEC-Sim.

Source Code Management

A stable version of WEC-Sim is maintained on WEC-Sim's main branch, and WEC-Sim releases are tagged on GitHub. WEC-Sim development is performed on WEC-Sim's dev branch using a forking workflow. New WEC-Sim features are developed on forks of the WEC-Sim repository, and pull-requests are submitted to merge new features from a development fork into the main WEC-Sim repository. Pull requests for new WEC-Sim features should be submitted to the WEC-Sim dev branch. The only exception to this workflow is for bug fixes; pull requests for bug fixes should be should submitted to the WEC-Sim main branch. When a new version of WEC-Sim is released, the dev branch becomes the main branch, and all updates are included in the tagged release.

wec-sim's People

Contributors

agmoore4 avatar akeeste avatar bradling avatar cmichelenstrofer avatar crobarcro avatar dav-og avatar dforbush2 avatar efantnu avatar emiliofa avatar gparisella avatar h0r5e avatar j-vanrij avatar jeffalo1 avatar jhbates avatar jleonqu avatar jtgrasb avatar kmruehl avatar lawsonro3 avatar lilnguy avatar mancellin avatar mattehall avatar mshabara avatar nrel-jim-mcnally avatar ratanakso avatar ryandavies19 avatar salhus avatar sedwardsand avatar siheth avatar yuyihsiang avatar zmorrell-sand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wec-sim's Issues

dimensionalized f-dom hydro coeffs are not available

If the WEC-Sim user wants to know the dimenstionalized hydro coeff (added mass, radiation damping and excitation), this information is not available to them in WEC-Sim in either of the following locations:

body(1).hydroData.hydro_coeffs.radiation_damping
body(1).hydroForce.fDamping

Installing python packages and bemio

Hi folks,
i´m desperately trying to find a possibility to use WEC-Sim. As I figured, I need Nemoh to get hydrodynamic coefficients, which I then have to trynsform using Bemio, so I can use them as input for WEC-Sim. I managed to set up Nemoh, but now I´m struggling.

  1. I downloaded Python 3.4.3 and .whl files of the required packages (matplotlib, numpy, scipy, progressbar2, astropy, h5py). Trying to install the packages with the command "pip install matplotlib" I receive nothing but error messages. I tried from both python console and shell (SyntaxError: invalid syntax), as well as from the windows command prompt (doesn´t know commands "pip" or "python"). I can´t fix it.
  2. Trying to install bemio in command prompt, I get the same error (it doesn´t know command "python"), despite exactly following the instructions given on http://wec-sim.github.io/bemio/installing.html#downloading-bemio

I´m really not a computer expert, so I hope someone might be able to help me learn about all this - its exciting, but also frustrating at times. Any help is highly appreciated - thanks a lot! Regards
Malte

STL normal vector calculation issue for certain files.

In general, the order of points in an stl should be given such that the normal of each triangle is obtained through the right hand rule. Our calculations assume this. So does the SimMechanics visualization. But some software (e.g. SolidWorks when using shading) don't give the points in ht right order. The STL does provide the normal vectors.

This is a problem when using non-linear hydro with a an stl that doesn't follow the right hand rule.

Suggested action:
Use the normal vectors from the STL, also calculate them using the right hand rule. If they disagree, give a warning.

From https://en.wikipedia.org/wiki/STL_%28file_format%29#The_facet_normal

In both ASCII and binary versions of STL, the facet normal should be a unit vector pointing
 outwards from the solid object. In most software this may be set to (0,0,0), and the software
 will automatically calculate a normal based on the order of the triangle vertices using the
 "right-hand rule". Some STL loaders (e.g. the STL plugin for Art of Illusion) check that the
 normal in the file agrees with the normal they calculate using the right-hand rule and warn
 the user when it does not. Other software may ignore the facet normal entirely and use only
 the right-hand rule. Although it is rare to specify a normal that cannot be calculated using the
 right-hand rule, in order to be entirely portable, a file should both provide the facet normal
 and order the vertices appropriately. A notable exception is SolidWorks, which uses the
 normal for shading effects.

buoyancy forces

Perhaps this is an obvious question, but how does WEC-Sim calculate buoyancy forces? Does it use the hydrostatic stiffness matrix from the BEM (linearized about the specified draft), or does WEC-Sim use the .stl file to calculate the nonlinear buoyancy force as the draft changes.

RM3MoorDyn Bug

By running case RM3MoorDyn, I find the following bugs:
Error using wecSim (line 210)
Error evaluating 'InitFcn' callback of SubSystem block 'RM3MoorDyn/Floating (3DOF)/Mooring/MoorDyn/MoorDyn'.

Caused by:
Error using wecSim (line 210)
Could not find file MoorDyn.h.

Does anybody has similar experience?

Nemoh to Bemio to WEC-sim: .h5 Dataset issues

Hi All,

I'm still getting up to speed on WEC-sim the dynamics and the code so please bear with me on this!

I'm running a test case using hydro data from Nemoh. I've managed to create a .h5 from bemio however when I go to run WEC-sim I get this error:

WEC-Sim Wave Setup & Model Setup & Run WEC-Sim ...
Error using griddedInterpolant
The grid vectors do not define a grid of points that match
the given values.

Error in interp1 (line 186)
F = griddedInterpolant(X,V,method);

Error in bodyClass/irrExcitation (line 165)
obj.hydroForce.fExt.re(:,ii) =
interp1(obj.hydroData.simulation_parameters.w,obj.hydroData.hydro_coeffs.excitation.re(:,ii),wv,'spline');

Error in bodyClass/hydroForcePre (line 93)
obj.irrExcitation(w,numFreq);

Error in wecSim (line 55)
body(kk).hydroForcePre(waves.w,simu.CIkt,waves.numFreq,simu.dt,simu.rho,waves.type,kk,simu.numWecBodies,simu.ssCalc);

Searching through my .h5 file and the RM3.h5 example case I see that the datasets under question (hydro_coeffs.excitation.im & re) are 3 dimensional in my case but 2D in the WEC-sim example case (RM3.h5).

I also looked at the Bemio Nemoh tutorial output and found those datasets also to be 3D.

In my case bemio creates a (6x6x40) dataset with the 40 corresponding to the amount of wave frequencies i've asked Nemoh to use.
In the RM3 case the .h5 shows a 198x6 table.
RM3 runs, mine doesn't.

Anyone know where the error lies? In my Nemoh sim, how bemio populates the .h5 or how WEC-sim reads the .h5?

Surge response using 'floating' constraint

@bjrose86

I am modeling a simple cylindrical buoy in WECSim. It's a small-scale model (0.5 m diameter) subjected to 2 s period waves of amplitude 0.05 m (0.1 m total wave height). All of the hydrodynamic coefficients were obtained using NEMOH and they have been validated to be correct. I've modeled the buoy in Simulink using a floating constraint with the base tied to the seabed.

The heave response is close to experiments - the heave amplitude should be 0.05 m (same as wave amplitude), yet WECSim calculates 0.04 m. Likewise, the buoy should pitch about +/- 4 degrees, yet WECSim calculates +/- 2 degrees. The discrepancy seems likely to do with the surge motion. WECSim calculates that the buoy surges with a much larger amplitude of 2.5 m (close to half the wavelength), whereas I believe the surge amplitude should be closer to the wave amplitude of 0.05 m.

Perhaps there is an issue with the surge calculation when using the floating constraint?

Simulate a floating type wind turbine

@Owen0708

Hi everybody, I have a wamit.OUT input file,as I know,this file's data is the submerge of the body's geometry of the Hydrodynamic coefficients. If i would like to simulate a floating type wind turbine,I am worry about the top of the SWL geometry. because the top of the SWL geometry will influence the motion of the body,right? and i find that the wecSimInputFile.m can modify the momOfInertia.So i just change this parameters(include the top of the SWL geometry's inertia). It will be a good result?

Degrees of Freedom Question

It looks like the default blocks that WEC-SIM uses to constrain motions, do so in a 2D plane for degrees of freedom in Heave Surge and Pitch. It looks like the outputs have 6DOF available, is it possible to model a device in all 6DOF in WEC-SIM? We use NEMOH as the BEM solver with 6DOF as well.
Thanks,
Alex

Heave Response

@Owen0708

Hi WEC-Sim community, I would like to model a floating wind turbine(just a floating type,no mooring,no PTO,constrain in Heave),and this wind turbine has a very deep water draft. and i check some of the difference wave period and has constant Wave.H. when the wave period short(Wave.T=1s),the heave response is very small, when the wave period long(Wave.T=60s),the heave response is equal to Wave.H,it's look good, but when i setting the wave period=19s,the heave response resoult from the WEC-Sim,It look like an envelope. Is it any chance to suggest me what's wrong with my resoult or the resoult with envelope? (i'm use the old version...)

Random seed in batch simulations

Hey guys,

I run in the problem that using waves.randPreDefined = 0; sets the random generator seed to 0, which effectively defines a deterministic sequence of numbers drawn from the default random number generator algorithm. This deterministic sequence will repeat itself in any instance of Matlab, when re-started, or when the random number generator is called again with the same seed number ( >> rng(0) )

I think the description in the manual and the annotations in waveClass.m are bit misleading:

Note that, by default, the random wave phase for irregular waves are generated arbitrarily (waves.randPreDefined=0). If the user speci es waves.randPreDefined=1 in the input file, the random phase of the waves will be generated using the rand function in MATLAB with a seed value of 1. This gives the user an option to generate the same random wave every time if needed.

As far as I can see, either of the options (waves.randPreDefined = 0; or waves.randPreDefined = 1;) will give a deterministic sequence of numbers from the random number generator. One with a seed number equal to 0 (because it uses directly rand, which will use rng with default values) and the other equal to 1. Every time you call the random number generator >> rng( seed_number ) it will start the same deterministic sequence corresponding to the given seed_number.

Ok, this is getting too long, but I hope it is clear... So, when rand is called for the first time it starts the random number generator, succesive calls to rand will contine drawing numbers from the sequence defined by the seed, until rng is called again to reset the seed number.

The problem then is that running batch simulations on different instances of Matlab with waves.randPreDefined = 0; will output simulations on each instance with the same sequence of random phase. Because the first simulation of each batch, in each Matlab instance, starts rng with the same seed.

The solution is to give a different seed_number (i.e., rng(seed_number) or waves.randPreDefined = seed_number;) for each batch. The easiest way to do this is to use rng('shuffle).

I implemented this in my repository (see this commit). I meant to make a pull request, but there are many changes that are prbably not relevant for the oficial WecSim repository and since I did not had a welll organized branching method, I think it will be a pain to pull it if you wanted.

Anyhow, it is trivial to implement, but I personally think you can save people time if you add the shuffle option because it guarantees a sort of random initialization of rng when rand is used.

Remove large binary files from repo

A zip of the current master branch is 300+ MB, but a clone is 1.5 GB. Notice that, for example, in eeaf882, changes are being committed to large HDF5 files, which is probably increasing the size of the repo dramatically, since Git cannot diff binary files (it just saves every version). You may want to put the large binary files from the tutorials in a figshare repo and have the newest versions downloaded automatically, or look into using Git large file storage to make cloning the repository faster and easier for users.

Non-linear buoyancy

The non-linear buoyancy calculation uses the wave elevation to zero out the cells above the instantaneous water surface. But it still uses the mean water line (0,0,0) to calculate the cells submergence (i.e. the cells submergence is just its z-coordinate, shouldn't it be the wave elevation - the cell's z-coordinate?)

block diagram parameter error

Hi guys,

I am trying to simply run the model in RM3.slx as it is setup in the script wecSimInputFile.m, both of them located in the applications folder.

I am using Matlab R2015a, with a trial version of Simulink. I get the following error:

Error using simulationClass/loadSimMechModel (line 101)
block_diagram does not have a parameter named 'SimMechanicsOpenEditorOnUpdate'

Error in wecSim_RunHere (line 93)
simu.loadSimMechModel(simu.simMechanicsFile);

Vizualisation using Paraview

I am ready to push this. It creates a paraview file of your wec-sim simulation results. It works well, but will need improvement to reduce file size and the time it takes to write the files. I will also write something up in the user's manual.

Hydrodynamic Coefficients causing error

I have succeeded in running the RM3 tutorial case in Wec-Sim, using the provided rm3.h5 file for the hydrodynamic coefficients.

However, when I tried to convert the provided rm3.out file into an rm3.h5 using BEMIO and the readWamit script, I encountered a problem. The file seemed to convert without issue, but when I try and run Wec-Sim with this converted file, it fails and throws up an error message (Enclosed at end of post).

I am using a version of BEMIO last updated in June, I think. I see that the Readme file mentions that the rm3.out and rm3.h5 are based on different runs. Has this problem been noticed before? I concede I may be making an error during the conversion.

Any help or info would be greatly appreciated.

Error message as follows:
'Index exceeds matrix dimensions.

Error in interp1 (line 125)
V = V(idx,:);

Error in bodyClass/regExcitation (line 159)
obj.hydroForce.fExt.re(ii) =
interp1(obj.hydroData.simulation_parameters.w,squeeze(obj.hydroData.hydro_coeffs.excitation.re(ii,1,:)),w,'spline');

Error in bodyClass/hydroForcePre (line 91)
obj.regExcitation(w);

Error in wecSim (line 55)
body(kk).hydroForcePre(waves.w,simu.CIkt,waves.numFreq,simu.dt,simu.rho,waves.type,waves.waveAmpTime,kk,simu.numWecBodies,simu.ssCalc);'

AQWA Data

Hello,

I was wondering if I need both LIS and AH1 files or just LIS file to run bemio. Also, if I have an IGS, do you know what tool should I use to get a STL for the geometry.

Regards,
Nak

Mooring questions

@ahagmuller

Hi Carlos , 

I haven't looked yet but is MoorDyn also open source? 

I had posted some questions regarding Mooring damping and stiffness and what I thought was the
 correct application of the matrix. 

I think it would be really helpful to the user to see a drawing of how the matrix is used base on the
 geometry of the device and how the equations are applied. I am still a little fuzzy on some I this 
myself. 

That being said, we are assuming that if we use damping on the spherical joint in the example we 
posted that this can be resolved to forces in x,y and z based on the connection points of the morning 
lines. Then, the rotational damping*rotational velocity in that axis is equal to torque, and that torque 
divided by the effective torque arm length to the mooring connection will be the magnitude of the 
catenary mooring force which can be resolved into its components. Does this sound correct? 

Thanks , 

Alex

OSWEC: Regular Wave Case

Hello,

It appears to me that the default OSWEC tutorial example case does not work for all wave period cases. For example, it failed when I tried to run at waves.T=16 at waves.H=2.5.

Below is the PTO information:
%% PTO and Constraint Parameters
constraint(1)= constraintClass('Constraint1'); % Initialize ConstraintClass for Constraint1
constraint(1).loc = [0 0 -10];

pto(1) = ptoClass('PTO1'); % Initialize ptoClass for PTO1
pto(1).k = 0; % PTO Stiffness Coeff [Nm/rad]
pto(1).c = 0; % PTO Damping Coeff [Nsm/rad]
pto(1).loc = [0 0 -8.9]; % PTO Global Location [m]

Here is the error message:
Error using wecSim (line 157)
Derivative of state 'Rotational_PTO_Local_RY.Pitch_PCC_Revolute_Joint.Rz.w' in block 'OSWEC/Rotational PTO (Local RY)/Pitch PCC
(Revolute Joint)' at time 65.95 is not finite. The simulation will be stopped. There may be a singularity in the solution. If
not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)

So, I changed the time step to 0.01s (simu.dt = 0.01) and it ran but results seem wrong. For example, when I look at output.bodies(1).position(:,5) which represents pitch (Ry), the angle is around +/- 75 degrees (max at +/-85 degrees).

Regards,
Nak

Natural Frequency Question

Hi,
Would it be correct to say for WEC-SIM, if you set up a simulation with no waves and started out with an applied force to a body that was instantaneously removed, that it should oscillate at it's natural frequency?

Thanks,
Alex

body2body interactions

WEC-Sim does not currently account for body2body interactions. A version of this is included in the 'dev' branch, but has not been merged with 'master'.

Variable names in HDF5 file

Make the names in the HDF5 file PIP8 compliant and update the WEC sim code to handle these names. This will entail:

  1. making names PIP8 compliant
  2. updating body class vars and a few vars in the .slx files

This is med-priority

PTO Blocks Ordering for 6DOF Single Body Point Absorber

We are modeling a single body point absorber and have a few questions on the correct way to order the constraints. I will get some screenshots to help clarify our question soon.

-For a single floating body point absorber, starting at the global reference frame, we used a fixed constraint, attached to a rotational PTO, attached to a Surge PTO, then attached to a Heave PTO, and finally the body of the device. We have no damping applied for the rotational and surge PTO's, and their locations are all the same (0,0,0). After running the simulation and looking at the reference frames, it appears that the rotational and surge PTOs stay at the 0,0,0 location, wheras the heave PTO moves only in the device's local Z, which is what we want and are only modeling damping with this PTO. It is hard to pick out, but it looks like rotation is always occuring at the reference origin (0,0,0) instead of about the device CG, but we wanted to confirm this to be the case.

-As a check, we swapped the location of the rotational and surge PTO's in their ordering, so now we have the reference frame, fixed constraint,surge PTO, rotational PTO, heave PTO, and finally the body. When running the simulation changing nothing else, it appears that the device now has it's rotational PTO fixed to the device's origin at it's local coordinate system, and seems to pitch about it's CG. We think that this is the correct way to do this but want to confirm.

-We will be using a user defined force on the heave PTO, and want to confirm that power generated can be the body velocity*user input force (velocity in m/s, force in newtons) when the PTO damping constant is otherwise set to zero.

-Finally, is there any reason to use the fixed constraint in this scenario if constraint forces aren't needed? It appears to run the same either way, and I am not sure that the constraint forces are meaningful for us.

Again, I will try to post some screen shots of the two scenarios detailing the differences.

Thanks,

Alex

User Defined Force PTO block errors

Hi,
When using the user defined for PTO block (z direction for us) we got the following error:
(ahcontrol4 is our .slx file)

Caused by:
Error using wecSim (line 130)
Error in port widths or dimensions. Output port 1 of 'ahcontrol4/Global Reference Frame/Solver Configuration/EVAL_KEY/INPUT_DEMUX_3_0' is a one dimensional vector with 6
elements.
Error using wecSim (line 130)
Error in port widths or dimensions. Input port 1 of 'ahcontrol4/Global Reference Frame/Solver Configuration/EVAL_KEY/INPUT_3_1_1' is a one dimensional vector with 1
elements.

Breakpoint data error

When running WEC-Sim an error occurs at line 52 of wecSim. The error states "'Breakpoint data' in 'Centipodb/RigidBody/WaveDiffractionandExcitationForceCalculation/IregularWaveExcitationForce/IncidentVary/Linear/ForEachFrequency/PeriodInd'must be strictly monotonically increasing. Its values become not strictly monotonically increasing starting at element 49. Please change 'Breakpoint data' values to be strictlymonotonically increasing."

Output sampling rate - Enhancement request

It would be nice to have the ability to output results at a lower sampling rate than the simulation is run at. It would reduce memory demands and increase runtime especially in accelerator and rapid accelerator mode for batch runs.

Maybe add a property to simulationClass something like dtOut?
Then the decimation of all the "to workspace" blocks could be set to "(simu.dtOut/simu.dt)"?

Morison Elements not working for irregular waves

When trying to run a simulation including a morison element using a bretschneider spectrum, I get the following error:

Error using wecSim (line 192)
        The input signal to port 6 of subsystem 'azura_half/float/Morrison Element and
        ViscousDampingForceCalculation/Morrison Element Variant Subsystem/Morrison Element On/Irregular Wave
        Excitation Force/MorrisonElements/MorisonElementIrregular' has a width of 1. This width must be a
        multiple of 301, the number of iterations expected by another subsystem input/output signals.

I think the problem is simulink is trying to loop through different time values for each wave component, instead of treating time as a constant.

direction dependent cd

@bjrose86

I'm interested in modeling a configuration in which a (submerged) body has a direction dependent quadratic force. For example, if the body is moving up (z_dot>0) then Cd = Cd+. And if the body is moving down (z_dot<0) then Cd=Cd-. I understand that the force can be introduced by modifying the body(<#>).cd and body(<#>).characteristicArea classes, but is it possible to add a functional dependence to Cd? This may also be relevant if one wants to add a Reynolds number dependence to a viscous drag coefficient. Thanks!

Buoyant force/restoring force questions

The way we understand it, restoring force is zero when the device is at static equilibrium with it's weight and the buoyant force acting on it, and when the device is displaced/submerged from this static position the greater displacement is what generates a restoring force.

Our question then is, if we apply a user defined force, will the restoring force increase until equilibrium is reached with the force and the new displacement of the device in the model? Would running the model without any waves in still water show this?

We are running the simulation with non-linear buoyancy now.

Thanks,

Alex

Trouble running RM3-Tutorial

Hi folks,
I´m completely new to WEC-Sim. I started by trying to run the RM3-example described in the user manual, but while WEC-Sim was runnig, I got this error in matlab:

Error using wecSim (line 97)
mxIsNumeric(prhs[0]) && mxGetLength(prhs[0])==1

Is anyone able to help me with this? I exactly followed the instructions given in the user manual, and I have no clue how to fix this. I´d very much appreciate any support! Thanks a lot!!
Malte

Is PTO force added to "Total Force" acting to rigid bodies?

@longlongwalking

I developed a wave energy conversion model on MATLAB/Simulink independently, and then compare the result of it with the result of simulation by WEC-Sim, in order to verify my model. 2 results are not same though I carefully checked mistakes. However, when I add PTO force to F_total in rigid body (WEC-Sim body elements) in the WEC-Sim model, the results get to be same. I think PTO force is not added to total force acting to rigid bodies in WEC-Sim. Does anyone know how PTO force is acting in WEC-Sim?

nonlinear FK force implementation

I have a few general questions regarding how the nonlinear FK force is calculated.

  1. Is the motion of the body (e.g. heaving or pitching) considered when calculating the potential flow field and integrating the surface pressure?
  2. Or do you use a quasi-steady approximation, that is, for each time step you solve for the potential flow field about a stationary body?
  3. If you use option 2, have you done any investigation into how good this approximation is? My guess is that it would be decent as long as the body oscillation frequency is slow compared to the wave frequency. However, this stands in contrast to most WEC designs, which are tuned to the wave frequency.

I would be interested in your thoughts.

Thanks!
Brian

How to model in WEC-SIM with 6DOF

Hi,
This question is related to Issue/Question #50.

We currently have 3 PTO blocks tied together for 3DOF in our model. This is, heave, pitch, surge, and sway. How can WEC-SIM be modified to analyze 6DOF, for heave, pitch, surge, sway, yaw, and roll.
I will try and get a drawing posted to describe how our device is intended to operate.
Thanks in advance!

Alex

time-domain state-space realization and frequency-domain state-space realization?

Dear Dr. Nathan Tom:

  Very please to contact you again and we are researchers from Shanghai Jiao Tong University.

In your paper “ Recent Additions in the Modeling Capabilities for the WEC-Sim-v1.1 Wave Energy Converter Design Tool” You mention that “Currently, WEC-Sim allows for the state-space realization of the hydrodynamic radiation coefficients either in the frequency-domain (FD) or time-domain (TD);”. However, we do not know which WEC-Sim command we should use in order to
perform a TD state-space realization or FD state-space realization. In the WEC-Sim-v1. 2. 1 wecSimInputFile for the RM3 tutorial, when we choose the “ Irregular Waves using BS Spectrum with State Space Calculation” in this file, there is a line command “simu.ssCalc = 1; %Control option to use state space model”. What does “simu.ssCalc = 1” mean? Does “simu.ssCalc = 1” mean time-domain state-space realization? Or does “simu.ssCalc = 1” mean frequency-domain state-space realization? How should we set the simu.ssCalc value in order to perform a time-domain state-space realization? How should we set the simu.ssCalc value in order to perform a frequency-domain state-space realization? Or are there any other input files in your WEC-Sim-v1.2. 1 routine that we should change in order to choose between the time-domain state-space realization and frequency-domain state-space realization?
Thanks for your consideration, and we are looking forward to hearing from you.

Sincerely yours,
wyg110

Modifying OSWEC with floating connection

Hello All,

I just began using WEC Sim last week and have a question on setting up the simulink file for OSWEC like wec. The wec I am working on is similar to OSWEC meaning it has a rotational PTO, but the fixed part (base) is now freely floating. Thus in the new/modified wec the Global Reference Frame is connected to the base with a floating constraint. What should be the constraint.loc values? Should it be [0 0 0] or the bottom most part of the base (which is floating now).

Also when wec-sim outputs the pitch motions, is it in radians or degrees?

Thank you

Kumar

MoorDyn output bug

In the example tutorials/RM3_CoupledWithMoorDyn the Lines.out file has CON2PX CON2PY CON2PZ as -267 0 0 for all time-steps. But it should be -267 0 -70 instead.

Nonlinear hydro with irregular waves not working

error message:

Size mismatch (size [1001 x 1] ~= size [96 x 1]).

Function 'Body Elements/Rigid Body/Wave Diffraction and Excitation Force Calculation/Nonlinear FK Force Variant Subsystem/With Nonlinear FroudeKrylov Force/Diffarction and Excitation Forces' (#260.3838.3842), line 102, column 16:
"k.*z"

Hydrostatic stiffness bug

WEC-Sim currently assumes that the hydrostatic stiffness matrix has values only on one side of the diagonal. This is true for WAMIT but not for AQWA (not sure about NEMOH). We should change it so that BEMIO outputs the entire matrices for all cases.

in bodyClass/hydroForcePre:

k = obj.hydroData.hydro_coeffs.linear_restoring_stiffness;
obj.hydroForce.linearHydroRestCoef =  (k + k' - diag(diag(k))).*rho .*g;

should be:

k = obj.hydroData.hydro_coeffs.linear_restoring_stiffness;
obj.hydroForce.linearHydroRestCoef =  k.*rho .*g;

I will make this change after BEMIO has been modified.

Visualisation with Paraview

Hi All,

Has anyone any advice for creating STL files for visualisation in Paraview?

I'm using geometry created in Solidworks at the moment but in running with simu.paraview = 1 I'm getting this error:

52 if (simu.nlHydro >0) || (simu.paraview == 1)
Subscript indices must either be real positive integers or
logicals.

Error in import_stl_fast (line 77)
if (C{4}(end)== NaN)

Error in bodyClass/bodyGeo (line 177)
[obj.bodyGeometry.vertex, obj.bodyGeometry.face,
~] = import_stl_fast(fname,1,2);

Error in wecSim (line 54)
body(kk).bodyGeo(body(kk).geometryFile)

I think it might have something to do with my STL file, not sure, Any ideas?

Many thanks,
Matt

PTO Blocks Internal Mechanics Indexing Error

Hello,

I just pulled the latest WEC-Sim master to work with my PTO-Sim and I have noticed that there are blocks called Assignment (eg., 5th Index) that takes the PS-Simulink Converter signal and [0 0 0 0 0 0] constant block. In other words, this block's inputs are Y0 & U and output Y. I am not sure why those blocks are there. When I ran WEC-Sim with my PTO-Sim and looked at my plots all the results were wrong. Then, when I removed all the [0 0 0 0 0 0] and Assignment blocks, and re-ran WEC-Sim that coupled with PTO-Sim again, the results are correct. Could you please look into this issue.

Thanks,
Nak

Trouble installing bemio

Hi folks,
i´m desperately trying to find a possibility to use WEC-Sim. As I figured, I need Nemoh to get hydrodynamic coefficients, which I then have to trynsform using Bemio, so I can use them as input for WEC-Sim. I managed to set up Nemoh, but now I´m struggling.

Trying to install bemio in command prompt, I get the following error-message:

Traceback (most recent call last):
File "setup.py", line 7, in
from bemio.version import base
File "C:...\bemio-master\bemio__init__.py", line 1, in
from version import base, full
ImportError: No module named 'version'

I exactly followed the following the instructions given on http://wec-sim.github.io/bemio/installing.html#downloading-bemio. Does anybody have an idea, why it doesn´t work? I didnt´change anything in the bemio-folders I´ve downloaded, so why can python not find the 'version' file? its in the bemio folder!

I´m really not a computer expert, so I hope someone might be able to help me learn about all this - its exciting, but also frustrating at times. Any help is highly appreciated - thanks a lot! Regards
Malte

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.