Question: 2 ) Assemble the global response arrays The second part of your task is to create a assembleGlobalArrays ( ) that assembles the global displacement
Assemble the global response arrays
The second part of your task is to create a assembleGlobalArrays that assembles the global displacement Uur and force Pur vectors:
KppKpfKfpKffUpUfPpPfKurUurPur
where the global arrays follow the node ascending ordering, ieUuruuuunnode and ui is the displacement of node i
Write the function assembleGlobalArrays that takes six input arguments up pf uf pp nnode, eqnum and returns two outputs uur pur:
Input arguments:
up: a D NumPy array that stores the known prescribed displacement values Up
pf: a D NumPy array that stores the known force values Pf
uf: a D NumPy array that stores the displacement values of the free nodes Uf
pp: a D NumPy array that stores the reaction forces on the prescribed nodes Pp
nnode: an integer that represents the number of nodes.
eqnum: a D NumPy array that determines how you should reorder your system of equations, used for the Assemble module.
Outputs:
uur: a D NumPy array that stores the displacement values of all nodes Uur in the original order also called the unreduced global displacement vector
pur: a D NumPy array that stores the force values applied on all nodes Pur in the original order also called the unreduced global force vector
Algorithm to create the arrays pur and uur:
initialize the arrays uur and pur with zeros.
what should be the type of these arrays?
what is the shape of these arrays?
for each entry of uur find the corresponding equation number eqnum
the value and sign of the equation number will tell you if the contributions are coming from uf or up
the same algorithm works to build pur
Remember:
Be aware that the node and equation numbers are indexed but NumPy arrays are indexed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
