17 #pragma warning(disable:4503)
28#include "viennagrid/config/default_configs.hpp"
29#include "viennagrid/algorithm/centroid.hpp"
59template <
typename DeviceType>
62 typedef typename DeviceType::segment_type SegmentType;
65 SegmentType
const & contact_left = device.segment(0);
66 SegmentType
const & n_left = device.segment(1);
67 SegmentType
const & i_center = device.segment(2);
68 SegmentType
const & p_right = device.segment(3);
69 SegmentType
const & contact_right = device.segment(4);
83 device.set_doping_n(1e22, n_left);
84 device.set_doping_p(1e10, n_left);
86 device.set_doping_n(1e16, i_center);
87 device.set_doping_p(1e16, i_center);
89 device.set_doping_n(1e10, p_right);
90 device.set_doping_p(1e22, p_right);
103 device.add_trap_level(trap);
107 device.add_trap_level(trap);
111 device.set_contact_potential( 0.0, contact_left);
112 device.set_contact_potential(-0.2, contact_right);
130 typedef viennagrid::quadrilateral_2d_mesh MeshType;
136 std::cout <<
"* main(): Creating device..." << std::endl;
170 device.generate_mesh(generator_params);
175 std::cout <<
"* main(): Initializing device..." << std::endl;
184 std::cout <<
"* main(): Creating DD simulator..." << std::endl;
207 std::cout <<
"* main(): Launching simulator..." << std::endl;
224 std::cout <<
"* main(): Setting up SHE..." << std::endl;
262 std::cout <<
"* main(): Computing first-order SHE..." << std::endl;
278 std::cout <<
"* main(): Writing SHE result..." << std::endl;
280 she_simulator.config(),
281 she_simulator.quantities().electron_distribution_function(),
289 std::cout <<
"* main(): Results can now be viewed with your favorite VTK viewer (e.g. ParaView)." << std::endl;
290 std::cout <<
"* main(): Don't forget to scale the z-axis by about a factor of 1e12 when examining the distribution function." << std::endl;
291 std::cout << std::endl;
292 std::cout <<
"*********************************************************" << std::endl;
293 std::cout <<
"* ViennaSHE finished successfully *" << std::endl;
294 std::cout <<
"*********************************************************" << std::endl;
The main SHE configuration class. To be adjusted by the user for his/her needs.
long max_expansion_order() const
Returns the current maximum expansion order.
bool with_holes() const
Returns true if holes are considered in the simulation.
bool with_traps() const
Returns true if traps are considered in the simulation.
nonlinear_solver_config_type & nonlinear_solver()
Returns the configuration object for the nonlinear solver.
void set_electron_equation(equation_id equ_id)
linear_solver_config_type & linear_solver()
Returns the configuration object for the linear solver.
double energy_spacing() const
Returns the uniform energy spacing of discrete energies.
bool with_trap_selfconsistency() const
Returns true if traps are considered self-consistently in the simulation.
void set_hole_equation(equation_id equ_id)
bool with_electrons() const
Returns true if electrons are considered in the simulation.
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
Class for self-consistent SHE simulations.
std::size_t max_iters() const
Returns the maximum number of iterative linear solver iterations.
std::size_t max_iters() const
Returns the maximum number of nonlinear solver iterations.
double damping() const
Returns the damping for the nonlinear solver.
void energy(double e)
Returns the trap energy in Joule (zero energy refers to the center of the band gap.
void collision_cross_section(double ccs)
Sets the collision cross section (SI units)
void density(double d)
Returns the trap density for the trap level.
Configuration class for the simple mesh generator.
void add_segment(double start_x, double start_y, double len_x, double len_y, unsigned long points_x, unsigned long points_y)
Convenience header, which includes all core functionality available in ViennaSHE.
void init_device(DeviceType &device, double Vg_init, double Nd, double Na)
Initalizes the MOS 1D device for testing.
void write_quantities_to_VTK_file(viennashe::simulator< DeviceType > const &simulator_obj, std::string filename, bool include_debug_information=false)
Generic interface function for writing simulated quantities to a VTK file.
std::string hole_density()
std::string electron_density()
std::string preamble()
Prints the ViennaSHE preamble (header). Used in all the examples as well as the standalone-applicatio...
A class referring to silicon and providing certain material parameters Note that this is the default ...
static const double q
Elementary charge.