Skip to main content

Questions tagged [monte-carlo]

Questions on Monte Carlo methods, methods that require the repeated generation of (pseudo-, quasi-)random numbers for computing their results.

0 votes
0 answers
40 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
1 vote
0 answers
30 views

Monte-Carlo metropolis algorithm for Ising model

I am using the Monte-Carlo metropolis algorithm to simulate the Ising model. Since the convergence is slow near $T_c$, I am looking for a method to speed up the problem. What I did was instead of ...
Michael's user avatar
  • 71
1 vote
1 answer
126 views

Is it possible to run a Metropolis Monte Carlo simulation in parallel?

Is it possible to run a Metropolis Monte Carlo simulation in parallel? Suppose I perform a Metropolis Monte Carlo simulation using four threads. Suppose, the programming source code divides a ...
user366312's user avatar
6 votes
2 answers
972 views

Implementation of Monte-Carlo Integration

After reading the Wikipedia page for Monte-Carlo integration, I have understood the basic idea but I am having trouble implementing it for a general case. The integration that I am trying to do is $$ \...
Michael's user avatar
  • 71
0 votes
1 answer
70 views

How can I determine if a system is equilibrated?

Cross-posted in CrossValidated.SE and MMSE I am experimenting with a new MCMC protocol and new research. In the context of Monte Carlo simulation, a "state of equilibrium" refers to a ...
user366312's user avatar
0 votes
0 answers
76 views

How can I compute the longest relaxation time?

Cross-posted on Stats.SE and on MMSE. In the case of Monte Carlo simulations: Autocorrelation Time ($\tau_{\text{int}}$): A measure of how many steps are needed for the correlations in the chain to ...
user366312's user avatar
1 vote
0 answers
87 views

Regarding the difference between Metropolis-Hastings and Wolff algorithm (synchronous vs asynchronous) applied to Ising Model?

I am trying to self-learn concepts at the intersection of physics and programming. When reading up on the Ising Model, I find that the typical programming tutorial (such as this one) covers the ...
user23358153's user avatar
2 votes
1 answer
204 views

How can I compute autocorrelation values of end to end vector?

I obtained a list of $\overrightarrow{r}_{end-to-end}$ from a Monte Carlo simulation of polymer movement. ...
user366312's user avatar
0 votes
1 answer
82 views

draw a log-log plot of MSD (mean square displacement) versus `t` of a movement of the polymer chain

Cross-posted on MMSE (Matter Modeling Stack Exchange). The following are the movements of the center of mass of a polymer chain over time in a monte carlo simulation. ...
user366312's user avatar
1 vote
1 answer
135 views

How to plot random points in 3 dimensions in order to calculate volume of a torus through Monte Carlo integration

I am new to Monte Carlo integration and have been tasked with using MC integration in order to calculate the volume of a torus with inner radius 5cm and outer radius 10cm. Below is the code I have ...
mikejacob's user avatar
  • 111
0 votes
1 answer
80 views

Determining the importance of different parameters in a simulation

Suppose that I have a function of, say, three parameters, $f(p_1,p_2,p_3)$ whose output is a field(s) (e.g. velocity field) and is dependent on some real-valued parameters (e.g. viscosity, density, ...
NNN's user avatar
  • 760
2 votes
2 answers
119 views

Automatic Differentiation In the Presence of Jump Points

I have a complex monte-carlo cashflow model that traditionally uses the finite difference (FD) method to calculate its derivative at any given point. To improve model performance, I coded forward-mode ...
Mild_Thornberry's user avatar
0 votes
0 answers
136 views

what is the proper way to update the XY model for a Metropolis MC simulation

I am trying to do a 2D simulation of the classical XY model in order to observe vortexes in the system. I am not really interested at the moment in calculating variables such as Magnetization because ...
Mephistopheles Faust's user avatar
1 vote
0 answers
50 views

Monte Carlo simulation of classical Heisenberg model doesn't represent Curie curve

I've created a JavaScript file to execute and log average energy and magnetization values of 2D lattice classical Heisenberg model. I run the simulation with parameters, ...
M. Çağlar TUFAN's user avatar

15 30 50 per page
1
2 3 4 5
10