Model an Extruded Solid

Model Overview

You can model an extrusion with a hole. One example is the box beam. Specifying hollow cross-sections must satisfy the cross-section guidelines. See Revolution and General Extrusion Shapes. In this example, you specify the cross-section coordinates of a box beam.

Modeling Approach

To represent the box beam geometry, first identify its cross-section. This is the 2-D area that you sweep along an axis to obtain the 3-D box beam. You can then specify the cross-section coordinates using the Solid block. The figure shows the box beam cross-section that you specify in this example.

The [0 0] coordinate identifies the solid reference frame origin. To place the reference frame at the center of the box beam, specify the coordinates so that the [0 0] coordinate is at the cross-section center. By parameterizing the cross-section coordinates in terms of relevant box beam dimensions, you can later change the box beam dimensions without having to reenter the cross-section coordinates. The figure shows the cross-section dimensions and coordinates that you must specify to represent the box beam.

Using the cross-section points that the figure shows, you define the coordinate matrix as:

OuterCS = [A, B, C, D, E];
InnerCS = [F, G, H, I, J];
CS = [OuterCS; InnerCS];
For more information about specifying the hollow cross-section coordinates, see Hollow Cross Sections.

Build Solid Model

  1. At the MATLAB® command prompt, enter smnew. A new Simscape™ Multibody™ model opens with some commonly used blocks. Delete all but the Solid block.

  2. In the Solid block dialog box, specify the following parameters. You later initialize the different MATLAB variables in a subsystem mask.

    ParameterSelect or Enter
    Geometry > ShapeGeneral Extrusion
    Geometry > Cross-SectionCS, units of cm
    Geometry > LengthL, units of cm
    Inertia > DensityRho
    Graphic > Visual Properties > ColorRGB

  3. Select the Solid block and generate a new subsystem, e.g., by pressing Ctrl+G.

Define Solid Properties

In the subsystem mask, initialize the solid parameters. Then, in the subsystem dialog box, specify their values.

  1. Select the Subsystem block and create a subsystem mask, e.g., by pressing Ctrl+M.

  2. In the Parameters & Dialog tab of the Mask Editor, drag six Edit boxes into the Parameters group and specify these parameters.


  3. In the Initialization tab of the Mask Editor, define the cross-section coordinates and assign them to MATLAB variable CS:

    D1 = W/2-T;
    D2 = H/2-T;
    OuterCS = [-W/2,-H/2; W/2,-H/2; W/2,H/2; ...
    -W/2,H/2; -W/2,-H/2];
    InnerCS = [-D1,-D2; -D1,D2; D1,D2; D1 -D2; -D1,-D2];
    CS = [OuterCS; InnerCS];

  4. In the Subsystem block dialog box, specify the numerical values of the solid properties. The table shows some values that you can enter.

    Color[0.85 0.45 0]

Visualize Solid Model

You can now visualize the box-beam solid. To do this, look under the Subsystem mask—e.g., by selecting the Subsystem block and pressing Ctrl+U—and open the Solid block dialog box. The solid visualization pane shows the solid that you modeled.

Parameterizing the solid dimensions in terms of MATLAB variables enables you to modify the solid shape without having to redefine its cross-section coordinates. You can change the solid size and proportions simply by changing their values in the Subsystem block dialog box. The figure shows some examples.

Was this topic helpful?