17 #pragma warning(disable:4503)
28#include "viennagrid/config/default_configs.hpp"
55template <
typename DeviceType>
59 typedef typename DeviceType::mesh_type MeshType;
61 typedef typename viennagrid::result_of::const_cell_range<MeshType>::type CellContainer;
64 CellContainer cells(device.mesh());
78 std::cout <<
"* init_device(): Setting doping..." << std::endl;
79 device.set_doping_n(1e28);
80 device.set_doping_p(1e4);
83 device.set_contact_potential(0.0, cells[0]);
84 device.set_contact_potential(vcc, cells[cells.size()-1]);
102 typedef viennagrid::line_1d_mesh MeshType;
127 device.generate_mesh(generator_params);
133 std::cout <<
"* main(): Initializing device..." << std::endl;
143 std::cout <<
"* main(): Creating DD simulator..." << std::endl;
169 std::cout <<
"* main(): Launching simulator..." << std::endl;
187 std::cout <<
"* main(): Setting up SHE..." << std::endl;
227 std::cout <<
"* main(): Computing SHE (electrons only) ..." << std::endl;
236 std::cout <<
"* main(): Writing SHE result..." << std::endl;
249 she_simulator.quantities().electron_distribution_function());
271 std::cout <<
"* main(): Computing SHE (electrons only) with EE scattering ..." << std::endl;
285 she_simulator_ee.run();
292 std::cout <<
"* main(): Writing SHE result..." << std::endl;
304 std::cout <<
"* main(): Results can now be viewed with your favorite VTK viewer (e.g. ParaView)." << std::endl;
305 std::cout <<
"* main(): Don't forget to scale the z-axis by about a factor of 1e12 when examining the distribution function." << std::endl;
306 std::cout << std::endl;
307 std::cout <<
"*********************************************************" << std::endl;
308 std::cout <<
"* ViennaSHE finished successfully *" << std::endl;
309 std::cout <<
"*********************************************************" << std::endl;
The main SHE configuration class. To be adjusted by the user for his/her needs.
double min_kinetic_energy_range(viennashe::carrier_type_id ctype) const
Returns the minimum kinetic energy range for the selected carrier.
long max_expansion_order() const
Returns the current maximum expansion order.
bool with_holes() const
Returns true if holes 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.
void set_hole_equation(equation_id equ_id)
bool with_electrons() const
Returns true if electrons are considered in the simulation.
viennashe::she::scatter_config & scattering()
Returns the configuration object for scattering.
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
An accessor for the average carrier energy at each point inside the device.
Accessor class providing the carrier velocity inside the device.
ionized_impurity_scattering_parameters const & ionized_impurity() const
Returns the parameters for ionized impurity scattering. Const-version.
impact_ionization_scattering_parameters const & impact_ionization() const
Returns the parameters for impact ionization scattering. Const-version.
acoustic_phonon_scattering_parameters const & acoustic_phonon() const
Returns the parameters for acoustic phonon scattering. Const-version.
optical_phonon_scattering_parameters const & optical_phonon() const
Returns the parameters for optical phonon scattering. Const-version.
bool electron_electron() const
Returns true if electron-electron scattering is activated.
Class for self-consistent SHE simulations.
void set(long solver_id)
Sets a new linear solver. Provide IDs defined in.
std::size_t max_iters() const
Returns the maximum number of nonlinear solver iterations.
double damping() const
Returns the damping for the nonlinear solver.
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_cell_quantity_for_gnuplot(AccessorType const &quan, DeviceType const &device, std::string filename)
Writes a quantity (on vertices) per point to a text file suitable for gnuplot.
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...
Writes the energy distribution function to a file which can be processed by Gnuplot....
A class referring to silicon and providing certain material parameters Note that this is the default ...
static const double q
Elementary charge.
A trivial filter, all objects are accepted.