Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [simulation]

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

-1
votes
0answers
48 views

At how fine time resolution do modern computer simulations run at? Do they need to measure ms, ns?

At how fine time resolution do modern computer simulations run at? Do they need to measure ms, ns (and if ns, then at what accuracy)? This sprang to my mind when I was considering, what's the ...
0
votes
1answer
48 views

Writing parallel code for molecular computation [duplicate]

I recently moved towards computational biophysics from an experimental science background. As of now, I am learning the fundamentals and doing some basic monte carlo simulations of LJ fluid on my ...
1
vote
1answer
29 views

Custom exponents for Lennard Jones in LAMMPS

I am trying to run an MD simulation using this generalized version of Lennard Jones. $$ U(r) = \left(\frac{r_0}{r}\right)^A -\frac{A}{B}\left( \frac{r_0}{r} \right)^B $$ However, I do not know how ...
2
votes
1answer
52 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 ...
1
vote
1answer
72 views

Multi-steps method for Navier-stokes equations with strongly nonlinear diffusion

I am trying to solve a particular form of the Euler / Navier-Stokes equations in 1D, with very strong and non-linear diffusion coefficients. My system of equations is \begin{cases} \...
5
votes
0answers
70 views

How can Navier--Stokes equations have asymmetric solutions such as Karman vortex streets

The Navier--Stokes equations are axially symmetric, so with symmetric boundary conditions, how can features such as Karman vortex streets develop? I understand that in reality symmetry does never ...
8
votes
1answer
185 views

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

What scientific problems can be simulated with computers that couldn’t be simulated 10 years ago? I’m particularly interested in cutting-edge scientific simulations, which wouldn’t have been possible ...
-1
votes
1answer
70 views

Simulation-based Optimization vs PDE-constrained Optimization

What is the difference between Simulation-based Optimization and PDE-constrained Optimization? Would studying a text on Simulation-based optimization be sufficient to understand and apply both?
0
votes
0answers
31 views

Stochastic simulation Gillespie algorithm for areas instead of volumes?

I am trying to find resources on the Gillespie stochastic simulation algorithm for my system which happens on a surface. The original algorithm was developed for a reactor of volume $V$, but my system ...
1
vote
1answer
39 views

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

I did a liquid argon simulation at 100k. I forgot during analysis that I need to accommodate for the Periodic Boundary Conditions before doing any analysis which included distance. What are other such ...
0
votes
1answer
47 views

Barnes-Hut method for gravitational dynamics

I have an assignment where i got this definition - "The dots velocities following the Maxwell distribution with typical velocity of $$v=<v>^{\frac{1}{2}}$$ and that mean that each of the ...
0
votes
2answers
76 views

Effective way to build the neighbor's list in MD

I'm trying to implement the following form of the cell/neighbor list method in my MD code. I have divided my simulation box into a fixed number of cells, and according to its positions, I have ...
2
votes
1answer
73 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 ...
0
votes
2answers
82 views

reading and processing large GRIB files

I'm trying to convert and process GrADS (grib) files into netcdf files. The files have values every 3 hours (2890 per year), 12 z levels, 120 variables, 241 columns and 236 rows. The data is almost 80 ...
3
votes
1answer
60 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 ...
0
votes
2answers
448 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/...
1
vote
0answers
32 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 ...
5
votes
2answers
141 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 ...
2
votes
0answers
82 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). ...
0
votes
1answer
58 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, ...
5
votes
1answer
85 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 ...
1
vote
1answer
89 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 ...
1
vote
2answers
142 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 ...
0
votes
1answer
96 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 ...
4
votes
1answer
96 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 ...
1
vote
0answers
48 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 ...
1
vote
0answers
17 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 ...
1
vote
1answer
70 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 ...
1
vote
1answer
64 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?
1
vote
0answers
37 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 ...
0
votes
1answer
53 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 ...
0
votes
1answer
70 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/...
1
vote
3answers
291 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 ...
0
votes
1answer
70 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 ...
0
votes
2answers
88 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 ...
1
vote
1answer
124 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 ...
1
vote
1answer
89 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)$, ...
1
vote
2answers
71 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 ...
1
vote
0answers
198 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 ...
0
votes
0answers
130 views

Speed up matrix calculation in R

I'm simulating in R a Geometric Brownian Motion, for different correlated companies (nComp), and number of days (nDays). Wt are the the correlated Brownian paths. I'm running the following code, for ...
1
vote
0answers
60 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 ...
0
votes
1answer
96 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 ...
1
vote
0answers
53 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 ...
2
votes
0answers
176 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 ...
2
votes
1answer
110 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" ...
0
votes
1answer
299 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 ...
3
votes
0answers
146 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 ...
1
vote
1answer
76 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 ...
4
votes
1answer
218 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: ...
1
vote
0answers
103 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, ...