pO = 0 * N.x #wNA = N.get_w_to(A) wNB = N.get_w_to(B) wNA = G * wNB aNA = wNA.time_derivative() #wNB = wB*B.z #aNB = wB_d*B.z I_motor = Dyadic.build(B, Im, Im, Im) I_load = Dyadic.build(B, Il, Il, Il) #Motor = Body('Motor',A,pO,0,I_motor,system) Motor = Body('Motor', B, pO, 0, I_motor, system, wNBody=wNA, alNBody=aNA) Inductor = PseudoParticle(0 * M.x, L, name='Inductor', vCM=i * M.x, aCM=i_d * M.x) #Load = Body('Load',B,pO,0,I_load,system,wNBody = wNB,alNBody = aNB) Load = Body('Load', B, pO, m, I_load, system) #T = kt*(V/R)-kv*G*qB_d T = kt * i system.addforce(T * N.z, wNA) system.addforce(-b * wNA, wNA) system.addforce(-Tl * B.z, wNB) system.addforce((V - i * R - kv * G * qB_d) * M.x, i * M.x) #import sympy #ind = sympy.Matrix([wB])
I_motorA = Dyadic.build(MA, Im, Im, Im) I_motorC = Dyadic.build(MC, Im, Im, Im) BodyO = Body('BodyO', O, pOcm, mO, Dyadic.build(O, I_main, I_main, I_main), system) #BodyA = Body('BodyA',A,pAcm,mA,Dyadic.build(A,I_leg,I_leg,I_leg),system) #BodyB = Body('BodyB',B,pBcm,mB,Dyadic.build(B,I_leg,I_leg,I_leg),system) #BodyC = Body('BodyC',C,pCcm,mC,Dyadic.build(C,I_leg,I_leg,I_leg),system) #BodyD = Body('BodyD',D,pDcm,mD,Dyadic.build(D,I_leg,I_leg,I_leg),system) MotorA = Body('MotorA', MA, pOA, m_motor, I_motorA, system) MotorA = Body('MotorC', MC, pOC, m_motor, I_motorC, system) InductorA = PseudoParticle(0 * MA.x, L, name='InductorA', vCM=iA * MA.x, aCM=iA_d * MA.x) InductorC = PseudoParticle(0 * MC.x, L, name='InductorC', vCM=iC * MC.x, aCM=iC_d * MC.x) ParticleA = Particle(pAcm, mA, 'ParticleA') ParticleB = Particle(pBcm, mB, 'ParticleB') ParticleC = Particle(pCcm, mC, 'ParticleC') ParticleD = Particle(pDcm, mD, 'ParticleD') system.addforce(-b * wOA, wOA) system.addforce(-b * wAB, wAB)