Hello! I have a situation of the following form. I have a function ##f = xy##. In my experiment ##y## is fixed, but it has some noise to it, such that at each measurement it is basically sampled from a Gaussian with the mean given by the fixed value and the standard deviation given by the known...
Hi, guys.
I have tried to write a Wang-Landau JDoS algorithm to describe a magnetic perovskite with exchange interactions J1 = 1.66 and J2 = -1.16. Then, I have a simple question: in the WL algorithm, the obtained joint density of states must have all possible E x M microstates? Since the...
Hello,
I have become familiar with ML and a number of ML models (supervised and unsupervised). I would like to now learn about Monte Carlo simulations since they are so ubiquitous in many fields.
When would we choose to do a Monte Carlo simulation instead of building a ML model (supervised...
Hello! This is tangentially also a follow up to this post. I have the following equation:
$$A = \frac{0.2\frac{W}{\Delta}}{\left(\frac{W}{\Delta}\right)^2+0.1^2}$$
where ##\Delta## is an experimental parameter, ##A## is obtained by some measurements and it depends on ##\Delta## and the...
Hello! I have 2 probabilities ##p_1## and ##p_2## which governs the probability of measuring some events. I measure event 1 N times and get ##N_1## counts and event 2 N times and get ##N_2## counts. Then I need to build the function ##A = \frac{N_1-N_2}{N_1+N_2}##. I am trying to estimate the...
Write a program that uses the Monte Carlo method to approximate the double integral $\displaystyle\iint\limits_R e^{xy}dA$ where $R = [-1,1] \times [0, x^2]$. Show the program output for N = 10, 100, 1000, 10000, 100000 and 1000000 random points.
My correct answer:
My Java program...
Hi, i would like to write my own MC code in order to simulate the transport of Neutrons in Nuclear reactors. I know the basics of MC and i have already written a code for homogeneus reactors, my problem is the generalization to more complex geometries made of different materials, such as fuel...
I am new in Vgate software.
I've tried a lot of things, but nothing works. I need to create a conical source that is 4 cm in radius and 16 cm in length. Example in photo attached
I am using WSL2/Ubuntu 20.04 on Windows 10 to run a specific cosmological parameter estimation program called Cobaya. (It only runs on Linux and Mac)
Here are my specs.
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order...
I am learning about the use of Monte Carlo to calculate/estimate uncertainties. If I take the example of a single measurement (i.e. I measure several quantities required to get an estimate of some physical property, but I do this only once), I can use Monte Carlo and some common sense for the...
Say you have measured several quantities and you can calculate the value of a physical quantity as a sum/product of the several measured quantities, and you are interested to calculate the uncertainty of that physical quantity.
I have just learned about the Monte Carlo method applied to error...
I have been struggling for over a month now with a problem I cannot fix. I would really appreciate any comment or guidance. Thank you!
I am considering an Ising-like model with N agents that han hold one of the following 3 states, represented by vectors:
state + : vector (1 0)
state 0 : vector...
My name is Irene and I've just started my PhD. at the University of Barcelona (October, 2020). I have a Physics degree and a Master in Computational Modelling.
I work in a research group named ClabB (complexity lab Barcelona) where I develop a large scale opinion model using Monte-Carlo...
Currently working on a project involving Monte Carlo integrals. I haven't had any prior studies of this method, so hence the following question.
Consider the following expectation:
$$E[f(X)]=\int_A f(x)g(x)dx.$$
Let ##X## be a random variable taking values in ##A\subseteq\mathbb{R}^n##. Let...
Problem:
Here’s a little Monte Carlo challenge problem, Consider the following game, which uses the two spinner disks. Suppose a player spins one or the other of the pointers on the disks according to the following rules: (1) if the player spins pointer ##i## and it stops in the region with area...
Hi, I'm wondering if there any exists a Monte Carlo free code that can simulate dissociative ionization, per example a beam of protons on water, and then track the fragments (from water) and their energy.
Thanks in advance!
Could someone tell me why this happens when I cut geometry?
The program that i used is Vised X_225 and my mcnpx version is 2.7
Sorry for my posts, I'm really in trouble.
Homework Statement
There is a square and a circle is inscribed inside. Simulate an experiment where raindrops drop on this surface. Some raindrops can drop in or on the border of the circle. Some can drop outside the circle. The area of the square divided by the area of the circle gives you pi...
I am analyzing a lot of data from Montecarlo simulations and trying to use bootstrap to estimate the standard deviation. what I'm finding however is very, very little variation with each iteration of bootstrap, and I don't know why.
Two reasons come to mind. Given the complexity of the analysis...
Let's say I want to simulate a 30-year investment return scenario by running n simulations (e.g. n = 1000) using a normal distribution with mean x% and standard deviation y%.
My first approach was to generate exactly n sets of 30 samples from N~(x,y) but I realized that for any given set of 30...
In the field of medical physics, specifically in monte carlo simulation of radiation beams produced by electron accelerators, people call ‘phase space’ to a file that contains the data of a large number of particles when they traverse a reference surface in the machine (usually a plane), i.e...
Hi guys.
I'm using the Monte Carlo method to simulate a spin lattice. If I have a square lattice, L x L, I can plot the phase transition temperature by the inverse of the lattice length (1/L) to find the phase transition temperature in the thermodynamic limit (extrapolating the curve for 1/L =...
Greetings,
for a Monte Carlo simulation of N hard spheres, I want to set up the initial configuration as a fcc lattice. I am thinking about how to do it most efficiently.
Here is the lattice structure:
The 3 lattice vectors, each one pointing to a different type of the 12 nearest neighbors...
Hi,
my question is about the correct means of the expression "computer experiment" in a Monte Carlo simulation. What specifically is an "experiment" in a Monte Carlo simulation? Is the same of "Monte Carlo path" or is the whole process adopted to found a magnetization curve, for example?
If the...
Dear all,
I would like to simulate X-ray tube and check the dose rate in the room.
My problem is when I simulate 80kV electrons bombard to the tungsten target, there is just a few photons coming out from the tube window. And the dose rate at 1m from the tube is nearly zero which is impossible...
Homework Statement
[/B]
I'm trying to write a program for caclulating Green's function using Monte Carlo method (Metropolis algorithm) in scalar field theory with a potential λφ4 in 4D. I'm writing it in python.
N_t, N_x, N_y, N_z - total number of lattice sites in each directions.
Field...
Homework Statement
$$f(x)=NormalPDF(x,2,1)+NormalPDF(x,2,(1/2)^2)$$.
where NormalPDF(a,b) is the PDF for a normal distribution with mean a and variance b.
Use Monte Carlo Integratoion to find: $$\int_{-10}^{10}f(x)dx$$
Homework Equations
The solution to this integration is 2.
I use the method...
Hello,
I am writing a program on Fortran to calculate the integral of sin^4(x) between x = 0 and x = π/2.
I believe I know how to write the correct code, but I am unsure what the if statement should be for whether or not a point is inside the desired area.
Any thoughts?
Thanks.
Hi
I was wondering the following/feeling uneasy about it:
Does it make sense to separate the statistical uncertainties of data and Monte Carlo?
For example assume infinite statistics in your MC (uncertainty-->0) while your data is finite : so they come with some "uncertainty" (if that makes...
I would like to discuss code for hit and miss monte carlo methods, and also monte carlo with veto algorithm in C++. Since I am coding in C++ after a long time, I am messed up with syntax too. I have a specific set of problems to work with. If interested we can start working on it here.
I'm creating a Monte Carlo simulation of the 2D Ising Model for a graduate course in computational materials science. Part of the assignment is to calculate the uncertainty in the calculation of the average magnetization per spin. To do so, we are told to find the correlation time for our data...
Hello everyone.
I'm working on a program to solve 2D Ising model of magnetic materials, using a system with 10x10 spins for simplicity at a temperature of 1E-8 K. I'm using this parameters to get a faster result of m=1 and guarantee it is correct. but...
For now i already pass 300 Monte Carlo's...
Homework Statement
A sample of cobalt was previously measured in a neutron scattering experiment. As a result, the sample has become activated. Write a Monte Carlo script to simulate the activation and decay of a Co sample during and after a neutron scattering experiment. It is recommended to...
Hello,
I use free VisEd and I want to plot the collision, the particle's transport and the particle in tally but I have an error. For the source the plot is ok. How can I solve this problem freely?
Someone can help me?
My input :C Cellules30 50 -1 (-1 3 19 ):(-2 3 ):(-4 3 -6 5 -7 1 2 ) imp:p=1...
Below is the partial code to plot the rejection/accept regions using monte carlo sampling. The context is to estimate pi and plotting is just one part of it.
I'm not sure how the ~ symbol can work.
scatter(samples(1,~reject),samples(2,~reject),'b.')...
Homework Statement
Lo,Im stuck on how to retrieve the specific heat capacity from an MC simulation, with the metropolis algorithm. I want my graph to look something like this:
https://i.stack.imgur.com/NXeXs.png
Homework Equations
C_v = ((<E^2>-<E>^2)/T^2
The Attempt at a Solution
My code is...
Hi guys, I am having trouble seeing where I have actually gone wrong with my code. If I run the code I am getting approximation of 12 as my lowest is way to big. But I am really struggling to find where I have gone wrong. Any advice would be appreciated.
PROGRAM assign_10_1
IMPLICIT NONE...
I am an undergraduate working in my university's high energy physics lab. I'm still new to particle physics, so I have to learn/understand a bunch of things on the fly.
We are currently searching for a new state theorized to occur in a specific decay process. I know we have to work with data...
I wasn't sure where to post this, I hope this was the right section.
I've been struggling quite a bit with implementing an autocorrelation code into my current project. The autocorrelation as it is now, is increasing exponentially from 1 at the start of my MC run, and hitting 2 halfway through...
I do not understand where are Markov chains in Monte Carlo Ising simulation. Going randomly from lattice site to lattice site one flip one spin calculates energy and goes ahaid. But where are Markov chain there? Could you please explain me this. Thanks a lot.
Hello I use a python package called emcee to fit a function to some data points. The fit looks great, but when I want to plot the value of each parameter at each step I get the plot.png below. In their example (with a different function and data points) they get the plot1.png image. Why is my...
Hi there, I'm currently working on a relatively simple code to do some lattice simulations. I have access to a computing cluster at school and have been learning how to use OpenMP to parallelize my code (each node has 16 cores). I'm currently not planning to use MPI.
My main question is...
Homework Statement
Calculate 5-day 1% Value at Risk of a portfolio using Monte Carlo simulation.
Homework EquationsThe Attempt at a Solution
I've found an article explaining how to perform Monte Carlo simulation on portfolio returns therefore calculating the Value At Risk (pdf attachment)...
Trying to accomplish a monte carlo simulation on the condensed state of 4He, yet I am in my sophomore year and know only a bit of quantum statistical physics. Is there any documentations recommended for beginners to the algorithm applied to 4He?
I've found some but they are not friendly to...
This is my first question here. I tried my best to work out it by myself but it didn't work.
I'm reading Computational Methods in Physics and Engineering by Samuel S M Wong recently.
I don't know how to deduce Eq.(7-2) on page 299 of this book. There are some paragraphs on this page as...
From the Theory of Open Quantum Systems; the Euler scheme is given by:
##\psi_{k+1} = \psi_{k} + D_1(\psi_k)\Delta t + D_2(\psi_k) \Delta W_k##
and is a scheme of order 1. What does the order of convergence mean? From my understanding higher order schemes require fewer interations to give a...
I am using the monte carlo method to calculate the integral of cos^2(x). This is done using N random numbers. In my case I am doing it for 10^i random numbers when i ranges from 1-6. I want to calculate the error on the integral for each value of i used.
I know for each value of N I want to...
Maxwell's equations are frequently solved numerically using deterministic methods such as finite difference time domain (FDTD) methods (https://en.wikipedia.org/wiki/Finite-difference_time-domain_method). The problem is that FDTD methods are known to be very computationally intensive. I'm...