In How to add a constant radial doping profile in CHARGE, we shared a script on how to create a radial doping profile in CHARGE 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 erfc function 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, we created a radial doping 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 CHARGE which is limited to rectangular shapes only.
We also attached a CHARGE 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.
Note the script uses a junction width of 0.5 micron. This is the distance over which the doping goes from the peak density to the lower density. So the size of the radial profile needs to be larger than this. If you want to make the profile 0.15 micron in length then the junction width will need to be smaller than that.