How can one find the area of $B$-$H$ hysteresis loop by the Monte-Carlo method? How can one find the area of $B$-$H$ hysteresis loop by the Monte-Carlo method?
 A: You're looking for what is called rejection sampling. One of the primary introductions to this method is how one would determine $\pi$ using Monte Carlo (i.e., sampling $x,\,y\in[0,\,1]$ and counting number of times $x^2+y^2<1$ out of total trials, then $\pi\simeq4\times\text{hits}\,/\,\text{total}$ where the 4 comes from sampling one quarter of the square).
For magnetic hysteresis, you have $B\in[-b,\,b]$ and $H\in[-h,\,h]$ with $b,\,h$ the maximal values for the given material. If you draw numbers uniformly for $B$ and $H$ from these ranges, it should just be a matter of counting the number of times the drawn point $(B,\,H)$ is in the interior of the curve versus the total number of samples.
Whether a point is interior depends on:

*

*$B\in[-b,\,b]$

*$H\in[-\mathcal{H}(B),\,\mathcal{H}(B)]$ where $\mathcal{H}(B)$ denotes the hysteresis curve.

The first point should always be true, since we're forcing that from the uniform sampling. The second one is where the rejection occurs since it is possible that the $H$ you've sampled exceeds the curve. Your area is then the ratio of interior points to total points.
Note that for Monte Carlo methods, the error is proportional to $1/\sqrt{N}$ where $N$ is the number of samples. Sampling 10,000 points would give you two decimal places of accuracy, so depending on your needs you may want more or less of these.
