# Questions tagged [simulation]

Simulation is the process of mimicking the behaviour of a real physical process or system using a representative model.

210 questions
Filter by
Sorted by
Tagged with
3k views

### Physics Simulation in C++

OK, I know a bit of C++ (very basic syntax), and I want to do physics simulation in C++, like stuff like (also the things mentioned here): Ripples and waves over a 2-d surface Vibrating string/...
52 views

### Magnetostatic modelling Radia: Increasing distance between magnets a produces positive force until a certain point, beyond which force goes haywire

I have two sets of magnets. One set consists of two electromagnets (Shown below: Blue) and the other set consists of two NdFeB N40 permanent magnets. Both sets of magnets lie on the same plane. I want ...
248 views

### Mean-squared displacement in Monte Carlo studies

Is measuring mean-squared-displacement in Monte Carlo simulations uncommon? I'm very interested to find out if this has actually ever been tried. For instance, in the context of spheres, or ...
195 views

### Simulation of surface tension-dominated interfaces

I want to simulate the shape of the free surface in a small fuel tank in microgravity, which is very slowly being emptied. The tank is not symmetric, the geometry is given by CAD (e.g. step file). ...
62 views

### On which software can I simulate landmass collisions?

I need to be able to set the properties of the materials (density, size etc) and see what happens according to laws in Physics when landmasses collide each others, with or without bodies of water, ...
113 views

### Finite-volume method applied to a particular advection equation

I'm trying to apply the finite-volume method (FVM), with which I'm not so familiar, so a simple 1D PDE equation. I already asked this question in the math stackexchange, but was told that it could be ...
127 views

### Combine Hydrodynamics and Electromagnetics

Is it possible, in general, to combine hydrodynamical motion and expansion of material with, say, a finite difference time domain method to simulate light-matter interaction? If so, how is this done ...
168 views

### Discussing the energy spectrum of Langevin Dynamics simulation of many atoms

UPDATED I've coded a multiparticle MD simulation in 3D. It is based on Langevin Dynamics, with random impulse and dissipation. I think the program works correctly now? I have attached the plots of ...
105 views

### Sampling simulation steps logarithmically

The common case of for instance a Monte Carlo simulation is, if we want to run our simulation for $N$ steps, we define a delta $\Delta,$ such that $N/\Delta = n$ tells us the frequency with which we ...
123 views

### Diffusion properties of hard spheres in Monte Carlo simulation

In standard Monte Carlo simulations, say for hard sphere systems, how should one compute the mean-squared displacement of the spheres in order to extract dynamical properties such as the diffusion ...
61 views

### Dealing with simultaneous collisions in N-body sim

I have written an 2d N-body simulation in Python which allows collisions between the bodies. A body is modeled as a circle whose area is proportional to its mass. Each time the sim advances by one ...
21 views

### Does excitation type matter in a time-domain simulation/computation of a transfer function of an LTI system?

Let's say I am running a FDTD simulation of a wave-equation to determine a transfer function of an LTI system: \begin{equation} H(f) = \dfrac{Y(f)}{X(f)}\ \end{equation} where $Y(f)$ and $X(f)$ are ...
108 views

### Oil/Water interface simulation using GROMACS

I would like to perform a decane/water(tip4p) interface simulation using GROMACS to analyse the fluctuation of the interface over a long period of time (50ps - 1ns). Though I have a rough idea on ...
67 views

### Why can we predict global temperatures years ahead but we cannot reliably predict weather weeks ahead?

In case of global temperatures we are interested in aggregate values rather than local distributions. Is this the reason we can accurately predict one but not the other?
39 views

### Simulating periodic boundary condition with long_range interaction

Consider 2 particles in a 2D plane. There is a long-range interaction between two particles: $$f (r_i-r_j)= \frac{\vec{r_i} - \vec{r_j}}{|r_i-r_j|^3}$$ $$\vec{r_i} =(x_i,y_i)$$ $r_i$ determines the ...
60 views

### Applying pressure on simulation box

We have a 3D simulation box (cubic, side $L$) filled with $N$ non-overlapping objects (say spheres). We are interested to study the evolution of the system under an applied pressure in the z-direction ...
89 views

### Questions about implementing an electromagnetism/photonics solver package

I am hoping to start (very slowly) on implementing some form of a computational photonics/electromagnetism package. I know things like Meep, S4, FDTD++, EMPy, and a host of other proprietary/free/...
424 views

### 2D simulation of a particle with different diffusion coefficient in different directions of the particle

How can one simulate diffusion of a particle which has a natural axis and diffusion coefficient of the particle in the direction of the axis is D_1 and in perpendicular to the axis is D_2? Could ...
89 views

### Multiscale Simulation of random walker

I want to simulate a system of random walkers (called A) with diffusion coefficient equal to D and other systems of random walkers (called type B) with diffusion coefficient equal to 1000 D. Second ...
103 views

### 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 ...
202 views

### How do I simulate an open end?

When simulating a partial differential equation describing a physical phenomenon like vibrations on a string, fluid flow in a chamber or quantum wave functions, the most straight-forward way is to ...
157 views

### GAMS Optimization

I am writing a GAMS program where I am interested in using the value of a variable as a condition inside an another equation. Let's say I have two equations with two variables, $g_1(t)$ and $g_2(t)$, ...
88 views

### Should energy be conserved in an N-body simulation where particles don't lose energy in collisions?

In an N-body simulation where forces between particles are attractive and particles do not lose energy on colliding with walls or each other, should energy be conserved? How could it be, with total ...
301 views

### Simulating a Hill-Type muscle model

I'm trying to do biologically based locomotion animation. I have a Hill-Type Muscle Model (see reference 1) that I've implemented in code. I can find the initial lengths of the tendons, then do a step ...
69 views

### Dielectric in an external electric field

I want to numerically solve for electric field of an object in an external electric field. The object has linear displacement field such that its permitivity ($\epsilon$) is constant. The object's ...
103 views

### Infinite force in simulation [closed]

In physical problems the infinite force is easily implemented by the mathematical form of that force, take $1/r$ as an example, whenever the distance between two particles becomes small the force goes ...
70 views

### RCWA for Non-Periodic Structure?

I have a quick question regarding Rigorous Coupled Wave Analysis (RCWA) for numerically solving problems (in optics). I am trying to simulate a device which is non-periodic in x, y directions (but is ...
279 views

### Error in MD simulation with Lennard-Jones potential in C, resulting in a lack of conservation of energy

I'm working on a MD simulation using the Lennard-Jones potential and the Velocity Verlet algorithm. The code compiles and runs, but the energy for each time step is not conserved; it decreases ...
133 views

### How does Multi Body Dynamics software work for flexible joints?

I need to model a "fishing rod" in 2 dimensions by joining several "rigid sticks" by flexible/elastic joints. The joints act as plate/torsion springs with different spring constants. The "fishing rod" ...
491 views

### Three body problem in C++

I am in a begginers programming course and we got a little project. I chose to simulate the three body problem using the Euler method. Even though the system is chaotic there are some special cases ...
170 views

### Initial conditions of nbody problem

Note: I have edited the original question to try to be clearer. I'm trying to simulate a gravitational nbody problem with a Barnes-Hut algorithm, in which the bodies start in a homogeneous sphere ...
81 views

### Convergence Criteria for Two Fluid Flow Solver

Which one of the following is suitable for judging convergence in Two-Fluid Flow Solver? 1) Absolute Residual (L^2-Norm). 2) Relative Residual. 3) Fraction Change in Velocity, Pressure and Volume ...
376 views

### Mobile robot path following using model predictive control (MPC)

I'am trying to implement a path following algorithm based on MPC (Model Predictive Control), found in this paper : Path Following Mobile Robot in the Presence of Velocity Constraints Principle: ...
120 views

### CFD implementation in software [closed]

I've been learning CFD theory for 4 months (which includes FEA, FDM AND FVM) and now I want to start running simulations. As a novice to CFD software, I would appreciate some advice on where to start, ...
166 views

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

I am in the process of building a robotics physics engine. I have been using the Linear ODE $x' = Ax + b$ for the core of my physics integration, but have never found a really good solution method for ...
879 views

### Simple Simulation Examples in Computational Fluid Dynamics

I would like to incorporate a CFD topic in a project I currently have. The deadline is a little less than a month from now. Basically, what I would like to do is solve some equations and simulate ...
396 views

### Help understanding and implementing fast multipole method for N-body

I've been trying to understand the Fast Multipole Method but not really getting anywhere. It seems like the fastest mainstream N-body simulation algorithm, and I would like to implement it in an ...
83 views

### $(1+x^M)^{1/M}$ need to be able to calculate any order derivatives vs. $x$ and $M$ for $x\ge 0$ and $M\gt 2$

cannot delete my own question, so I try to overwrite it instead...
63 views

2k views

### Good desktop PC for molecular dynamics simulations

I want to build a new desktop PC for MD simulations of relatively simple protein/carbohydrate systems using mainly GROMACS and Amber force field. No ab initio or QM-MM simulations are intended for now....
842 views

### BiCopter simulation in Matlab

I derived a bicopter dynamical model with two servos and two BLDC motors. And now am trying to simulate it using Matlab. As base for simulation I used this paper and this code Unfortunately, the ...