Home > リソース > MBDynモデル集 > 8. バネ‐マス‐ダンパー系（２）
MBDynモデル集

## 8. バネ‐マス‐ダンパー系（２）

### 入力ファイル

```# spring_mass_damper_2.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-3;
max iterations: 10;
tolerance:      1.e-6;
end: initial value;

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

begin: control data;
skip initial joint assembly;
output frequency: 10;
structural nodes: 2;
rigid bodies:     1;
joints:           4;
gravity;
end: control data;

#-----------------------------------------------------------------------------
# Design Variables
set: real M = 1.;  #[kg] Mass
set: real L = 1.;  #[m] Spring Natural Length
set: real K = 20.; #[N/m] Spring Stiffness Coefficient
set: real C = 1;   #[Ns/m] Damper Damping Coefficient

#-----------------------------------------------------------------------------
# Node Labels
set: integer Node_Ground = 1;
set: integer Node_Mass   = 2;

# Body Labels
set: integer Body_Mass = 1;

# Joint Labels
set: integer JoClamp_Ground      = 1;
set: integer JoInLin_Ground_Mass = 2;
set: integer JoPrism_Ground_Mass = 3;
set: integer JoDfmd_SpringDamper = 4;

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

begin: nodes;

#-----------------------------------------------------------------------------
# Nodes
structural: Node_Ground, static,
null, # absolute position
eye,  # absolute orientation
null, # absolute velocity
null; # absolute angular velocity

structural: Node_Mass, dynamic,
0., 0., -L, # absolute position
eye,        # absolute orientation
null,       # absolute velocity
null;       # absolute angular velocity

end: nodes;

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

begin: elements;

#-----------------------------------------------------------------------------
# Bodies
body: Body_Mass, Node_Mass,
M,    # mass
null, # relative center of mass
eye;  # inertia matrix

#-----------------------------------------------------------------------------
# Joints
joint: JoClamp_Ground,
clamp,
Node_Ground,
null, # absolute position
eye;  # absolute orientation

joint: JoInLin_Ground_Mass,
in line,
Node_Ground,
null, # relative line position
eye,  # relative line orientation
Node_Mass;

joint: JoPrism_Ground_Mass,
prismatic,
Node_Ground,
Node_Mass;

joint: JoDfmd_SpringDamper,
deformable displacement joint,
Node_Ground,
null, # relative offset
Node_Mass,
null, # relative offset
linear viscoelastic isotropic,
K,    # stiffness
C,    # viscosity coefficient
prestrain, single, 0., 0., -1, const, L;

#-----------------------------------------------------------------------------
# Gravity
gravity: 0., 0., -1., const, 9.81;

end: elements;
```