1
$\begingroup$

I was assigned a project in my intro to computer programming class. The goal is to implement a numerical model to some engineering or physics/science problem. The course uses Java.

An example might be a soccer ball's flight. I'm looking for something a little bit more interesting than just modeling gravity, air drag,.. and solving using Euler's.

I am interested in numerical optimization and I looked at some algorithms but I could not find any topic to which I could apply them.

Can you please shine me with some ideas?

Thank you.

$\endgroup$

3 Answers 3

1
$\begingroup$

There are many interesting ordinary differential equations (ODEs) that make for interesting model cases. For example, predator-prey models like the one by Lotka and Volterra make for interesting cases and can easily be generalized to simulate the dynamics of multiple, interacting species.

Similarly, modeling the gravitational interaction of multiple bodies makes for nice pictures.

Feel free to get inspired using the snippets I've got here on an intro math modeling course: http://www.math.tamu.edu/~bangerth/teaching.html#2010-fall-442

$\endgroup$
0
$\begingroup$

Expanding Wolfgang's answer, another place you can find ODEs is chemistry. A 0-D model, assuming Arrhenius rates of the form $A \cdot n_i \cdot n_j$ would lead to a set of non-linear ODEs. Once you got the solver setup and running, you could easily expand it to include more species and more reactions until you create something interesting enough for your purpose.

One warning though, depending on the system, the system may end up stiff, and therefore require an implicit solver. I am going to assume that implementing such a solver would be beyond the scope of your class, however, if you are making up fictitious rates, you should be able to avoid this. If allowed, and you want to, you can download an open source implicit library for java from netlib. Note: I haven't personally used this library, but just reading the readme, it appears well documented and fairly complete.

In your question you mention optimization, however that may be slightly more complicated than an ODE solver. If you do want to go that path however, you could look into something such as finding a local minimum to a scalar function of many variables ($y = f(\vec x)$). Again, it is hard to know if this would be too much or too trivial for your skill level. For reference, I would expect this in the second "programming" class for an engineer, likely taken in the 2nd or 3rd year and implemented in matlab.

$\endgroup$
0
$\begingroup$

Traveling Salesman problem is a great optimization problem. It's also a NP-hard problem which need global optimization. In order to solve the problem you have to try several heuristic optimization algorithm like Simulated Annealing and Evolutionary Algorithm which makes you familiar with the idea of global optimization.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.