Closed JohanCarlsen closed 1 year ago
Hi @JohanCarlsen!
I haven't looked closely at it, but one thing you can look into:
The values you get for <e>
and <|m|>
are strange. They are too large in magnitude (think about what the largest possible values should be). And how can you get a negative number for the expectation value <|m|>
for the absolute magnetization? So I think a place to start is to double-check the parentheses in this part :)
avg_e = sumE / (nCyclesPerThread - burnIn * N);
avg_m = sumM / (nCyclesPerThread - burnIn * N);
Other than that, I'd suggest you search for a possible sign error in your code. Perhaps it's somewhere in the mcmc
function, so that the returned threadE
and threadM
are wrong? (I'm just guessing here.)
So I finally fixed the code. I have zero clue about what was making the errors, but it is fixed now!
Hooray! :)
Hi! So I've produced plots of $<\epsilon>$, $<|m|>$, $C_V$ and $\chi$ for different temperatures. I've used
t=linspace(2.1, 2.4, 6)
and run 1.000.000 MC cycles on the systems. From the compendium, I notice the shape of my curves are "swapped" for $<\epsilon>$ and $<|m|>$. Also, the plot for $<|m|>$ does not show the clear step-function shape I expected. Does anyone have an idea about what the reason for this might be?