Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods...

43
Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods [email protected]

Transcript of Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods...

Page 1: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Uppsala, November 24, 2011

Jacob Yström, doc. Numerical Analysis

Team leader Numerical Methods

[email protected]

Page 2: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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)

Page 3: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

World leader in multiphysics simulations

• HQ in Stockholm.• 16 offices in Europe, India and USA.• 250+ employees.• 14 000 licenses, 60 000 users.

Page 4: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

COMSOL in Sweden

• Development– Math & Computer Science– Numerical Methods– Rendering & Visualization– API– Quality & testing

• Applications– Physics interfaces– Modules– Model library

• Support• Sales

Page 5: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Traditional approach to modeling

Fluid Flow

Chemical Reactions

Electromagnetic Fields

Heat Transfer

Acoustics

Structural Mechanics

Page 6: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

The COMSOL Multiphysics approach

Fluid Flow

Chemical Reactions

Acoustics

Electromagnetic Fields

Heat Transfer

Structural Mechanics

User Defined Equations

Page 7: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

COMSOL 4.2a Product Line

Page 8: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 9: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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– ...

Page 10: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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)

Page 11: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 12: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Extensions

• Sensitivity (forward and adjoint)– For stationary and time-dependent (4.3) problems

• Optimization (NLP and LSQ)– SNOPT (Stanford)– Levenberg-Marquardt– For stationary and time-dependent problems (4.3)

• h-adaption (for Stationary, Parametric and Eigenvalue problems)– L2-norm– Goal oriented (dual weighted residual)

• h-adaption (for Time-dependent problems)– Fixed mesh in sub time-intervals– Uses a physics (or user) controlled error indicator function

• Moving meshes– 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)

Page 13: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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)

Page 14: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 15: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 16: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 17: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 18: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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.

Page 19: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

AC/DC Module

• Capacitors• Inductors• Motors & Generators• Cables• Sensors• EMC

• Capacitors• Inductors• Motors & Generators• Cables• Sensors• EMC

Model courtesy Comet AG, Switzerland.

Page 20: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

RF Module

• Antennas• Waveguides• Microwave & optical

components• Plasmonics• Metamaterials• Seabed logging• Transmission lines

Page 21: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Plasma Module

• All types of non-nuclear plasma reactors.

• Inductively coupled plasmas (ICP)• DC discharges• Wave heated discharges

(Microwave plasmas) • Capacitively coupled plasmas (CCP)

Page 22: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 23: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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.

Page 24: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

MEMS Module

Model courtesy VTT Microtechnologies Anturit.

• Resonators• Actuators• Sensors• Piezoelectric devices• Accelerometers• Lab-on-chips• Transducers• BAW/SAW devices

Page 25: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Acoustics Module

• Speakers• Microphones• Transducers• Mufflers • Sound barriers• Building acoustics

Page 26: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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)

Page 27: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Microfluidics Module

• Electrokinetic flow• Creeping flow• Two-phase flow with level set

and phase field• Wetted walls• Surface tension effects• Fluid-Structure Interaction

Page 28: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 29: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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.

Page 30: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 31: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 32: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Material Library

• 2500 different materials• Up to 24 different properties per

material.• Most are temperature dependent.

Page 33: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

Optimization Module

• Topology optimization • Inverse modeling• Based on SNOPT code by Stanford

University and University of California San Diego

Page 34: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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

Page 35: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM for MATLAB®

• 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.

Page 36: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

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)

Page 37: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM for SolidWorks®

Model courtesy Comet AG, Switzerland.

• Associative connection between COMSOL Multiphysics and SolidWorks.

• Parametric sweeps and design optimization directly from within SolidWorks.

Page 38: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM for Inventor®

• Associative connection between COMSOL Multiphysics and Inventor.

• Parametric sweeps and design optimization directly from within Inventor.

Page 39: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM for Pro/ENGINEER®

• Associative connection between COMSOL Multiphysics and Pro/ENGINEER.

• Parametric sweeps and design optimization directly from within Pro/ENGINEER.

Page 40: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM 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.

Page 41: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM 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 andSpaceClaim.

Page 42: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

LiveLinkTM for CreoTM 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.

Page 43: Uppsala, November 24, 2011 Jacob Yström, doc. Numerical Analysis Team leader Numerical Methods jacob@comsol.se.

COMSOL is Expanding!