26

There are a few ways to conserve energy during ODE integration. Method 1: Symplectic Integration The cheapest way that is to use a symplectic integrator. A symplectic integrator solves the ODE on a symplectic manifold if it comes from one, and so if the system comes from a Hamlitonian system, then it will solve on some perturbed Hamiltonian trajectory. Some ...


16

One of the leaders in the field of using CFD for animation, Ron Fedkiw, had a web page with some fantastic examples, including references to the relevant publications.


13

Atmosphere and ocean have highly-stratified flows in which the Coriolis force is a major source of dynamics. Maintaining geostrophic balance is extremely important and many numerical schemes are intended to be exactly compatible (at least in the absence of topography) to avoid radiating energy in gravity waves. Due to the stratification, limiting vertical ...


11

To get something that looks realistic for planetary orbits, you shouldn't use the forward or backward Euler methods. These will cause your planets to spiral outward or inward. You should use a symplectic method. You may also need to adjust the timestep to be smaller when two bodies are very close to each other. Read Chambers (1999) A hybrid symplectic ...


11

Both the standard cluster and custom supercomputer (Anton) versions of molecular dynamics at D. E. Shaw Research are both deterministic and parallel invariant. That is, a test run on a single core generates the same bits as a massively parallel run. The techniques include Integer summation: Although each force term is computed in floating point, the total ...


11

I maintain (and am the main coder of) a simulation software that has been developed for ~8 years and is used by few hundreds people. It all started as a side project during my PhD, and it clearly outgrew itself. It is both over- and under-engineered: the architecture of some parts is too complicated for their own good, whereas some other parts (whose ...


10

A good introduction to how issues of element shape influence quality and ease of solution, with pictures, is Jon Shewchuk's "What Is a Good Linear Finite Element? Interpolation, Conditioning, Anisotropy, and Quality Measures" http://www.cs.berkeley.edu/~jrs/papers/elemj.pdf


10

The problem you describe, how to prescribe non-reflecting or absorbing boundary conditions when solving partial differential equations (PDE) has been extensively studied. For complex (e.g. nonlinear) systems of PDE and general boundaries, it can be quite challenging and is something of an ongoing research problem. You can find many references on the topic, ...


9

There was a paper in Notices of the American Mathematical Society on this subject: Crashing Waves, Awesome Explosions, Turbulent Smoke and Beyond: Applied Mathematics and Scientific Computing in the Visual Effects Industry. In particular, these commercial packages constitute examples of simulation software used in the film industry.


9

256 equations is a relatively small number. All of the usual integrators, such as those included in Matlab, Maple or Mathematica should have no real problem with equations of this size and should be able to return answers in a fraction of the time it would take an algorithm you would implement yourself, because they use sophisticated explicit/implicit and ...


9

Any general-purpose ODE solver should be able to handle this linear coupled system of ODE very easily, for example: scipy.integrate.ode CVODE from the Sundials solver suite; it appears to have Python bindings here, and perhaps there are others. This kind of thing is typically discussed in any textbook on numerical methods. In general, computing the matrix ...


9

"developers lack the skills". Maybe. I think it's much more likely that the developers lack the incentives. Making solid code is difficult and expensive and, in academia, comes with minimal-to-negative reward. You're asking for a list of things of guidelines, but all of your examples are specific to the technical situation, not the social situation. That'...


9

Up until a couple of decades ago, science was based on two large pillars. Those were theory and actual physical experiments. It is an exciting time to see a third pillar arise with numerical simulations. In between pure theory and expensive real-world experiments, we can now run simulations! When it comes to these simulations, you may observe two types of ...


8

Since the size of each type of atom is fixed, for a given level of accuracy the asymptotic cost is dominated by far field electrostatic interactions. These are $O(n)$ using multigrid and $O(n \log n)$ using FFTs. Thus the optimal complexity is $O(n)$ per time step as a function of the number of atoms simulated. The time step is also asymptotically ...


8

One commonly used approach is the "Response Surface Method" in which you sample the feasible region, running the full simulation at the sample points, then use regression techniques to fit a surrogate model to these points. You'll be assuming that the response in between your sample points is relatively smooth. Once you've fit that surrogate model, you ...


7

Conventional integrators do not preserve the "shape" of phase space, leading to systematic energy gain or loss, thus you should consider "sympelectic" integrators. For close encounters, you should consider the method of Chambers (1999) A hybrid symplectic integrator that permits close encounters between massive bodies.


7

Our Matlab package SnobFit was created precisely for this purpose. No assumption about the distribution of the noise is needed. Moreover, function values can be supplied through text files, thus you can apply it to functions implemented in any system able to write a text file. See http://www.mat.univie.ac.at/~neum/software/snobfit/ SnobFit had been ...


7

There are several Bayesian optimization techniques you could try. Easiest are based on Gaussian process: Harold J. Kushner. A new method of locating the maximum of an arbitrary multipeak curve in the presence of noise. Journal of Basic Engineering, pages 86:97–106, March 1964. J. Mockus. The Bayesian approach to global optimization. Lecture Notes in Control ...


7

Model Exchange vs. Co-Simulation This depends on how you export your FMUs: You can either use FMI for model-exchange or FMI for co-simulation. In the model-exchange scenario, the FMU contains only the model and no solver. Therefore the solver of the importing simulator is used. In the co-simulation scenario, the FMU contains both the model and a solver. ...


7

Have you had a look at VMD? I used it ages ago to produce movies from simulation snapshots. Way back then, it could read a sequence of PDB files, render them (or generate POV-Ray scripts to raytrace them), and store them as individual images. I then used mencoder to generate MPEG-4 files out of the stills. Those were the days. I haven't used VMD since, but ...


6

The dealiasing of the convolution doesn't act as numerical dissipation. In fact, energy is conserved only if you kick out the aliased terms. The idea behind dealiasing FFT-based convolutions is to get rid of extra terms that are added by the FFT. A convolution is just a sum, and you can compute it by just calculating the sum. However, this is really slow, ...


6

(actually the comments provide an answer to your question, but this is additional information). 1) http://qblade.de.to/ This is a link to a free software called as QBlade. It is a wind turbine design and optimization software with emphasis on blade design (using XFOIL). This might come useful in designing/ optimization the rotor blades. What can it be ...


6

Disclaimer: most of this is purely opinion. In the $600 range for a whole computer, I'm not sure that processor matters all that much, as long as the architecture is x86. If you want to run simulations locally, memory would probably be the first thing that I'd look at spending money on, and since the main use of the computer is scientific computing, you'll ...


6

(1) Using the previous value of $\ddot{r}_j$ is like adding an error term to the r.h.s. of your equation of magnitude $\mathit{const}\times(\ddot{r}_j(t+\delta t) - \ddot{r}_j(t))$, meaning your scheme will only be first-order correct, regardless of whether the integration method you use has a higher order. (2) I believe what you are describing is similar ...


6

There is a recently published paper addressing the question of what is the optimal combination of hardware on which to run GROMACS: Kutzner, C., Páll, S., Fechner, M., Esztermann, A., de Groot, B. L., & Grubmüller, H. (2015). Best bang for your buck: GPU nodes for GROMACS biomolecular simulations. Journal of Computational Chemistry, (Spp 1648). doi:10....


6

A first step, if you "have never been up in computing", is to read the literature and see what others are doing and have done. The second step is that you will likely learn that what you want to do is not possible today -- at least unless you have access to supercomputers. I suspect that 3 billion particles is possible today, but only if you have access to ...


5

You have a stiff system with the current formulation. The dynamic stretching and vibration in the string are (presumably) uninteresting, but they control the explicit time step. This indicates using an implicit time integration method. You can use damping to prevent the oscillations which will tend to mess up adaptive error control for the implicit method. ...


5

A fantastic introductory book (final year undergraduate to graduate level) for simulation of electron and holes in semiconductor is, Fundamentals of Carrier Transport by M. Lundstrom. The book covers difference techniques of solving the Boltzmann transport equation and it has a chapter on Monte-Carlo. It should provide you with an overview of the relevant ...


5

Speaking from a computational electromagnetics background, I think it is a very elegant way to discretize problems. I have used it with success in eigenmode and boundary value problems. It is probably less accurate than a strict finite element discretization if you go with diagonal Hodge stars (lumped mass approximation), but I think it still achieves the ...


5

You could try using a library that implements the Fast Multipole Method (FMM), which should drastically reduce the amount of memory you need and will decrease the complexity of matrix-vector products from $\mathcal{O}(N^{2})$ to $\mathcal{O}(N)$. It is difficult to implement, but there should be some libraries out there. Another algorithm for N-body ...


Only top voted, non community-wiki answers of a minimum length are eligible