Skip to main content

PeriDigmBoundaryCondition

C++: phynexis::peridigm::PeriDigmBoundaryCondition
Python: phynexis.peridigm.PeriDigmBoundaryCondition
Header: src/peridigm/peridigm_boundary_condition.hpp

Description

Defines a boundary condition for peridynamic simulations. Supports prescribed displacement or body force, with time-dependent or constant loading profiles.

Constructors

PeriDigmBoundaryCondition()

Default constructor with type = Type.Prescribed_Displacement and all dimensions activated.

Example:

import phynexis
bc = phynexis.peridigm.PeriDigmBoundaryCondition()
print(bc.type)

Output:

Type.Prescribed_Displacement

Methods

insert_node(node_set_id)

Adds a node to the boundary condition set.

Parameters:

ParameterTypeDescription
node_set_idintNode index to add

Example:

bc = phynexis.peridigm.PeriDigmBoundaryCondition()
bc.insert_node(0)
bc.insert_node(1)
print(list(bc.node_indices))

Output:

[0, 1]

set_activated_dimensions(x, y, z)

Sets which dimensions are activated by this boundary condition.

Parameters:

ParameterTypeDescription
xboolActivate x axis
yboolActivate y axis
zboolActivate z axis

set_by_displacement_rate(x, y, z)

Sets a time-dependent boundary condition by displacement rate.

Parameters:

ParameterTypeDescription
xfloatDisplacement rate along x
yfloatDisplacement rate along y
zfloatDisplacement rate along z

set_by_ultimate_displacement(x, y, z, t)

Sets a constant boundary condition by ultimate displacement.

Parameters:

ParameterTypeDescription
xfloatUltimate displacement along x
yfloatUltimate displacement along y
zfloatUltimate displacement along z
tfloatMechanical time

set_by_loading_rate(x, y, z)

Sets a time-dependent boundary condition by loading rate (body force).

Parameters:

ParameterTypeDescription
xfloatLoading rate along x
yfloatLoading rate along y
zfloatLoading rate along z

set_by_ultimate_loading(x, y, z, t)

Sets a constant boundary condition by ultimate loading.

Parameters:

ParameterTypeDescription
xfloatUltimate loading along x
yfloatUltimate loading along y
zfloatUltimate loading along z
tfloatMechanical time

write_input_file(os, node_set_id)

Writes the boundary condition to a Peridigm input file stream.

Parameters:

ParameterTypeDescription
osfile-likeOutput stream
node_set_idintNode set index

write_node_set_file(result_dir, node_set_id)

Writes the node set file to the specified directory.

Parameters:

ParameterTypeDescription
result_dirstrOutput directory
node_set_idintNode set index

Properties

PropertyTypeAccessDescription
typePeriDigmBoundaryCondition.Typeread/writeBoundary condition type
node_indiceslist[int]read/writeAffected node indices
dim_activatedlist[bool]read/writeActivated dimensions [x, y, z]
disp_rateVec3dread/writeDisplacement rate
loading_rateVec3dread/writeLoading rate
dispVec3dread/writeUltimate displacement
loadingVec3dread/writeUltimate loading
mech_timefloatread/writeMechanical time

Enums

Type

ValueDescription
Prescribed_DisplacementFixed or time-varying displacement
Body_ForceExternal body force loading