Force_left(1,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))^2+(cos(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+sin(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+cos(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+sin(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2+(-sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2)^(1/2)*(-A_left*rho*CD_left*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))-A_left*rho*CL_left*(-sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))); 
Force_left(2,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))^2+(cos(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+sin(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+cos(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+sin(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2+(-sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2)^(1/2)*(-A_left*rho*sin(alpha_left)*CL_left*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+A_left*rho*sin(alpha_left)*CD_left*(-sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))); 
Force_left(3,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))^2+(cos(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+sin(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+cos(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+sin(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2+(-sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2)^(1/2)*(A_left*rho*cos(alpha_left)*CL_left*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))-A_left*rho*cos(alpha_left)*CD_left*(-sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))); 
Force_right(1,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))^2+(cos(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)-sin(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+cos(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))-sin(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2+(sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))+cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2)^(1/2)*(-A_right*rho*CD_right*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))-A_right*rho*CL_right*(sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))+cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))); 
Force_right(2,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))^2+(cos(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)-sin(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+cos(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))-sin(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2+(sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))+cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2)^(1/2)*(A_right*rho*sin(alpha_right)*CL_right*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))-A_right*rho*sin(alpha_right)*CD_right*(sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))+cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))); 
Force_right(3,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))^2+(cos(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)-sin(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+cos(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))-sin(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2+(sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))+cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))^2)^(1/2)*(A_right*rho*cos(alpha_right)*CL_right*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))-A_right*rho*cos(alpha_right)*CD_right*(sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)+cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))+cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))); 
Force_pitch(1,1) =((cos(psi)*cos(theta)*dx+dy*sin(psi)*cos(phi)+dy*cos(psi)*sin(theta)*sin(phi)+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_pitch-(dphi*sin(theta)+dpsi)*y_pitch)^2+(-sin(psi)*cos(theta)*dx+dy*cos(psi)*cos(phi)-dy*sin(psi)*sin(theta)*sin(phi)+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*x_pitch-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_pitch)^2+(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_pitch-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_pitch)^2)^(1/2)*(-rho*A_pitch*CD_pitch*(cos(psi)*cos(theta)*dx+dy*sin(psi)*cos(phi)+dy*cos(psi)*sin(theta)*sin(phi)+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_pitch-(dphi*sin(theta)+dpsi)*y_pitch)-rho*A_pitch*CL_pitch*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_pitch-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_pitch)); 
Force_pitch(2,1) =0; 
Force_pitch(3,1) =((cos(psi)*cos(theta)*dx+dy*sin(psi)*cos(phi)+dy*cos(psi)*sin(theta)*sin(phi)+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_pitch-(dphi*sin(theta)+dpsi)*y_pitch)^2+(-sin(psi)*cos(theta)*dx+dy*cos(psi)*cos(phi)-dy*sin(psi)*sin(theta)*sin(phi)+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*x_pitch-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_pitch)^2+(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_pitch-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_pitch)^2)^(1/2)*(rho*A_pitch*CL_pitch*(cos(psi)*cos(theta)*dx+dy*sin(psi)*cos(phi)+dy*cos(psi)*sin(theta)*sin(phi)+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_pitch-(dphi*sin(theta)+dpsi)*y_pitch)-rho*A_pitch*CD_pitch*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_pitch-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_pitch)); 
Force_yaw(1,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw)-(dphi*sin(theta)+dpsi)*y_yaw)^2+(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz+(dphi*sin(theta)+dpsi)*x_yaw-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw))^2+(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_yaw-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_yaw)^2)^(1/2)*(-rho*A_yaw*CD_yaw*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw)-(dphi*sin(theta)+dpsi)*y_yaw)-rho*A_yaw*CL_yaw*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz+(dphi*sin(theta)+dpsi)*x_yaw-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw))); 
Force_yaw(2,1) =((cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw)-(dphi*sin(theta)+dpsi)*y_yaw)^2+(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz+(dphi*sin(theta)+dpsi)*x_yaw-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw))^2+(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_yaw-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_yaw)^2)^(1/2)*(rho*A_yaw*CL_yaw*(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw)-(dphi*sin(theta)+dpsi)*y_yaw)-rho*A_yaw*CD_yaw*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz+(dphi*sin(theta)+dpsi)*x_yaw-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw))); 
Force_yaw(3,1) =0; 
Force_sail(1,1) =((cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_sail-(dphi*sin(theta)+dpsi)*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2)))^2+(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2))-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_sail)^2+(sin(theta)*dx-sin(theta)*Wind_x-cos(theta)*sin(phi)*dy+cos(theta)*sin(phi)*Wind_y+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2)))^2)^(1/2)*(-rho_air*A_sail*CD_sail*(cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_sail-(dphi*sin(theta)+dpsi)*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2)))+rho_air*A_sail*CL_sail*(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2))-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_sail)); 
Force_sail(2,1) =((cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_sail-(dphi*sin(theta)+dpsi)*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2)))^2+(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2))-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_sail)^2+(sin(theta)*dx-sin(theta)*Wind_x-cos(theta)*sin(phi)*dy+cos(theta)*sin(phi)*Wind_y+cos(theta)*cos(phi)*dz+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2)))^2)^(1/2)*(-rho_air*A_sail*CL_sail*(cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_sail-(dphi*sin(theta)+dpsi)*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2)))-rho_air*A_sail*CD_sail*(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2))-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_sail)); 
Force_sail(3,1) =0; 
Force_drag(1,1) =-((cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi))^2+(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi))^2+(sin(theta)*dx-sin(theta)*Wind_x-cos(theta)*sin(phi)*dy+cos(theta)*sin(phi)*Wind_y+cos(theta)*cos(phi)*dz)^2)^(1/2)*rho_air*A_structure*CD_structure*(cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)); 
Force_drag(2,1) =-((cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi))^2+(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi))^2+(sin(theta)*dx-sin(theta)*Wind_x-cos(theta)*sin(phi)*dy+cos(theta)*sin(phi)*Wind_y+cos(theta)*cos(phi)*dz)^2)^(1/2)*rho_air*A_structure*CD_structure*(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)); 
Force_drag(3,1) =0; 
