# A program to simulate cellular automaton model

I have worked on mathematical modeling based on differential equations, and now I want to simulate a cellular automaton based on a system of mixed ode-pde coupled first order differential equations \begin{eqnarray} \dfrac{dR}{dt}(t)&=&v_r(R,t),\\ \dfrac{\partial v_r}{\partial r}(r,t)&=&\dfrac{R\sinh(r)}{r\sinh(R)}[1-\zeta_1\sqrt{\sigma_r^2(r,t)+2(\sigma_r(r,t)-\beta(r,t))^2}]-\epsilon[1+\zeta_2\sqrt{\sigma_r^2(r,t)+2(\sigma_r(r,t)-\beta(r,t))^2}]-2\dfrac{v_r(r,t)}{r},\\ \dfrac{\partial\sigma_r}{\partial r}(r,t)&=&-\dfrac{2\beta}{r},\\ \gamma(r,t)&=&\left(\dfrac{\partial}{\partial t}+v_r(r,t)\dfrac{\partial}{\partial r}\right)\beta(r,t),\end{eqnarray} where $\gamma$ is a given function depending also of $R,\;\sigma_r,\;v_r,\;\beta$ corresponding to a model with domain $\Omega\subset\mathbb{R}^2$ compact (and of course with the necessary initial and boundary conditions). But I am new in this and I have no idea of a programming platform or software (I'm not really sure how to say that) to achieve my goal.

Can anyone recommend a good program to simulate cellular automaton?

• Can you write the system of PDEs for your problem? – nicoguaro Feb 22 '17 at 18:54

As @BlaisB mentioned, Mathematica has quite a bit of stuff built-in to do cellular automata. You might want to check that out if you have a license. I find Mathematica to be very nice when something has library functions you can use, but if you can't solve the problem by easily stringing together library functions then I find Mathematica much tougher to use than other languages.

If you will need good performance, the ideal is to use Julia, C/C++, or FORTRAN. These days I would usually recommend Julia, but other scripting languages which can do this are Python, MATLAB, and even R.

But what language you use really doesn't matter all that much (except for performance. There is a difference between the languages in terms of performance which might matter if your PDEs are difficult to solve).

I believe Mathematica has some functionality for basic automatons. See for instance this reference: http://reference.wolfram.com/language/tutorial/CellularAutomata.html

However, if you wish to implement a complex cellular automaton, then you might have to program it yourself. If performance is not an issue, then a scripting language like Python can be ideal. If performance is an issue, than a C++/C/Fortran approach can extract the best performance out of your machine. However, this will all require certain programming skill.

What is the PDE you intend to solve with your cellular automaton?

• I edited my question, and thanks for your answer. – Fernando Feb 22 '17 at 18:36