Solve wind turbine with ode solver
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Lisanne Meinerzhagen
el 26 de Jul. de 2016
Comentada: Lisanne Meinerzhagen
el 28 de Jul. de 2016
Hey, I'm trying to solve the following differential equation with an ode solver:
tspan = [ta te];
ic = 1;
opts = odeset('RelTol',1e-2,'AbsTol',1e-4);
[t,u]=ode113(@(t,u) fu1_SS(t,u,u0,Pt,A,zusFG),[ta te],u0,opts);
function u=fu1_SS(t,u,u0,Pt,A,zusFG)
A=A.';
A = interp1(Pt,A,t); % Interpolate the data set (P,A) at time t
A=A.';
u=zeros((nodes*ld+3*zusFG)*2,1); % 1:nodes*ld Displacement, nodes*ld+1:nodes*ld*2 Velocity
du=zeros((nodes*ld+3*zusFG)*2,1); % 1:nodes*ld Velocity, nodes*ld+1:nodes*ld*2 Acceleration
du(1:nodes*ld+3*zusFG,1)=u(nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2,1); % du(1)=u(2)
u(1:nodes*ld+3*zusFG,1)=K\(A-M*du(nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2,1)-C*u(nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2,1)); %Displacement u(1)=K\(P-M*du(2)-C*u(2))
end
nodes are the Nodes of the wind turbine, ld are the degrees of freedom, zusFG are additional degrees of freedom of the soil. M, C and K are matrices which declare the system (mass, damping and stiffness). Pt is the time vector to interpolate A. A is the wind load, which consists out of a load vector for every node. The Problem is, that the displacement is becoming larger and larger instead of oscillating about one constant value...
Does anybody have an idea where the problem is?
Thanks for you help in advance!
0 comentarios
Respuesta aceptada
Torsten
el 26 de Jul. de 2016
I don't understand this line in your code.
u(1:nodes*ld+3*zusFG,1)=K\(A-M*du(nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2,1)-C*u(nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2,1)); %Displacement u(1)=K\(P-M*du(2)-C*u(2))
u is the solution variable - you can't determine or prescribe it here. You will have to prescribe velocity in
du(1:nodes*ld+3*zusFG)
and acceleration in
du( nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2)
if your function has the form
function du=fu1_SS(t,u,u0,Pt,A,zusFG)
Best wishes
Torsten.
1 comentario
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!