@@ -13,11 +13,11 @@ def __init__(
1313 self ,
1414 id : int , # pylint: disable=redefined-builtin
1515 Fx : float = 0.0 ,
16- Fz : float = 0.0 ,
17- Ty : float = 0.0 ,
16+ Fy : float = 0.0 ,
17+ Tz : float = 0.0 ,
1818 ux : float = 0.0 ,
19- uz : float = 0.0 ,
20- phi_y : float = 0.0 ,
19+ uy : float = 0.0 ,
20+ phi_z : float = 0.0 ,
2121 vertex : Vertex = Vertex (0 , 0 ),
2222 hinge : bool = False ,
2323 ):
@@ -26,35 +26,35 @@ def __init__(
2626 Args:
2727 id (int): ID of the node
2828 Fx (float, optional): Value of Fx force. Defaults to 0.0.
29- Fz (float, optional): Value of Fz force. Defaults to 0.0.
30- Ty (float, optional): Value of Ty moment. Defaults to 0.0.
29+ Fy (float, optional): Value of Fy force. Defaults to 0.0.
30+ Tz (float, optional): Value of Tz moment. Defaults to 0.0.
3131 ux (float, optional): Value of ux displacement. Defaults to 0.0.
32- uz (float, optional): Value of uz displacement. Defaults to 0.0.
33- phi_y (float, optional): Value of phi_y rotation. Defaults to 0.0.
32+ uy (float, optional): Value of uy displacement. Defaults to 0.0.
33+ phi_z (float, optional): Value of phi_z rotation. Defaults to 0.0.
3434 vertex (Vertex, optional): Point object coordinate. Defaults to Vertex(0, 0).
3535 hinge (bool, optional): Is this node a hinge. Defaults to False.
3636 """
3737 self .id = id
3838 # forces
3939 self .Fx = Fx
40- self .Fz = Fz
41- self .Ty = Ty
40+ self .Fy = Fy
41+ self .Tz = Tz
4242 # displacements
4343 self .ux = ux
44- self .uz = uz
45- self .phi_y = phi_y
44+ self .uy = uy
45+ self .phi_z = phi_z
4646 self .vertex = vertex
4747 self .hinge = hinge
4848 self .elements : Dict [int , Element ] = {}
4949
5050 @property
51- def Fy (self ) -> float :
52- """Fy is the vertical force, and the negative of Fz
51+ def Fy_neg (self ) -> float :
52+ """Fy is the vertical force, and the negative of Fy
5353
5454 Returns:
55- float: negative of Fz
55+ float: negative of Fy
5656 """
57- return - self .Fz
57+ return - self .Fy
5858
5959 def __str__ (self ) -> str :
6060 """String representation of the node
@@ -64,12 +64,12 @@ def __str__(self) -> str:
6464 """
6565 if self .vertex :
6666 return (
67- f"[id = { self .id } , Fx = { self .Fx } , Fz = { self .Fz } , Ty = { self .Ty } , ux = { self .ux } , "
68- f"uz = { self .uz } , phi_y = { self .phi_y } , x = { self .vertex .x } , y = { self .vertex .y } ]"
67+ f"[id = { self .id } , Fx = { self .Fx } , Fy = { self .Fy } , Tz = { self .Tz } , ux = { self .ux } , "
68+ f"uy = { self .uy } , phi_z = { self .phi_z } , x = { self .vertex .x } , y = { self .vertex .y } ]"
6969 )
7070 return (
71- f"[id = { self .id } , Fx = { self .Fx } , Fz = { self .Fz } , Ty = { self .Ty } , ux = { self .ux } , "
72- f"uz = { self .uz } , phi_y = { self .phi_y } ]"
71+ f"[id = { self .id } , Fx = { self .Fx } , Fy = { self .Fy } , Tz = { self .Tz } , ux = { self .ux } , "
72+ f"uy = { self .uy } , phi_z = { self .phi_z } ]"
7373 )
7474
7575 def __add__ (self , other : Node ) -> Node :
@@ -85,17 +85,17 @@ def __add__(self, other: Node) -> Node:
8585 self .id == other .id
8686 ), "Cannot add nodes as the ID's don't match. The nodes positions don't match."
8787 Fx = self .Fx + other .Fx
88- Fz = self .Fz + other .Fz
89- Ty = self .Ty + other .Ty
88+ Fy = self .Fy + other .Fy
89+ Tz = self .Tz + other .Tz
9090
9191 return Node (
9292 id = self .id ,
9393 Fx = Fx ,
94- Fz = Fz ,
95- Ty = Ty ,
94+ Fy = Fy ,
95+ Tz = Tz ,
9696 ux = self .ux ,
97- uz = self .uz ,
98- phi_y = self .phi_y ,
97+ uy = self .uy ,
98+ phi_z = self .phi_z ,
9999 vertex = self .vertex ,
100100 hinge = self .hinge ,
101101 )
@@ -113,24 +113,24 @@ def __sub__(self, other: Node) -> Node:
113113 self .id == other .id
114114 ), "Cannot subtract nodes as the ID's don't match. The nodes positions don't match."
115115 Fx = self .Fx - other .Fx
116- Fz = self .Fz - other .Fz
117- Ty = self .Ty - other .Ty
116+ Fy = self .Fy - other .Fy
117+ Tz = self .Tz - other .Tz
118118
119119 return Node (
120120 self .id ,
121121 Fx ,
122- Fz ,
123- Ty ,
122+ Fy ,
123+ Tz ,
124124 self .ux ,
125- self .uz ,
126- self .phi_y ,
125+ self .uy ,
126+ self .phi_z ,
127127 self .vertex ,
128128 hinge = self .hinge ,
129129 )
130130
131131 def reset (self ) -> None :
132132 """Reset the node to zero forces and displacements"""
133- self .Fx = self .Fz = self .Ty = self .ux = self .uz = self .phi_y = 0
133+ self .Fx = self .Fy = self .Tz = self .ux = self .uy = self .phi_z = 0
134134 self .hinge = False
135135
136136 def add_results (self , other : Node ) -> None :
@@ -142,15 +142,15 @@ def add_results(self, other: Node) -> None:
142142 assert (
143143 self .id == other .id
144144 ), "Cannot add nodes as the ID's don't match. The nodes positions don't match."
145- assert self .phi_y is not None
145+ assert self .phi_z is not None
146146 assert self .ux is not None
147- assert self .uz is not None
148- assert other .phi_y is not None
147+ assert self .uy is not None
148+ assert other .phi_z is not None
149149 assert other .ux is not None
150- assert other .uz is not None
150+ assert other .uy is not None
151151 self .Fx = self .Fx + other .Fx
152- self .Fz = self .Fz + other .Fz
153- self .Ty = self .Ty + other .Ty
152+ self .Fy = self .Fy + other .Fy
153+ self .Tz = self .Tz + other .Tz
154154 self .ux = self .ux + other .ux
155- self .uz = self .uz + other .uz
156- self .phi_y = self .phi_y + other .phi_y
155+ self .uy = self .uy + other .uy
156+ self .phi_z = self .phi_z + other .phi_z
0 commit comments