Skip to content

Commit a43c8d9

Browse files
committed
revert external_force_setup to normalized loads
1 parent 918096f commit a43c8d9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/compas_cra/equilibrium/cra_helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ def external_force_setup(assembly, density, gravity):
9090
block = assembly.node_block(node)
9191
index = key_index[node]
9292
# determine weight and load
93-
weight = block.volume() * (block.attributes["density"] if "density" in block.attributes else density) * gravity
94-
load = block.attributes["load"] if "load" in block.attributes else 0
95-
# set external force
93+
weight = block.volume() * (block.attributes["density"] if "density" in block.attributes else density)
94+
load = (block.attributes["load"] if "load" in block.attributes else 0) / gravity # normalized load
95+
# set external force vector
9696
p[index][2] = -(weight + load)
97-
print(f"{node:>4} {round(p[index][2],3):>10}")
97+
print(f"{node:>4} {round(p[index][2] * gravity, 3):>10}")
9898

9999
print()
100100

0 commit comments

Comments
 (0)