% MotionGenesis file: MGAircraftTrifilarPendulumStaticsFBD.txt % Copyright (c) 2016-18 Motion Genesis LLC. %-------------------------------------------------------------------- SetAutoZ( OFF ) NewtonianFrame N % Earth / aircraft hanger. RigidBody C % Aircraft. Point N1(N), N2(N), N3(N) % End-points of cable on N. Point C1(C), C2(C), C3(C) % End-points of cable on C. %-------------------------------------------------------------------- Constant L1 = 30 m % Length of cable between N1 and C1. Constant L2 = 30 m % Length of cable between N2 and C2. Constant L3 = 30 m % Length of cable between N3 and C3. Constant dN = 30 m % Distance between No and N1. Constant dC = 30 m % Distance between Co and C1. Constant wN = 20 m % Distance between No and N2. Constant wC = 20 m % Distance between Co and C2. Constant dcm = 8 m % Distance between Co and Ccm. Constant g = 9.8 m/s^2 % Earth's gravitational acceleration. Variable x, y, z % Locates Ccm from No. Variable q1, q2, q3 % BodyZYX Euler angles. Variable T1, T2, T3 % Tension in cables. C.SetMass( m = 9000 kg ) %-------------------------------------------------------------------- % Rotational and translational kinematics. C.SetRotationMatrix( N, BodyZYX, q1, q2, q3 ) CCm.SetPosition( No, x*Nx> + y*Ny> + z*Nz> ) Co.SetPosition( CCm, -dcm*Cx> ) C1.SetPosition( Co, dC*Cx> ) C2.SetPosition( Co, -wC*Cy> ) C3.SetPosition( Co, wC*Cy> ) N1.SetPosition( No, dN*Nx> ) N2.SetPosition( No, -wN*Ny> ) N3.SetPosition( No, wN*Ny> ) %-------------------------------------------------------------------- % Configuration constraints: Length of cables. CableConstraint[1] = C1.GetDistanceSquared( N1 ) - L1^2 CableConstraint[2] = C2.GetDistanceSquared( N2 ) - L2^2 CableConstraint[3] = C3.GetDistanceSquared( N3 ) - L3^2 %-------------------------------------------------------------------- % Add forces from gravity and tension. Ccm.AddForce( m*g*Nz> ) unitVectorToN1FromC1> = N1.GetPosition(C1) / L1 unitVectorToN2FromC2> = N2.GetPosition(C2) / L2 unitVectorToN3FromC3> = N3.GetPosition(C3) / L3 C1.AddForce( N1, T1 * unitVectorToN1FromC1> ) C2.AddForce( N2, T2 * unitVectorToN2FromC2> ) C3.AddForce( N3, T3 * unitVectorToN3FromC3> ) %-------------------------------------------------------------------- % Calculate resultant force on C in terms of Fx, Fy, Fz. ResultantForce> = C.GetResultantForce() Fx = Dot( ResultantForce>, Nx> ) Fy = Dot( ResultantForce>, Ny> ) Fz = Dot( ResultantForce>, Nz> ) %-------------------------------------------------------------------- % Calculate moment of all forces on C about Ccm in terms of Mx, My, Mz. ResultantMoment> = C.GetMomentOfForces( Ccm ) Mx = Dot( ResultantMoment>, Cx> ) My = Dot( ResultantMoment>, Cy> ) Mz = Dot( ResultantMoment>, Cz> ) %-------------------------------------------------------------------- % For statics: Resultant force and moment on aircraft is zero. Statics = [ Fx; Fy; Fz; Mx; My; Mz ] %-------------------------------------------------------------------- % Statics analysis 1: Equal-length cables L1 = L2 = L3 = 30 m. SolveSetInput( [Statics; CableConstraint] = 0, q1=0 deg, q2=0 deg, q3=0 deg, x = Input(dN)/2 m, y=0 m, z = Input(L1) m, & T1 = Input(m*g)/2 N, T2 = Input(m*g)/4 N, T3 = Input(m*g)/4 N ) %-------------------------------------------------------------------- % Statics analysis 2: Unequal-length cables L1 = L2 = 22 m, L3 = 30 m. Input L1 := 22 m, L2 := 22 m, L3 := 30 m SolveSetInput( [Statics; CableConstraint] = 0, q1=0 deg, q2=0 deg, q3=0 deg, x = Input(dN)/2 m, y=0 m, z = Input(L1) m, & T1 = Input(m*g)/2 N, T2 = Input(m*g)/4 N, T3 = Input(m*g)/4 N ) %-------------------------------------------------------------------- % Calculate yaw, pitch and roll angles in terms of q1, q2, q3. Yaw = GetAngleBetweenUnitVectors( Nx>, Cy> ) - pi/2 Pitch = GetAngleBetweenUnitVectors( Nz>, Cx> ) - pi/2 Roll = pi/2 - GetAngleBetweenUnitVectors( Nz>, Cy> ) %-------------------------------------------------------------------- % Numerical values. DistanceStatic = EvaluateToNumber( Co.GetDistance(No) ) YawStaticDegrees = EvaluateToNumber( Yaw ) * 180/pi PitchStaticDegrees = EvaluateToNumber( Pitch ) * 180/pi RollStaticDegrees = EvaluateToNumber( Roll ) * 180/pi %-------------------------------------------------------------------- Save MGAircraftTrifilarPendulumStaticsFBD.html Quit