Using multiple dynamic weighting potentials/fields from TCAD

Dear experts,

Hi, recently we are trying to simulate the current response of a 3D diamond detector, in which the electrodes’ resistance matters and we need to introduce a series of weighting fields at different time points (we already have the .dat and .grd files). Since we are using TCAD to generate electric fields, I notice there is a function in Garfield::ComponentTcad3d class:

bool SetWeightingField (const std::string &datfile1, const std::string &datfile2, const double dv, const double t, const std::string &label)

I wonder how it can be used? like, can it be called multiple times in a simulation to introduce multiple (~10) weighting fields? If not, is there any methods to calculate the induced current using these fields in Garfield?

Thank you very much!
Huazhen

I think @hschindl can help you.

Dear Huazhen,

The function you need to use depends on the boundary condition applied to the electrode for which you’re calculating the weighting field:

  • dv·δ(t)
  • dv·Θ(t)

For the former (dv·δ(t)), you should use the SetDynamicWeightingField function. For the latter (dv·Θ(t)), you can use SetDynamicWeightingPotential. Both functions are intended for sensors with a doping profile, where the weighting field is calculated by adding a small voltage increment (dv) to the electrode under study while the sensor is biased. The weighting field is then obtained by subtracting the field map of the biased sensor without perturbation (datfile1) from the map with the perturbation (datfile2).

In your case, this is not needed. Instead:

  • datfile1 can be a file where all electrodes are grounded.
  • datfile2 is the configuration where all electrodes are grounded except the one of interest, which is set to a voltage dv.

To import each time slice of the solution, you can call SetDynamicWeightingPotential or SetDynamicWeightingFieldfor each time t. Note that when t = 0, it is automatically flagged as the prompt component.

Here’s an example:

std::vector<double> times = {0., 0.1, 1., 2.1, 3.5, 8.}; // ns
const std::string label = "Readout";

ComponentTcad3d 3DDiamond;
3DDiamond("n5_dut_des.grd", "n5_dut_des.dat");

// Load field maps
for (int tt = 0; tt < times.size(); ++tt) {
  std::ostringstream oss;
  oss << std::setfill('0') << std::setw(4) << tt;
  std::string number = oss.str();
  
  const std::string wpFileName = "n8_trans_" + number + "_dut_des.dat";
  
  3DDiamond.SetDynamicWeightingPotential("n5_dut_des.dat", wpFileName,
                                         0.01, times[tt], label);
}

sensor.AddElectrode(&RSD, label);

Kind regards,
Djunes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.