12. Examples

12.1. Included examples

The following example directories are contained in the distribution. Some of them are described in Simple Examples.

Table 12.1 Examples Distributed with DEVSIM

Directory

Description

capacitance

These are 1D and 2D capacitor simulations, using the internal mesher. A description of these examples is presented in Capacitor.

diode

This is a collection of 1D, 2D, and 3D diode structures using the internal mesher, as well as Gmsh. These examples are discussed in Diode.

bioapp1

This is a biosensor application.

vector_potential

This is a 2D magnetic field simulation solving for the magnetic potential. The simulation script is vector_potential/twowire.py A simulation result for two wires conducting current is shown in Fig. 12.1.

mobility

This is an advanced example using electric field dependendent mobility models.

plotting

Example using a Python notebook. There is 3D visualization using pyvista.

_images/twowire.png

Fig. 12.1 Simulation result for solving for the magnetic potential and field. The coloring is by the Z component of the magnetic potential, and the stream traces are for components of magnetic field.

12.2. Test scripts

The scripts in the testing and examples directories are used for the regression tests whose platform dependent results are kept in the repositories listed in Regression results.

Some of them demonstrate the use of different features of the simulator.

  • Extended precision

    examples/diode/gmsh_diode3d_float128.py

  • Version and Solver Information

    Parameter info can be queried for getting version information. The file testing/info.py contains an example.

  • Small signal simulation

    examples/diode/ssac_diode.py

  • Custom Matrix Assembly

    examples/diode/diode_1d_custom.py demonstrates custom matrix assembly and can be directly compared to examples/diode/diode_1d.py.

  • Custom External Meshing

    testing/pythonmesh1d.py demonstrates how to create a mesh via script, and how to get mesh information using devsim.get_element_node_list().

  • Transient Simulation

    • examples/diode/tran_diode.py demonstrates transient diode simulation.

    • testing/transient_rc.py test which compares simulation with analytic result for RC circuit.

  • Fermi and Gauss-Fermi Statistics

    • testing/Fermi1.py Fermi integral

    • testing/Fermi1_float128.py Fermi integral in extended floating point precision

    • testing/GaussFermi.py Gauss-Fermi integral

    • testing/GaussFermi.py Gauss-Fermi integral with extended floating point precision

12.4. Mobile app

12.5. Third party libraries