Creating the MBD Model of the Car Door

In this step, you will create the MBD model of the car door, after which the door closure simulation can be performed.

For this model, use the following units for length, mass, force, and time, respectively: millimeter, megagram, Newton, second.

Model Units

From the Forms panel, , change the Mass units from the default Kilogram to Megagram.

Points

For building this model, a total of six points need to be created.

From the Project Browser right-click Model and select Add Reference Entity > Point, or right click Points from the toolbar. Add the points as shown in the table below.


Figure 1. Points Required for the Model

Bodies

In this model, there are two bodies: one body to represent the car and another to represent the flexible door.

  1. From the Project Browser right-click Model and select Add Reference Entity > Body, or right click Bodies from the toolbar. Add a body and label it Car Body.
  2. From the CM Coordinates tab, specify the center of mass of the body as the point Car Body CG.
  3. Click the Properties tab of the Car Body and enter the mass and inertia properties values as shown below.


    Figure 2. Mass and Inertia Properties of the Car Body
  4. Add another body and label it Car Door.
  5. From the Properties tab, click the Deformable check box.
  6. Browse and specify the metro_door_flex.h3d file as the Graphic file and H3D file of the Door Body. Use the flexbody file generated in Step 2 above.

Graphics

After Point 6 above, you can see that the Door Body has a graphical representation, but Car Body does not. You can add a file graphic to the Car Body so that visualization of the model becomes more meaningful.

  1. From the Tools menu, select Import CAD or FE.
  2. From the Input File drop-down menu, select HyperMesh. Use the file browser to select the HyperMesh file car_body_graphics.hm.
    The Output Graphic File field is automatically populated.


    Figure 3.
  3. Click OK.
    The HyperMesh file is converted to H3D and imported into the MotionView window.
  4. From the Graphics panel, , click the graphic just added.
  5. From the Connectivity tab, double-click Body and pick Car Body as the body.
    This will associate the selected graphic with the Car Body.

Joints

For this body, you will need to add a total of four constraints/joints. One of these joints will need to be added using the XML template.

  1. From the Project Browser right-click Model and select Add Constraint > Joint, or right click Joint from the toolbar.
  2. Add joints as specified in the table below.


    Figure 4. List of the Joints to Create and their Topology

    Once the joints are specified and since there is a flexible body in the model, the interface nodes of the flexible body have to be associated with corresponding joint markers.

  3. From the Bodies panel, select Car Door.
  4. From the Properties tab, click Nodes.
  5. From the Nodes dialog, click Find All to find the interface node numbers and to resolve them with the respective connection markers.

Initial Conditions

In this simulation, body initial velocity will act as the primary motion input to the model.

  1. From the Project Browser select the Door Body from the filter on the left.
  2. Click the Initial Conditions tab.
  3. Activate WZ and specify a value of 5.0.
    This will be the magnitude of the initial angular velocity about the global Z axis that will be applied to the Door Body.
  4. Do a test simulation to check how the model behaves with just the initial velocity and the constraints.

Markers

To represent the locking mechanism of the car door, you will use a sensor activated fixed joint between the Car Body and the Door Body that initially is deactivated. The fixed joint will need to be created using XML templates since the MotionView interface allows joints to be created using bodies and points. In this case, you need to create the joint between two initially non-coincident markers.

  1. From the Project Browser right-click Model and select Add Reference Entity > Marker, or right click Bodies from the toolbar.
  2. Add two markers as specified in the table below.


    Figure 5. List of Markers to Create and their Topology
  3. Once the markers are created, repeat steps 2-4 under Joints above to resolve the node connections of Car Door Body with the maker Door Lock Mark.

Sensors

In this model, you will use an Event Sensor to detect the closing of the door. At the instance of the event detection, the fixed joint between the door and the car body is activated to simulate the actual locking mechanism.

  1. From the Project Browser right-click Model and select Add General MDL Entity > Sensor, or right click Sensor from the toolbar.
  2. Add a sensor and label it Lock Recognize.
  3. Click the Signal tab and change the signal type from Linear to Expression.
  4. Use the following expression as the signal: .
    DY({MODEL.m_door.idstring},{MODEL.m_car.idstring},{MODEL.m_car.idstring})

    The DY function accepts three markers as arguments. It returns the Y distance of the first marker from the second marker in the third marker's reference frame. In this case, the first marker is the maker labeled Door Lock Mark, which belongs to the Car Door Body. The second and the third marker is Car Body Lock Mark, which belongs to the Car Body.

  5. From the Compare To tab, specify 0.0010 for Value and 0.0001 for Error.
  6. Under Respond if, select Signal is less than VALUE + ERROR.
  7. From the Response tab, activate the Return to command file check box.

Templates

To simulate the door lock, you need a fixed joint between the door and the car body. The fixed joint needs to be activated with the sensor. The activation of the joint and the deactivation of the sensor can be done using a sequential simulation operation.

  1. From the Project Browser right-click Model and select Add General MDL Entity > Template, or right click Template from the toolbar. Add a template to the model and label it Lock Fix Joint.
  2. From the Properties tab of the template, under Type:, select Write text to solver input deck.
  3. Type in the following definition of the fixed joint in XML format in the template are of the panel:
    <Constraint_Joint
    id                  = "1001"
    type                = "FIXED"
    i_marker_id         = "{the_model.m_door.idstring}"
    j_marker_id         = "{the_model.m_car.idstring}"
    />

    This defines the fixed joint between the two markers Door Lock Mark and Car Body Lock Mark.

  4. From the Project Browser, right-click Model and select Add General MDL Entity > Template to add another template.
  5. Specify the label as Seq Sim Commands.
  6. From the Properties tab of the template, under Type, select Write text to solver command file.
  7. Below are XML Commands for the sequential simulation. Enter the following blocks of XML commands in the template area of the panel:
    <Deactivate
    element_type = "JOINT"
    element_id   = "1001"
    />
    <Simulate
    analysis_type  = "Transient"
    end_time       = "1.0"
    print_interval = "0.001"
    />
    <Activate
        element_type = "JOINT"
    element_id   = "1001"
    />
    <Deactivate
    element_type = "SENSOR"
    element_id   = "{the_model.sen_0.idstring}"
    />
    <Param_Transient
    integrator_type     = "VSTIFF"
    />
    <Simulate
    analysis_type  = "Transient"
    end_time       = "2.5"
    print_interval = "0.001"
    />
    <Stop/>

    These set of XML blocks define a sequential simulation operation as specified in the steps below:

    1. Deactivate Fixed Joint (initially).
    2. Simulate for 1 second.
    3. Activate Fixed Joint.
    4. Deactivate Sensor.
    5. Change the Integrator Type to VSTIFF.
    6. Simulate for 1.5 seconds.
    7. Stop simulation.
  8. Save the model once by selecting Export > Solver Deck from File menu.
  9. From the Run panel, click the file browser next to Save and run current model and specify a name for the solver XML file.
  10. Click Run to run the model in MotionSolve.
  11. Once the run is complete, click Animate to animate the simulation results.