What is the role of C and C++ in Mechanical Engineering?

Can someone explain the role of C and C++ programming languages in Mechanical Engineering?

Answer:

Mechanical engineering is a broad field that can involve various applications of programming and computing. Here are a few ways in which programming languages like C and C++ can be relevant:

  1. Simulation and Modeling: Mechanical engineers often need to simulate and model physical systems. For complex systems, these models may need to be implemented as computer programs. C and C++ can be useful for these tasks, especially when high performance is needed, as they are powerful, flexible and efficient languages.

  2. Control Systems: Mechanical engineers often work with control systems, such as those used in robotics or automation. These systems may be programmed in C or C++, particularly if they involve real-time processing or need to interface with hardware.

  3. CAD/CAM Software: Computer Aided Design (CAD) and Computer Aided Manufacturing (CAM) software often have APIs (Application Programming Interfaces) that allow for custom programming. This can be done in various languages, but C and C++ are commonly used due to their performance and flexibility.

  4. Embedded Systems: Many mechanical systems involve the use of embedded systems. These systems often use C or C++ for programming, as these languages provide the necessary low-level access to hardware, have small footprints, and run quickly and efficiently.

  5. Data Processing: Mechanical engineers often have to process large amounts of data, such as from sensors or simulations. C and C++ can be used to create efficient and effective data processing tools.

  6. Research: In academic and industrial research, programming languages like C or C++ may be used to develop custom solutions for experiments, simulations, and data processing.

Overall, while not every mechanical engineer will need to know C or C++, these languages can certainly be useful in this field. The need for these languages will depend on the specific role and tasks of the engineer.

Replies

  • Kaustubh Katdare
    Kaustubh Katdare
    My best guess is that you can develop C programs for design related calculations.
  • Manish Goyal
    Manish Goyal
    1:-Start learning c++ language

    2:-as big k said you can use c++ for design related calculations

    3:-You can also learn graphics in c++
  • ShrinkDWorld
    ShrinkDWorld
    any small program for exampal???
  • samarjeetsaigal
    samarjeetsaigal
    its like in computer softwares we design a program which does several functions according to the program, i guess its the same with the operations we want to perform like to move some tool connected to the machines
  • abhishek1814
    abhishek1814
    I don think so a mechanical guy need to have knowledge of C/C++.. if he has then it is his extra knowledge
  • trulyajays
    trulyajays
    for generating a single line also in mechanical C lanuguage is used. .
  • mediummachinery
    mediummachinery
    Knowledge of a programming language certainly helps with automation. You can check out our machine at #-Link-Snipped-#

    PIC 18F4620 micro controller was used, with the control algorithm written in C. Let me know if you want to look at the code.
  • choondu
    choondu
    Even i had this same question in my mind while i was in 6th Semester and was basically struggling with C. I assumed that it gives us an opportunity to widen our horizons an know what the basics are and this helps in understanding Industrial automation concepts, prgram to do Design calculations say, pump designm etc. These days we have softwares for all these design calcutaions which has the basis from C /C++.

    Another anology is like Electrical branch having Fluid Mechnics Lab in their 3rd or 4th semester.
  • ShrinkDWorld
    ShrinkDWorld
    Thanks for lot of replies!!!


    I had found another roll of C/C++ in mechanical engineering.
    We can use c program to design the various mechanical parts. such as knuckle joint, couplings, Etc as we have to calculate all stresses and determine the dimension. again we have to check them for various failure, so it easy to design any component by using c program because the basic procedure for particular part is same/canst.
  • sharon09
    sharon09
    Computational Fluid Dynamics codes are written in C
  • yisehak
    yisehak
    i had the same question before a month or two, and now ,AFTER I HAVE STARTED, i found it to be one of the most important thing for the industrial automation of which is worlds concern now and in the next few years.
  • saimriyaz
    saimriyaz
    It is used in Computer Aided Designing software like Autocad...................We have to define formula for the geometry in C/C++ then we have to design on its basis
  • Ammar Aziz
    Ammar Aziz
    to design a thing require some information about that thing, and also the procedure to arrange these things in a systematic manner to get the required results by giving some type of commands. this is what which simply happens to use c++ for mechanical engineering
  • ISHAN TOPRE
    ISHAN TOPRE
    It is seen that mechanical students do not take introduction of C/C++ in their syllabus very kindly. However, it is required in various designing software like MATLAB which is a requirement not only in electronics but also to mechanical too.
    In simple terms, C and C++ are the same computer programming languages but with different syntax. They help in defining problems in various simulation oriented problems.
  • saimriyaz
    saimriyaz
    C/C++ is applied to any designing..............................
    It is fundamental of part design
  • vignesh sp
    vignesh sp
    yisehak
    i had the same question before a month or two, and now ,AFTER I HAVE STARTED, i found it to be one of the most important thing for the industrial automation of which is worlds concern now and in the next few years.
    how can i create a prog. i jst know the basic c programming
  • saimriyaz
    saimriyaz
    C programming is not used for automation.............................. automatic machine needs programming of microprocessor..........and for prgrmng of mcps higher level language is used.....................................
    c/c++ is lover level language............CNC programing is very different
  • Capt Spark
    Capt Spark
    odd to see this alive again. programming languages are very much important as usual in creating any automated process.
    FE software Ansys is developed using Fortran.
  • Ankita Katdare
    Ankita Katdare
    I recently found out that mechanical engineers are actively learning programming languages and was reminded of this old discussion on CE. These days most engineering programs expect undergraduates to take computer programming, but in some parts of India they don't have C or C++ or other coding related courses in their curriculums.

    I believe if a mechanical engineer builds a solid foundation in C language, he will be able to grasp other more complex, advanced, mathematical programming languages as well as other emerging computing paradigms quite easily.

    It has been found that students who knew some programming language basics, were able to grasp Matlab more quickly. As it is, many mechanical engineers are being recruited in the IT industry, where they are trained in various integration programs of mechanical hardware and control software. It only makes sense in today's IT world, to make mechanical engineers learn how to code.

    Would like to read more opinions on this.
  • Shashank Moghe
    Shashank Moghe
    C/C++/FORTRAN becomes increasingly more useful when you start working on opensource technologies. Make no mistake of assuming a programming language as a tool essential for just the software guys, these days everything analytical is getting heavy on computation and there are very few and simplified problems you can solve by hand, most of the time you will find yourself in need of a program that will do the calculations for you efficiently. A well learned programming language comes in real handy then.

    MATLAB is perhaps going to become your best friend in an academic environment (where licenses are "free"), you graduate to the industry and it is replaced by Scilab/FreeMat, C++ and the likes. If you need a head-start and are interested in a career in analytical engineering, start learning C++. There is nothing like it.

You are reading an archived discussion.

Related Posts

CEans, We are proud and happy to present you CE's exclusive small talk with Mr. Chief Technology Officer of Opera - The World's Fastest Web Browser! Follow this link: -...
sir pls give me best topic on seminar of technical related to information technology or computer enfineering branch... pls fast
hi to all!! anyone can say me how to make sd memory cardreader?(by easy way )
hi CE's 😛 I am going to creat model of bluet train. In this i use electro magnet. It nothing but small model of our convectional bluet train. Any more...
Hi I am starting on my project on a Flyback converter. It is an IEEE based re-engineering project. It is little modified from the basic design. To improve the power...