ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 12 Jan 2011 06:28:44 +0100sage for aerospace engineeringhttps://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/Greetings,
I'm a aerospace engineering graduate student and a heavy matlab user. In aerospace engineering (controls, dynamics, navigation...) Matlab/Simulink is fairly standard both in academia and industry. I've been doing extensive looking searching for open-source alternatives, for reasons beyond this discussion.
I've come across multiple alternatives like Octave, Scilab, and Enthought's Python distrubution. After much reading, I been fascinated by Sage, but am wondering to what extent Sage is used for engineering applications. I get the feeling that Sage is primarily used by mathematicians and scientists, but haven't seen much discussion on usage by engineers for engineering applications.
Any insight in this regard would be appreciated,
-Hamid
Wed, 05 Jan 2011 11:14:24 +0100https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/Answer by cswiercz for <p>Greetings,</p>
<p>I'm a aerospace engineering graduate student and a heavy matlab user. In aerospace engineering (controls, dynamics, navigation...) Matlab/Simulink is fairly standard both in academia and industry. I've been doing extensive looking searching for open-source alternatives, for reasons beyond this discussion.</p>
<p>I've come across multiple alternatives like Octave, Scilab, and Enthought's Python distrubution. After much reading, I been fascinated by Sage, but am wondering to what extent Sage is used for engineering applications. I get the feeling that Sage is primarily used by mathematicians and scientists, but haven't seen much discussion on usage by engineers for engineering applications.</p>
<p>Any insight in this regard would be appreciated,
-Hamid</p>
https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?answer=11926#post-id-11926If you'd like a personal account of Sage being used in engineering, my fiance is a mechanical engineer at the University of Washington who is currently using Sage in her work. She does research in modeling chemical combustion reactors. (Or something like that.)
One of her main projects is to develop a reduced mechanism model of the reactions taking place. An approach she's looking into is a graph-theoretic approach: construct a digraph where the vertices are all of the major elements and molecules present in the reactor and the directed edges represent chemical dependencies / reaction directions. (E.g. formation of H20 requires the presence of hydrogen and oxygen.) The goal is to find a subgraph that models the reactor to a "close enough" accuracy from the full model.
Her work requires a substantial amount of numerics as well. Since Sage includes Numpy/Scipy (a powerful numerics package similar to Matlab) as well as powerful graph theoretic algorithms and interface, Sage has become her primary software fo choice for her research.
In general, I've found that many of my engineering colleagues use Matlab in their work. Numpy/Scipy is a free, open-source alternative. (You can use Numpy/Scipy/matplotlib independent of the Enthought Python Distribution via Sage.) They've all been more or less pleased when I showed them this Python-based alternative to Matlab. Also, I believe that Boeing has invited William Stein to give a talk or two about Sage at one of the Seattle/Everett plants so there exists some industrial interest in Sage as well.Wed, 05 Jan 2011 13:18:22 +0100https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?answer=11926#post-id-11926Answer by Felix Lawrence for <p>Greetings,</p>
<p>I'm a aerospace engineering graduate student and a heavy matlab user. In aerospace engineering (controls, dynamics, navigation...) Matlab/Simulink is fairly standard both in academia and industry. I've been doing extensive looking searching for open-source alternatives, for reasons beyond this discussion.</p>
<p>I've come across multiple alternatives like Octave, Scilab, and Enthought's Python distrubution. After much reading, I been fascinated by Sage, but am wondering to what extent Sage is used for engineering applications. I get the feeling that Sage is primarily used by mathematicians and scientists, but haven't seen much discussion on usage by engineers for engineering applications.</p>
<p>Any insight in this regard would be appreciated,
-Hamid</p>
https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?answer=11931#post-id-11931I'm a physicist running numerical simulations using Sage. Probably the biggest attractions of Sage for me is that you write in Python, a *real* programming language that's object oriented and has a nice syntax. I had no experience with Python before picking up Sage - I just couldn't handle programming in Mathematica any longer. Python has lots of code examples, snippets and libraries available.
The second biggest attraction of Sage is that it can call Mathematica/Matlab/octave/whatever functions, so if you don't want to port all your existing code over to Sage/Python immediately, then you can still get things done.
If you want parts of your code to run fast, then you can write them in Fortran and use f2py, or write them in C using Cython. Then the high level logic of your code can be written in a nice language, while the guts of your code still runs at full speed. Sadly, the guts of the code I use still lives in Fortran run by C MathLink driven by Mathematica, and I don't understand this inherited code well enough to port it.
I've actually mostly been using numpy/scipy/matplotlib over Sage's matrices and plotting - they do seem mostly geared towards mathematicians and the numpy/scipy/matplotlib alternatives are often more flexible. But Sage offers a very nice environment to use these tools, and occasionally native Sage functions prove invaluable to me.Wed, 05 Jan 2011 19:20:11 +0100https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?answer=11931#post-id-11931Comment by cswiercz for <p>I'm a physicist running numerical simulations using Sage. Probably the biggest attractions of Sage for me is that you write in Python, a <em>real</em> programming language that's object oriented and has a nice syntax. I had no experience with Python before picking up Sage - I just couldn't handle programming in Mathematica any longer. Python has lots of code examples, snippets and libraries available.</p>
<p>The second biggest attraction of Sage is that it can call Mathematica/Matlab/octave/whatever functions, so if you don't want to port all your existing code over to Sage/Python immediately, then you can still get things done.</p>
<p>If you want parts of your code to run fast, then you can write them in Fortran and use f2py, or write them in C using Cython. Then the high level logic of your code can be written in a nice language, while the guts of your code still runs at full speed. Sadly, the guts of the code I use still lives in Fortran run by C MathLink driven by Mathematica, and I don't understand this inherited code well enough to port it.</p>
<p>I've actually mostly been using numpy/scipy/matplotlib over Sage's matrices and plotting - they do seem mostly geared towards mathematicians and the numpy/scipy/matplotlib alternatives are often more flexible. But Sage offers a very nice environment to use these tools, and occasionally native Sage functions prove invaluable to me.</p>
https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?comment=22325#post-id-22325Concerning that last paragraph, I've seen many people use Sage for the same reason: it's a good Python interface. In fact, the Python-based finite element software, femhub (http://code.google.com/p/femhub/) uses a "standalone" version of the Sage notebook for its interface!Wed, 05 Jan 2011 19:26:51 +0100https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?comment=22325#post-id-22325Answer by mchamran for <p>Greetings,</p>
<p>I'm a aerospace engineering graduate student and a heavy matlab user. In aerospace engineering (controls, dynamics, navigation...) Matlab/Simulink is fairly standard both in academia and industry. I've been doing extensive looking searching for open-source alternatives, for reasons beyond this discussion.</p>
<p>I've come across multiple alternatives like Octave, Scilab, and Enthought's Python distrubution. After much reading, I been fascinated by Sage, but am wondering to what extent Sage is used for engineering applications. I get the feeling that Sage is primarily used by mathematicians and scientists, but haven't seen much discussion on usage by engineers for engineering applications.</p>
<p>Any insight in this regard would be appreciated,
-Hamid</p>
https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?answer=11944#post-id-11944Thanks for the input - I found the notes for the [Boeing lecture here](http://modular.math.washington.edu/talks/). I've read from others as well that they chose python/sage over programs like Matlab because it is an actual programming language. From my experience, many engineers (aerospace, mechanical, others...) have minimal backgrounds in programming and therefore the simplicity of languages like those offered by Matlab are very attractive. It allows them to focus more on the actual problem and less on the programming techniques.
After using Matlab, I admittedly find python/sage languages to be more complicated. Even the side-by-side code comparisons show Matlab code being generally shorter in length. Those that have a programming background can better appreciate and take advantage of the richness of the Python language. But for others without that background, the same 'richness' can prove to be a hurdle. Nevertheless, I'm still optimistic about integrating sage/python into my work.
Sat, 08 Jan 2011 13:50:34 +0100https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?answer=11944#post-id-11944Comment by cswiercz for <p>Thanks for the input - I found the notes for the <a href="http://modular.math.washington.edu/talks/">Boeing lecture here</a>. I've read from others as well that they chose python/sage over programs like Matlab because it is an actual programming language. From my experience, many engineers (aerospace, mechanical, others...) have minimal backgrounds in programming and therefore the simplicity of languages like those offered by Matlab are very attractive. It allows them to focus more on the actual problem and less on the programming techniques. </p>
<p>After using Matlab, I admittedly find python/sage languages to be more complicated. Even the side-by-side code comparisons show Matlab code being generally shorter in length. Those that have a programming background can better appreciate and take advantage of the richness of the Python language. But for others without that background, the same 'richness' can prove to be a hurdle. Nevertheless, I'm still optimistic about integrating sage/python into my work.</p>
https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?comment=22295#post-id-22295If your background is primarily Matlab then I highly suggest looking at Numpy/Scipy for performing similar computations (i.e. numerics) instead of pure Python or, in some instances, Sage. The Numpy/Scipy developers try to match the functionality and syntax of Matlab while keeping everything "Pythonic". Even though Python is considered to be a "rich" language it's much easier to learn than a low-level language like C/C++ or FORTRAN. Give it a shot! :)Wed, 12 Jan 2011 06:28:44 +0100https://ask.sagemath.org/question/7842/sage-for-aerospace-engineering/?comment=22295#post-id-22295