Questions tagged [simulation]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
61 views

Iteratively refine bounds on exp for Metropolis criterion

In Monte Carlo simulations, using the Metropolis criterion, one often has to compare a random number $a$, $0 \leq a < 1$, to the Boltzmann distribution $exp(-\beta\Delta E)$, where $\Delta E$ is ...
4
votes
1answer
433 views

Verlet Leap-frog Method of approximating orbits

I found the following simulation of an orbit given the semi-major axis of the ellipse, eccentricity, initial velocity, the mass of the object being orbited, and initial position of the orbiting ...
4
votes
2answers
455 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 ...
4
votes
1answer
1k views

Numerically solve a PDE in Python with a term calculated by coarse-graining

I'm trying to solve a PDE in Python of the form, $\dfrac{\partial c(\mathbf{x}, t)}{\partial t} = \mathrm{D} \nabla^2 c(\mathbf{x}, t) -\gamma \rho(\mathbf{x}, t) c(\mathbf{x}, t)$ where $c$ ...
4
votes
0answers
100 views

Tracking for two meshes

I'm dealing with physical simulation (position based dynamic). Now I'm trying to realize tracking for two meshes. In order to explain what does it mean, let's assume that we have two similar meshes: ...
4
votes
0answers
235 views

Sound Waves Simulation in 3D Environment

I want to do a simulation of sound waves including wave propagation, absorption, and reflection in 3D space. I did some research and I found this question in stackoverflow but it talks about ...
4
votes
0answers
113 views

What are the governing equations solved in coupled atmosphere-ocean models?

In (hydrostatic) atmospheric general circulation models, for example the so-calle Primitive Equations, consisting of the horizontal momentum equation, the hydrostatic balance, the continuity equation, ...
3
votes
4answers
571 views

Finding a molecular dynamics visualization library for C

I asked this question over at stackoverflow, and got blasted for it. I am currently working with legacy MD code written in C that my university uses, and haven't moved to a more modern library like ...
3
votes
2answers
103 views

Optimization techniques for expensive multi-variable functions

I'm working with a finite element model in which I'm interested to minimize the average temperature at a surface. I have 15 independent variables in my model, including geometry, materials, flows, ...
3
votes
1answer
115 views

Solve implicit ODE numerically in orbit simulation

I'm trying to plot the orbit of a compact binary star system where general relativistic effects become important. I'm using post-Newtonian approximation and I want to solve the orbit numerically based ...
3
votes
1answer
94 views

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

When I read strong papers from, say, the Journal of Fluid Mechanics, a simple model, simulations and physical experimental results are given, showing good agreement. Can one publish a new model and ...
3
votes
1answer
214 views

Is using Monte Carlo method a good approach for solving Boltzmann equation?

I'm trying to solve for electron and hole distribution function using Boltzmann equation with various scattering mechanisms. Since I land up with an integro-differential equation, analytical solution ...
3
votes
2answers
2k views

GPU-enabled Lattice Boltzmann solvers?

Is anybody aware of any GPU-enabled Lattice Boltzmann solvers (preferably on C++/OpenCL and open-source) that would be recommended? I have found Advanced Simulation Library, but it seems to be very ...
3
votes
2answers
870 views

Simulating laminar fluid flow in microfluidics device

I just started working in a lab that is trying to design microfluidics devices to trap and manipulate colonies of E. coli cells. Given a 3D model of such a device created in Autodesk Inventor (or a ...
3
votes
2answers
191 views

Earth and Moon computer simulation

Edit: I made a test model with 2 bodies. The sun and earth or w/e. But I now have the problem of zero divisions every time that one of the coordinates is zero. ...
3
votes
1answer
150 views

How to add perturbation to a base state in physical grid space?

For study 3D instabilities problem i.e a base state (velocity field and temperature field) and an additional perturbation. The method must be independent of the type of instabilities considered but ...
3
votes
1answer
114 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 ...
3
votes
1answer
483 views

How to model the mixing of two fluids in a container?

In the context of a research project of mine, I am faced with the difficult task of modeling the mixing of two fluids in a container. I would like to achieve the following: Given a container (...
3
votes
1answer
649 views

Pressure projection method boundary conditions

When using the pressure projection method to solve the incompressible Navier-Stokes equations do we apply Neumann boundary conditions for pressure only where there are associated no-slip velocity ...
3
votes
1answer
1k views

Euler's equations for a tube with varying cross-section

$\def\pd{\partial}$ $\def\l{\left}\def\r{\right}$ $\def\mdot{{\dot{m}}}$ $\def\eps{\varepsilon}$ Consider a tube with longitudinal coordinate $x$ from $0$ to $l$ and varying cross-section $A(x)$. ...
3
votes
1answer
184 views

Use of random numbers in the Metropolis algorithm

In the Metropolis algorithm, we accept or reject based on following criterion in the $NVT$ ensemble: $$ e^ {(E_{\text{new}} - E_{\text{old}})\,/ \,kT } \ge \text{random}(0,1). $$ Why does the ...
3
votes
1answer
79 views

Computing autocorrelations of configurations in Monte Carlo simulations

In the context of Monte Carlo simulations, I am trying to learn how I should ensure that the configurations of my system are not correlated for the chosen interval of measurements. I have found out ...
3
votes
1answer
95 views

Calculating the Convolution Using DFT (FFT)

I have the following convolution as part of a numerical simulation. $$T(r)=\int \mathrm{d}^3r_2\, p(r_2)f(r_2)\alpha(r-r_2)\, .$$ My problem is that the analytical expressions for $f$ and $p$ do ...
3
votes
1answer
63 views

Radiation heat transfer between surfaces

I'm trying to model the temperature distribution over a curved surface. Apart from the heat equation, I need to take into account the energy emission/absorption through electromagnetic radiation. The ...
3
votes
1answer
389 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: ...
3
votes
1answer
88 views

numerical inaccuracy ellipsoid-ellipsoid collision

I am trying to implement ellipsoid-ellipsoid collision in my C++ code. Briefly this task can described as next: Let's assume that we have two arbitrarily oriented ellipses in the in space and this ...
3
votes
1answer
99 views

Simulating evolution of comet

I have to present a working 3D simulation of an arbitrary comet in a close proximity to the Sun or to the Jupiter. In specific, I want to simulate comets D/1993 F2 and C/2011 W3, using the theoretical ...
3
votes
2answers
844 views

How to simulate basic semiconductor models using the Drift-diffusion model on Python?

I'm trying to simulate basic semiconductor models for pedagogical purposes--starting from the Drift-diffusion model. Although I don't want to use an off-the-shelf semiconductor simulator--I'll be ...
3
votes
1answer
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 ...
3
votes
1answer
364 views

Finite difference scheme for 2D sound propagation

I am simulating the sound wave propagation in non-rectangular and asymetric spaces using finite-difference method. I presume linear acoustics equations to be enough (i.e. $\Box p = 0$, $\Box \vec{v} = ...
3
votes
0answers
45 views

Spectral solver on em-pic

I'm recently studying for the spectral solver to implement EM-PIC code. I read an article and have some questions. Many PIC codes uses spectral solver to overcome numerical artifacts on FDTD. In the ...
3
votes
0answers
96 views

Is it normal to expect the error of simulation of a damped harmonic oscillator to decrease as the damping factor decreases?

I am simulating a damped harmonic oscillator using the RK4 method of numerical integration. I am comparing the simulated results with the analytical ones (for the free evolution case) and obtaining ...
3
votes
0answers
55 views

Discretizing boundary conditions for vortex methods

I am working on a fluid simulation using vortex methods. For this I must compute the vortex sheet on my boundaries given as: $$ \gamma(\mathbf{x}) - \frac{1}{\pi}\int_S \frac{\partial}{\partial\mathbf{...
3
votes
0answers
241 views

N-body simulation for particles

I would like use N-body simulation for measure a torque on an object in a liquid (helium). It's a 2D study. On the site : http://www.browndeertechnology.com/docs/BDT_OpenCL_Tutorial_NBody-rev3.html I ...
3
votes
0answers
209 views

How to estimate if a velocity field is statistically homogeneous?

For a 3D velocity field $\mathbf{u}$ obtained by direct numerical simulation. Assuming that the field is defined on a periodic domain $\mathcal{P}$ of periodicity $L_x$ in the $x$ direction, $L_y$ ...
3
votes
1answer
382 views

General case Kutta condition

I'm working on a 2D inviscid fluid simulation using a "panel method", with Potential being used to enforce the no-through boundary condition. I'm trying to incorporate the Kutta condition, which says ...
2
votes
1answer
208 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 ...
2
votes
2answers
226 views

Which processor should I consider buying for a desktop built for scientific computing?

I run Python/C simulations for biological problems, so the range of computational tasks can be broad. Here are some examples: 1) continuum model simulations: FEM type 2) agent-based simulations: ...
2
votes
1answer
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 ...
2
votes
2answers
572 views

Should a colorbar have constant values throughout a simulation?

The default option for matplotlib's pcolormesh (also true for VisIt and I think also true for Matlab) is to allow the maximum and minimum of a colorbar vary. Which ...
2
votes
2answers
157 views

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

I work with scientific simulation, but what I like the most in programming is creating graphical user interfaces and 2D or 3D outputs to visualize the evolution of the simulations. I know most input ...
2
votes
1answer
79 views

Symplectic linear multistep method?

I'm doing a gravitational n-body simulator and I'm thinking of implementing linear multistep methods like Adam-Bashforth. But is there any symplectic multistep methods?
2
votes
1answer
493 views

MD Simulation: Reference for the Neighbor's List Method

With a rather basic knowledge in C++, I have written my own MD simulation code. Currently, I calculate forces in the most naive way: I go through all the atoms and account for their interactions. This ...
2
votes
1answer
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...
2
votes
1answer
992 views

Particle Tracking Code - MATLAB vs. C++

First some background, I am a mathematician by training with very little formal training in programming. I am most comfortable in MATLAB and have been working with it for a long time. My second choice ...
2
votes
1answer
213 views

How are collisions detected in simulations?

I want to understand how does the simulation identifies and models when two bodies are colliding with each other. For example car crash simulation. The car moves towards the wall or another crash. ...
2
votes
1answer
142 views

build a simple incompressible solver with spectral method

I am trying to build a simple solver for the incompressible fluid in a periodic box to learn the spectral method. I am following the textbook (Peyret R. Spectral methods for incompressible viscous ...
2
votes
1answer
135 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" ...
2
votes
1answer
69 views

Is it common or to use objects for calculation of pair interactions in physics and chemistry simulations?

When simulation atoms, molecules, colloids, autc., are there programs that define each interacting unity as an object in the OOP sense? In my own case, I've been simulating magnetic nanoparticles in ...
2
votes
2answers
455 views

Simulating a Simple Pendulum - Increasing amplitude on each swing?

I am trying to animate a dampened pendulum using RK4 for a highschool project. The equations that describe the dampened system are as follows: (from http://www.maths.tcd.ie/~smurray/Pendulumwriteup....