OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
655 stars 447 forks source link

MoorDyn and simulink/matlab #2062

Open HANloading opened 4 months ago

HANloading commented 4 months ago

Dear guys, Here's my Moordyn input file, I've changed the "z" value as my model reference point is (0,0,-13.46) (13.46 metres below SWL). lines.txt I get a fatal error when I run the moordyn call example and I don't understand what's going on? image

Can anyone help me?

Thanks!

my code: ` X=zeros(6,1); XD=zeros(6,1); % FLines=zeros(6,N+1);

N=5002; dt=0.01;

F_lines=zeros(6,N);

Ts=zeros(N,1);

FairTens1=zeros(N+1,1); FairTens2=zeros(N+1,1); FairTens3=zeros(N+1,1);

% Anchor_Tens1=zeros(N+1,1); % Anchor_Tens2=zeros(N+1,1); % Anchor_Tens3=zeros(N+1,1);

FLines_temp=zeros(1,6); FLines_p=libpointer('doublePtr', FLines_temp); % FLines=F_lines_p.value;

loadlibrary('Lines.dll','MoorDyn.h'); calllib('Lines','LinesInit',X,XD);

XD(1)=0.1;

for i=1:N

calllib('Lines','LinesCalc',X,XD,FLines_p, Ts(i),dt);

% F_lines_p; FairTens1(i+1)=calllib('Lines','GetFairTen',1); FairTens2(i+1)=calllib('Lines','GetFairTen',2); FairTens3(i+1)=calllib('Lines','GetFairTen',3); % Anchor_Tens1(i+1)=calllib('Lines','GetFairTen',4); % Anchor_Tens2(i+1)=calllib('Lines','GetFairTen',5); % Anchor_Tens3(i+1)=calllib('Lines','GetFairTen',6); X=X+XDdt; Ts(i+1)=dti; % FLines_p=libpointer('doublePtr', FLines_temp); F_lines(:,i)=FLines_p.value; end

calllib('Lines','LinesClose'); unloadlibrary Lines; `

HANloading commented 4 months ago

Sorry for another question. How should I get the form of the anchor chain load if I run it successfully? , such as 6x6 mooring line restoring matrix?? image

RyanDavies19 commented 4 months ago

Hi @HANloading, it seems to me that you are using the C++ version of MoorDyn instead of the Fortran version in OpenFAST. Is this the case?

If so can you post this issue in the MD-C issues page: https://github.com/FloatingArrayDesign/MoorDyn/issues