Home > リソース > MBDynモデル集 > 11. 減速ギア
MBDynモデル集

11. 減速ギア

アニメーション



説明図


plot_reduction_gear_in_out

入力ファイル

reduction_gear.mbd
# reduction_gear.mbd

#-----------------------------------------------------------------------------
# [Data Block]

begin: data;
   problem: initial value;
end: data;

#-----------------------------------------------------------------------------
# [<Problem> Block]

begin: initial value;
   initial time:   0.;
   final time:     5.;
   time step:      1.e-4;
   max iterations: 10;
   tolerance:      1.e-7;
end: initial value;

#-----------------------------------------------------------------------------
# [Control Data Block]

begin: control data;
   output frequency: 100;
   structural nodes: 2;
   rigid bodies:     2;
   joints:           3;
   forces:           3;
end: control data;

#-----------------------------------------------------------------------------
# Design Variables
set: real M_Gear1 = 0.1; #[kg] Mass of Gear1
set: real M_Gear2 = 0.1; #[kg] Mass of Gear2
set: real R_Gear1 = 0.1; #[m] Radius of Gear1
set: real R_Gear2 = 0.3; #[m] Radius of Gear2

set: real K_GroundSpring = 5; #[Nm/rad] Stiffnes Coefficient of Ground Spring 
                              #         attached to Gear2

set: real K_Gear1_Gear2 = 100000.; #[N/m] Stiffness Coefficient of Contact
set: real C_Gear1_Gear2 = 100.;    #[Ns/m] Damping Coefficient of Contact

#-----------------------------------------------------------------------------
# Intermediate Variables
set: real I_Gear1 = M_Gear1*R_Gear1^2./2.; #[kgm^2] Moment of Inertia of Gear1
set: real I_Gear2 = M_Gear2*R_Gear2^2./2.; #[kgm^2] Moment of Inertia of Gear2

#-----------------------------------------------------------------------------
# Reference Labels
set: integer Ref_Gear1 = 1;
set: integer Ref_Gear2 = 2;

# Node Labels
set: integer Node_Gear1 = 1;
set: integer Node_Gear2 = 2;

# Body Labels
set: integer Body_Gear1 = 1;
set: integer Body_Gear2 = 2;

# Joint Labels
set: integer JoRevp_Gear1       = 1;
set: integer JoRevp_Gear2       = 2;
set: integer JoTotp_Gear1_Input = 3;

# Force Labels
set: integer CoStr_Gear1              = 1;
set: integer CoStr_Gear2              = 2;
set: integer CoStr_Gear2_GroundSpring = 3;

#-----------------------------------------------------------------------------
# Scalar Functions 
scalar function: "cubstep",
   cubicspline, do not extrapolate,
      -0.03, 0.00,
      -0.02, 0.00,
      -0.01, 0.00,
       0.00, 0.00,
       1.00, 1.00,
       1.01, 1.00,
       1.02, 1.00,
       1.03, 1.00;

#-----------------------------------------------------------------------------
# References
reference: Ref_Gear1,
   null,                 # absolute position
   euler, pi/2., 0., 0., # absolute orientation
   null,                 # absolute velocity
   null;                 # absolute angular velocity  
      
reference: Ref_Gear2,
   0., 0., -R_Gear1-R_Gear2, # absolute position
   euler, pi/2., 0., 0.,     # absolute orientation
   null,                     # absolute velocity
   null;                     # absolute angular velocity

#-----------------------------------------------------------------------------
# [Nodes Block]

begin: nodes;

   #-----------------------------------------------------------------------------
   # Nodes
   structural: Node_Gear1, dynamic,
      reference, Ref_Gear1, null, # absolute position
      reference, Ref_Gear1, eye,  # absolute orientation
      reference, Ref_Gear1, null, # absolute velocity
      reference, Ref_Gear1, null; # absolute angular velocity
      
   structural: Node_Gear2, dynamic,
      reference, Ref_Gear2, null, # absolute position
      reference, Ref_Gear2, eye,  # absolute orientation
      reference, Ref_Gear2, null, # absolute velocity
      reference, Ref_Gear2, null; # absolute angular velocity

end: nodes;

#-----------------------------------------------------------------------------
# [Elements Block]

begin: elements;

   #-----------------------------------------------------------------------------
   # Bodies
   body: Body_Gear1, Node_Gear1,
      M_Gear1,               # mass
      null,                  # relative center of mass
      diag, 1., 1., I_Gear1; # inertia matrix
      
   body: Body_Gear2, Node_Gear2,
      M_Gear2,               # mass
      null,                  # relative center of mass
      diag, 1., 1., I_Gear2; # inertia matrix  
    
   #-----------------------------------------------------------------------------
   # Joints          
   joint: JoRevp_Gear1, 
      revolute pin, 
         Node_Gear1,
            null,                             # relative offset
            hinge, eye,                       # relative orientation
            reference, Ref_Gear1, null,       # absolute pin position
            hinge, reference, Ref_Gear1, eye; # absolute pin orientation
            
   joint: JoRevp_Gear2, 
      revolute pin, 
         Node_Gear2,
            null,                             # relative offset
            hinge, eye,                       # relative orientation
            reference, Ref_Gear2, null,       # absolute pin position
            hinge, reference, Ref_Gear2, eye; # absolute pin orientation
            
   joint: JoTotp_Gear1_Input,
      total pin joint,
         Node_Gear1,
            position, null,                                  # relative offset
            position, reference, Ref_Gear1, null,            # absolute position
            rotation orientation, reference, Ref_Gear1, eye, # absolute rotation orientation
         position constraint,
            inactive, inactive, inactive,
            null,
         orientation constraint,
            inactive, inactive, active,
         single, 0., 0., 1., string, "2.*pi*3.*sin(2.*pi*Time/4.)*model::sf::cubstep(Time)";

   #-----------------------------------------------------------------------------          
   # Plugin Variables
   set: [element, AZ_Gear1, JoRevp_Gear1, joint, string="rz"];
   set: [element, WZ_Gear1, JoRevp_Gear1, joint, string="wz"];
   set: [element, AZ_Gear2, JoRevp_Gear2, joint, string="rz"];
   set: [element, WZ_Gear2, JoRevp_Gear2, joint, string="wz"];

   #-----------------------------------------------------------------------------
   # Forces     
   couple: CoStr_Gear1,
      follower,
         Node_Gear1,
            single, 0., 0., 1.,
               string, "-K_Gear1_Gear2*(AZ_Gear1*R_Gear1+AZ_Gear2*R_Gear2)*R_Gear1\
                        -C_Gear1_Gear2*(WZ_Gear1*R_Gear1+WZ_Gear2*R_Gear2)*R_Gear1";
         
   couple: CoStr_Gear2,
      follower,
         Node_Gear2,
            single, 0., 0., 1.,
               string, "-K_Gear1_Gear2*(AZ_Gear1*R_Gear1+AZ_Gear2*R_Gear2)*R_Gear2\
                        -C_Gear1_Gear2*(WZ_Gear1*R_Gear1+WZ_Gear2*R_Gear2)*R_Gear2";
               
   couple: CoStr_Gear2_GroundSpring,
      follower,
         Node_Gear2,
            single, 0., 0., 1.,
               string, "-K_GroundSpring*AZ_Gear2";
                 
end: elements;