Skip to main content

All Questions

0 votes
0 answers
41 views

What techniques are there to take averages and errors in a Monte Carlo simulation in C? Can my code be improved?

I'm trying to perform a Monte Carlo simulation in C and these are the steps I'm following: We assume an infinite reservoir compound of CO and NO molecules with partial pressures 𝑦CO and 𝑦NO(= 1 − 𝑦...
Auyk's user avatar
  • 1
0 votes
0 answers
55 views

Why is Magnetic Susceptibility not showing the expected transition in 2D&3D Ising Model?

I'm trying to code the Ising Model with the metropolis algorithm to study the ferromagnetic-paramagnetic transitions. The code seems to work ; the equilibration happens. While equilibrating, the ...
SSsaha's user avatar
  • 1
2 votes
1 answer
421 views

How to leverage the GPU for parallel 3-body problem computations

I have a 3-body simulation which must run millions of times. As far as I know, the GPU shines when it gets to preform simple operations on huge matrices/arrays. Currently I'm debugging and running my ...
Remeraze's user avatar
0 votes
0 answers
158 views

Damping not working in Verlet simulation with absolute constraint

I'm trying to build a simple physic simulation with Verlet intergration, which I'm currently implementing as such: ...
silverfox's user avatar
  • 101
0 votes
0 answers
50 views

I encountered some issues simulating the shape transition of silicon clusters using LAMMPS

== I have been trying to write an input file for lammps to simulate the shape transition of a nanoparticle of silicon using multiple potentials to obtain the best structure, which I will compare with ...
Hadjmohammad Abderahmane's user avatar
0 votes
0 answers
41 views

Energy potential involvign pressure and viscoscity?

Making a really long explanation short. I am looking for an energy density function for an incompressible isotropic fluid that involves both viscoscity and pressure. The reason is, there is a way to ...
Makogan's user avatar
  • 273
0 votes
0 answers
55 views

Solving a minimization problem without flattening inputs?

I am reading this paper on improving time steps for solving simulation problems: https://www.math.ucla.edu/~jteran/papers/GSSJT15.pdf The authors developed this energy function: $$E(x) = \frac{1}{2\...
Makogan's user avatar
  • 273
2 votes
0 answers
176 views

Poisson equation solution in a semiconductor structure

I am trying to solve the $\textbf{1-D}$ Poisson equation for a semiconductor structure at equilibrium (There is no external bias applied). $\textbf{Background}$ \begin{equation} \frac{d^2V}{dx^2} = -\...
0-0's user avatar
  • 33
0 votes
0 answers
38 views

Geant4, simulate photon emitted into lead

I have just learned Geant4 and recently I tried to simulate photons emitted into lead. After I collected the data and figured out the transmission of photons. I found my data is bigger than the ...
SHZ's user avatar
  • 9
2 votes
1 answer
93 views

How to correct for collision in $N$-dimensional bounded motion of a particle?

I want to numerically simulate the motion of a point particle (unit mass) in $N$-dimensional space according to the force $f(\vec{x}, t)$ and bounded by a set of linear constraints (equalities as well ...
haoyu's user avatar
  • 23
-1 votes
1 answer
367 views

Can someone help or point me out to C++ source code for a two body orbit simulation using symplectic integration?

I've professional experience with physics simulations and C++ programming, although I don't have specific experience with astrophysics simulations. I'm trying to build a two-body evolving system ...
Simo's user avatar
  • 19
1 vote
0 answers
56 views

Reproducing a paper's result for Topological Insulators

For the past weeks I have been trying to reproduce Agarwala's results but I've been unsuccessful. From this paper I am trying to reproduce the first and last columns of Fig.2, by implementing eq.2; ...
Victor RM's user avatar
2 votes
1 answer
1k views

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

I'm trying to write an integrator for the 2 and 3-body problem. I choose to start from a generalisation to N-body problem so I can just pass my bodies to the same integrator in the two cases. I'm ...
Mathieu Rousseau's user avatar
1 vote
1 answer
255 views

Electrostatic Force - Simulate Trajectory of Test Particle using Runge Kutta - Force always Repels

In the center of a 2D-Plane a positive static charge Q is placed with position r_prime. This charge creates a static electrical Field E. Now i want to place a test particle with charge Q and position ...
tester931's user avatar
0 votes
0 answers
94 views

Why is perfect sampling not used in large-scale lattice model simulations?

The statistical physics literature is replete with papers describing simulations of lattice models, such as the Ising model. Typically, these are done through Monte Carlo methods, such as the ...
alligator's user avatar
  • 105

15 30 50 per page