#### 6.2` `Basic CAD to U-spline workflow

This section presents general-purpose, basic workflows for building surface and volumetric U-spline models of CAD BREP geometry in Coreform Cubit™ . Users may also benefit from reviewing the more in-depth, application-specific guidance provided in Building U-spline meshes for ANSYS LS-DYNA analyses.

##### 6.2.1` `Building U-spline surfaces

U-splines can be constructed from CAD surface geometry that has been imported into Coreform Cubit or created using Cubit’s native geometry creation capabilities.

To create a U-spline surface, a quadrilateral finite element mesh must first be generated over the CAD source geometry.

As always, generating a quality mesh may require defeaturing, geometry cleanup, and/or compositing to address small features or extraneous topological entites. We do not address these issues in this section, but illustrative cases and solutions are discussed in more detail in Cleanup model geometry (Optional) and Modify BREP topology for quality meshing (Optional).

Once geometry is prepared to satisfaction, an all-quadrilateral surface mesh should be generated over the CAD surface(s). This is generally best accomplished using Cubit’s pave or map meshing schemes. (See also the discussion in Mesh model geometry for additional, potentially useful pave command sizing and cleanup options.)

After mesh generation and prior to U-spline construction, it may be desirable to create Cubit block and sideset entities. Depending on solver support, these may be utilized for boundary condition or material property assignment.

When the mesh layout is complete, U-spline construction can begin. A critical initial task is to identify all Bézier interfaces that should be assigned continuity, or creased. Creasing may be required when:

the underlying geometry is not smooth, or

we wish to apply a Dirichlet boundary condition, either on the interface in question, or on a surface enclosed by a loop of Bézier interfaces, as described in Create subdomains for *SET_ keywords and figure 581

U-spline construction is currently accomplished via commands in the Cubit command window; no GUI components have yet been implemented for this functionality.

To designate Bézier interfaces for creasing, we (1) select the curves that contain the Bézier element interfaces that need to be creased and (2) assign them to a crease group, which the U-spline algorithm in Coreform Cubit automatically consumes as input.

We create the group by executing build uspline crease group in the Cubit command line. This command creates a group called cf_crease_and_project_entities and searches for candidate curves (and vertices) to include in this group.

Alternatively, the user can do this manually, creating the group cf_crease_and_project_entities via the command create group and then manually adding (or removing) entities to the group by selecting them in the model-viewer, as we demonstrate in figure 582.

After creasing is specified to satisfaction, the set uspline command is used to specify the desired degree, continuity, and creasing parameters, with syntax as follows:

set uspline {([volume <ids>]) ([surface <ids>]) ([curve <ids>])|default} [degree <degree>] [continuity <default continuity>] [creasing {full|minimal}]

Finally, the U-spline is constructed using the command syntax:

[build] uspline ([volume <ids>]) ([surface <ids>]) ([curve <ids>]) [optimized for timestep] [as <id>]

fit uspline <uspline id> [tessellation tol <tessellation multiplier>]

For an example that includes both crease group creation and construction of a quadratic surface U-spline with maximal continuity, see Constructing the U-spline.

##### 6.2.2` `Building U-spline volumes

Coreform Cubit currently constructs trivariate U-spline basis functions as the tensor product of bivariate and univariate U-spline basis functions. One consequence of this approach is that while U-spline volumes can be built for CAD geometry of arbitrary complexity, that geometry must be meshed with a high-quality hexahedra under the the following constraints:

The input mesh must be generated using Cubit’s sweep meshing scheme. For some geometries, this may require prior defeaturing and/or decomposition.

For many-to-one swept meshes, source surfaces must be contiguous

Entities cannot be creased using the build crease group command

##### 6.2.2.1` `U-spline volumes require swept input meshes

It is important to ensure the mesh scheme is set to sweep before meshing bodies on which U-splines volumes are to be built. Assume we want a simple 3 x 3 x 3 mesh on the unit cube. We can mesh the volume and build a valid U-spline using the commands:

bri x 1 vol 1 size 0.33 vol 1 scheme sweep mesh vol 1 set uspline vol 1 deg 2 cont 1 build uspline vol 1

However, if we omit the command vol 1 scheme sweep, an error is returned:

ERROR: Cannot build a volumetric spline on a non-swept volume. Volume ID: 1

##### 6.2.2.2` `Source surfaces must be contiguous in many-to-one swept meshes

As an example, consider the two cylinders created using the following commands:

create cylinder height 2 radius 2 create cylinder height 2 radius 1 move vol 1 z 1 move vol 2 z 3 imprint vol all merge vol all vol all size 1 surf 2 5 6 scheme circle surf 7 scheme hole vol all scheme sweep mesh vol all uspline vol all

This sequence of commands results in the U-spline volume shown in the third image of figure 471 (top right, in grayscale).

By contrast, U-spline construction fails if the two cylinders are joined into a single volume before meshing, as shown in the fourth image (bottom left) of figure 471. Cubit can generate a swept mesh in this case also, as seen in the fifth image, but only via a many-to-one sweep involving non-contiguous source surfaces. Attempting to build a U-spline on the resulting mesh will fail with the error

ERROR: Cannot build volumetric splines over Volume 1 which is a many to one sweep with non-contiguous source surfaces.

Figure 471: This figure shows the restrictions on building U-spline volumes over many-to-one swept meshes. (a) A CAD geometry decomposed into two volumes. (b) The mesh of the two volume CAD geometry. Each volume is meshed as a one-to-one sweep. (c) The resulting U-spline volume. (d) The same CAD geometry represented as a single volume. (e) The mesh of the single volume CAD geometry. The volume is meshed using a many-to-one sweep. Because the two source surfaces are not contiguous, a U-spline volume cannot be built on this mesh.

##### 6.2.2.3` `Entities cannot be creased using build crease group

Instead the geometry must be decomposed into seperate swept meshes. The faces on interfaces between swept meshes are automatically creased to continuity.

create Cylinder height 2 radius 2 move vol 1 z 1 create frustum height 2 radius 2 top 0 webcut volume 2 with plane zplane offset 0 delete Volume 2 compress all move vol 2 z 3 unite body 1 2 webcut volume 1 with cylinder radius 1 axis z compress all imprint vol all merge vol all surf 2 size .5 vol 1 size 1.5 surf 2 scheme circle volume 2 scheme Sweep source surface 2 target surface 7 sweep transform translate propagate bias volume 1 scheme Sweep source surface 3 target surface 5 sweep transform least squares mesh vol 2 mesh vol 1 uspline vol all

The geometry, mesh, and resulting U-spline volume generate by the commands are shown in the first three images of figure 472. If we instead build a U-spline over the single volume shown in fourth image (lower left), the algorithm succeeds, but issues the warning

WARNING: Some edges which are at surface kinks in the CAD are not creased in the spline.

As the last image of figure 472 shows, the resulting U-spline volume fails to accurately capture a key feature of the original geometry.

Figure 472: This figure shows the workflow for ensuring sharp features are preserved in a U-spline volume fitted to a CAD geometry. (a) A CAD geometry decomposed into two volumes, separated by a sharp feature in the geometry. (b) The mesh of the two-volume CAD geometry. (c) The resulting U-spline volume, which accurately captures the sharp edge between the two volumes. (d) The same CAD geometry represented as a single volume. (e) The mesh of the single volume CAD geometry. (f) The resulting U-spline volume. Note that the sharp corner is not preserved in this U-spline volume.

Finally, automatic creasing of the U-spline mesh is performed to ensure a valid U-spline basis is constructed. This automatic creasing algorithm serves to ensure the following criteria are met:

The bivariate U-spline mesh on the source surface(s) of each swept mesh. must satisfy the admissiblity criteria for bivariate U-splines.

All faces on interfaces between swept meshes must be creased to continuity.

The continuity cannot change across interfaces between swept meshes.

While the user does not have control over this automatic creasing, they should be aware that it may have an effect on the resulting U-spline basis and corresponding geometry.

##### 6.2.3` `Commands

##### 6.2.3.1` `set uspline

The set uspline command sets the basis degree and continuity on Cubit geometric entities for building a U-spline.

set uspline <enum>entity [degree <integer>deg] [continuity <integer>cont] [creasing <enum>creasing_type]

The entity enum allows for setting degree and continuity on volumes, surfaces, and curves simultaneously.

If the degree and continuity keywords are not supplied, default values of p = 2 and ϑ = 1 will be used.

- The creasing_type enum can take one of the following values:
minimal: Crease the minimal number of edges necessary in order to crease a valid U-spline.

full: Crease edges to remove all continuity transitions in the resulting U-spline.

If no creasing_type is specified, the default creasing strategy minimal will be used. When a U-spline is built using the build uspline command, all of the geometric entities corresponding to a single U-spline must have identical degree and continuity settings, or an error will be thrown.

##### 6.2.3.2` `build uspline

[build] uspline {<enum>entity {<integer>id}} [as {<integer>us_id}]

The entity enum allow for building volume, surface, and curve U-splines simultaneously. Each entity is built as a single U-spline, and each is given a unique U-spline ID.

The entries in the set of us_id integers correspond to the entries in the set of entity enums. If no us_id are given, the constructed U-splines are given the next free IDs.

##### 6.2.3.3` `build uspline optimized

[build] uspline {<enum>entity {<integer>id}} optimized for timestep [as {<integer>us_id}]

The set of existing_us_id allow for specifying multiple existing U-splines to build an optimal timestep basis from. These existing U-splines must have been built with the full option enabled and with p = 2, or an error will be thrown.

The entries in the set of new_us_id integers correspond to the entries in the set of existing_us_id. If no new_us_id are given, the newly constructed U-splines are given the next free IDs.

##### 6.2.3.4` `fit uspline

fit uspline {<integer>us_id} [tessellation tol <real>tol]

The set of us_id specifies the U-spline IDs to be fitted to the source CAD geometry. The keyword all may be substituted for the list of integers to fit all U-splines that have been constructed.

The tessellation tol keyword specifies how far to refine the visualization tessellation. The value provided, times the largest axis-aligned bounding box dimension of the U-spline, equals the desired maximum difference between the actual spline and the tessellated approximation.

##### 6.2.3.5` `draw uspline

draw uspline <enum>toggle

The toggle takes a value of either off or on.

##### 6.2.3.6` `draw uspline projection_error

draw uspline id {<integer>us_id} <enum>field

The field enum takes a value of either projection_error or none.

##### 6.2.3.7` `remove uspline

remove uspline {<integer>us_id}

The set of us_id specifies the IDs of the U-splines to be removed. The keyword all may be substituted for the list of integers to remove all U-splines in the session.