WECSim MoorDyn Coupling

Hi All,

I had a question regarding how WEC-Sim and MoorDyn are coupled to each other in MATLAB to solve governing equations of motion.

At the beginning of each timestep, WEC-Sim sends time t_i, displacement x_i and velocity v_i measurement to MoorDyn, which then calculates a corresponding force, F_i. Is this force F_i then used to solve WECSim’s next step, iteration i+1? In which case, WECSim would be using mooring force from the previous time-step to calculate its next timestep.

Also, regarding Simulink blocks that are setup for this coupling, I am considering a hybrid implementation where WEC-Sim (on Simulink) is coupled to MoorDyn via the C++ code. Do moorDynDisp1, moorDynVel1 represent body forces that are sent to MoorDyn, and moorDynForce1 would thus be the returning body force? To modify this source code, I would send moorDynDisp1 and moorDynVel1 to the C++ code, and change moorDynForce1 to be the C++ output. MoorDyn Caller would be excluded. I just wanted to verify if this was a suggested approach.

Alternatively, I have been taking in body disp,vel information as inputs to the C++code at the beginning of the simulation and using the output C++ mooring force directly into the body’s F_net. Do you know why MoorDyn caller is setup in the way as shown above? I’m not sure if the below approach is missing something. Note the screenshot is a little greyed out.

Thanks, I am happy to provide more information and greatly appreciate any insight!

Best,
Elaine

Hi @Elaine.Liu,

I forwarded your question to Jeff Grasberger at Sandia National Lab, who set up the MoorDyn WEC-Sim coupling on the WEC-Sim side. This was his response:

Your initial description is correct. At each timestep, WEC-Sim sends the current displacement information to MoorDyn and MoorDyn calculates the corresponding forces that are applied back onto the model to solve the dynamics for the next timestep.

From your image, moorDynDisp1 and moorDynVel1 are the displacement and velocity of the measured connection (for one body connected to the seafloor, this is just the body displacement and velocity) and the moorDynForce1 is the force returned from MoorDyn and applied to the model. Your first described approach sounds reasonable.

As for your second approach, this is likely also reasonable for your case. The WEC-Sim MoorDyn coupling is set up to allow for connections at different points on the body, between multiple bodies, etc. Therefore, it is supposed to be relatively general and plug and play. Your suggested approach of feeding the mooring force direction into the body’s forces should work fine if you have one connection between the seafloor and the body. However, this would not work for connections between multiple bodies.

2 Likes

Okay, thank you both !