Computing in Mechanical Engineering?

In summary, the conversation discusses the use of computer programming languages in mechanical engineering and the different opinions on which language is most effective. Some engineers prefer using spreadsheets, particularly Microsoft Excel, for its popularity and user-friendly interface. Others prefer more specialized programs like MathCAD for their capabilities in specific areas of engineering. There is also a debate on whether teaching spreadsheets in engineering education is beneficial or hinders computational abilities. Overall, the conversation highlights the importance of finding the right tool for the specific problem at hand.
  • #36
My undergrad was in Mechanical Engineering, we where mostly taught FORTRAN and Matlab, as for CFD we used I-DEAS NX10, and solidworks & AutoCAD, and yes spreadsheets where used too :D (only time we used it was an actual sample from a European Satelite system).

Since then I've learned C++, C#, Java, Python, and a ton of other scripting languages (and Z80 machine language, plugging binary values straight into memory on a simulator)

But no-one seems to be mentioning the Floating Point Errors of Excel, this is something that can not be avioded, during our Systems failure studies one of the case study was regarding a financial organisation that lost literally millions becuse they assumed the results from the spreadsheet where accurate!

Anways I say learn them all, they are just tools, and like I always say

"If your toolbox just consists of a hammer; consider getting a new one"

Anhar
 
Engineering news on Phys.org
  • #37
Oops I forgot to mention, one of the best use was to see Excel used to create a real 3d engine!, each cell was used as a "pixel" ! :)
 
  • #38
Excel is good for making your results presentable, but for solving computational math problems its not very good.

I most frequently use MATLAB, which is great because it has built-in solvers that can be used with user-defined functions. MATLAB stands for "MATrix LABoratory" and is named that because its operator syntax accommodates the laws of linear algebra. It can numerically integrate user-defined functions and discrete data sets using the most effective methods availiable. It's the best software availiable for numerically solving ODES. It also has excellent plotting capabilities. Its 3-D plotting functionality far exceeds Excel's.


I have a hard time getting it to solve PDE's. It has a toolbox for this but I can't use it yet.
I am also trying to figure out a way to put REFPROP functions into MATLAB however. It has excellent tools for solving non-linear systems, but I need that to solve heat exchanger problems which require thermodynamic property functions that MATLAB seems to lack.

I use C# because I work in a software group that develops windows applications for heat exchanger simulation.

Look into matlab.
 
  • #39
Hello everyone!
I'm not an engineer at all, I just surfed on in because I'm you can say a Linux advocate and I'm just basically going around telling everyone about it. It's almost unbelievable luck that a thread like this happened to be going on here. Linux is a free open source OS, you can download it and use it, and there are tons of places around the net with resources and information on how to get started and get on with your work and your life.
Now the thing is I don't know what software you all use , I read some of the discussion - there is OpenOffice.org which comes with just about all distributions which has a spreadsheet. Windows software can be run under Linux with Wine, a sort of "emulation layer", and there are numerous solutions to even run Windows under Linux (you must have enough RAM and space, needless to say). So - the OS, a ton of software and help and hand holding are all free - can we ask that once you use it, you give away some of your plane designs as well? :)

I will follow this thread, and answer any questions you have, and try searching on the net for free software equivalents of whatever it is you use - just throw them at me :)

Just to add -wikipedia just told me about gnu octave and freemat as something like Matlab, and there is BRL-CAD for CADing. What does Solidworks do?
 
Last edited:
  • #40
iamhere said:
Hello everyone!
Windows software can be run under Linux with Wine, a sort of "emulation layer", and there are numerous solutions to even run Windows under Linux (you must have enough RAM and space, needless to say).

I am running Ubuntu 7.10 under the OpenGEU platform name and have set up Virtual Box, which allows me to run XP within Linux. I only do this when I absolutely have to, as i despise Winblows. I have 1 GB of ram with a 2.0 GHz processor and both systems run almost natively. Linux is the way to go. Onto the thread topic:


I must agree with caslav.ilic. Spreadsheets are the spawn of hell.

From what I have observed, many engineers have replaced the program form of an engineering tool with formula-based spreadsheets. Not only is this messy if you want to share the tool with others, (Formulas may be erased, its not easy to copy outputs, can't follow thought process. etc...) but you are reliant upon Microsoft and their shoddy programing.

The other problem is speed. Most programs that I create end up taking 10-20 sec of computation time, if not more. I could speed this up by tossing my calculations out to a .dll, but such things get messy quickly. Your better off bypassing the spreadsheet and using a faster language from the start.

Basicly what I am saying is there is no need to be tethered to one company, one operating system or program. Spreadsheets can be useful for basic, quick and dirty calculations, or making pretty graphs for management, but anything beyond that and I believe that something like MATLAB or maple or mathmatica will better serve your purpose. If your looking for a tool that will do a lot of calculations and fast, then you need to use the right tool. Odds are VBA and excel are not the right one.

As a side note, MATLAB is capable of interfacing with excel files. Pulling info in or passing it out is a matter of a few commands. on the downside, it is not nearly as fast as c++.
 
  • #41
If you're working on something in a spreadsheet that requires 10-20 sec of CPU time then you are missing the point of this argument completely.
 
  • #42
(One) point of my arguments was that any computation -- something which has input parameters, number of formulas to process them, and output results -- should be trivially usable at a later point as a part of something that will take 10-20 sec, to hours and days, to compute. And if the computation could, in principle, operate on variable number of input parameters, and do two or more iterations somewhere inside (which I've seen people implement as several worksheets, each named "iteration-x"), that's from the onset a total loss with spreadsheets.

Stating that one should "think ahead" and "choose the right tool for the right job" overly simplistically assumes that this is a one-way process, neglecting the feedback that the tools have on breadth and scope of our ideas. Engineers are especially susceptible to this feedback, as they tend to think problems over constructively, in specific procedures that could lead to the solution. That's why they, of all people, should avoid constraining tools.

--
Chusslove Illich (Часлав Илић)
 
  • #43
FredGarvin said:
If you're working on something in a spreadsheet that requires 10-20 sec of CPU time then you are missing the point of this argument completely.

Not at all. I have seen Solver processes easily go for that long on newer computers.
 
  • #44
Viper2838 said:
Not at all. I have seen Solver processes easily go for that long on newer computers.

I think Fred's point is that 10-20 seconds of computing time is nothing, and you can use any program to solve it. The argument for faster and more efficient solvers comes into play when your computer is running for hours or days. A 50% difference in solve time for a problem that runs for 40 hours is a big deal, where as with a 10 second algorithm you won't even notice the difference.
 
  • #45
Matlab is currently US$1900 per license, whereas the same thing, Octave, is free. Secondly, http://curveexpert.webhop.biz/ is excellent.
 
Last edited by a moderator:
  • #46
nvn said:
Matlab is currently US$1900 per license, whereas the same thing, Octave, is free. Secondly, http://curveexpert.webhop.biz/ is excellent.

MathCAD is only around $1,000.00 last time I checked anyway.

CS
 
Last edited by a moderator:
  • #47
Mech_Engineer said:
I think Fred's point is that 10-20 seconds of computing time is nothing, and you can use any program to solve it. The argument for faster and more efficient solvers comes into play when your computer is running for hours or days. A 50% difference in solve time for a problem that runs for 40 hours is a big deal, where as with a 10 second algorithm you won't even notice the difference.
That's pretty much what I was attempting to get at. For something that takes such a short period of time, where is the time benefit of coding something yourself? Perhaps I am stubborn, but with all of the things mentioned here, only the comment about floating point errors has been mentioned to show that spreadsheets are not a legitimate engineering tool.
 
  • #48
FredGarvin said:
Perhaps I am stubborn, but with all of the things mentioned here, only the comment about floating point errors has been mentioned to show that spreadsheets are not a legitimate engineering tool.

Spreadsheets aren't unit-aware either, that's a big minus in my book. And they don't have symbolic/exact manipulation capabilities; everything must be solved in dicrete pieces no matter how infantesimally small.
 
  • #49
ANSYS isn't unit aware either.

Symbolic manipulation is a shortfall, but that is outside the original scope of their development. It sure would be nice if they had it, especially since it is not an unheard of thing in a piece of software.
 
  • #50
FredGarvin said:
ANSYS isn't unit aware either.

ANSYS Workbench is :approve:

I'm not sure I consider ANSYS a calculation tool as much as a simulation tool. The line between the two is a bit of a gray area, but ANSYS is very good at what it is designed to do- generate and solve huge linear algebra problems using geometry and boundary condition inputs from the user. In a way, it's a very specialized engineering math tool; I shudder at the thought of trying to find the inverse of a 300,000 x 300,000 matrix using MathCAD...
 
Back
Top