联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2024-08-07 06:54

A Suggestion on Information to be Presented for Each Question

For each problem, for example, Problem 4:

1. Equation derivations:

1) What equation do you use in your coding?

2) Also give all the coefficients, and source terms (e.g. external force/voltage), as necessary.

2. What initial conditions, boundary conditions, time periods, domain size, etc., (computational conditions) are used? Provide schematic diagrams as necessary.

3. Main programme:

Provide the coding below, with necessary comments.

4. Functions

1) Give information on what is this function used for, and what equation is solved, related to point 1.

2) Provide the coding below, with necessary comments.

5. Results

1) Present the results required by each question, which can be numbers, data tables, figures, as appropriate.

2) Comments and analysis of the results:

If required by a question, then you need to do this.

If not required, you can still do this if you wish, which is great!

If you think it is necessary to clarify your results and methods used, then please provide your comments.

6. Flow charts of your programme (if applicable).

Problem 1. Plotting (10 Marks) P 1-1 (5 Marks)

Write a script that can generate the figure shown below using the conditions and provide a screenshot of the figure.

P 1-2 (5 Marks)

The Arrhenius equation is widely used to describe plenty of physical phenomena. Based on the equation and conditions shown below, write a script that can generate the figure of k  as a function of T.

Problem 2 Matrix Operation (15 Marks)

P 2-1 (5 Marks, 1 Mark for each small question)

Type this matrix in MATLAB and use MATLAB to carry out the following instructions.

a) Create a vector  v  consisting of the elements in the third column of AA.

b) Create a vector  w  consisting of the elements in the second row of AA.

c) Create a 4 x 3 array  BB  consisting of all elements in the second through fourth columns of AA.

d) Create a 3 x 4 array  CC  consisting of all elements in the second through fourth rows of AA.

e) Create a 2 x 3 array  DD  consisting of all elements in the first two rows and the last three columns of AA.

P 2-2 (5 Marks, 1 Mark for each small question)

Consider the following arrays:

Write MATLAB expressions to do the following.

a) Select just the third row of B.

b) Evaluate the sum of the second row of B.

c) Multiply the second column of B and the first column of A element by element.

d) Evaluate the maximum value in the vector resulting from element-by-element multiplication of the second column of B with the first column of A.

e) Use element-by-element division to divide the first row of A by the first three elements of the third column of B. Evaluate the sum of the elements of the resulting vector.

P 2-3 (5 Marks)

The figure shows the forces in the eight-member truss. The forces can be determined by solving a system of linear equations using the sets of equations  shown below. Using the equations shown below, set the system of linear equations and get the solutions ofthe forces.

Problem 3 (30 Marks)

P 3-1 (15 Marks, 10 Marks for programming and 5 Marks for displaying results)

The equation of motion  for a pendulum whose base is  accelerating horizontally with  an acceleration a(t) is

Suppose that  g = 9.81 m/s2 ,  L  =  1.5 m , and  θ(̇)(0) = 0. Plot  θ(t)   for  0 ≤ t  ≤ 10 s   for

the following three cases:

a) The acceleration is constant:  a  = 5 m/s2 , and  θ(0) = 0.5 rad.

b) The acceleration is constant:  a  = 6 m/s2 , and  θ(0) = 3 rad.

c) The acceleration is linear with time:  a  = 0.5t m/s2 , and  θ(0) = 3 rad.

P 3-2 (15 Marks, 10 Marks for programming and 5 Marks for displaying results)

The following equation describes the motion of a certain mass connected to a spring, with no friction

where f(t)  is an applied force. Suppose the applied force is sinusoidal with a frequency of w rad/s  and an amplitude of 10 N:  f(t) = 10 sin(wt).

Suppose that the initial conditions are  y(0) = y(̇)(0) = 0. Plot  y(t)  for  0 t 20 s. Do this for the following three cases. Compare the results of each case:

a)  w = 2 rad/s

b)  w = 5 rad/s

c)  w = 10 rad/s

Problem 4 (25 Marks, with 1) 15 Marks, 2) 10 Marks)

Consider a circuit system as shown in Figure 4.

Question:

1) Derive the equations for  i1 (t)  and  iL (t)  for all  t.

2) Obtain the plots of  i1 (t)  and  iL (t)  for all  t.

Problem 5 (20 Marks, with 1) 5 Mark, 2) 5 Marks, 3) 10 Marks)

1) In Simulink, generate a model that simulates 5sin(2pi * 60t) with time between 0 and 0.2 seconds and show the result using the scope of Simulink.

2) In Simulink, generate a model that simulates 2sin(50t) with time between 0 and 5 seconds and show the result using the scope of Simulink.

3)  Using  Simulink,  generate  a  model  that  can  solve with  the  initial conditions of Set the simulation time between 0 to 10 seconds and show the result using the scope of Simulink.




版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp