Example B-1: Node Sets Only

This example demonstrates how to create the predefined node sets for a part. These node sets can then be used for a variety of constraints.

See the Boundary Conditions section for a thorough explanation of this subject.

The model created in this example is similar to Example A-2. A 3D part with a shape of 50×75×100 voxels is created with a base material of 1 and a voxel size of 0.02 units in all directions. The parameter log_debug is set to True for demonstration purposes.

Afterwards, the node sets are requested using the following statement:

part.add_bc(bc_type='Nodeset Only',
            vertices_nodeset=True, edges_nodeset=True, faces_nodeset=True,
            explicit_nodeset=True, simple_nodeset=True)

The part is then exported to an Abaqus™ input file in 3D mode with C3D8R elements. The Non-Empty elements (which happens to be the whole model), are requested to be exported.

The code can be found in the examples folder of the main repository. It is also included below:

"""Script for Example B-1: Node Sets Only."""

from vcams.voxelpart import VoxelPart

# Create the part.
part = VoxelPart(size=(50, 75, 100), base_material=1, voxel_size=(0.02, 0.02, 0.02), name='Ex B-1 Node Sets Only',
                 description='Example B-1: A 3D part for which all node sets are defined.', log_debug=True)

# Ask for all node sets to be created for the model.
part.add_bc(bc_type='Nodeset Only', explicit_nodesets=True, simple_nodesets=True)

# Output the part.
part.output_abaqus_inp(file_name='ex_b1_nodesets_only',
                       elem_code='C3D8R', dim='3D',
                       material_elem_sets='Non-Empty')

After importing the resulting file in Abaqus™, the node sets are available in the assembly.