Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Final Project of Teng #3

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

longteng09
Copy link

This is the final version.

@ncclementi
Copy link
Member

Hey Teng, here are some suggestions, and some things that you might need to explain.

  • In the figure 1 the numbers and the letter is small, you should try to use
    a program and make a digital version.

  • You say Equation 1 is Newton's Law, can you explain what is each term? because
    Newton's Law is F=m.a but in the equation you show we have more terms and it's not clear where they come from.

  • You only need this line once, not every time you put a video:

    from IPython.display import YouTubeVideo

  • You are importing the same video, twice: YouTubeVideo('4dL9kFjfizY')

  • The word coefficiency doesn't exist, I guess what you are trying to say is coefficient.

  • In the phrase " the suspension of the car has a properity damping coefficiency(C),"
    there is a typo "properity", I guess you were trying to say property, however, I don't
    understand. What does it mean that the car has a "property damping coefficient"?

  • You use the word "Specifically" multiple times, and some of them it is not necessary

  • In the matrix form of equation 6, what is U\V it appears in red. Can you explain that or fix it in case it is a typo?

  • In the section The Finite Element Method:
    - equations 13, 14, 15 are broken, I can't see them. Check the link here: http://nbviewer.ipython.org/github/longteng09/assignment-bank-2015/blob/master/TengMAE6286Final/The_Dynamic_Structure_Analysis_based_on_Numerical_Method.ipynb

    - Can you explain in few lines what each Matrix represents? 
    - What is the shape function? 
    - The expansion of the summation form, the linear momentum one, and many others,
      are broke. 
    
  • Most of the equations have 2 numbers, can you fix that? otherwise it's difficult
    to understand when you are referring to a specific one in the text.

*In section 5 the equations that you present are the same ones than in section 2

  • After a comma "," or a period "." you always need a space.

Add the space in:

car body.The suspension
Specifically,at 3:00
Specifically,the structure

You also need a space here before the (:

Numerical Method(Euler's Method)
a Load(1N) 
Equation One(Newton's Law) 
damping coefficiency(C)   
at the website(https://en.wikipedia.org/wiki/Euler_method)

Your reference 1 says (internet resource). Provide the link, and due to it is a book
specify in which page is the equation that your are mentioning.

Typos:

coefficiency ----> coefficient
properity -------> property
Becuase ---------> Because
theorically------> theoretically
enery -----------> energy
numerial---------> numerical
Sepcificallly----> Specifically
Sepcifically-----> Specifically
Assembel---------> Assemble
GetSifnessMatrix3D>GetStifnessMatrix3D
Possion----------> Poisson
"errot"----------> "error"
demensional -----> dimensional

About coding:

  • Change from sympy import * for import sympy and call the functions as we do with numpy.

  • The function NewWayToAss(K1,S) can be writen in vector form! Morover, it's not a nice name for a function. And why you have this functiontwice in the code?

  • In the Note "The relation between variables and equations in the program"

    what are the names, aabbcc, gghhii, jjkkll, mm, nn, oo ? Can you explain it?

  • Can you explain why you choose to wrtite the matrices in old fashion way instead of using numpy arrays, and where and why do you use sympy?

  • You are importing matplotlib more than once! you only need to do it once!

  • When you are plotting, if you add a semi-colon in the last line, the output line
    <matplotlib.text.Text at 0x7faf7cbfda90> won't appear.

  • You should plot the analytical solution and the numerical one in the same plot, so we can see
    easily the difference.

  • It would be interesting to have an error analysis, to see how different is the numerical solution compared with the analytical one.

@longteng09
Copy link
Author

Thank you so much!
I will try to modify them as soon as possible!

On Thu, Dec 17, 2015 at 7:17 PM, ncclementi [email protected]
wrote:

Hey Teng, here are some suggestions, and some things that you might need
to explain.

In the figure 1 the numbers and the letter is small, you should try to
use
a program and make a digital version.

You say Equation 1 is Newton's Law, can you explain what is each term?
because
Newton's Law is F=m.a but in the equation you show we have more terms
and it's not clear where they come from.

You only need this line once, not every time you put a video:

from IPython.display import YouTubeVideo

You are importing the same video, twice: YouTubeVideo('4dL9kFjfizY')

The word coefficiency doesn't exist, I guess what you are trying to
say is coefficient.

In the phrase " the suspension of the car has a properity damping
coefficiency(C),"
there is a typo "properity", I guess you were trying to say property,
however, I don't
understand. What does it mean that the car has a "property damping
coefficient"?

You use the word "Specifically" multiple times, and some of them it is
not necessary

In the matrix form of equation 6, what is U\V it appears in red. Can
you explain that or fix it in case it is a typo?

In the section The Finite Element Method:

*In section 5 the equations that you present are the same ones than in
section 2

  • After a comma "," or a period "." you always need a space.

Add the space in:

car body.The suspension
Specifically,at 3:00
Specifically,the structure

You also need a space here before the (:

Numerical Method(Euler's Method)
a Load(1N)
Equation One(Newton's Law)
damping coefficiency(C)
at the website(https://en.wikipedia.org/wiki/Euler_method)

Your reference 1 says (internet resource). Provide the link, and due to it
is a book
specify in which page is the equation that your are mentioning.

Typos:

coefficiency ----> coefficient
properity -------> property
Becuase ---------> Because
theorically------> theoretically
enery -----------> energy
numerial---------> numerical
Sepcificallly----> Specifically
Sepcifically-----> Specifically
Assembel---------> Assemble
GetSifnessMatrix3D>GetStifnessMatrix3D
Possion----------> Poisson
"errot"----------> "error"
demensional -----> dimensional

About coding:

Change from sympy import * for import sympy and call the functions as
we do with numpy.

The function NewWayToAss(K1,S) can be writen in vector form! Morover,
it's not a nice name for a function. And why you have this functiontwice in
the code?

In the Note "The relation between variables and equations in the
program"

what are the names, aabbcc, gghhii, jjkkll, mm, nn, oo ? Can you
explain it?

Can you explain why you choose to wrtite the matrices in old fashion
way instead of using numpy arrays, and where and why do you use sympy?

You are importing matplotlib more than once! you only need to do it
once!

When you are plotting, if you add a semi-colon in the last line, the
output line
won't appear.

You should plot the analytical solution and the numerical one in the
same plot, so we can see
easily the difference.

It would be interesting to have an error analysis, to see how
different is the numerical solution compared with the analytical one.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@longteng09
Copy link
Author

The equations display very well on my computer and I do not know why it can not display well on the website. I have modified my project as much as possible according to your instruction, but it still has some undesirable parts.

Thank you for your help!

@labarba
Copy link
Member

labarba commented Jan 11, 2016

As we discussed many times in person, your choice of topic was a risky one because it departs substantially from the course topics: we studied Finite Difference Methods in the course, yet you insisted on working with the Finite Element Method for your project. You made it clear that this is a strong interest of yours—but it is sufficiently off-topic to the course that assessment is made difficult.

You could have dampened this difficulty by crafting careful explanations of the equations, method and problem you are solving. But unfortunately that is not the case.

In several places, you refer to "Numerical Method combined with Finite Element Method” — I’m not sure what you’re thinking here. The FEM is a numerical method.

The explanation you provided concerning equations (1) and (2) is poor: only a reader that is already familiar with FEM can understand it. We can follow from there that you turn the second-order ODE into a system of first-order ODEs in equation (5) … going by the right-most equation numbers (it’s not helpful that you have two sets of equation numbers!). But the matrix form of the equation is confusing and badly written.

On section 3 (“The Finite Element Method”), you also have equations that do not render properly and it’s impossible to follow. You introduced mass matrix, stiffness matrix, damping matrix, and shape function … none of this can be followed or understood by a reader that is not already very familiar with FEM.

The whole sequence of equations that you wrote under the heading "The Process of how we use the Linear monentum equation to derive the Finite Element equations” is impossible to follow for anyone not already familiar with this content. Any reader not familiar with FEM would be forced to go to your reference (or another book) and study it from scratch, which defeats the purpose of this notebook! And again, we have many equations that do not render, so that makes it worse.

After input line In[5], you write a sequence of equations, where you re-name some terms aabbcc, gghhii and so on … What terrible way to chose auxiliary variable names! When writing computer code, you are well advised to choose names that make some sense to another human reading the code (we said that in class many times).

In general, you’ve written here quite unreadable code, disregarding not only conventions for readability but also proper use of NumPy array structures.

Input line In[23]: you do not need a colon at the end of the line dt=0.00006;
… and again in input line In[31]!

You imported Matplotlib with other libraries in input line In[4] using from matplotlib import pyplot … why do you have this line in input line In[24]?
import matplotlib.pyplot as plt
… and again in input line In[32]!
It looks like this is unnecessary because your plotting commands later use the pyplot prefix.

Where do we find any explanation of the initial/boundary conditions for your example problem? We can find a few clues digging into your code, but since the code is verbose and uneconomical, it’s really buried … you should have explained your problem set up clearly in the write up.

Looking at your results now: output line Out[26] shows a plot of the displacement of node 11 over time for the numerical result. The first oscillation slightly overshoots a value of 0.010 (undeclared units). Meanwhile, the result from the analytical solution, shown by the output of Out[67], has the first oscillation slightly overshooting a value of 0.0010 — i.e., the numerical and analytical solutions are off by an order of magnitude. What happened? (The same applies for the result without damping.)

In input line In[73], you need to add a semi-colon (;) at the end of the plotting commands to avoid the multiple lines of <matplotlib … > stuff.

Conclusion “Based on the 3 reasons, the difference between numerical solution and analytical solution can be definitely accepted.” —> Absolutely not. Your conclusion is nonsensical, I’m afraid.

Typos, grammar, etc.

comfortability —> this is not a word
what effects the riding comfortabiltity —> affects
See:
http://grammarist.com/usage/affect-effect/

three degree of freedoms —> three degrees of freedom
appled on the y direction —> applied
natrue coordinate —> natural(?)
How we can discrete the displacement —> discretize(?)

monentum —> momentum
to Solve the dyanmic equation —> dynamic
Internal Internaction —> Interaction(?)
As a reuslt —> result
euqation (41) —> equation
interation part —> integration(?) or iteration(??)

The Natural Frequence —> Frequency

There are a lot of other typos (especially in comments within the code), which would be too long to list.

@longteng09
Copy link
Author

Dear professor!

Anyway,thank you for your help and patience in the past! Your course is
really good!

Best wishes,

Teng Long

On Sun, Jan 10, 2016 at 7:09 PM, Lorena A. Barba [email protected]
wrote:

As we discussed many times in person, your choice of topic was a risky one
because it departs substantially from the course topics: we studied Finite
Difference Methods in the course, yet you insisted on working with the
Finite Element Method for your project. You made it clear that this is a
strong interest of yours—but it is sufficiently off-topic to the course
that assessment is made difficult.

You could have dampened this difficulty by crafting careful explanations
of the equations, method and problem you are solving. But unfortunately
that is not the case.

In several places, you refer to "Numerical Method combined with Finite
Element Method” — I’m not sure what you’re thinking here. The FEM is a
numerical method.

The explanation you provided concerning equations (1) and (2) is poor:
only a reader that is already familiar with FEM can understand it. We can
follow from there that you turn the second-order ODE into a system of
first-order ODEs in equation (5) … going by the right-most equation numbers
(it’s not helpful that you have two sets of equation numbers!). But the
matrix form of the equation is confusing and badly written.

On section 3 (“The Finite Element Method”), you also have equations that
do not render properly and it’s impossible to follow. You introduced mass
matrix, stiffness matrix, damping matrix, and shape function … none of this
can be followed or understood by a reader that is not already very familiar
with FEM.

The whole sequence of equations that you wrote under the heading "The
Process of how we use the Linear monentum equation to derive the Finite
Element equations” is impossible to follow for anyone not already familiar
with this content. Any reader not familiar with FEM would be forced to
go to your reference (or another book) and study it from scratch, which
defeats the purpose of this notebook! And again, we have many equations
that do not render, so that makes it worse.

After input line In[5], you write a sequence of equations, where you
re-name some terms aabbcc, gghhii and so on … What terrible way to chose
auxiliary variable names! When writing computer code, you are well advised
to choose names that make some sense to another human reading the code (we
said that in class many times).

In general, you’ve written here quite unreadable code, disregarding not
only conventions for readability but also proper use of NumPy array
structures.

Input line In[23]: you do not need a colon at the end of the line
dt=0.00006;
… and again in input line In[31]!

You imported Matplotlib with other libraries in input line In[4] using from
matplotlib import pyplot … why do you have this line in input line In[24]?

import matplotlib.pyplot as plt
… and again in input line In[32]!
It looks like this is unnecessary because your plotting commands later use
the pyplot prefix.

Where do we find any explanation of the initial/boundary conditions for
your example problem? We can find a few clues digging into your code, but
since the code is verbose and uneconomical, it’s really buried … you should
have explained your problem set up clearly in the write up.

Looking at your results now: output line Out[26] shows a plot of the
displacement of node 11 over time for the numerical result. The first
oscillation slightly overshoots a value of 0.010 (undeclared units).
Meanwhile, the result from the analytical solution, shown by the output of
Out[67], has the first oscillation slightly overshooting a value of
0.0010 — i.e., the numerical and analytical solutions are off by an order
of magnitude. What happened? (The same applies for the result without
damping.)

In input line In[73], you need to add a semi-colon (;) at the end of the
plotting commands to avoid the multiple lines of <matplotlib … > stuff.

Conclusion “Based on the 3 reasons, the difference between numerical
solution and analytical solution can be definitely accepted.” —> Absolutely
not. Your conclusion is nonsensical, I’m afraid.

Typos, grammar, etc.

comfortability —> this is not a word
what effects the riding comfortabiltity —> affects
See:
http://grammarist.com/usage/affect-effect/

three degree of freedoms —> three degrees of freedom
appled on the y direction —> applied
natrue coordinate —> natural(?)
How we can discrete the displacement —> discretize(?)

monentum —> momentum
to Solve the dyanmic equation —> dynamic
Internal Internaction —> Interaction(?)
As a reuslt —> result
euqation (41) —> equation
interation part —> integration(?) or iteration(??)

The Natural Frequence —> Frequency

There are a lot of other typos (especially in comments within the code),
which would be too long to list.


Reply to this email directly or view it on GitHub
#3 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants