Electric field units

Hi all,

I am not sure if I am blind or not, but I ran into some trouble importing the electric field. I found that the time the charge carrier took to reach the electrodes was on the order of ~3ns, about 10 times less than when using my own simple simulation code.

After inspecting the example electric field bundled in Allpix, I figured that the field must be in V/cm, and not in SI as V/m, which of course in turn made the charge carriers using very stressed and hurried across the sensor when the field values were in V/m. Changing the field values to V/cm, I get much more sensible results that agree well with experiments.

I just want to confirm that the field units actually are V/cm?
And, if I am blind, where I can find more information regarding the default units (if other than here)?

All the best,
Rickard

Hi @rickard ,

That is indeed the place to find the default units, but it’s best to always explicitly give the units when defining a quantity in a configuration.
The output plots of [ElectricFieldReader] do use V/cm as the unit, but the internal unit (and thus the default unit) will be the somewhat funky MV/mm. The module just converts to V-cm when filling the histograms.
So in the end, it becomes a question of the mesh converter if you use an externally-generated field. This has no default value, and what you provide here in the observable_units keyword should match what is exported from the external software.

So, as a general rule, always give units when specifying keywords that can have units, because the internal/default units can be unexpected because they are chosen for precision rather than following the most common expectation.

Kind regards,
Håkan

Hi @hwennlof

Thank you for the quick reply! Just so that I understand correctly, the [ElectricFieldReader]assumes that the field when using mesh is V/cm? And to tell it the units of the meshed field I can pass observable_units = V/m given that the externally generated field is in V/m?

And since wer’re talking about units, I am also getting the warning
(WARNING) [I:WeightingPotentialReader:detector1] No field units provided, interpreting field data in internal units, this might lead to unexpected results., is this something I should be concerned about?

To expand a bit, I am using COMSOL to simulate the electric field and the weighting potential, and I then export in a grid and use Python to format field.init files according to the Mesh Converter

Best,
Rickard

Hi @rickard

This is correct, the relevant code call is here, setting the units in a hardcoded way currently. In principle we could just make this a parameter to pass to the module if that would help?

is this something I should be concerned about?

No, this is a warning we have to find a clever way for to suppress :smiley: The weighting potential is meant to be used without units. @hwennlof can hopefulyl confirm, but this warning unfortunately is currently always printed when loading a weighting potential.

Best regards,
Simon

Hi,

Ah, yes, indeed, the mesh converter outputs in V/cm, so if you get your INIT in a different way you’ll have to use that. But as Simon mentioned, we could add a parameter for it.

Confirming that the weighting potential should be unitless, and that the warning pops up from the field parser which is used to parse any field (electric, doping, or weighting). So it shouldn’t be there for the weighting potential, so that’s all good from your side! I’ll have a look at it

Kind regards,
Håkan

Hi @simonspa & @hwennlof,

Great, good to know! As a side note, it would maybe be nice to add that to the documentation of [ElectricFieldReader] that it assumes V/cm. But I guess that is added by default if you make it a variable (which would be even nicer) :smiley:

Thank you for the quick replies!

All the best,
Rickard

Here you go :slight_smile:

1 Like