Example B-3: Periodic BC

This example demonstrates how to apply the constraints for a periodic BC to a part.

These constraints can then be used for applying the boundary conditions to the part. A sample script fot Abaqus’ Python Scripting Interface is provided for clarity.

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

The model created in this example is similar to Example A-1. A 2D part with a shape of 50×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 periodic BC is requested using the following statement:

part.add_bc(bc_type='Periodic')

The part is then exported to an Abaqus™ input file in 2D mode with CPE4R 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-3: Periodic BC."""

from vcams.voxelpart import VoxelPart

# Create the part.
part = VoxelPart(size=(50, 100), base_material=1, voxel_size=(0.02, 0.02), name='Ex B-3 Periodic BC',
                 description='Example B-3: A 2D part on which a Periodic BC is applied.', log_debug=True)

# Request a Periodic BC for the model.
part.add_bc(bc_type='Periodic')

# Output the part.
part.output_abaqus_inp(file_name='ex_b3_pbc',
                       elem_code='CPE4R', dim='2D',
                       material_elem_sets='Non-Empty')

After importing the resulting file in Abaqus™, we must do the following:

  1. Define a step. Here we assume it is named 'Step-1'.

  2. Fix vertex \(V_1\), which is the node set named 'Vertex1-NodeSet'.

  3. Apply the displacement tensor \(\mathbf{U}\) to the part.

    \[\begin{split}\mathbf{U} = \begin{bmatrix} U_{11} & U_{12} \\ U_{21} & U_{22} \end{bmatrix} = \begin{bmatrix} 1.1 & 0.6 \\ 0.6 & 2.2 \end{bmatrix}\end{split}\]

    To do this, and according to Eq. (6), we must apply the following displacement vectors to each dummy node:

    \[\begin{split}\begin{cases} \begin{alignat}{3} \vec{u}^{D_1} = (&U_{11} - 1&,&\ U_{12} &)& = (0.1, 0.6)\\ \vec{u}^{D_2} = (&U_{12} &,&\ U_{22} - 1&)& = (0.6, 1.2) \end{alignat} \end{cases}\end{split}\]

Steps 2 and 3 can be done using the following Python commands:

# Define some parameters for ease of use.
model = mdb.models['ex_b3_pbc']  # Make sure the name is correct.
assembly = model.rootAssembly

# Fix RP-0 in place.
model.EncastreBC(name='Fixed-BC', createStepName='Initial', region=assembly.sets['Vertex1-NodeSet'])

# Apply the displacements.
# Note that they are added in the step named 'Step-1',
# and only u1 and u2 are valid displacements.

# Apply the displacement vector (0.1, 0.6) to RP-1.
model.DisplacementBC(name='Disp-BC-1', createStepName='Step-1',
    region=assembly.sets['RP1-NodeSet'],
    u1=0.1, u2=0.6)

# Apply the displacement vector (0.6, 1.2) to RP-2.
model.DisplacementBC(name='Disp-BC-2', createStepName='Step-1',
    region=assembly.sets['RP2-NodeSet'],
    u1=0.6, u2=1.2)