Loading in 5 sec....

Codename “NanoFEM Platform” - software architecture and componentsPowerPoint Presentation

Codename “NanoFEM Platform” - software architecture and components

Download Presentation

Codename “NanoFEM Platform” - software architecture and components

Loading in 2 Seconds...

- 150 Views
- Uploaded on
- Presentation posted in: General

Codename “NanoFEM Platform” - software architecture and components

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

www.ing.unipi.it

Codename “NanoFEM Platform” - software architecture and components

Marek Gayer, Ph.D.

Project TCAD by prof. Giuseppe Iannaccone

- Design and implement open source software for nano-electronics CAD/CAE
- Should be flexible - for research purposes
- Interactive features: Geometry, meshing and visualization
- Separation of informatics and physics
- Ability to run on remote servers
- Able to run on Windows and Linux
- Extendible; users should be able to develop for the platform by ability write own modules
- Performance

- Commercial codes (Atlas)Fentaurus, Sonos, EMOSFET
- MATLAB, FreeFEM
- Disadvantages: limited extendibility, changing equations,performance
- Existing simulation frameworks
- GMSH, Salome Platform, Orcan

- Existing Meshers:
- Netgen and Tetgen, Lagrit and Cubit

- Finite Element Solvers - Fenics/Dolfin, Libmesh, Getfem++, Rheolef, Tahoe (from Sandia), OOFEM.org, OFELI

- 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
- Complex to design and implement, solid mathematical and informatics understanding required for performance

- 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 generate FEM mesh on arbitrary structures
- To create a quality mesher = topic minimally for a whole PhD study

- Exchange data in memory or files
- Supports anisotropic refinement of the mesh
- Auto detection of places with finer mesh
- Includes application w. OpenGLVisualization
- Mesh output format: One file with sections: nodes, volume elements (tetrahedra) , surface elements (triangles), edges. Format poorly documented.
- Mesh export: DiffPack, TecPlot, Tochnog, Fluent, Abaqus, Permas, Feap, Elmer, STL, VRML, GMSH

- Developed 1997 – 2007
- Input geometry specified either by own geometry format or interactively
- 3D Mesh algorithm uses either Netgen or TetGen (linked in)
- Different regions are specified by defining Physical volumes
- Output mesh: List of points and tetrahedra facets with respect to Physical volumes
- User interface: FLTK, not very nice and intuitive
- Visualization: OpenGL/VTK
- Windows version is compiled with Cygwin, with switch –mno-cygwin

- SALOME(LGPL) is a free software that provides a generic platform for Pre and Post-Processing for numerical simulation. It is based on an open and flexible architecture made of reusable components available as free software.
- Available since 2003, 1 million+ lines
- Over 975 developer/months (Salome 2)
- Current release Salome 3.2.6 (May 2007), 3.2.9 on the way
- Does not fulfill our initial requirement portability due to be natively only Linux or Unix
- www.salome-platform.org

- Supports interoperability between CAD modeling and computation software (CAD-CAE link)
- Very good user interface (Qt4)
- All functionalities are also accessible through the programmatic integrated Python console
- Large package with great number of dependencies
- Not very easy to start with
- Very hard, if possible at all to install on new Linux distributions (3.2.6) with GCC 4.x
- Much more powerful then any other open source finite element solution we found

- Salome 3.2.6 supports limited number of OS
- Comes as a VmWare image with:
- Debian Linux 3.1 (codename Sarge)
- Salome 3.2.6
- Fenics/Dolfin 0.7.1
- MeshAPI – library for our FEM module
- Our additional codes and Salome component
- KDevelop for development
- Additional tools (Krusader, …)

- Running on VmWare Server 1+ or Workstation 6+
- Eventual distribution based on providing this image

- Storing and loading data associated to numerical meshes and fields
- Exchange between codes and solvers
- Comes with C++/Python API
- Data can be exchanged in memory
- 3. levels – files, memory, CORBA (data on demand)
- The persistent data storage is based upon HDF format (developed by Boeing and NASA in the area of Computational Fluid Dynamic).

- Salome Platform

- MeshAPI with Dolfin

- Winner from our evaluation of FEM libraries, October 2007
- Supports both iterative and direct solvers (LU, Krylov solver)
- Uses PETSc and uBLAS 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, including arbitrary order continuous and discontinuous Lagrange finite elements, BDM elements, RT elements, BDFM elements, Nedelec elements and Crouzeix-Raviart
- www.fenics.org

- Almost nothing about FEM method is needed to use and develop it
- Difficult to install, namely on non-Ubuntu or with PETSc
- Eigen value problems with SLEPSc
- Simple and intuitive C++ object interface
- Many input / output formats - DOLFIN XML, VTK, Octave, MATLAB, OpenDX, Diffpack, Exodus
- Could be better documented

- MeshAPI/Core mesh and fields
- MeshAPI/XML material database
- MeshAPI/Linear-Nonlinear PDE
- MeshAPI/Dolfin
- |-> inherited MeshAPI based solvers
- Wrappers for Salome
- Command line tool(s) for testing or running from command line

- 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
- Support of Dirichlet boundary conditions
- Clean code design in strictly object oriented C++

- Transforming of readable .xml file to fast C++ structures
- Based on libxml2 via SAX parser approach (fast, consumes few memory even for huge structures) http://en.wikipedia.org/wiki/Simple_API_for_XML
- Created XSD schema for database (http://en.wikipedia.org/wiki/XML_Schema ), allows us to easily validate, whether the XML document is correct and contains the allowed tags and attributes
- User friendly in good XML editor =>
- Errors are marked just similar to spelling and grammar errors in word and IntelliSense offers allowed values.

- <?xmlversion="1.0"encoding="UTF-8"?>
- <materialDatabasexmlns="materials.xsd">
- <materialname="Si"description="(100)[silicio]">
- <parametername="dielectricConstant"description="CostanteDielettricarelativa"type="double"value="11.8" />
- <parametername="longitudeMassForElectrons"description="MassaLongitudinaleelettrone"type="double"value="0.98" />
- <parametername="transversalMassForElectrons"description="MassaTrasversaleelettrone"type="double"value="0.19" />
- </material>
- <materialname="SiO2"description="ossidodisilicio">
- <parametername="dielectricConstant"type="double"value="3.9" />
- </material>
- <materialname="Air"description="Aire">
- </material>
- </materialDatabase>

- class MaterialData
- {
- public:
- double electroMobility;
- double holeMobility;
- int reserved;
- std::string description
doubletrapLevel;

- double acceptorEnergy;
- double donorsEnergy;
- double electronAfinity;double electronAfinity1;
- double dielectricConstant;double dielectricConstant1;
- double longitudeMassForElectrons;
- double transversalMassForElectrons;
- double holeMass;
- double energyGap;double energyGap1;
- double alfaParameter;double alfaParameter1;
- double betaParameter;double betaParameter1;
- MaterialData();
- };

- 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)

- Using MeshAPI, one can easily, in few of lines define Dolfin solvers as classes inherited from class “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)

- Module can be used in Salome (with/out GUI)
- Automake based
- Linked with Dolfin and MEDMEM libraries
- Selected routines are automatically wrapped
- Works in Salome supervision module
- Automatic conversion (using Salome hxx2salome tool based on mainly configure and automake)

- Solving linear PDE: Poisson equation:
- f(x) – source function (known), can be 0
- ε(x) – permittivity of material in given point
- u(x)– potential, that we are computing
- g(x)– Neumann boundary condition, can be 0

- # 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)
- a = dot(grad(v), grad(u))*dx
- L = v*f*dx + v*g*ds
- # This generates 5239 lines, 191.359 characters

- #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};
- mesh.addFieldsToWrite (fields);

- }

- 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;

}

};

- 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;
- }
};

- 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;

- }
};

- 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;

- }
};

- 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;
- }
};

- Solving non-linear PDE: Poisson equation:
- n(u, r) - is the electron concentration (m-3)
- p(u, r) - is the hole concentration (m-3)
- ε(r)– permittivity of material in given point
- NA(r) - Acceptor concentration
- ND(r)- Donor concentration
- q - elementary charge 1.61e-19 C

- More complex equations (drift, diffusion)
- Compare performance with commercial
- More modules with exchange of fields
- Tests of supervision (with scripting)
- More complex boundary conditions
- Run on Debian Lenny and new Salome
- Get some funding

???

Do you have any questions ?