BoundaryConditions#

Usage:

BoundaryConditions Class API Wrapper

class BoundaryConditions[source]#

Bases: object

Wrapper for BoundaryConditions class of Moldflow Synergy.

create_core_shift_fixed_constraints(nodes, retract_time=0)[source]#

Creates core shift fixed constraints at given nodes with specified retract time.

Parameters:
  • nodes (EntList | None) – The nodes to apply the fixed constraints to.

  • retract_time (float) – float that specified retract time.

Returns:

Number of constraints created

Return type:

int

create_core_shift_general_constraints(nodes, trans, rotation, trans_types, rotation_types, retract_time=0)[source]#

Creates core shift general constraints at given nodes with specified retract time.

Parameters:
  • nodes (EntList | None) – EntList object containing nodes to be constrained

  • trans (Vector | None) – Vector object specifying translation constraints

  • rotation (Vector | None) – Vector object specifying rotation constraints

  • trans_types (Vector | None) – Vector object specifying translation constraint types

  • rotation_types (Vector | None) – Vector object specifying rotation constraint types

  • retract_time (float) – float specifying the retract time

Returns:

Number of constraints created

Return type:

int

create_core_shift_pin_constraints(nodes, retract_time=0)[source]#

Creates core shift pin constraints at given nodes with specified retract time.

Parameters:
  • nodes (EntList | None) – The nodes to apply the pin constraints to.

  • retract_time (float) – Optional retract time for CORE_SHIFT analysis.

Returns:

Number of constraints created

Return type:

int

create_core_shift_spring_constraints(nodes, trans, rotation, retract_time=0)[source]#

Creates core shift spring constraints at given nodes with specified retract time.

Parameters:
  • nodes (EntList | None) – The nodes to apply the spring constraints to.

  • trans (Vector | None) – Vector object that specifies translation stiffnesses

  • rotation (Vector | None) – Vector object that specifies rotation stiffnesses

  • retract_time (float) – float that specifies retract time

Returns:

Number of constraints created

Return type:

int

create_critical_dimension(node1, node2, upper, lower)[source]#

Creates a critical dimension between two nodes

Parameters:
  • node1 (EntList | None) – The first node.

  • node2 (EntList | None) – The second node.

  • upper (float) – Upper Dimensional tolerance.

  • lower (float) – Lower Dimensional tolerance.

Returns:

Number of loads created

Return type:

int

create_doe_critical_dimension(node1, node2, name)[source]#

Creates a DOE critical dimension between two nodes

Parameters:
  • node1 (EntList | None) – The first node.

  • node2 (EntList | None) – The second node.

  • name (str) – Name of the DOE critical dimension.

Returns:

Number of loads created

Return type:

int

create_edge_loads(nodes, force)[source]#

Creates edge loads at selected nodes

Parameters:
  • nodes (EntList | None) – The nodes to apply the edge loads to.

  • force (Vector | None) – The force vector.

Returns:

Number of loads created

Return type:

int

create_elemental_loads(tri, force)[source]#

Creates elemental loads at selected elements

Parameters:
  • tri (EntList | None) – The elements containing triangles to be loaded.

  • force (Vector | None) – The force vector.

Returns:

Number of loads created

Return type:

int

create_entity_list()[source]#

Creates a new entity list.

Returns:

The created entity list.

Return type:

EntList

create_fixed_constraints(nodes, analysis)[source]#

Creates fixed constraints at given nodes for the specified analysis type.

Parameters:
  • nodes (EntList | None) – The nodes to apply the fixed constraints to.

  • analysis (AnalysisType | int) – The analysis type (e.g., CORE_SHIFT).

Returns:

Number of constraints created

Return type:

int

create_general_constraints(nodes, analysis, trans, rotation, trans_types, rotation_types)[source]#

Creates general constraints at given nodes for the specified analysis type.

Parameters:
  • nodes (EntList | None) – EntList object containing nodes to be constrained

  • analysis (AnalysisType | int) – AnalysisType or int specifying the analysis type

  • trans (Vector | None) – Vector object specifying translation constraints

  • rotation (Vector | None) – Vector object specifying rotation constraints

  • trans_types (Vector | None) – Vector object specifying translation constraint types

  • rotation_types (Vector | None) – Vector object specifying rotation constraint types

Returns:

Number of constraints created

Return type:

int

create_ndbc(nodes, normal, prop_type, prop)[source]#
Creates a “generic” boundary condition such as:

injection entrance, coolant entrance, gas entrance, etc.

Parameters:
  • nodes (EntList | None) – The nodes to apply the boundary condition to.

  • normal (Vector | None) – The normal vector of the boundary condition.

  • prop_type (int) – Specifies the property type of the boundary condition

  • prop (Property | None) – Property that needs to be attached to the boundary condition.

  • type (Specify Nothing to automatically create or select one for the given property)

Returns:

The list of NDBC that were created.

Return type:

EntList

create_ndbc_at_xyz(coord, normal, prop_type, prop)[source]#
Creates a “generic” boundary condition such as:

injection entrance, coolant entrance, gas entrance, etc.

Parameters:
  • coord (Vector | None) – The coordinates of the boundary condition.

  • normal (Vector | None) – The normal vector of the boundary condition.

  • prop_type (int) – Specifies the property type of the boundary condition

  • prop (Property | None) – Property that needs to be attached to the boundary condition.

  • type (Specify Nothing to automatically create or select one for the given property)

Returns:

The list of NDBC that were created.

Return type:

EntList

create_nodal_loads(nodes, force, moment)[source]#

Creates nodal loads at selected nodes

Parameters:
  • nodes (EntList | None) – The nodes to apply the nodal loads to.

  • force (Vector | None) – The force vector.

  • moment (Vector | None) – The moment vector.

Returns:

Number of loads created

Return type:

int

create_one_sided_constraints(nodes, positive_trans, negative_trans, positive_trans_types, negative_trans_types, retract_time=0)[source]#

Creates one-sided constraints at given nodes for the specified analysis type.

Parameters:
  • nodes (EntList | None) – The nodes to apply the one-sided constraints to.

  • positive_trans (Vector | None) – The positive translation vector.

  • negative_trans (Vector | None) – The negative translation vector.

  • positive_trans_types (Vector | None) – The positive translation types vector.

  • negative_trans_types (Vector | None) – The negative translation types vector.

  • retract_time (float) – The retract time.

Returns:

Number of constraints created

Return type:

int

create_pin_constraints(nodes, analysis)[source]#

Creates pin constraints at given nodes for the specified analysis type.

Parameters:
  • nodes (EntList | None) – The nodes to apply the pin constraints to.

  • analysis (AnalysisType | int) – The analysis type (e.g., WARP).

Returns:

Number of constraints created

Return type:

int

create_pressure_loads(tri, pressure)[source]#

Creates pressure loads at selected elements

Parameters:
  • tri (EntList | None) – The elements containing triangles to be loaded.

  • pressure (float) – The pressure value.

Returns:

Number of loads created

Return type:

int

create_spring_constraints(nodes, analysis, trans, rotation)[source]#

Creates spring constraints at given nodes for the specified analysis type.

Parameters:
  • nodes (EntList | None) – The nodes to apply the spring constraints to.

  • analysis (AnalysisType | int) – The analysis type (e.g., WARP).

  • trans (Vector | None) – Vector object that specifies translation stiffnesses

  • rotation (Vector | None) – Vector object that specifies rotation stiffnesses

Returns:

Number of constraints created

Return type:

int

create_temperature_loads(tri, top, bottom)[source]#

Creates temperature loads at selected elements

Parameters:
  • tri (EntList | None) – The elements containing triangles to be loaded.

  • top (float) – Temperature at the top of the element.

  • bottom (float) – Temperature at the bottom of the element.

Returns:

Number of loads created

Return type:

int

create_volume_loads(tri, force)[source]#

Creates volume loads at selected elements

Parameters:
  • tri (EntList | None) – The elements containing triangles to be loaded.

  • force (Vector | None) – The force vector.

Returns:

Number of loads created

Return type:

int

find_property(prop_type, prop_id)[source]#

Finds a property by its type and ID.

Parameters:
  • prop_type (int) – The type of the property.

  • prop_id (int) – The ID of the property.

Returns:

The found property.

Return type:

Property

move_ndbc(ndbc, nodes, normal)[source]#

Moves the NDBC to the specified nodes and normal vector.

Parameters:
  • ndbc (EntList | None) – The NDBC to move.

  • nodes (EntList | None) – The nodes to move the NDBC to.

  • normal (Vector | None) – The normal vector of the NDBC.

Returns:

True if the NDBC was moved successfully, False otherwise.

Return type:

bool

move_ndbc_to_xyz(ndbc, coord, normal)[source]#

Moves a boundary condition to a different position

Parameters:
  • ndbc (EntList | None) – The NDBC to move.

  • coord (Vector | None) – The coordinates to move the NDBC to.

  • normal (Vector | None) – The normal vector of the NDBC.

Returns:

True if successful; False if not

Return type:

bool

set_prohibited_gate_nodes(nodes, analysis)[source]#

Sets the nodes as prohibited gate nodes for the specified analysis type.

Parameters:
  • nodes (EntList | None) – The nodes to set as prohibited gate nodes.

  • analysis (AnalysisType | int) – The analysis type (e.g., WARP).

Returns:

Number of constraints created

Return type:

int