Apply a vertical load to all nodes on the free face.
(total_load: float)
| 134 | |
| 135 | |
| 136 | def apply_load_pattern(total_load: float) -> None: |
| 137 | """Apply a vertical load to all nodes on the free face.""" |
| 138 | tStart, tEnd, period = 0.0, 6.0, 4.0 |
| 139 | ops.timeSeries('Trig', 1, tStart, tEnd, period, '-factor', 1.0) |
| 140 | ops.pattern("Plain", 1, 1) |
| 141 | far_x_nodes = [ |
| 142 | node for node in ops.getNodeTags() |
| 143 | if math.isclose(ops.nodeCoord(node, 1), BAR_LENGTH, abs_tol=1e-9) |
| 144 | ] |
| 145 | if not far_x_nodes: |
| 146 | raise ValueError("No nodes found on the far face (x = BAR_LENGTH)") |
| 147 | load_per_node = total_load / len(far_x_nodes) |
| 148 | for node in far_x_nodes: |
| 149 | ops.load(node, 0.0, 0.0, -load_per_node) |
| 150 | |
| 151 | |
| 152 | # ----------------------------------------------------------------------------- |