Flexible Body Model Builder
Description
The Flexible Body Model Builder app generates the reduced-order model (ROM) data for flexible bodies by using the Craig-Bampton method [1]. You can use the app to specify the geometry, material properties, and interface frames of the flexible body. To control the accuracy of the reduced-order model, you can specify the meshing parameters and model order reduction settings.
The app saves the ROM data as a structure called FlexibleBody
in a
MAT-file. The ROM data contains the stiffness and mass matrices, the origins and orientations
of the interface frames, and graphical information for displaying the deformed shape of the
flexible body. You can use the fields of the structure to specify the corresponding parameters
of the Reduced Order Flexible
Solid block to model a flexible body.
The Flexible Body Model Builder app provides the Partial Differential Equation Toolbox and Integro-Differential Modeling Frameworks (IDMF) options to generate ROM data. The Partial Differential Equation Toolbox option requires Partial Differential Equation Toolbox™. The IDMF option requires the Integro-Differential Modeling Framework for MATLAB® add-on that supports Linux® and Windows®.
On Linux, the add-on runs without any additional requirement. On Windows, to run the add-on, you must install the Windows Subsystem for Linux (WSL). To install WSL, see Install Linux on Windows with WSL.
On Windows, the first time you use IDMF to generate a ROM data set, the app imports a
Linux distribution to WSL. The distribution is named
idmf_hub_<MATLABrelease>
, such as idmf_hub_2023b
,
where <MATLABrelease>
is the release number of the currently running
MATLAB. To query the presence of the
idmf_hub_<MATLABrelease>
distribution, in the Windows command prompt, type wsl -l -v
. To remove the
idmf_hub_<MATLABrelease>
distribution, type
idmf_container_teardown()
at the MATLAB command line.
When you use IDMF on Windows with WSL, the available memory and swap space may be limited
due to default settings. For details, see Main
WSL settings. To increase the amount of memory available to IDMF, you can configure
global settings for WSL 2 by using the .wslconfig
file. For detailed
instructions, see .wslconfig
. Set the memory
and
swap
entries based on the specifications of the computer and your memory
requirements. For example, to assign 48GB of memory to WSL 2 and add 8GB of swap space, add
the following lines to the .wslconfig
file.
[wsl2] memory=48GB swap=8GB
On Windows, the Flexible Body Model Builder app cannot generate a ROM data set by using the IDMF option if the Windows Defender Firewall blocks the PostgreSQL server. By default, the firewall blocks the server on all public and private networks.
To resolve this issue, you can allow the server to communicate on desired networks if the
firewall prompts when using the app. Alternatively, you can manually add the executable file
of the PostgreSQL server to the list of allowed apps. For more information, see Allowing apps through Windows Defender Firewall. You can find the executable file in
the installation folder of the currently running MATLAB,
<matlabroot>\sys\postgresql\win64\PostgreSQL\bin\postgres.exe
. It is
recommended that you go through these steps with your IT team or a system
administrator.
Open the Flexible Body Model Builder App
MATLAB Toolstrip: On the Apps tab, under Simscape, click Flexible Body Model Builder.
MATLAB command prompt: Enter
flexibleBodyModelBuilder
.
Parameters
Geometry
File Name
— Path of CAD geometry file
character vector
Path of the CAD geometry file, specified as a character vector. The file location can the absolute path starting from the root directory of the file system or a relative path starting from a folder on the MATLAB path.
Except the STL, the app supports all the file formats listed in Supported Software and File Formats.
Note
The geometry must be a single part. The app raises an error if the geometry is an assembly.
Example:
'C:/Users/JDoe/Documents/myShape.STEP'
or
'Documents/myShape.STEP'
Unit Type
— Source for solid geometry unit
From File
(default) | Custom
Source of the solid geometry unit, specified as the From
File
or Custom
. Select From
File
to use the unit specified in the imported file. Select
Custom
to specify your own unit.
Unit
— Length unit in which to interpret geometry
m
(default) | cm
| mm
| km
| um
| in
| ft
| mi
| yd
Length unit in which to interpret the geometry. Changing the unit changes the scale of the imported geometry.
Dependencies
To enable this parameter, set Unit Type to
Custom
.
Stiffness and Inertia
Density
— Mass per unit volume of material
2700 kg/m^3
(default) | positive scalar
Mass per unit volume of material. The default value corresponds to aluminum.
Specify
— Elastic properties used to parameterize plate
Young's Modulus and Poisson's Ratio
(default) | Young's and Shear Modulus
Elastic properties used to parameterize the plate. You can specify either
Young's Modulus and Poisson's Ratio
or Young's and Shear
Modulus
. These properties are commonly available in materials
databases.
Young's Modulus
— Ratio of normal stress to normal strain
70 GPa
(default) | positive scalar
Ratio of normal stress to normal strain, specified as a positive scalar. The default value corresponds to aluminum.
The app performs a cross-parameter check between the Young's and shear moduli to ensure the resulting Poisson's ratio is in the range [0, 0.5).
Poisson's Ratio
— Ratio of transverse to normal strains
0.33 (default) | scalar in the range [0, 0.5)
Poisson's ratio of the plate. The value specified must be greater than or equal to 0 and smaller than 0.5. The default value corresponds to aluminum.
Dependencies
To enable this parameter, set Specify to Young's
Modulus and Poisson's Ratio
.
Shear Modulus
— Ratio of shear stress to engineering shear strain
26 GPa
(default) | positive scalar
Ratio of shear stress to engineering shear strain, specified as a positive scalar. The default value corresponds to aluminum.
The app performs a cross-parameter check between the Young's and shear moduli to ensure the resulting Poisson's ratio is in the range [0, 0.5).
Dependencies
To enable this parameter, set Specify to
Young's and Shear Modulus
.
Discretization
The app creates meshes based on the specified maximum and minimum element sizes. The app provides quadratic tetrahedral meshes whose edge lengths are roughly within the specified element sizes. The values of the Max Element Size and Min Element Size parameters do not impose strict constraints on the created mesh, but provide soft lower and upper bound targets. Occasionally, the edge length of some elements may be beyond the specified limits.
Max Element Size
— Target maximum mesh edge length
1 m
(default) | positive scalar
Target maximum mesh edge length, specified as a positive scalar.
The Max Element Size parameter is an approximate upper bound on the mesh edge lengths. The value must be larger than the value of the Min Element Size parameter. This parameter controls the overall refinement of the mesh. Small values create finer meshes, but the mesh generation and ROM computation take a longer time.
Min Element Size
— Target minimum mesh edge length
1 m
(default) | positive scalar
Target minimum mesh edge length, specified as a positive scalar.
The Min Element Size parameter is an approximate lower bound on the mesh edge lengths and controls the mesh refinement in a localized manner, such as at curved edges or on small features. The value must be less than the value of the Max Element Size parameter. Small values may better capture details and improve the accuracy of the ROM, but the mesh generation and ROM computation take a longer time.
Model Order Reduction
Number of Fixed-Interface Normal Modes
— Retained dynamic Craig-Bampton modes
0 (default) | nonnegative integer
Retained dynamic Craig-Bampton modes, specified as an integer in range [0, n].
,
where:
nn is the number of all the nodes in the mesh.
nnf is the number of nodes on the surfaces to which the interface frames are attached.
For most analyses, it is not necessary to retain high-frequency modes for these reasons:
High-frequency modes do not contribute much to simulation results.
Simulations with high-frequency modes are computational expansive.
Frames
Frames
— Create interface frames
button
Click the Create Frame button to open a pane for creating a new interface frame on the body. In this pane, you can specify the origin and orientation for the frame.
To define the origin of the frame, under Frame Origin, use Based on Geometric Feature to make the new frame origin coincident with the canonical point of the selected undeformed feature. Surfaces are the only valid feature. Select a surface from the visualization pane, then click Select Feature to confirm the location of the origin. The name of the origin location appears in the field below this option.
After you select a surface to define the origin of the frame, the app rigidly constrains that surface in the flexible body and rigidly attaches the frame to that rigid region. The selected surfaces for the interface frames must not connect to or overlap each other.
To define the orientation of the frame, under the Frame Axes section, select the Primary Axis and Secondary Axis of the frame and then specify their directions.
Use the following methods to select a vector for specifying the directions of the primary and secondary axes. The primary axis is parallel to the selected vector and constrains the remaining two axes to its normal plane. The secondary axis is parallel to the projection of the selected vector onto the normal plane.
Along Reference Frame Axis: Selects an axis of the reference frame of the undeformed geometry.
Based on Geometric Feature: Selects the vector associated with the chosen undeformed geometry feature. Valid features include surfaces and lines. The corresponding vector is indicated by an arrow in the visualization pane. You can select a feature from the visualization pane and then click Select Feature to confirm the selection. The name of the select feature appears in the field below this option.
FrameN
— Edit or delete existing interface frame
frame name
Edit or delete the frames you created. N
is a unique
identifying number for each custom frame.
Click the Edit button to edit the interface frame, such as the origin and axes.
Click the Delete button to delete the interface frame.
Dependencies
To enable this parameter, create a frame by clicking the Create Frame button .
References
[1] Craig Jr, Roy R., and Andrew J. Kurdila. Fundamentals of Structural Dynamics. 2nd ed. Hoboken, N.J: John Wiley, 2006.