What are all the must known Programming languages for mechanical enginners?
What are all the must known Programming languages for mechanical enginners?
(OP)
Not only general programming, knowing programming languages will help us to use advanced / user-defined features of other engineering softwares like NX, ANSYS CFX, ANSYS FLUENT etc.,
But each software supports different programming languages like NX supports C++, GRIP, Visual Basic etc., ANSYS CFX supports FORTAN, ANSYS FLUENT supports C++, etc.,
But it will be difficult to learn all programming languages.
So What are all the must known Programming languages for Mechanical enginners, which will be most useful in 'many' of the engineeing applications?
But each software supports different programming languages like NX supports C++, GRIP, Visual Basic etc., ANSYS CFX supports FORTAN, ANSYS FLUENT supports C++, etc.,
But it will be difficult to learn all programming languages.
So What are all the must known Programming languages for Mechanical enginners, which will be most useful in 'many' of the engineeing applications?






RE: What are all the must known Programming languages for mechanical enginners?
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: What are all the must known Programming languages for mechanical enginners?
In the most part, C and FORTRAN, in that order. Most CAE tools will provide APIs for both.
FORTRAN will either require buying and using the right (compatible) compiler ... and there are many out there. Mixing is possible, but challenging.
C will generally be easy as the interfaces and calling conventions are well defined. Plus the OS will be written in C, making it a good glue language for applications.
Good luck using a C++ interface without name-mangling nightmares and library versionitis.
- Steve
RE: What are all the must known Programming languages for mechanical enginners?
Dik
RE: What are all the must known Programming languages for mechanical enginners?
Oh, but wait a minute ...
http://newtonexcelbach.wordpress.com/2013/02/25/wh...
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: What are all the must known Programming languages for mechanical enginners?
Now had I known one better would I have found application for it, possibly. However, not knowing one well hasn't been an obvious impediment.
What is Engineering anyway: FAQ1088-1484: In layman terms, what is "engineering"?
RE: What are all the must known Programming languages for mechanical enginners?
While Matlab is costly, Octave is a free Matlab-clone, which could get you pretty far all by itself.
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: What are all the must known Programming languages for mechanical enginners?
http://www.maplesoft.com/
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: What are all the must known Programming languages for mechanical enginners?
C++ is an object oriented language, as opposed to a structured language like C. Objected Oriented Programming (OOP) makes no sense to me outside of a project in which I write 2000 lines of code, you write 2000 lines of code, the OP write 2000 lines of code, etc. The name mangling nightmares you refer to are all the object declarations needed to keep all of us out of each other's workspace.
For mechanical engineering purposes, I do not think we have that problem. The overhead becomes a pain in the butt. This is why I hate Visual C.
There is Gnu Fortran, which is Free Software. Computer geeks hate Fortran. Fortran is not a general purpose language like C. It is a specialized language for doing stuff that actually, we want to do.
--
JHG
RE: What are all the must known Programming languages for mechanical enginners?
Dik
RE: What are all the must known Programming languages for mechanical enginners?
When you are writing code to extend an existing CAE (or other) package, your choice of programming language is somewhat constrained. My post addressed this. It was not a geneneral comparison among the programming languages or analysis environments w.r.t engineering use. That's down to personal preference.
- Steve
RE: What are all the must known Programming languages for mechanical enginners?
Funnily enough I don't write Fortran because I'm addicted to GOTO.
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: What are all the must known Programming languages for mechanical enginners?
- Steve
RE: What are all the must known Programming languages for mechanical enginners?
Pick your own tool. There is not one tool for all tasks, and not all people have the same preferred tool for a given task. I'd say every post here has merit except the one that closes the door on a tool.
=====================================
(2B)+(2B)' ?
RE: What are all the must known Programming languages for mechanical enginners?
My opinion - excel is a great tool for many tasks… often the first I reach for. Search the old threads for various people's discussions of pros and cons of excel.
=====================================
(2B)+(2B)' ?
RE: What are all the must known Programming languages for mechanical enginners?
Dik
RE: What are all the must known Programming languages for mechanical enginners?
if you are an ordinary design engineer, maybe some excel+vba to automate pieces of your work. apart from that you don't need anything.
testing uses matlab or labview for example.
in most other areas, it's usually the case that if you need a programming language, you have a phd.
RE: What are all the must known Programming languages for mechanical enginners?
I have used Matlab since I learned it in college, and it's a great tool. That said, for a new engineer, I might point them towards Python/Scipy/Numpy. Python is freely available (so you can use it wherever you happen to be), and it has a growing number of libraries which are really a rival to Matlab's capabilities... and in many cases are better.
That said, Matlab still has some nice graphical tools and debugging widgets which make it really nice to work with. It's also comparatively faster than Octave in solving certain types of problems. Also Simulink is really unique to Matlab. I don't use Simulink myself, but I understand that many people find it invaluable.
As far as spreadsheets go... I find them very useful for simple calculations, but I've never really pursued VBA programming. I find that if programming is required for a task, Matlab/Octave and Python seem like better tools for the job than VBA to me. Maybe that's just my own personal bias, though.
That said, one advantage of creating a spreadsheet with fancy macros is that any knucklehead should be able to use it without much knowledge about what it's doing behind the scenes... depending on the spreadsheet, though, that might not be an advantage after all. I suppose that you could say the same for a Python program with a GUI, though...
RE: What are all the must known Programming languages for mechanical enginners?
Yes loki3000, I am an "ordinary" design engineer & as u say I was doing everything in ordinary way, before joining this forum!
After joining this forum, I learnt many things by going through the queries of many persons in this forum :) I observed that some time consuming works like Modelling Gears, Extracting points to text, etc., are simplified by way of programming in GRIP or VB (mostly by Mr.JohnRBaker :) ) . So I thought learning a scripting language will not only makes the work easier but also interesting ! :) but i was confused to decide which programming language to learn & so i put this question n this forum.
Thanks everyone for the reply :)
I spent considerable time in analysing which programming language is better for " mechanical engineer" and I have gone through many sites & also read a book "Beginning programming for dummies" to understand that and I would like to share something which I learnt:
First of all the requirement for a typical mechanical design engineer is
1. to used the extended facility of softwares (NX - GRIP,VB ; EXCEL - VB ; CFX - FORTAN ; FLUENT - C++)
2. Mathematical modelling, problem solving & automation
3. Data visualization
First of all, I like to tell essential type of programming languages, in brief:
1. Machine language (only 0s & 1s ; the only language which the processor can understand but for us it is difficult to write such a program)
2. low level programming language, eg C program. (a language which is not 0s & 1s, which can be comparitively easier for us to read & understand. Even this language should be translated to 0s & 1s by "compiler program" to make the processor understand)
3. high level programming language, eg MATLAB (low level & high level with respect to computer. It means a high level program is easier for us but to the computer it is complicated)
4. Scripting language: This can be any programming language (mostly low level languages) by which the usage of a software can be extended or customized as per our need. As said by Mr.somptinguy, the choice of learning a scripting language is constrained, since many softwares uses different languages & it depends only on the software maker & there is no single scripting language for all softwares.
Many prefers low level languages like C, since
1. it is widely accepted,
2. it is the choice for scripting language for many softwares.
3. can be used to control hardwares easily (if we need)
But it is less preferable when it comes to our requirement 2 & 3 (i.e., mathematical modeling, data visualization etc.,)
Considering all that, I think "MATLAB" is better. MATLAB suites for requirement 2 & 3. Some may tell that excel is sufficient. But I say, atleast excel is not easier in handling complex problems, plotting complex graphs (like 3d plots, polar plots etc) and much more. And coming to our requirement to use a "scripting language", there is a option to convert Matlab program to C program completely using "matlab coder"; it can be used to access hardware too. The generated program can be used as standalone executable program also using matlab compiler.
Hence matlab satisfies most of our requirement.
There are much more like object oriented programming languages like c++, database languages, etc., but here i shared only a few thing which is necessary for a mechanical engineer!
Atlast I know, most of the persons here are experts & knows these things pretty well. But I shared, to give a clear picture and it may help somebody who knows only little like myself ;) & looking forward to learn a lot :)
If I am wrong anywhere, then please let me know.
(some may still think, explaining even types of languages is too much ;) but previously i was searching in this forum for the samething & so i shared it here :) )
Thank you.
RE: What are all the must known Programming languages for mechanical enginners?
i doubt you really need the features of matlab + advanced feats are quite expensive (matlab -> c++). it is much worse for symbolic math then mathematica or mathcad.
i think NX also uses C for macros.
RE: What are all the must known Programming languages for mechanical enginners?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: What are all the must known Programming languages for mechanical enginners?
- Steve
RE: What are all the must known Programming languages for mechanical enginners?
The Python programming language is added as a language binding for NX Open. This allows NX users to record and replay NX workflows in the Python language. Advanced users can create or extend NX Open Python journals to develop NX Open applications in Python. These applications can use any of the features of the Python programming language including classes, looping constructs, control statements, and callbacks. Python journals can be recorded and replayed on Windows, Linux, and Mac.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: What are all the must known Programming languages for mechanical enginners?
- Steve
RE: What are all the must known Programming languages for mechanical enginners?
RE: What are all the must known Programming languages for mechanical enginners?
" Conversely, CPython applications that depend on extensions to the language that are implemented in C (e.g. NumPy) are not compatible with IronPython,[16] although a commercially-supported open source project to address this is underway.[17]"
However linking Python to Excel is relatively simple with a number of packages, of which ExcelPython (which I am experimenting with at the moment) is free and open source, and seems to work well.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: What are all the must known Programming languages for mechanical enginners?
ironpython is more of a just another language for .net. just the syntax, not the libraries.
RE: What are all the must known Programming languages for mechanical enginners?