Skip to content

How can I get the internal forces, forces, reaction and displacement? #59

Answered by adtzlr
Martin15135215 asked this question in Q&A
Discussion options

You must be logged in to vote

Please have a look at the comments in the code-block:

import trusspy as tp

M = tp.Model(log=0)

# create nodes
with M.Nodes as MN:
    MN.add_node(1, (0, 0, 0))  # mm
    MN.add_node(2, (0, 0, 3000))  # mm
    MN.add_node(3, (-4000, 0, 3000))  # mm
    MN.add_node(4, (-4000, 0, 6000))  # mm

# create element
with M.Elements as ME:
    ME.add_element(1, [2, 1])
    ME.add_element(2, [2, 3])
    ME.add_element(3, [2, 4])
    ME.assign_geometry("all", [1000])  # Area mm²
    ME.assign_material("all", [1000])  # E-Modulus N/mm²


# create displacement (U) boundary conditions
with M.Boundaries as MB:
    MB.add_bound_U(1, (0, 0, 0))  # support
    MB.add_bound_U(2, (1, 0, 1))  # smooth pin
    

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Martin15135215
Comment options

Answer selected by Martin15135215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants