28 votes
Accepted

Conserving Energy in Physics Simulation with imperfect Numerical Solver

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 ...
Chris Rackauckas's user avatar
12 votes

What guidelines should I follow for simulation software projects?

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 ...
lr1985's user avatar
  • 677
12 votes
Accepted

What guidelines should I follow for simulation software projects?

"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-...
Richard's user avatar
  • 3,891
10 votes
Accepted

How do I simulate an open end?

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) ...
Bill Greene's user avatar
  • 5,954
10 votes

Why not use the convolution theorem for explicit timestepping?

This is a linear PDE, and so while this technique works here, it would not work for any nonlinear PDE. Often times when people are solving these equations it is to get experience with common solution ...
EMP's user avatar
  • 2,069
9 votes

Methods for solving $x'=Ax+b$ for small, sparse, singular $A$

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 ...
Kirill's user avatar
  • 11.4k
8 votes

Optimization techniques for expensive multi-variable functions

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 ...
Brian Borchers's user avatar
8 votes
Accepted

What kind of a researcher am I?

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 ...
MPIchael's user avatar
  • 2,621
7 votes

Maximizing unknown noisy function

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 ...
Memming's user avatar
  • 870
7 votes

Physics Simulation in C++

I think you are missing a very important and crucial step that lies exactly between the physics and simulation: the mathematical model. In order to model any physics, one has to formulate the ...
Anton Menshov's user avatar
  • 8,592
6 votes

Good desktop PC for molecular dynamics simulations

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.,...
Juan M. Bello-Rivas's user avatar
6 votes
Accepted

Solve implicit ODE numerically in orbit simulation

(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 ...
Kirill's user avatar
  • 11.4k
6 votes
Accepted

MD Simulation: Reference for the Neighbor's List Method

I'd recommend "The Art of Molecular Dynamics Simulation" by D. C. Rapaport. The code samples are written in C. I'm not a huge fan of the programming style of the book, but at least it's not ...
lr1985's user avatar
  • 677
6 votes

How to simulate over 1 billion particles?

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 ...
Wolfgang Bangerth's user avatar
6 votes
Accepted

Artificial Intelligence, Modeling and Simulation

So bottom line is I don't see any comprehensive work on the use of AI in M&S as a whole, let's say having models that can learn how to produce new improved models using the existing models. There'...
Chris Rackauckas's user avatar
6 votes

Starting configuration for Molecular Dynamics

Usually one needs to employ periodic boundary conditions (at least in the horizontal directions). Any atoms which fly outside of the box will be mapped to the opposite side. This also has to be ...
MPIchael's user avatar
  • 2,621
5 votes
Accepted

Mean-squared displacement in Monte Carlo studies

This is possible (see [1]) but uncommon, as it requires Monte Carlo moves that alter the current conformations by a very small perturbation. In that setting of "small" Metropolis MC moves, it is ...
Juan M. Bello-Rivas's user avatar
5 votes

Mean-squared displacement in Monte Carlo studies

It is in some cases possible to map the dynamics obtained in MC simulations to other (more realistic) dynamics, especially for the case of dense colloidal suspensions. The following two papers talk ...
lr1985's user avatar
  • 677
5 votes
Accepted

Simulation-based Optimization vs PDE-constrained Optimization

Both approaches apply to the same problem (numerical minimization of functionals which involve the solution of a PDE, although both extend to a larger class of problems). The difficulty is that for ...
Christian Clason's user avatar
5 votes

What scientific problems can be simulated that couldn’t be simulated 10 years ago?

This report on exascale computing from the DOE might be useful: https://science.energy.gov/~/media/ascr/ascac/pdf/reports/Exascale_subcommittee_report.pdf
EssentialAnonymity's user avatar
5 votes
Accepted

Can one publish a new model and simulation without physical experiments?

The short answer is: it depends. Some journals have a requirement or a guideline to have experimental results that corroborate the numerical simulations. For example, IEEE Transactions on Microwave ...
Anton Menshov's user avatar
  • 8,592
5 votes
Accepted

N-body problem with differents solvers (RK2, RK4, Euler symplectic, Stormer-Verlet) : planets drift to infinity

All-over this is a nicely structured code. The main problems are related to the Runge-Kutta solvers, where the first-order system was not uniformly applied to the computation. What is obviously wrong ...
Lutz Lehmann's user avatar
  • 5,204
5 votes

Why not use the convolution theorem for explicit timestepping?

For the linear, constant coefficient advection equation on a torus, one can simply use the exact solution. So there are no "popular" numerical methods for this problem.
David Ketcheson's user avatar
5 votes

What evidence exists to suggest that computational science produces more information than studying real phenomena as they are?

This is the nature of science, at least the more physical ones. You have a hypothesis about some object. You devise some experiment that would highlight this hypothesis the clearest, with the least ...
Lutz Lehmann's user avatar
  • 5,204
4 votes
Accepted

Sorting eigenvalues by the dominant contribution

You'd like to sort eigenvalues/eigenvectors in a way that is continuous as you move through momentum. This highly constrains the sorting - for most k-points, you must sort the eigenvalues to be a ...
deemaregee's user avatar
4 votes

Simple Simulation Examples in Computational Fluid Dynamics

There are many simple cases that you could look at, e.g. 2D-flow over a backward-facing step. Lid-driven cavity flow. (Inviscid) wave resistance of thin ships or travelling pressure distributions. ...
Lysistrata's user avatar
4 votes
Accepted

What do C, C++ and Java have that Fortran 2003 don't?

One thing that C++ includes that Fortran doesn't have is extensive support for generic programming and compile-time code ...
Darren Engwirda's user avatar
4 votes
Accepted

Is model-view-controller useful pattern useful to build scientific simulation programs?

This answer is my personal opinion. I believe that high performance numerical solvers are not a good place to use MVC pattern. Additional layers and specific data flow will not help to get a better ...
Krzysztof Bzowski's user avatar
4 votes

What are the things I should keep in mind before doing an analysis of my gromacs simulation?

I think that this question is too generic for a complete answer, as the latter would depend entirely on what you are simulating and what observables you are interested in. The only things that come to ...
lr1985's user avatar
  • 677
4 votes

Is saying "math modeling and numerical simulation" wordy and redundant?

The obvious answer is "it depends". However, it's not helpful. I would certainly separate the work in mathematical modeling and actual numerical simulation. Sometimes it might be a bit tough to draw ...
Anton Menshov's user avatar
  • 8,592

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