首页 > > 详细

讲解ENG3047、讲解python、python编程调试、辅导Programming留学生 调试Matlab程序|辅导Web开发

ENG3047 Programming assignment 2019
The deadline for this assignment is: Wednesday 13th March at 16:00. Overview
You are required to solve two tasks, by using the knowledge and skills that you have gained in the last few weeks.
The first task is to present your work from Lab 3 and Lab 4 so that another engineer can understand your code and use it.
This is very important in real engineering projects, as different team members are assigned to the project at different
times. Poor handover is a significant risk to project success.
The second task is a 2D frame problem where you are given appropriate geometry, section properties, material properties,
loading and boundary conditions. The specific problem you will solve will depend on your student number, and I have
given you some code below which will specify which options you are to use for your assignment. It is very important you
use the options given to you by this function.
For task 1 you should provide Python code that demonstrates:
1. Your complete solution for Lab 3 and Lab 4 in one code box
2. That you understand what each step does, use the #note fuction for this.
3. An explanation for other users over the function for each step.
An understanding of what your results mean, by including a short discussion in a markdown box at the end of the
python script.
4.
For task 2 you should provide Python code that demonstrates:
1. Local element displacements for each node in the structure.
2. Local element forces for each element of the structure.
3. An explanation for other users over the function for each step.
There are also marks available for demonstrating that you have validated your results for task 2 (displacements and
forces) by solving the equivalent problem in Robot or Mastan and making it very clear that your solutions match. Note, if
your solutions do not match then a thorough explanation of your python results could get you some marks, you should
demonstrate an appreciation of any displacments or forces that don't make sense.
Each task is worth 30 marks (60 marks total for assignment)
Marking scheme
Marks will be awarded for:
Correctness of your code (i.e. does your code give the right answer?)
Validation of your code (i.e. have you convinced me that your code is correct by comparing with Mastan, Robot?)
Readability (i.e. can I follow your code easily?) Note, a significant proportion of marks are available for readability, so
if you have messed up your code and get weird results then there is still hope for you with good explanations.
This assignment counts towards 15% of your overall ENG3079 grade.
ENG3079_python_coursework_2019 http://localhost:8888/nbconvert/html/OneDrive - University of Glasgo...
1 of 4 05/02/2019, 12:14Deadline and submission details
The deadline for this assignment is: Wednesday 13th March at 16:00. I'm sure you've got a lot of other assignments, but
this gives you a month, so no griping to me
I do not mind if you write your code using an IPython Notebook or using a script (as you did for last year's programming
class).
Submit all your relevant files on the ENG3079 moodle page. If you have more than 5 files, please zip these into one file
and then submit.
Task 1 (30 Marks)
Task 1 - a
Collate and present your code for Lab 3 in one code box in its own python notebook. Make sure to fully explain each step
using #. Compare your results with the given Mastan results. Save the file as "your student number_task1a"
Task 1 - b
Collate and present your code for Lab 4 in one code box in its own python notebook. Make sure to fully explain each step
using #. Compare your results with the given Mastan results. Save the file as "your student number_task1b"
Task 2 (30 marks)
Save the file as "your student number_task2"
Frame options
ENG3079_python_coursework_2019 http://localhost:8888/nbconvert/html/OneDrive - University of Glasgo...
2 of 4 05/02/2019, 12:14Geometry and loading options
Here are the options that specify frame dimensions and loading. Note that if you are working with Option 4 above, you will
not need dimension b.
Option 1: a = 5.0m, b = 6.0m, L = 5.0m, P = 15.0kN
Option 2: a = 10.0m, b = 8.0m, L = 12.0m, P = 3.0kN
Option 3: a = 8.0m, b = 7.0m, L = 10.0m, P = 8.0kN
Specified material and section properties
All sections have a Young's Modulus of E=200GPa (steel)
ENG3079_python_coursework_2019 http://localhost:8888/nbconvert/html/OneDrive - University of Glasgo...
3 of 4 05/02/2019, 12:14The second moment of area and section areas are specified as follows:
Section 1 ( ): Rectangular cross section with width=100mm, height = 300mm
Section 2 ( ): Circular hollow section with outer diameter=300mm and inner diameter = 270mm
Option generator
Use the function below to generate your assignment options for both problems. I have given you an example below on
how to use the random number generator with your student number.
In [6]: import random
def optionsGenerator(studentString):

formattedNumber = int(studentString.strip("0"))
random.seed(formattedNumber)
question1_choices = []
choiceArray = [4,3] # 4 frame choices, 3 geometry/loading options

for c in choiceArray:
question1_choices.append(random.randint(1,c))
print('Task 2 options for student number {} are:'.format(studentString))
print('\nFrame option: {}'.format(question1_choices[0]))
print('Geometry and loading option: {}\n'.format(question1_choices[1]))

question2_choices = []
choiceArray = [2,3] # 2 section choices, 3 geometry/loading options
for c in choiceArray:
question2_choices.append(random.randint(1,c))

#print('Question 2 options are:'.format(studentString))
#print('\nSection option: {}'.format(question2_choices[0]))
#print('Geometry and loading option: {}'.format(question2_choices[1]))
Now you can generate your required choices by running this function with only the numeric part of your student ID:
In [7]: optionsGenerator('213722') # Simply change the number here to your student numbe
r (without the last letter) to generate your choices
Last modified by ATM on 04/02/2019
In [ ]:

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!