Docstoc

Malaga

Document Sample
Malaga Powered By Docstoc
					                         Google: "nanofem platform"



 A Software Platform for Nanoscale
Device Simulation and Visualization
   Marek Gayer and Giuseppe Iannaccone



                 ACTEA 2009 - Conference on Advances in
           Computational Tools for Engineering Applications

             Notre Dame University, Faculty of Engineering,
             Zouk Mosbeh, Lebanon, July 15 – July 17, 2009
                                         Google: "nanofem plaform"



     Goals of NanoFEM platform
              Create software platform for Technology
               CAD device simulation based on FEM
              Should be flexible & modifiable (research)
              Interactive features: Geometry, meshing
               and visualization with user interface
              Separation of IT (software) and physics
              Ability to run simulations on remote servers
              Able to run on Windows, Linux, Mac OS X
              Extendible; users should be able to develop
               for the platform writing own modules
ACTEA 2009
              Performance                                     2
                                              Google: "nanofem plaform"



     Finite Element Method
              Finding solution for Partial
                 Differential equations for
                 evaluation of characteristics
                 (e.g. potential)
                Discretizes continuum (i.e.
                 modeled object) into finite
                 number of elements – e.g.
                 triangles, tetrahedron
                Characteristics are
                 determined in the nodes of the
                 element
                Solving of linear systems
                Complex to design and
                 implement, solid mathematical
                 and informatics understanding
ACTEA 2009       required for high performance                      3
                                      Google: "nanofem plaform"



     3D Finite Element Mesh
              Suitable discretization of continuous
               domain to simple volume cell elements
              Partial differential equations (PDE’s) can
               be replaced by system of non-linear
               algebraic equations
              Very complex to create code to generate
               FEM mesh on arbitrary structures
              Mesh need to be at least Delaunay mesh
              Tetrahedrons
ACTEA 2009                                                  4
                                       Google: "nanofem plaform"



     Related solutions / approaches
              Commercial codes
               (Synopsis, Silvaco, etc.)
              Disadvantages: limited
               extendibility, modifications
              Free codes 2D, 3D:
                – Archimedes, nextnano
              Free Meshers - NETGEN, Tetgen
              Existing simulation frameworks
                – Gmsh, Calculix, Salome Platform, Orcan,
              Finite Element Solvers
                – FEniCS/DOLFIN, Libmesh, Getfem++,
ACTEA 2009
                  Rheolef, Tahoe, OOFEM.org, OFELI           5
                        Google: "nanofem plaform"



     Transistor modeled in NETGEN




ACTEA 2009                                    6
                               Google: "nanofem plaform"
     Gmsh – Mesh of transistor +
     Postprocessing (tutorial dataset)




ACTEA 2009                                           7
                                            Google: "nanofem plaform"



     Components of NanoFEM platform
              SALOME 3.2.6 supports limited number of OS’s =>
              Developed as a VmWare image with:
                – Debian Linux 3.1 (codename Sarge)
                – SALOME 3.2.6
                – FEniCS/DOLFIN 0.7.1
                – MeshAPI – lib. for our FEM module/component
                – Component and additional codes for SALOME
                – KDevelop for development
                – Additional tools (Krusader, …)
              Running on VmWare Server 1+ or Workstation 6+
              Eventual distribution by providing this VmWare image


ACTEA 2009                                                        8
                            Google: "nanofem plaform"



      NanoFEM platform modelling approach



                     Salome Platform


                     MeshAPI with
                     DOLFIN/FEniCS




ACTEA 2009                                        9
                                              Google: "nanofem plaform"
     SALOME platform (LGPL)
     www.salome-platform.org
              SALOME(LGPL) is a free software that provides a
                 generic platform for Pre and Post-Processing for
                 numerical simulation.
                Interactice geometry modelling, meshing
                Very good user interface (Qt4)
                Visualization (2D and 3D graphs)
                Can use Python scripting to replace or assist GUI:
                 all functionalities are also accessible through the
                 programmatic integrated Python console
                Modular architecture, we can create own modules
                Components can run on remote servers (CORBA)
                Exchanging data: MEDMEM API, .HDF, .MED
                Much more powerful then any other open source finite
                 element component/software we found
ACTEA 2009                                                         10
                           Google: "nanofem plaform"



     SALOME platform modular architecture




ACTEA 2009                                      11
                                                     Google: "nanofem plaform"
     FEniCS/ DOLFIN – (L)GPL
     www.fenics.org
              Free finite element library and solver
              Supports both direct and iterative solvers
                 (LU, Krylov solvers)
                Uses PETSc and uBLAS libraries for
                 systems of linear/nonlinear equations =>
                 high performance linear algebra
                Automatic generation of finite elements,
                 evaluation of variational form assembly
                 of matrices for FEM – linear systems
                Support for general families of finite
                 elements, (Lagrange, BDM, RT, BDFM
                 Nedelec and Crouzeix-Raviart
                 elements)
                No deeper knowledge about FEM
                 method is needed to use and develop
                Eigenvalue problems with SLEPSc
ACTEA 2009
                Simple and intuitive C++ object interface                13
                                     Google: "nanofem plaform"
     Our SALOME/DOLFIN
     bridge MeshAPI
              Core – mesh, fields, groups
              Linear-Nonlinear PDE classes
              Selection from Krylov solver methods
               and preconditioners
              XML material database (SAX parser)
              Boundary conditions
              Inherited MeshAPI based solvers
              Wrappers for SALOME platform
ACTEA 2009                                                15
                                                Google: "nanofem plaform"



     MeshAPI – mesh, fields, groups
              Reading Salome mesh from files .med files
                 (MEDMEM API)
                Processing mesh coordinates and connectivities
                Processing groups of mesh (can be defined in
                 SALOME editor)
                Passing this information to DOLFIN (to build mesh in
                 memory)
                Providing core fields (such as Source, Flux, Potential,
                 some visual debug fields)
                Additional methods to work with mesh and fields
                Control of storing of core and custom fields to .MED
                 files
                Clean code design in strictly object oriented C++

ACTEA 2009                                                            16
                                                         Google: "nanofem plaform"



     Example of XML material database
              <?xml version="1.0" encoding="UTF-8"?>

              <materialDatabase xmlns="materials.xsd">
               <material name="Si" description="(100)[silicio]">
                <parameter name="dielectricConstant"
                 description="CostanteDielettricarelativa" type="double" value="11.8" />
                   <parameter name="longitudeMassForElectrons"
                 description="MassaLongitudinaleelettrone" type="double" value="0.98"
                 />
                   <parameter name="transversalMassForElectrons"
                 description="MassaTrasversaleelettrone" type="double" value="0.19" />
                 </material>
                 <material name="SiO2" description="ossidodisilicio">
                   <parameter name="dielectricConstant" type="double" value="3.9" />
                 </material>
                 <material name="Air" description="Aire">
                 </material>
                </materialDatabase>
ACTEA 2009                                                                            17
                                        Google: "nanofem plaform"
     Storing materials and boundary
     conditions in MEDMEM mesh
              Implemented by correct naming of groups,
               which are then read in code to retrieve
               materials and boundary conditions
              Examples: bottomoxide[Si]
                           metalplate1[dirichlet=1.0]
              From SALOME mesh, we get ID’s of nodes
               and assign a group color number to them
              From group number, we determine material,
               Dirichlet boundary conditions etc. These data
               are stored in numeric arrays [0..n] – n is
               number of groups

ACTEA 2009                                                   18
                                                  Google: "nanofem plaform"



     MeshAPI/Linear-Nonlinear PDE
              Classes allowing solving nonlinear and nonlinear
               PDE, using DOLFIN, allows to set preconditioners
               and Krylov methods:
              Available Krylov methods:
                – cg - The conjugate gradient method
                – gmres - The GMRES method (default)
                – bicgstab - The stabilized biconjugate gradient squared
                  method
              Preconditioners:
                – none - No preconditioning
                – jacobi - Simple Jacobi preconditioning
                – sor - SOR, successive over-relaxation
                – ilu - Incomplete LU factorization (default)
                – icc - Incomplete Cholesky factorization
                – amg - Algebraic multigrid (through Hypre when available)
ACTEA 2009                                                                   19
                                              Google: "nanofem plaform"



     MeshAPI based solvers
              Using MeshAPI, one can easily, in few lines define
               DOLFIN solvers as classes inherited from cl. Dolfin
              Behaviour that can be generalized and reused is
               already defined in Mesh API
              It can be used in any current and future examples
              There are 3 example solvers:
                – Poisson example from DOLFIN manual, but using
                   Salome mesh
                – Poisson equation computed on partitioned group
                – Poisson equation computed on partitioned group
                   with permittivity (Eps)
                – Non-linear Poisson equation computed on
                   partitioned group with permittivity (not 100% done)

ACTEA 2009                                                          20
                                           Google: "nanofem plaform"



     Solving example – linear Poisson
              Solving linear PDE: Poisson equation:

                        (u)  f
              f(x,y,z) – source function (known), can be 0
              ε(x,y,z) – permittivity of material in given point
              u(x,y,z) – potential, that we are computing



ACTEA 2009                                                      21
                                         Google: "nanofem plaform"



     Solving example – linear Poisson
              Bi-linear and linear form of Poisson equation:

               a ( v, u )      
                                
                                  (v  u ) dx

               L( v )      
                            
                              vf dx        
                                           
                                               vg ds
              g(x,y,z) – Neumann boundary condition

ACTEA 2009                                                    22
                                                    Google: "nanofem plaform"



     Converting equation to variational form
              # The bilinear form a(v, U) and linear form L(v) for
              # Poisson's equation.
              # Compile this form with FFC: ffc -l dolfin PoissonEps.form

                element = FiniteElement("Lagrange", "tetrahedron", 1)
                v = TestFunction(element)
                u = TrialFunction(element)
                f = Function(element)
                g = Function(element)
                eps = Function(element)

              a = dot(grad(v), grad(u))*eps*dx
              L = v*f*dx + eps*v*g*ds

              # This generates 5239 lines, 191.359 characters
ACTEA 2009                                                               23
                                                                    Google: "nanofem plaform"



     Main solving routine in C++
                #include "PoissonEps.h“
                #include "LinearPDE.hxx"

                int SC::PoissonEps::solve ()
                {
                   – Source f (mesh);
                   – Flux g (mesh);
                   – DirichletFunction u0 (mesh);
                   – DirichletBoundary boundary(mesh);
                   – DirichletBC bc (u0, mesh.dolfinMesh, boundary);
                   – Eps eps (mesh);
                   – PoissonEpsBilinearForm a (eps);
                   – PoissonEpsLinearForm L (f, g, eps);
                   – SC::LinearPDE pde (a, L, mesh.dolfinMesh, bc);
                   – pde.setupKrylov (mesh.krylovMethod, mesh.krylovPc);
                   – Function solution;
                   – pde.solve(solution);

                     –   mesh.nodePotential.init (u); mesh.nodeSource.init (f); mesh.nodeFlux.init (g);
                     –   mesh.resetFieldsToWrite();
                     –   Field<double> *fields[] = {&mesh.nodePotential, &mesh.nodeSource, &mesh.nodeFlux,
                         NULL};
ACTEA 2009           –   mesh.addFieldsToWrite (fields);                                                24
                }
                                                   Google: "nanofem plaform"



     Dirichlet boundary in C++
              class DirichletBoundary : public SubDomain
              {
                – MeshAPI &mesh;public:
                – DirichletBoundary(MeshAPI & meshInstance) :
                   mesh(meshInstance)
                – {
                – }
                – bool inside(const dolfin::real* x, bool on_boundary) const
                – {
                    int index = mesh.getGroupNumberFromCoordinates(x);
                             MaterialFunction *nodeMaterial =
                      mesh.materialFunctions[index];          return
                      nodeMaterial->materialData == NULL;
                    }
                };

ACTEA 2009                                                                     25
                                                    Google: "nanofem plaform"



     Dirichlet values in C++
              class DirichletFunction : public Function
              {
                 – MeshAPI &mesh;public:
                 – DirichletFunction(MeshAPI& meshInstance) :
                    mesh(meshInstance), Function(meshInstance.dolfinMesh)
                 – {
                 – }
                 – dolfin::real eval(const dolfin::real* x) const
                 – {
                 –   int index = mesh.getGroupNumberFromCoordinates(x);
                     MaterialFunction *nodeMaterial =
                            mesh.materialFunctions[index];
                 –   return nodeMaterial->dirichlet;
                 – }
                 };

ACTEA 2009                                                                  26
                                                Google: "nanofem plaform"



     Source function in C++
              class Source : public Function
              {
                – MeshAPI &mesh;public:

                – Source(MeshAPI & meshInstance) :
                   mesh(meshInstance),
                   Function(meshInstance.dolfinMesh)
                –{
                –}
                – dolfin::real eval(const dolfin::real* x) const
                –{
                     return 0;
                –}
ACTEA 2009      };                                                   27
                                                Google: "nanofem plaform"



     Neumann boundary conditions C++
              class Flux : public Function
              {
                – MeshAPI &mesh;public:

                – Flux(MeshAPI & meshInstance) :
                   mesh(meshInstance),
                   Function(meshInstance.dolfinMesh)
                –{
                –}
                – dolfin::real eval(const dolfin::real* x) const
                –{
                     return 0;
                –}
ACTEA 2009      };                                                   28
                                                Google: "nanofem plaform"



     Defining permittivity in C++
              class Eps : public Function
              {
                – MeshAPI &mesh;public:
                – Eps (MeshAPI& meshInstance) : mesh(meshInstance),
                   Function(meshInstance.dolfinMesh)
                – {
                – }
                – dolfin::real eval(const dolfin::real* x) const
                – {
                –    int index = mesh.getGroupNumberFromCoordinates(x);
                     MaterialFunction *nodeMaterial =
                           mesh.materialFunctions[index];
                –    return nodeMaterial->permitivity;
                – }
                };

ACTEA 2009                                                                29
                          Google: "nanofem plaform"



     Geometry modelling of transistor




ACTEA 2009                                     30
                          Google: "nanofem plaform"



     Automatically generated mesh




ACTEA 2009                                     31
                            Google: "nanofem plaform"



     Scalar map of the electric potential




ACTEA 2009                                       32
                            Google: "nanofem plaform"



     Scalar map of the electric potential




ACTEA 2009                                       33
                                       Google: "nanofem plaform"



     Conclusion - 1/2
              NanoFEM platform is a new research
               environment for TCAD simulations of
               nanoscale devices.
              Based on free LGPL components SALOME
               Platform and FEniCS/DOLFIN
              We can concentrate only on developing of
               our MeshAPI and computational modules
              Physicist/developers – independent
              Simple definition of equations instead of
               programming
ACTEA 2009                                                  34
                                     Google: "nanofem plaform"



      Conclusion – 2/2

              Interactive pre- and post-processing
              Automated meshing
              Modules can run on remote servers
              High performance
              Standard formats - .MED and .HDF
              .XML material database
              Good extendibility and modularity

ACTEA 2009                                                 35
                                      Google: "nanofem plaform"
     Possible future effort for the
     NanoFEM Platform
              More complex equations (drift, diffusion)
              Compare performance with commercial
              More modules with exchange of fields
              Control of simulation flow and coupling
              Tests of supervision (with scripting)
              More complex boundary conditions
              Run on native Debian and Windows

ACTEA 2009                                                 36
                             Google: "nanofem plaform"


     Thank you for your attention.




                ?                ?
             Do you have any questions ?
ACTEA 2009                                        37

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:126
posted:2/21/2010
language:English
pages:35