Post date: | May 31, 2023 |
Due date: | June 1, 2023 |
Many systems consist of point interactions. The iconic Eiffel Tower can be modeled through the trusses linking two points with coordinates . The unit vector along direction from point to point is
Suppose that structure deformation changes the coordinates to , . The most important structural response is that on point a force is exerted that can be approximated as
in appropriate physical units. An opposite force acts on point . Note the projector along the truss direction . Adding forces on a point from all trusses leads to the linear relation
(1) |
with , , the number of dimensions, the number of points, and , the number of degrees of freedom of the structure. Point interactions arise in molecular or social interactions, cellular motility, and economic exchange much in the same form (1). The techniques in this homework are equally applicable to physical chemistry, sociology, biology or business management.
Load the Eiffel Tower data.
octave] |
cd /home/student/courses/MATH347DS/data/EiffelTower; load EiffelPoints; X=Expression1; [NX,ndims]=size(X); load EiffelLines; L=Expression1; [NL,nseg]=size(L); |
octave] |
m=3*NX; disp([NX NX^2 NL m]) |
26464 700343296 31463 79392
octave] |
Of the possible linkages between points in the structure, only are present. It is wasteful, and often impossible, to store the entire matrix of couplings between points (), but storing only the nonzero elements corresponding to the interacting can be carried out through a sparse matrix. After allocating space with spalloc, the matrix is initialized with zeros along the truss directions.
octave] |
K=spalloc(m,m,3*NL); for k=1:NL i = L(k,1); j = L(k,2); p = 3*(i-1)+1; q = 3*(j-1)+1; for id=1:3 for jd=1:3 K(i+id,j+jd) = 0; end; end; end |
octave] |
The matrix can be formed by loops over the trusses. The following computation takes a few minutes. The matrix has been pre-computed, and can be loaded from a disk file when answering the questions below, rather than executing the following loops.
octave] |
for k=1:NL i = L(k,1); j = L(k,2); lij = (X(j,:)-X(i,:))'; Pij = lij*lij'; p = 3*(i-1)+1; q = 3*(j-1)+1; for id=1:3 for jd=1:3 K(i+id,j+jd) = K(i+id,j+jd) + Pij(id,jd); end; end; end |
octave] |
save "K.mat" K |
octave] |
Use small matrices in Octave to find evidence or counter-examples for these true or false questions.
If is an upper-triangular matrix, its singular values are the same as the diagonal values .
If , the singular values of are the same as its eigenvalues.
If is of full rank, and have the same singular values.
For , the matrices and have the same eigenvalues.
Load data, and define functions to draw the deformed structure.
octave] |
size(K) |
ans =
79392 79392
octave] |
octave] |
cd /home/student/courses/MATH347DS/data/EiffelTower; load EiffelPoints; X=Expression1; [NX,ndims]=size(X); load EiffelLines; L=Expression1; [NL,nseg]=size(L); m=3*NX; load K; |
octave] |
function drawXu(X,u,L,is) clf; view(-30,45); [NX,nd]=size(X); [nL,nseg]=size(L); x=[]; y=[]; z=[]; U=reshape(u,3,NX)'; for k=1:is:nL x=[x X(L(k,1),1)+U(L(k,1),1) X(L(k,2),1)+U(L(k,2),1)]; y=[y X(L(k,1),2)+U(L(k,1),2) X(L(k,2),2)+U(L(k,2),2)]; z=[z X(L(k,1),3)+U(L(k,1),3) X(L(k,2),3)+U(L(k,2),3)]; end; plot3(x,y,z); end |
octave] |
drawXu(X,zeros(m,1),L,20); axis 'equal' |
octave] |
function drawXU(X,U,L,is) clf; view(-30,45); [NX,nd]=size(X); [nL,nseg]=size(L); x=[]; y=[]; z=[]; for k=1:is:nL x=[x X(L(k,1),1)+U(L(k,1),1) X(L(k,2),1)+U(L(k,2),1)]; y=[y X(L(k,1),2)+U(L(k,1),2) X(L(k,2),2)+U(L(k,2),2)]; z=[z X(L(k,1),3)+U(L(k,1),3) X(L(k,2),3)+U(L(k,2),3)]; end; plot3(x,y,z); end |
octave] |
drawXU(X,zeros(NX,3),L,20); axis 'equal' |
octave] |
octave] |
The following questions only require a few Octave lines to solve correctly. Be careful to not request output of the large vectors and matrices that arise. Use visualization with the draw function to represent results, and concentrate on the mathematical formulation. For example, imposing displacement at each node, i.e., a horizontal displacement along the direction proportional to the coordinate is accomplished by:
octave] |
U=zeros(NX,3); U(1:NX,1)=X(1:NX,3); |
octave] |
drawXU(X,U,L,20) |
octave] |
Find the linear combination of the first 10 singular modes that best approximates a force on the structure. Randomly choose . Show the first 3 singular modes and the linear combination you find.
The displacements resulting from the application of a force are found by solving the linear system
which however is costly since is of large size.
Find an approximation based upon the dominant part of , namely choosing dominant singular modes
octave] |
n=10; [U S V] = svds(K,n); |
Find displacements for the dominant modes by least squares
Solve by projection
octave] |
Find the linear combination of the first 10 eigenmodes that best approximates a force on the structure. Show the first 3 eigenmodes and the linear combination you find.
Replace singular modes or eigenmodes by orthogonal , with (known as Krylov modes). Find the linear combination of the first 10 Krylov modes that best approximates a force on the structure. Show the first 3 Krylov modes and the linear combination you find.
From the SVD construct an approximate matrix
and compare the force with , from question 1.3.1.
From the eigendecomposition construct an approximate matrix
and compare the force with , from question 1.3.2.
Choose one of the reduced models from 1.3.1 to 1.3.4. Repeat the calculations for 15,20,25 modes, and comment on whether the solutions converge.