Flexible Body Model Builder
R2026bDescription
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 app provides the Partial Differential Equation Toolbox and
Integro-Differential Modeling Frameworks options to generate ROM
data. If you use the Partial Differential Equation Toolbox option,
the FlexibleBody structure also includes a
ReducedStructuralModel object. You can use this object with the reconstructSolution (Partial Differential Equation Toolbox)
function to recover full‑model results for further analysis, such as evaluating stress and
strain. The Partial Differential Equation Toolbox option requires
Partial Differential Equation Toolbox™. The Integro-Differential Modeling Frameworks (IDMF) option requires the
Integro-Differential Modeling Framework for MATLAB® add-on that supports Linux® and Windows®.
On Linux, the IDMF add-on runs without any additional requirement. On Windows, the IDMF option requires additional setup, including the Windows Subsystem for Linux (WSL). For setup details, see IDMF Setup on Windows.
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.
Examples
Parameters
Tips
On Windows, to run the IDMF 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.
References
[1] Craig Jr, Roy R., and Andrew J. Kurdila. Fundamentals of Structural Dynamics. 2nd ed. Hoboken, N.J: John Wiley, 2006.





