# Create a radial diffusion doping profile in DEVICE

In an earlier post, I had shared a script on how to create a radial doping profile in DEVICE (CHARGE transport solver) using the import doping object. In a lot of cases, the user would prefer a radial doping profile that has a diffusion pattern, i.e. the dopant concentration is high at the outer surface and exponentially decreases to a low value at the core. This is a much realistic representation of doping on a wire in compared to the constant profile in that earlier post. The new erfc function in Lumericalâ€™s S2016A release allows us to write a script where the radial doping profile can have a diffusion of dopants from the surface to the core. In the attached script file, I have created a radial dopign profile that exponentially decays from a peak concentration to a low value over a certain length (junction width). It is similar to the diffusion doping object available by default in DEVICE which is limited to rectangular shapes only.

I have also attached a DEVICE project file to help visualize the resulting profile. To see the doping profile, open the project file, load the attached .mat file into the (import) doping object, calculate the mesh and visualize the grid.

1 Like

In the code, the peak concentration is in the order of 25. However, as shown in the image, the max. doping concentration is the order of 19 (in the color bar). why is that?!

In the scripting language, everything is defined in SI unit. So when we define the concentration in script, the unit is /m^3. However, if you look at the â€śResultsâ€ť tab in the CHARGE solver properties, you will see that carrier densities are reported in units of /cm^3 which is the more common practice. This is why the peak doping concentration in the image is a factor of 1e6 less than seen in the script.

1 Like

The previous code gets the good results when the raduis of radial doping is greater than or equal 0.5e-6 but when it is below 0.5e-6, the followoing messege appears:

radial_diffusion_doping.lsf line 31: matrix arguments must be greater than or equal to 1