ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to...

6
ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below. All items, including justification, plots, and code must be put WITHIN A SINGLE MS WORD DOCUMENT, USING THE FILENAME “lastname.firstname”. Your document must be submitted into Safeassign in bblearn (in the computer project folder) by the date/time listed above. You will have the option of doing either of 2 different geometries for your simulation. The first geometry is easier, but will have a maximum possible score of 80%. The other geometry is more complex and is the only way to get a full 100% on the project. Your code must be able to handle any mesh size that is a multiple of 10 (e.g. 10x10, 20x20, etc). Code that does not allow a variable mesh size will result in a zero grade for the project. This project may or may not be painful, but I assign it because this is the direction that engineering (not just heat transfer) is going. Additionally, many students have expressed appreciation for the project, although for most of them that was after the fact. I include a couple quotes below from previous students who emailed me after graduating: “My mentor, who is the Lead Engineer for the testing group at Orbital, was SUPER impressed when I told him about the MATLAB project I did for heat transfer. My tears and extra gray hairs were worth it. Tell that to the new seniors when they whine about the project next year. “ “side note, i learned A LOT. i knew very little about matlab prior to this. thank you” “I gotta say though, I think the main thing that pushed me into the realm of being qualified for this job is my capability in Matlab. Your HT project you had all of us do was paramount in kicking me into gear.” Deliverables Your submitted document must contain all of the following: An assessment of the validity of your simulation. Explain how the results of each of these tests either validate your simulation, or explain how they show that your results are not valid. No credit will be given for attempted justification of incorrect solutions. Your justification must address EACH of the following tests: o Heat flows on each individual node should add up to 0 on every node (note: if done correctly, your sums should be something like 10 -10 ) o Net heat flow summed over the boundaries of your simulation should match the heat generated in the system (again, if correct these sums should match within 10 -10 ) o Your temperature profile should match what is physically expected given EACH of the prescribed boundary conditions (describe SPECIFICALLY what EACH boundary condition

Transcript of ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to...

Page 1: ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

ME 450 Computer Project

Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

All items, including justification, plots, and code must be put WITHIN A SINGLE MS WORD DOCUMENT,

USING THE FILENAME “lastname.firstname”. Your document must be submitted into Safeassign in

bblearn (in the computer project folder) by the date/time listed above.

You will have the option of doing either of 2 different geometries for your simulation. The first

geometry is easier, but will have a maximum possible score of 80%. The other geometry is more

complex and is the only way to get a full 100% on the project. Your code must be able to handle any

mesh size that is a multiple of 10 (e.g. 10x10, 20x20, etc). Code that does not allow a variable mesh

size will result in a zero grade for the project.

This project may or may not be painful, but I assign it because this is the direction that engineering (not

just heat transfer) is going. Additionally, many students have expressed appreciation for the project,

although for most of them that was after the fact. I include a couple quotes below from previous

students who emailed me after graduating:

“My mentor, who is the Lead Engineer for the testing group at Orbital, was SUPER impressed when I told

him about the MATLAB project I did for heat transfer. My tears and extra gray hairs were worth it. Tell

that to the new seniors when they whine about the project next year. “

“side note, i learned A LOT. i knew very little about matlab prior to this. thank you”

“I gotta say though, I think the main thing that pushed me into the realm of being qualified for this job is

my capability in Matlab. Your HT project you had all of us do was paramount in kicking me into gear.”

Deliverables Your submitted document must contain all of the following:

An assessment of the validity of your simulation. Explain how the results of each of these tests

either validate your simulation, or explain how they show that your results are not valid. No

credit will be given for attempted justification of incorrect solutions. Your justification must

address EACH of the following tests:

o Heat flows on each individual node should add up to 0 on every node (note: if done

correctly, your sums should be something like 10-10)

o Net heat flow summed over the boundaries of your simulation should match the heat

generated in the system (again, if correct these sums should match within 10-10)

o Your temperature profile should match what is physically expected given EACH of the

prescribed boundary conditions (describe SPECIFICALLY what EACH boundary condition

Page 2: ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

should do to the temperature profile, and verify that this is reflected in your 3D

temperature map)

o Doubling your mesh density should not affect your solution (i.e. your calculated heat

flows) by more than 0.5%

A table listing the quantity of heat transfer per unit depth along each of the non-insulated

edges, using a positive value for heat transfer into the object and negative for heat transfer out

of the solid. The value in the table for each edge should be the TOTAL (summed) amount of

heat transfer along the edge.

A 3D projection of the temperature distribution (the ‘surf’ command may prove useful),

arranged in a way that clearly shows the full temperature distribution, in the correct orientation.

Plots of the temperature profiles along each of the edges. Put these profiles together into a

single 3x2 figure using the subplot command. Begin with the bottom edge, then work your way

clockwise around the geometry.

The code you wrote to complete the project

Deadlines While there are no deliverables associated with the deadlines below other than the final submission, I

will not provide assistance to you on the listed subtasks after their associated deadlines, unless it is

during my normal office hours AND there is no one else waiting to ask questions. Also make use of the

Finite Difference Overview, Finite Difference Logic, MATLAB primer, and tips document which are

posted in bblearn.

Make sure you understand how FD simulations work, by a) reviewing your

lecture notes; b) reading Chapter 4 of your textbook; and c) reviewing the Finite

Difference Overview posted in bblearn

Chosen a numbering scheme for your nodes (where is node ‘1’, how do the

nodes increment, etc.)

Identified each of the ‘types’ of nodes present and determined the appropriate

energy balance relation for each of them

Determined the LOGIC to identify the node ‘type’ for an arbitrary node number

‘i’ (based on your numbering scheme and the size of the mesh ‘n’)

For a given arbitrary node ‘i’, have a way of identifying the node numbers of all

neighboring nodes using only ‘i’ and ‘n’.

Written pseudocode that shows the logic of your program. If you do not have

pseudocode, I cannot help you with your coding.

Have code that can identify the node numbers for all neighboring nodes for an

arbitrary node ‘i’ (this will probably involve a series of ‘if’ statements)

Have code that can identify which energy balance equation should be applied

for any arbitrary node ‘i’ (again, this will probably involve a series of ‘if’

statements)

Have code that correctly populates the coefficient matrix and ‘b’ vector by:

Page 3: ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

Iterating through every node

Determining which energy balance equation should be applied for each

node

Determining the appropriate columns for the coefficients of the energy

balance equation (this comes from knowing the node numbers for all

neighboring nodes)

Have code that calculates the temperature distribution from the coefficient

matrix and ‘b’ vector

Creating the required plots

Calculating the required heat flows

Validating/verifying your simulation

Plagiarism Note that this is an INDIVIDUAL project. While you may discuss, you may NOT share code. Two people

independently writing code will NEVER end up with the same code at the end of the day. Merely

changing variable names or comments is not sufficient. Plagiarized code will result in a severely reduced

score (potentially a zero) and a report of academic dishonesty. Moreover, presenting results that were

not obtained by your code will result in a zero grade and a report of academic dishonesty.

Several students will be randomly selected to meet with me to discuss their code to verify that they are

the actual authors of the code. Students that are unable to describe what their code is doing will

receive a zero grade and a report of academic dishonesty.

Please do not test this – I derive no joy from catching people in plagiarism.

Grading The grade breakdown will be as follows:

Report: 30 pts

o 20 pts: Justification of the validity of your code

o 5 pts: required plots shown in report

o 5 pts: required heat transfer values shown in table

Code: 70 pts (50 pts max if you choose the easier geometry)

o 45 pts (35 for easier geometry): coefficient matrix generation

o 15 pts: (10 for easier geometry): calculation of heat transfer on edges

o 10 pts (5 for easier geometry): temperature matrix and correct surface plot

Subtractions:

o Up to -10 points for grammar and writing clarity

o -5 points for inverting a matrix using imaginary nodes (for the harder geometry)

o -5 points for incorrect file name and file format

o -5 points/day late (no more than 7 days allowed)

Page 4: ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

o Up to 100% deduction for plagiarized code

o 100% deduction for reporting results not generated by your submitted code

o 100% deduction for submitting code that cannot handle a variable mesh size

o 100% deduction for being unable to explain your code

Skeleton Pseudocode The code listed below is intended to help you organize your thought process on this project. Feel free to

use it or not as you see fit. However, if you do not follow this general approach, I will be unable to help

you.

******

%Choose mesh size (e.g. n=10 for 10x10, 20 for 20x20, etc.)

%Calculate number of nodes (probably something related to n2)

%Run a for loop to define all the nodetypes and put them in their proper location

for i=1:allnodes

if i == xxxxx %use if statements (may need more than one) to determine where node ‘i’ is

%e.g. left boundary, bottom right corner, etc. Should be able to determine

%using only i and n

%Must be node type 1 (for example)

Nodetype(i) = 1

elseif i==xxxxx %use if statements to determine where node ‘i’ is

%must be node type 2 (for example)

Nodetype(i) = 2

elseif i ==xxxx %continue for all node types

end

end

%Run a single for loop to populate the coefficient matrix one row at a time

for i =1:allnodes

if nodetype (i) == 1

%use energy balance equation for node type 1

%put appropriate coefficients into the correct columns of row i for coefficient

%matrix and b vector

elseif nodetype(i) ==2

%use energy balance equation for node type 2

%etc., etc.

end

end

%coefficient matrix and b vector should now be populated. Solve for T values

%rearrange T values into matrix to make surface plot

%verify sum of qin to each node adds to 0

Page 5: ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

%calculate heat flows on edges, verify that it matches generation

%make edge plots

Project Geometries

Easier Geometry (Max Score is 80/100) The overall size is 1mx1m. The geometry is designed to work with any mesh size that is a multiple of

10x10.

Page 6: ME 450 Computer Project - files.transtutors.com · ME 450 Computer Project Overview You are to perform a 2D heat transfer simulation of the thermal system shown in the schematic below.

Harder Geometry The overall size is 1mx1m. The geometry is designed to work with any mesh size that is a multiple of

10x10.