讲解 program、辅导 matlab 程序语言
2025-GNU, Graduated school, Advanced Noise and Vibration Analysis (ANVA)
Exercise 1 – Matlab
Before you get started with the exercises you must complete the following setup tasks:
• Download the basic plate Matlab code from the course LMS page under “Lecture Resources” and unzip it into the newly generated folder.
• Open Matlab and go to the ‘Chapter01’ folder.
• Run the plate program by typing run_ex00.m in the Matlab command window.
The handout code solves a static problem for a clamped rectangular plate subject to a point load in the center. The displacement and the two rotations are plotted and the code outputs the displacement of the center node.
NOTE 1: I strongly urge you to keep a BACKUP of your work at all times. When starting a new exercise, create a new script named according to the exercise number. For example, Exercise 1.1 should be named run_ex11.m, and Exercise 1.2 should be run_ex12.m, following the same pattern. Additionally, at the beginning of each chapter, copy the previous chapter’s code into a new folder named after the corresponding course week number. These are just recommendations to help you stay organized and avoid data loss. However, feel free to use any backup method that works best for you.
NOTE 2: Exercises marked with (*) are voluntary and should first be solved after having completed the mandatory tasks.
Exercise 1.1: Analytic verification
Modify the supports to create a simply supported plate using the mesh tool(s). Solve the problem for a rectangular plate with a central point load and compare the results with analytical solutions for different plate thicknesses. Analyze and explain any deviations between the Finite Element Analysis (FEA) results and the analytical predictions. You may use the material properties and dimensions from run_ex00.m or define your own plate specifications.
Theverticaldisplacement, 𝑤(𝑥,𝑦),forasimplysupportedplateofdimensions 𝑎×𝑏×hand flexural stiffness 𝐷, can be computed from the series when subjected to a point load:
Where
and where 𝑝!", for a point load Q, is given by
where (xp; yp) is the location of the point load. For truncating of the series use e.g. N = M = 1000.
2025-GNU, Graduated school, Advanced Noise and Vibration Analysis (ANVA)
Exercise 1.2: Changing the load
Modify the loading to include a distributed pressure load and verify the result using analytic results. You can use the material and dimensions from run_ex00.m or a plate of your choice. This assignment should be completed by modifying the assembly process in AssemblyMindlin.m. That is, the
element matrix method already returns the result of the element integration f! = h ∫ [N]"𝑄𝑑𝐴. Note #
that Q = 1 is hardcoded in the handout code. The pressure load should be assembled into the second row of the load vector, i.e. in opt.P(:,2). In this way, the call to the backslash operator solves both a point load problem and the distributed pressure in one go (which is very efficient).
The analytic solution from Exercise 1.1 can still be used. Only 𝑝!", should be replaced by the following:
Note that Q is the total force acting the plate. Exercise 1.3: Convergence
Investigate what happens to the FE predicted displacement of the center node compared to the analytic result as the mesh is refined. I.e. make a plot with h on the x-axis and the FE center displacement on the y-axis (where h is the element size). Overlay the figure with the analytical displacement shown as a line. What does this tell you about the convergence of the displacement prediction?
Exercise 1.4: Eigenvalue analysis
Implement a generalized eigenvalue analysis in SolverEigen.m. That is, modify the solver section of the script by adding a new study.analysis (e.g. eigen_lin). In order to perform the eigenvalue analysis, the code should be capable of performing the following tasks:
1. Assemble the mass matrix (a function that computes the element mass matrix is already in the script). Use the stiffness matrix as inspiration and remember to apply the correct BCs on both [K] and [M]. This is to be done in AssemblyMindlin.m.
2. Call the sparse eigenvalue solver in matlab ’eigs’ and ask it to return the 6 smallest eigenvalues and eigenvectors. Use study.neig to transfer this information such that you can control it from the driver script.
3. Sort the eigenvalues (and vectors) in ascending order, such that the first one is also the smallest.
4. Make sure that the eigenvector as mass normalized (important next Chapter).
Plot the different modes for a rectangular plate (use the material and dimensions from run_ex00.m or a plate of your choice) and compare the eigenvalues to the analytic result.
The analytic solution for the eigenvalues of a simply supported plate can be stated as:
Where 𝜌 is the density of the material.
2025-GNU, Graduated school, Advanced Noise and Vibration Analysis (ANVA) Exercise 1.5: Multiple eigenvalues
Solve the eigenvalue problem to determine the first six eigenvalues of a square, simply supported plate. Identify any multiple eigenvalues and analyze their corresponding mode shapes. Discuss the factors contributing to eigenvalue multiplicity and examine what happens if the same problem is solved multiple times—does the solution remain consistent, or do variations occur?
*Exercise 1.6: Complexity of eigenvalue analysis
Analyze the relationship between problem size (number of equations) and wall-clock solution time for computing the first six eigenmodes. Ensure that the memory usage does not exceed the computer’s limit while conducting the investigation.
*Exercise 1.7: Animate modeshapes
For a specified eigenmode, modify ‘PlotFields’ such that it runs an animation of one period and use e.g. ‘getframe’ to store an animated ’gif’.
*Exercise 1.8: Use ParaView for visualization
Use the VtuWriter.m method to write files that can be opened in ParaView. Play around with the tool and get a jump start on the second half of the course.