联系方式

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

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

日期:2019-04-16 09:48

April 5, 2019

Assignment Ten: BVPs

Assigned: 5 April Submission: Electronic

Due Date: 19 April Collaboration Type: Individual

Due Time: before 11:59 pm Grading: 50 points

Assignment Purpose:

The purpose of this assignment is to help further your understanding in how to

solve ordinary differential equations (ODEs) posed as boundary value problems

(BVPs). Most physical laws are expressed in terms of ODEs, and many are solved

over a spatial domain with conditions specified along its boundaries; consequently,

this type of problem pervades engineering applications, e.g., finite elements.

Submission Instructions: Electronic submission only. Create a zip archive

containing all your py-files and pdf documents, as appropriate, and submit the

archive via your eCampus homework link. Right next to the SUBMIT button is a

SAVE DRAFT button. You can save a draft as many times as you like. Once it

is in a form you want, then submit it. If you find your submission to be wanting,

for some reason or another, a second submission is permitted, but no more than

that. If there are two submissions, we will only grade the second submission. Use

the following naming convention: A10_Spring_2019_lastName_firstName.zip.

Please do not use nick names, as it can at times become difficult to discern who to

assign the grade to. FAILURE TO USE THIS FILE NAMING CONVENTION

WILL RESULT IN YOU RECEIVING HALF CREDIT.

Submission Note: Submit the solutions to all non-Python program problems as

pdf files, e.g., as exported from a document editor like Microsoft Office, Apple

iWorks, Linux Libre Office, a.k.a. Open Office, LaTeX, etc.

Submission Note: Not all versions of doc and docx files can be read by someone

else’s particular version of Word, which is why only pdf files are accepted.

Submission Note: pdf documents made from scanned hand-written answers will

receive half their otherwise earned points.

April 5, 2019

Grading Policy: All Python programs that you write for this homework

assignment will be graded using a grading script written by your professor that

your TA will execute. This grading script will run the software that you write.

How your code executes will determine your grade.

Grading Note: You will receive 0 points for this assignment if your submission is

late by more than a week, loosing 15% per day late as determined by the time

stamp that eCampus assigns to your file upon its submission. Being 1 second late

equates with being 1 day late. Being a day late may be a better option than not

completing a task altogether.

Script File Format:

In the various tasks for this homework assignment you will be asked to write script

files that run (i.e., execute) your programs. The script file that you write, viz.,

a10task1.py, will contain a procedure with the following basic format:

# any imports you use

def runTask<#>(<input data>):

# execute the problem assigned in task <#>

# print to the command window in Spyder the requested results in

# the requested format, including figures

runTask<#>(<input data>):

Any functions that you create, which are to be used by your script file(s), are to be

cited/used through imports into your script file(s). Do not forget to include these

function files in your list of files that you zip up as an archive for submission.

For the most part, naming conventions for your imported functions are not strictly

enforced (unless stated otherwise); however, naming conventions for your script

files are strictly enforced. As a rule of thumb, if the grading script has to call

something that you write, then the naming convention must be strictly adhered to.

April 5, 2019

Grading your Source and Script Files:

There is only one task for which files are to be supplied for this homework

assignment that will be run by the Grader. Points will be assigned accordingly (36

of 50 points):

36 pts) File/script executes, answers are correct, printout is in the

correct format

27 pts) File/script executes, answers are correct, printout is NOT in

the correct format

18 pts) File/script executes, at least one answer is NOT correct,

printout is in the correct format

9 pts) File/script executes, at least one answer is NOT correct,

printout is NOT in correct format

0 pts) File/script does NOT execute

Visual inspection of the code (14 of 50 points):

14 pts off) If you solve the problem using a method other than as

assigned.

8 pts off) If there are any error symbols (bullets) in the editor.

6 pts off) If you do not incorporate reasonable comment statements into

your code.

4 pts off) If there are any ‘style’ errors (yellow triangles) in the editor.

2 pts off) If you use cryptic variable names (a judgment call)

else Full credit

April 5, 2019

In this homework you will be analyzing the following beam problem.

Here x and y form your coordinate frame. The beam has a length L and is made of

a material whose Young’s modulus is E with a geometry that has a moment of

inertia I. The beam is subjected to an uniformly distributed loading of q and an

axial compression loading of p. The beam is simply supported.

The differential equation that governs this boundary value problem is

which you can use to verify your software.

April 5, 2019

Task 1:

Write a solver that uses a finite difference engine to solve for the deflection of this

beam, i.e., y (x). This solver is to have an interface of

runTask1(EI, L, p, q, nodes)

and is to be called as

x, y = runTask1(EI, L, p, q, nodes)

where EI is the product of a Young’s modulus E with a moment of inertia I, L is

the length of the simply support beam, p is the compressive force, q is the

distributed loading, and nodes is the number of integration nodes (there will be

nodes–1 intervals of integration) that the algorithm is to employ when solving from

0 to L. The returned values x and y are arrays of length nodes that contain the

displacements y[i] at locations x[i], i = 0 .. nodes-1.

Note: Error will diminish with increasing numbers of nodes. Running analyses

with different nodal densities allows one to study the convergence properties of a

solver, which is an import topic when seeking reliable numerical solutions.

Submit this script as file a10task1.py


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

python代写
微信客服:codinghelp