# The relationship between uncertainty of diffusion parameters and the number of collisions

@hschindl
Hi hschindl,

How can we estimate the relationship between uncertainty of diffusion parameters and the number of collisions?

Best Regards,
Jiechen

Hi @jiangjc-github,
Thanks for reaching out!
I think that @hschindl might help with this.

Cheers,
Monica

Yes, sorry for the late reply. I’ll try to give an answer later…

Hi, hschindl

I found the MediumMagboltz::RunMagboltz could output the uncertainty.
e.g.: Transverse diffusion: 0.00678657 cm1/2 +/- 0.45%，the value is 100 for noll (typical is 10).

I’m not sure the 0.45% means 0.00678657 +/- 0.0045 cm1/2 or 0.00678657 +/- 0.00678657*0.45% cm1/2? If the error is former one, the error is relatively high, I thought the number of collisions is larger enough in the simulation.

Although I check the source file, I still don’t understand the meaning and relationship.

Thank you very much for help.

Best regards，

It’s the latter (it’s a relative error).

Thank you, hschindl

Back to the question, I still don’t understand the relationship between uncertainty of diffusion parameters and the number of collisions?
dterr = 0.5 * sqrt(Magboltz::diferl_.dfter * Magboltz::diferl_.dfter +vzerr * vzerr);
Could you please explain the equation?
Thank you very much for help.

Best regards

Hi,

the variable `dfter` is the rel. error of the transverse diffusion coefficient (unit: cm / s), `vzerr` is the rel. error of the velocity component in the direction of the electric field. The equation calculates the error of the transverse diffusion parameter (unit: sqrt(cm)).

Thank you, hschindl,

I know the meaning of the variable after your illustration,
But I still don’t understand how was it derived for this equation? Could you please explain it?
I try to find the extern struct function “diferl_”, but fail to find the concrete content.

Thank you very much.

Best regards

`DFTER` is the average of `DXXERR` and `DYYERR` which are computed here:

I must admit I don’t know where the factors in these expressions (L12031, 12032) come from. Need to ask the author of Magboltz…