Report

Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods [email protected] Introduction to COMSOL Multiphysics • COMSOL - the company and the products • Modelling steps in COMSOL Multiphysics – Live demo • Basic numerical techniques • Extensions – Examples: moving meshes, time-dependent h-adaption, particle dynamics • Core algorithms – Two larger examples (CFD and RF) World leader in multiphysics simulations • • • • HQ in Stockholm. 16 offices in Europe, India and USA. 250+ employees. 14 000 licenses, 60 000 users. COMSOL in Sweden • Development – Math & Computer Science – Numerical Methods – Rendering & Visualization – API – Quality & testing • Applications – Physics interfaces – Modules – Model library • Support • Sales Traditional approach to modeling Electromagnetic Fields Chemical Reactions Fluid Flow Acoustics Heat Transfer Structural Mechanics The COMSOL Multiphysics approach Electromagnetic Fields Acoustics Heat Transfer Chemical Reactions Structural Mechanics Fluid Flow User Defined Equations COMSOL 4.2a Product Line Modeling steps • Define geometry – With a LiveLink to CAD program, interactively or by CAD file import • Select physics (and/or mathematics) – Through application tailored interfaces (and/or user defined equations) • Generate mesh – Automatically, interactively, mesh import (NASTRAN) • Specify details – – – – Material properties Boundary conditions Sources, sinks,... Multiphysics couplings • Select “Study” to perform and compute – Generate solver settings automatically or manually • Result processing Study • Study step – Analysis type • • • • Stationary Time-dependent Eigenfrequency (eigenvalue problem) Frequency domain (harmonic assumption) – Physics to use – Mesh to use (for each geometry) – ... • Multi Study step – Modal analysis – Small signal analysis – ... Our basic method for PDE’s • Galerkin FEM discretization – With optional artificial stabilization (SD, GLS-stabilization,…) – Lagrange elements, Edge elements, ... • Standard studies – Stationary -> AE • f(u,x) = 0 – Time dependent -> DAE • f(du/dt,u,t,x) = 0 – Eigenfrequency/Eigenvalue -> GAEP • (E*lambda^2 + D*lambda + K)*u=0 – Frequency dependent (Helmholtz eq.) -> parametric • K(k)*u = L(k) ... and the basic solvers • Stationary – Fully coupled (Newton) • Automatic and Constant damping – Segregated (solve for subset of variables, iterate) – Pseudo time stepping (CFD) • Time-dependent – – – – – • BDF solver (SUNDIALS/IDA, 1st-5th order, implicit, adaptive) Generalized alpha (2nd order, implicit, tunable damping, adaptive) Runge-Kutta (1st-4th order, explicit, manual step length) Time discrete (for CFD projection schemes) Modal solver (uses eigenfunction expansion) Algebraic eigenvalue – ARPACK using shift and invert mode • Frequency domain – Plain sweep (solve for each wave number k) – AWE (Taylor or Padé expansion) – Modal Solver (uses eigenfunction expansion) Extensions • Sensitivity (forward and adjoint) – • Optimization (NLP and LSQ) – – – • Fixed mesh in sub time-intervals Uses a physics (or user) controlled error indicator function Moving meshes – – • L2-norm Goal oriented (dual weighted residual) h-adaption (for Time-dependent problems) – – • SNOPT (Stanford) Levenberg-Marquardt For stationary and time-dependent problems (4.3) h-adaption (for Stationary, Parametric and Eigenvalue problems) – – • For stationary and time-dependent (4.3) problems ALE (Arbitrary Lagrange-Eulerian) Automatic re-meshing (Parametric and Time-dependent) Model control (Jobs) – – – Parametric sweep (vary any parameters in a systematic way) Batch (a detachable - external process - job) Cluster computing (MPI) Extensions and more methods... • Particle dynamics – Large system of independent ODE’s • Field to particle effects (one-way coupled) • Boundary interaction (bounce, stick, dissaper, ...) • Explicit and implicit time-stepping methods • Far-field evaluation – BEM formulation • Nodal Discontinuous Galerkin method (work in progress) – For wave equations in the time-domain – High order, very memory lean, scalable, ... – Fully explicit time-stepping • Other general methods ... (work in progress) Core algorithms • Linearization, evaluation and symbolic differentiation – Used by all the basic solvers • Parallel FE assembly – OpenMP and MPI • Parallel sparse matrix lib – OpenMP and MPI • Sparse linear systems – Direct; MUMPS, PARDISO, SPOOLES – Iterative; GMRES, FGMRES, BiCGSTAB, CG • • • • • • • • Multilevel methods; AMG, GMG(hp) SOR, Jacobi (standard) SOR Vector (vector element Helmholtz equation) SOR Gauge (ungauged magnetostatics) SOR Line (boundary layer meshes) Vanka (saddle point problems) Krylov (Helmholtz equations) LAPACK – BLAS; MKL, ACML Performance example 1 • Ahmed body (CFD benchmark model, Re>1e6) – – – – – – – k-eps Reynolds stress turbulence model Mixed structured-unstructured-boundary layer mesh. Size: 2.16M dofs (linear Lagrange elements on 1.6M mesh elements) Solver: Segregated, GMRES/GMG/SOR Line Memory: ~10GB CPU time: 42h (-np 1), 7.5h (-np 16) Accuracy C_d (drag): 2% within experimental results Performance example 2 • Balanced Patch Antenna for 6GHz (for cell phones, GPS etc.) – – – – – – – Study of the efficiency over a freq. range No. Elems: 77k Solver: BiCGStab/GMG/SOR Vector (blocked version) Size: 0.47M complex valued dofs (2nd order edge elements) Memory: ~2GB CPU time: 307 sec (-np 4), 694 sec (-np 1) Accuracy: 10-20% (est.) COMSOL Multiphysics • • • Facilitates all steps in the modeling process − defining your geometry, meshing, specifying your physics, solving, and then visualizing your results. Needed in order to run all add-ons. Interfaces for: – – – – – – – – Heat transfer Structural analysis Electromagnetics CFD Acoustics Diffusion PDEs Unlimited multiphysics couplings Heat Transfer Module • Handles: – Convection – Conduction – Radiation • Interfaces for: – Surface-to-surface radiation – Non-isothermal flow – Heat transfer in thin layers – Heat transfer in biological tissue Model courtesy Continental Corporation. AC/DC Module • • • • • • Capacitors Inductors Motors & Generators Cables Sensors EMC Model courtesy Comet AG, Switzerland. • • • • • • Capacitors Inductors Motors & Generators Cables Sensors EMC RF Module • Antennas • Waveguides • Microwave & optical components • Plasmonics • Metamaterials • Seabed logging • Transmission lines Plasma Module • All types of non-nuclear plasma reactors. • Inductively coupled plasmas (ICP) • DC discharges • Wave heated discharges (Microwave plasmas) • Capacitively coupled plasmas (CCP) Structural Mechanics Module Model courtesy Metelli S.p.A. • Linear and nonlinear stress-strain analysis • Thermal strains and stresses • Elastoplasticity and hyperelasticity • Contact analysis and friction • Buckling • Viscoelasticity, viscoplasticity and creep • Piezoelectric effects Geomechanics Module • A specialized add-on to the Structural Mechanics Module aimed at modeling and simulating geotechnical applications. • Interfaces to study plasticity, deformation, and failure of soils and rocks, as well as their interaction with concrete and human-made structures. MEMS Module • • • • • • • • Model courtesy VTT Microtechnologies Anturit. Resonators Actuators Sensors Piezoelectric devices Accelerometers Lab-on-chips Transducers BAW/SAW devices Acoustics Module • • • • • • Speakers Microphones Transducers Mufflers Sound barriers Building acoustics CFD Module • Laminar flow • K- turbulence model, including low Re • Single- and multiphase flow • Porous media flow • High Mach Number flow • Thin Film flow • Rotating machinery • K-omega (4.2a - October) • Euler-Euler (4.2a - October) Microfluidics Module • Electrokinetic flow • Creeping flow • Two-phase flow with level set and phase field • Wetted walls • Surface tension effects • Fluid-Structure Interaction Subsurface Flow Module • • • • • Model courtesy VTT Technical Research Centre of Finland. Oil& Gas flow in porous media Groundwater flow Pollution through soil Petroleum extraction analysis Poroelastic compaction Chemical Reaction Engineering Module • Is tailor-made to study reacting systems including the effects of material and energy transport. • The Chemical Engineering Module and the Reaction Engineering Module have been replaced with the new Chemical Reaction Engineering Module. Batteries & Fuel Cells Module • Fuel cells • Alkaline • Molten Carbonate (MCFC) • Direct Methanol (DMFC) • Proton Exchange Membrane (PEMFC) • Solid Oxid (SOFC) • Batteries • Lithium ion • Nickel hydride • Lead acid Electrodeposition Module • Enhancement of electrical and thermal conductivity – Printed circuit boards, electrical contacts, and cooling devices • Protection of metal parts – – Corrosion protection of nuts, bolts, and other components Wear resistance coatings on bearings and shafts • Decoration of metals and plastics – – Chromium coatings of automotive parts Nobel metals on jewelry and tableware • Electroforming of parts with thin complex shapes – – Manufacturing of thin screens and shaver heads Manufacturing of MEMS devices Material Library • 2500 different materials • Up to 24 different properties per material. • Most are temperature dependent. Optimization Module • Topology optimization • Inverse modeling • Based on SNOPT code by Stanford University and University of California San Diego Particle Tracing Module • Computes the trajectory of particles in a fluid or electromagnetic field, including particle-field interactions • Applications include: – – – – – – – – – Flow visualization Mixing Spraying Particle separation Mass spectrometry Ion optics Beam physics, Ion energy distribution functions Acoustic streaming LiveLink for MATLAB TM ® • Enables scripting. • Save your COMSOL files as MATLAB M-files. • Manipulate the M-file and call your own functions. • Interface COMSOL Multiphysics simulations to computations performed in other simulators. CAD Import Module • Brings in all major CAD formats directly into the COMSOL Desktop: – – – – ACIS® (.sat, .sab) Parasolid® (.x_t, .x_b, .xmt_bin) STEP (.step) IGES (.igs) TM ® LiveLink for SolidWorks • Associative connection between COMSOL Multiphysics and SolidWorks. • Parametric sweeps and design optimization directly from within SolidWorks. Model courtesy Comet AG, Switzerland. TM LiveLink for Inventor ® • Associative connection between COMSOL Multiphysics and Inventor. • Parametric sweeps and design optimization directly from within Inventor. TM ® LiveLink for Pro/ENGINEER • Associative connection between COMSOL Multiphysics and Pro/ENGINEER. • Parametric sweeps and design optimization directly from within Pro/ENGINEER. TM LiveLink for AutoCAD ® • Associative connection between COMSOL Multiphysics and AutoCAD. • Parametric sweeps and design optimization directly from within AutoCAD. The picture shows a direct currents simulation where a foil wire conductor is represented as a surface in AutoCAD. TM LiveLink for SpaceClaim ® • Associative connection between COMSOL Multiphysics and SpaceClaim. • Parametric sweeps and design optimization directly from within SpaceClaim. The picture shows a thermal simulation of an exhaust manifold where the geometry is synchronized between COMSOL and SpaceClaim. TM TM LiveLink for Creo Parametric • Associative connection between COMSOL Multiphysics and Creo Parametric. • Parametric sweeps and design optimization directly from within Creo Parametric. Streamlines showing the velocity into the impeller and housing of an industrial fan. Model courtesy of Gianluca Argentini, Riello Burners, Italy. COMSOL is Expanding!