Fill out the form to download

Required field
Required field
Not a valid email address
Required field
Required field
  • Set up your own cloud-native simulation in minutes.

  • Documentation

    How to Change the Geometry While Maintaining Assignments (CAD Associativity)?

    This article goes through CAD associativity capabilities using Onshape. This workflow allows the user to change geometries in a simulation tree while maintaining as many assignments as possible.

    Overview

    In a given simulation project, the user is often interested in testing multiple geometries that are similar between themselves. Having to re-assign faces and volumes to the simulation setup whenever changing a geometry can take some time, depending on the complexity of the CAD model.

    To make the simulation setup process smooth, Onshape users can leverage the Onshape Connector App and maintain the assignments when switching geometries. The next section will go through a step-by-step example.

    Example

    To showcase the CAD associativity capabilities, the geometry from the Thermal Comfort in a Meeting Room tutorial will be used.

    meeting room geometry solid parts
    Figure 1: Initial geometry from the meeting room tutorial, containing only the solid parts

    The initial geometry contains only the solid parts and no flow region. In CFD studies, to use CAD associativity efficiently, it is important to generate the fluid domain on Onshape before importing the CAD model to SimScale.

    Generating a Flow Region on Onshape

    There are many ways to create a flow region on Onshape, however, the easiest way usually involves the extrusion of a raw flow region followed by a Boolean subtract operation.

    As an example, initially, we are going to use one of the outer faces of the room as a base for the sketch. A rectangle is created, perfectly enveloping the room:

    creating a rectangle for a flow region extraction on onshape
    Figure 2: The rectangle needs to envelop the room as it will be the base of the flow region volume

    After sketching the rectangle, an extrude operation is the next step. Here, the intention is to create a simple parallelepiped that envelops the solids completely.

    extrude operation on onshape to create a flow region
    Figure 3: The extrusion operation uses the rectangle that was previously drawn to generate a ‘New’ part

    The new part that is generated in this process will represent the flow region after the next step. With a Boolean subtract operation, you can use the solid parts (Tools) to remove material from the newly created volume (the Target):

    boolean subtract operation onshape
    Figure 4: By selecting all solid parts as tools and the raw flow region as a target, you can generate a flow region on Onshape. By unticking “Keep tools”, the solid parts are deleted in this process.

    Finally, a ‘Delete body’ operation ensures that only the flow region of interest remains.

    creation of a flow region on onshape
    Figure 5: Finalized geometry on Onshape which will be imported to SimScale.

    This is going to be the first version of the CAD model to simulate.

    simulation set up in simscale meeting room tutorial maintaining assignments
    Figure 6: Initial simulation and mesh set ups in SimScale, using the first version of the CAD model.

    The objective is to make adjustments to the initial version of the CAD model and maintain as many assignments as possible in the simulation tree.

    Changing the CAD Model and Importing a New Version

    After running a simulation with the initial CAD model, the user might be interested in making small adjustments to the geometry and running more simulations. As a demonstration, let’s say that a ‘Move face’ command is used to reposition the inlet and outlet:

    making changes to a cad model on onshape
    Figure 7: The inlet and outlet were repositioned for the second version of the CAD model

    When importing the new CAD model to SimScale via Onshape, you can take advantage of the CAD associativity capabilities.

    Maintaining Assignments in the Simulation Setup

    To keep the setup assignments, the best way to proceed is to duplicate the initial simulation tree and assign the new geometry in the Geometry tab:

    duplicating a simulation tree and maintaining assignments by switching geometry
    Figure 8: When duplicating a simulation tree, all settings are copied over to a new simulation tree
    1. First, By right-clicking on the first simulation tree, a window appears with options
    2. Select ‘Duplicate’ to duplicate all settings from the first simulation tree
    3. Select ‘Geometry’ in the new simulation tree, and assign the updated geometry

    After the user selects the new geometry, all assignments are kept:

    maintaining assignments for a simulation setup when changing geometries
    Figure 9: Final result of the workflow that allows maintaining the assignments in a simulation setup.

    Since SimScale keeps all assignments in this example, the user can directly proceed to the meshing and simulation operations.

    Depending on the CAD changes performed, some assignments may be lost, however, SimScale will maintain as many as possible.

    Did you know?

    Although the example from this article involves a CFD simulation, associativity also works for FEA analysis types.

    Last updated: July 4th, 2023

    Contents