+ All Categories
Home > Documents > The COMSOL Multiphysics Modeling & Development …Standalone applications compiled with COMSOL...

The COMSOL Multiphysics Modeling & Development …Standalone applications compiled with COMSOL...

Date post: 17-Mar-2020
Category:
Author: others
View: 2 times
Download: 0 times
Share this document with a friend
Embed Size (px)
of 96 /96
The COMSOL Multiphysics ® Modeling & Development Environment From Physics to Simulations and Applications
Transcript
  • The COMSOL Multiphysics®

    Modeling & Development EnvironmentFrom Physics to Simulations and Applications

  • COMSOL’s Mission“To develop easy-to-use software for the modeling and simulation of real-world multiphysics systems”

  • How Our Customers Use COMSOL

  • ▪ The Model Builder

    ▪ The Application Builder

    ▪ COMSOL Compiler™

    ▪ COMSOL Server™ for running and administrating applications

    COMSOL Multiphysics®

  • Development Tools

    ▪ Model development in the Model Builder

    Physics and math interfaces for modeling and simulations

    Predefined multiphysics interfaces and couplings

    ▪ Application development in the Application Builder

    User interface design tools for creating applications

    Tailored applications built on top of models

    ▪ Standalone applications compiled with COMSOL Compiler™

    Create executables that you can distribute freely

  • From Physics to Application

  • ▪ Define multiphysics models and solve the model equations in the Model Builder

    ▪ Design dedicated user interfaces on top of an embedded model in the Application Builder

    ▪ Create standalone compiled applications with COMSOL Compiler™

    Development Tools

    The COMSOL development tools. Physics interfaces can be created with the Physics Builder.

  • Creating Models

    Model Builder

  • How Our Customers Use COMSOL

  • From Mathematical Model to Numerical Model

  • The First Step: Model Wizard1. Select Model Wizard 2. Select space dimension 3. Select physics interfaces 4. Select study

    Model Wizard1. Select Model Wizard2. Select space dimension3. Select physics interface4. Select study

    Go back and forward with arrow buttons

  • Ribbon Controls for all steps of the modeling process.

    Graphics Window ToolbarApplication BuilderClick this button to start building an application.

    Model Builder WindowThe model tree, with the associated toolbar buttons, gives you anoverview of the model. The modeling process can be controlled from context-sensitive menus.

    Settings WindowShows the settings for the node that is selected in the model tree.

    COMSOL Desktop®

    Model Builder

    Information WindowShows messages progress and log.

    Graphics Window Presents interactive graphics for geometry, mesh, and results.

  • Definitions Geometry Materials Physics Mesh Study Results

    Definitions

    Geometry

    Materials

    Physics

    Mesh

    Study

    Results

    Ribbon tabs for all steps in the modeling process

    Model tree shows sequences of operations

  • Definitions Geometry Materials Physics Mesh Study Results

    Definitions

    Geometry

    Materials

    Physics

    Mesh

    Study

    Results

    Home tab with the most common commands in the

    modeling process

    Model tree shows sequences of operations

  • Multiphysics Modeling: The Core of COMSOL

    Numerical model equations

    Mathematical model equations

    Physics interfacesfor model formulation

    System of differential equations, all coupled using the variable’s notations:

    u, v, w, T, V, … ,x, y, z, t

    Algebraic system of equations obtained through different discretization methods

    Structural mechanics

    Electromagnetics Equation basedTransport

    phenomena

    PDEsODEsDAEs

    FEMBEMFD …

  • Multiphysics, Physics, and Math Interfaces

    Overview of How the Model Builder Defines the Mathematical Model and Generates the Numerical Model

  • Multiphysics: Joule Heating with Thermal Expansion

    Electric currents, solid mechanics, and heat transfer

  • Problem Definition and Physics Settings

    Substrate Dimple Cold arm Hot arms Anchors Applied voltage Ground

    Roller Fixed Fixed temperature

    q·n = h (T - Tamb) Joule heating

    250 mm

    Electric current

    Heat transferSolid mechanics

    Geometry

  • Approaches for Model Setup

    1. Joule heating and thermal expansion

    All physics interfaces and multiphysics couplings are added automatically

    2. Joule heating

    Electric currents and heat transfer with Joule heating couplings are added automatically

    Solid mechanics with thermal expansion multiphysics coupling is added manually

    3. Thermal stress

    Solid mechanics and heat transfer with thermal expansion couplings are added automatically

    Electric currents with Joule heating multiphysics coupling is added manually

    4. Electric currents, solid mechanics, and heat transfer

    One single physics interface at a time

    All predefined multiphysics couplings are added manually

    All four approaches above give the same physics structure in the model tree All physics interfaces and multiphysics couplings are added automatically

  • Physics structure in the model tree

    Domain equation contributionfrom thermal expansion

    Settings forthermal expansion

    All properties depend on T

  • The Mathematical Model Equations “Under the Hood”

    𝜌𝒖𝑡𝑡 − 𝛻 ∙ 𝝈

    𝜌𝐶𝑝𝑇𝑡 + 𝛻 ∙ −𝑘𝛻𝑇

    𝛻 ∙ −𝜅𝛻𝜙

    𝛻𝜙 ∙ −𝜅𝛻𝜙

    𝜌𝒖𝑡𝑡 − 𝛻 ∙ 𝝈 = 0

    𝜌𝐶𝑝𝑇𝑡 + 𝛻 ∙ −𝑘𝛻𝑇 + 𝛻𝜙 ∙ −𝜅𝛻𝜙 = 0

    𝛻 ∙ −𝜅𝛻𝜙 = 0

    𝜎𝑥𝑥𝜎𝑦𝑦𝜎𝑧𝑧𝜎𝑥𝑦𝜎𝑦𝑧𝜎𝑥𝑧

    = 𝑫 𝜺 − 𝜶𝑣𝑒𝑐 𝑇 − 𝑇𝑟𝑒𝑓

    1

    1

    1

    3

    3

    Model tree Domain contributions Domain equations*

    All material properties depend on T

    *Analogously for initial and boundary conditions

  • Mathematical Model Equations “Under the Hood”

    ▪ Expressed like with pen and paper for all physics interfaces

    ▪ For example, an advective term in heat transfer

    ▪ Jacobian obtained with symbolic or numerical differentiation

    𝜕𝑢

    𝜕𝑥= 𝑢𝑥 ↔ ux

    rho*Cp*(Tx*u+Ty*v+Tz*w)𝜌𝐶𝑝 𝑇𝑥 ∙ 𝑢 + 𝑇𝑦 ∙ 𝑣 + 𝑇𝑧 ∙ 𝑤 ↔

  • The Numerical Model Equations “Under the Hood”

    𝜌𝒖𝑡𝑡 − 𝛻 ∙ 𝝈 = 0

    𝜌𝐶𝑝𝑇𝑡 + 𝛻 ∙ −𝑘𝛻𝑇 − 𝑓 𝑇, 𝜙 = 0

    𝛻 ∙ −𝜅𝛻𝜙 = 0

    Mathematical model Numerical model

    න 𝑒𝑎ഥ𝒖𝑡𝑡 + 𝑑𝑎ഥ𝒖𝑡 𝜓𝑑𝑉 − න𝛻𝜓 ∙ 𝚪𝑑𝑉 + න 𝚪 ∙ 𝒏 𝜓𝑑𝐴 = න𝒇 𝑇, 𝜙 𝜓𝑑𝑉

    𝐵𝐶𝑠 𝑎𝑛𝑑 𝐼𝐶𝑠𝜞3

    𝜞2

    𝜞1

    𝑇𝑖𝑚𝑒 𝑑𝑒𝑟. 𝐹𝑙𝑢𝑥 𝑐𝑜𝑛𝑠. 𝐵𝑜𝑢𝑛𝑑. 𝑓𝑙𝑢𝑥 𝑆𝑜𝑢𝑟𝑐𝑒𝑠/𝑠𝑖𝑛𝑘𝑠

    𝐹𝑢𝑙𝑙𝑦 𝑐𝑜𝑢𝑝𝑙𝑒𝑑 𝑎𝑛𝑎𝑙𝑦𝑡𝑖𝑐𝑎𝑙 𝑜𝑟 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙 𝐽𝑎𝑐𝑜𝑏𝑖𝑎𝑛

    Assembling, parsing,weak formulation

    𝛺𝜕𝛺𝛺𝛺

    𝑖=1

    𝑁3

    න𝛺𝑖

    𝑊3𝑖𝑑𝑉𝑖 +

    𝑗=1

    𝑁2

    න𝜕𝛺𝑖

    𝑊2𝑗𝑑𝐴𝑗 = 0

    𝑁3 𝑑𝑜𝑚𝑎𝑖𝑛 𝑐𝑜𝑛𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛𝑠 𝑊3𝑖

    𝑒𝑎𝑐ℎ 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑒𝑑 𝑜𝑣𝑒𝑟 𝑑𝑜𝑚𝑎𝑖𝑛

    𝑠𝑒𝑙𝑒𝑐𝑡𝑖𝑜𝑛 𝛺𝑖

    𝑁2 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛𝑠𝑊2𝑗

    𝑒𝑎𝑐ℎ 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑒𝑑 𝑜𝑣𝑒𝑟 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦𝑠𝑒𝑙𝑒𝑐𝑡𝑖𝑜𝑛 𝜕𝛺𝑗

    FEM

    & F

    D

    𝐸𝑙𝑖𝑚𝑖𝑛𝑎𝑡𝑖𝑜𝑛 𝑜𝑓 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛𝑠 𝑢𝑠𝑖𝑛𝑔𝐷𝑖𝑟𝑖𝑐ℎ𝑙𝑒𝑡 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛𝑠

  • Physics Interfaces as Shown in the Physics List for 3D

    AC/DC and acoustics Chemistry and electrochemistry Fluid flow and heat transfer Optics, plasma, radio frequency, and semiconductor

    Structural mechanics

  • Modeling with Math Interfaces

  • ▪ 3D: Equations defined in volumes and on faces, edges, and points

    ▪ 2D and 2D axi: Equations defined on faces, edges, and points

    ▪ 1D and 1D axi: Equations defined on lines and points

    Math Interfaces

    The math interfaces

  • Landau-Ginzburg Equations Defined on General Form

    Propagation of nerve signals

    System of PDEswith twoindependentvariables (v1, v2)

    𝜕𝑣1𝜕𝑡

    + 𝛻 ∙ Γ1 = 𝑓1

    𝜕𝑣2𝜕𝑡

    + 𝛻 ∙ Γ2 = 𝑓2

  • Modeling with Moving MeshFluid-Structure Interaction (FSI), Rotating Machinery

  • Moving Meshes and Deformed Geometry in the Model Builder

    ▪ Available under Definitions

    ▪ Functionality for deforming domains and rotating domains

    ▪ The arbitrary Lagrangian–Eulerian (ALE) method is used: Meshes that can deform arbitrarily and meshes that move with the material are combined

    ▪ FSI: The solid deforms with the material while the fluid domain can deform arbitrarily within a spatial frame

  • Multiphysics Problems with Moving Mesh: ALE Method

    Structural problemdefined only in the solid domain

    Fluid flow problemdefined only in the fluid domain

    Coupling: The solid’s displacementis balanced by the force from the fluid

    Structural problemdefined on a material frame or undeformed frame:Lagrangian description

    Fluid flow problemdefined on a spatial frame ordeformed frame:Eulerian description

    ALE = Arbitrary Lagrangian–Eulerian

  • Multiphysics Problems with Moving Mesh: ALE Method

    Structural problemdefined only in the solid domain

    Fluid flow problemdefined only in the fluid domain

    Coupling: The solid’s displacement is balanced by the force from the fluid

    The solid’s displacement velocitysets the fluid’s and the frame’s velocityat the boundary

    The displacement of the spatial frame can be formulated by any PDE dueto the ability to formulate math models

  • Multiphysics Problems with Moving Mesh: ALE Method

    Structural problemdefined only in the solid domain

    Fluid flow problemdefined only in the fluid domain

    Coupling: The solid’s displacementis balanced by the force from the fluid

    Equations expressedin a spatial frame ormaterial frame

    The displacement of the spatial frame can be formulated by any PDE*

    Example: 𝜕𝑢

    𝜕𝑥=

    𝜕𝑢

    𝜕𝑋

    𝜕𝑋

    𝜕𝑥;

    𝜕𝑋

    𝜕𝑥obtained from PDE*

    *Note that this is done automatically. There is no need for the user to enter PDEs.

  • Multiphysics Problems with Moving Mesh: ALE Method

    Permanent magnet motor modeled with a moving meshStirred tank reactor modeled with a moving mesh (sliding mesh)

  • Nonlocal Couplings and Extra Dimensions

    Extended Multiphysics

  • Extended Multiphysics

    ▪ Integral equations, ODEs, and algebraic equations defined in the mathematical model

    ▪ Additional systems of PDEs in other coordinate systems

    ▪ Extra dimensions

    ▪ Common nonlocal couplings: control equations, system models, floating potentials, surface-to-surface radiation Model of a wind turbine composite blade. The blade sandwich material structure and stacking sequence is also shown. The quantities and properties along the thickness of the

    layered structure are modeled with a so-called extra dimension.

  • Extended Multiphysics

    ▪ Integral equations, ODEs, and algebraic equations defined in the mathematical model

    ▪ Additional systems of PDEs in other coordinate systems

    ▪ Extra dimensions

    ▪ Common nonlocal couplings: control equations, system models, floating potentials, surface-to-surface radiation

    Packed bed reactor with catalyst pellets, where the transport and reaction along the radius of the microscopic pellets are modeled in an extra dimension (r) in every point in space (x, y, z). This is usually referred to as a multiscale model.

    x

    yzr

    Inflow

    Outflow

  • Extended Multiphysics: Component Couplings

    – General Extrusion

    – Linear Extrusion

    – Boundary Similarity

    – Identity Mapping

    – General Projection

    – Linear Projection

    – Integration

    – Average

    – Maximum

    – Minimum

    The nonlocal couplings are found under Definitions > Component Couplings in the model tree.

  • Multiple Model Components

  • Multiple Model Components in One Model

    ▪ The Model Builder allows for several model components in one model

    ▪ Components can have different space dimensions

    ▪ Coupling operators connect the different components

    ▪ Example: Detailed 1D model of a lithium-ion battery coupled to a 3D model of the cooling system with fluid flow and heat transfer

    1D component

    3D component

  • Multiple Model Components in One Model

    ▪ The Model Builder allows for several model components in one model

    ▪ Components can have different space dimensions

    ▪ Coupling operators connect the different components

    ▪ Example: Detailed 1D model of a lithium-ion battery coupled to a 3D model of the cooling system with fluid flow and heat transfer

    Average operator defined in 1D component for computingaverage heat source

    Variable uses the average operator from the 1D component for computing a 3D heat source

    Heat source

    Temperature fed back to electro-chemical model

  • Studies and SolversA Few Words

  • A Few Words About the Solvers

    ▪ Solvers:

    Direct and iterative linear solvers:

    • Geometric multigrid (GMG) preconditioner

    • Algebraic multigrid (AMG) preconditioner

    Newton methods for nonlinear problems

    Time stepping

    • Backwards differentiation formula

    • Runge–Kutta

    • Generalized a

    Palette of optimization solvers

    ▪ All solvers are parallelized

    Natural convection:time and space-dependent problem

  • Study: Sequence, Step, and Type

    ▪ General studies:

    Stationary

    Time dependent

    Frequency domain (time harmonic)

    Eigenfrequency, eigenvalue

    ▪ Preset studies may consist of several study steps

    ▪ Study steps can be freely combined to produce studies with a sequence of study steps

    Note: Preset studies usually determine the formulation of the underlying model equations

  • Study: Sequence, Step, and Type

    ▪ General studies:

    Stationary

    Time dependent

    Frequency domain (time harmonic)

    Eigenfrequency, eigenvalue

    ▪ Preset studies may consist of several study steps

    ▪ Study steps can be freely combined to produce studies with a sequence of study steps

    The effect of a 50-g, 11-ms, half-sine shock on a circuit board is investigated using response spectrum analysis. The results are compared with a time-dependent modal analysis.

  • Study: Sequence, Step, and Type

    ▪ General studies:

    Stationary

    Time dependent

    Frequency domain (time harmonic)

    Eigenfrequency, eigenvalue

    ▪ Preset studies may consist of several study steps

    ▪ Study steps can be freely combined to produce studies with a sequence of study steps

    An adapter for microwave propagation in the transition between a rectangular and an elliptical waveguide. The scattering S-parameters are calculated for frequencies in the single mode range.

  • ▪ Sets of equations can be altered in a study sequence:

    Solve one set of equations to get initial conditions or a starting guess

    Solve another set of equations, choosing the previous solution as the initial condition or starting guess

    Modify the model configuration in a sequence of study steps; e.g., activate boundary conditions, sources, and sinks

    ▪ Parametric sweeps:

    Study sequences can be combined with parametric sweeps

    Study: Sequence, Step, and Type

    Modified model configuration in a sequence of study steps.

  • Summary: From Mathematical Model to Numerical Model

  • Summary: Multiphysics, Physics, and Math Interfaces

    The equations are treated in the same way, whether they are defined by physics and multiphysics interfaces, user defined in math interfaces, or a combination:

    Fully coupled mathematical and numerical models are created automatically and “on the fly”

    න 𝑒𝑎ഥ𝒖𝑡𝑡 + 𝑑𝑎ഥ𝒖𝑡 𝜓𝑑𝑉 − න𝛻𝜓 ∙ 𝚪𝑑𝑉 + න 𝚪 ∙ 𝒏 𝜓𝑑𝐴 = න𝒇 𝑇, 𝜙 𝜓𝑑𝑉

    𝛺𝜕𝛺𝛺𝛺

    𝑖=1

    𝑁3

    න𝛺𝑖

    𝑊3𝑖𝑑𝑉𝑖 +

    𝑗=1

    𝑁2

    න𝜕𝛺𝑖

    𝑊2𝑗𝑑𝐴𝑗 = 0

    COMSOL Multiphysics®

    formulates a mathematical model before discretization to generate the numerical model

    Physics, multiphysics, and math interfaces

    Results

    Numerical solver

  • Creating ApplicationsThe Application Builder

  • Creating Applications: Why?

    ▪ Allows for a larger community of scientists, engineers, and designers to benefit from modeling and simulation

    ▪ Modeling specialists may create applications for use by nonspecialists

    ▪ The application’s user interface may be tailored for a very specific task and designed so that it is very easy to use for the purpose

    Modeling and simulation specialist

    Application users:typically product or domain specialists

  • ▪ Create dedicated user interfaces on top of an embedded model

    ▪ The embedded model is created in the Model Builder

    Application Builder

    The COMSOL development tools. Physics interfaces can be created with the Physics Builder.

  • Application BuilderClick this button to start building an application.

    COMSOL Desktop®

    Model Builder

  • Form Tab Gives access to the Form Editor functions.

    RibbonControls for all steps of the application design process.

    Form Editor Window Allows you to design the application’s user interface by moving objects around by drag and drop: WYSIWYG!

    Model BuilderClick this button to work with the embedded model.

    Application Builder WindowThe application tree, with the associated toolbar buttons, gives you anoverview of the application’s user interface. The building process can be controlled from context-sensitive menus.

    Settings WindowShows the settings for the node that is selected in the application tree.

    COMSOL Desktop®

    Application Builder

  • Using the Application BuilderAn Example

  • EXAMPLE

    Application for Optimization of a Heat Sink for Battery Cooling

    Maximize the cooling power of a heat sink at a given pressure difference over the cooling system

    Battery pack

    Cooling plateInlet

    Outlet

    Outlet

    Pressure loss

  • EXAMPLE

    Application for Optimization of a Heat Sink for Battery Cooling

    ▪ Topology optimization

    Porosity, e, between 0 → 1

    0 solid materials and 1 no solid material present

    Distribution of e obtained through optimization

    ▪ Assumptions and approximations

    2D structure that is unchanged in the z direction

    The fluid provides the only way to transport heat out of the system

    Pressure over the system and plate dimensions are fixed for each optimization study

    z

    Battery pack

    Cooling plateInlet

    Outlet

    Outlet

  • EXAMPLE

    Application for Optimization of a Heat Sink for Battery Cooling

    ▪ Fluid flow: Brinkman

    Navier–Stokes with Darcy term

    ▪ Heat transfer:

    Conduction and advection

    ▪ Optimization interface:

    Gradient based (SNOPT)

    ▪ Math interface for smoothing

    Diffusion equation for smoothing the walls of the channels

    ▪ Parameter sweep for studying variations in flow rate

  • EXAMPLE

    Application for Optimization of a Heat Sink for Battery Cooling

    ▪ The Application Builder

    Application based on the embedded heat sink model in the previous slide

    Graphics-based development environment: drag-and-drop widgets and forms

    Methods are recorded or written from scratch

    ▪ Application specification

    Define heat sink size

    Set fluid properties

    Set pressure drop over the heat sink

    Result: cooling channel structure

  • Widgets, forms, and methods are created in a graphical environment (WYSIWYG) and previewed with “Test Application”.

    EXAMPLE

    Application for Optimization of a Heat Sink for Battery Cooling

    Application Builder Application

  • Compiling ApplicationsCOMSOL Compiler™

  • ▪ Produce standalone executables from applications created with the Application Builder

    ▪ The executable contains COMSOL Runtime™

    COMSOL Compiler™

    The COMSOL development tools. Physics interfaces can be created with the Physics Builder.

  • COMSOL Compiler™

    ▪ Add-on to COMSOL Multiphysics®

    ▪ Compile for the Windows® and Linux®

    operating systems and macOS

    Compiled applications run without a COMSOL Multiphysics® or COMSOL Server™ license

    Linux is a registered trademark of Linus Torvalds in the U.S. and other countries. macOS is a trademark of Apple Inc., in the U.S. and other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

  • Conclusions: Development Tools

    ▪ The equation-based core means an easy-to-use development environment

    Does not require a programmer for model development

    Just type it in: easy to extend with your own equations

    Physics and multiphysics interfaces can be combined freely

    ▪ Application Builder

    Model to application: drag & drop common commands and widgets

    Depth and versatility: methods for extended functionality

    Easy-to-tailor applications for different purposes

    ▪ COMSOL Compiler™ for creating standalone applications

    Distribute your applications

  • Running ApplicationsA Short Note

  • Running Applications Using COMSOL Server™

    ▪ Install COMSOL Server™ where you want it:

    Own server

    Cloud using a cloud service

    ▪ Access applications worldwide:

    Intranet or extranet

    ▪ Run applications through a browser or native client, such as Windows® or Android®

  • COMSOL Server™

    ▪ Manage application libraries

    ▪ User accounts

    Credentials

    Groups

    Monitor processes

    ▪ Branding and appearance

    Customize user interface

    ▪ Worldwide license

    All trademarks are the property of their respective owners. See http://www.comsol.com/trademarks.

    http://www.comsol.com/trademarks

  • ▪ COMSOL Compiler™

    Create standalone simulation applications that anyone can run

    ▪ COMSOL Server™

    Give your organization access to applications and manage them using administrator tools

    Running and Administrating Applications

  • End

  • Extra Slides

  • ▪ The Physics Builder

    ▪ The Model Builder

    ▪ The Application Builder

    ▪ COMSOL Compiler™

    ▪ COMSOL Server™ for running and administrating applications

    COMSOL Multiphysics®

  • Development Tools

    ▪ Physics interface development in the Physics Builder

    Math interfaces for prototyping

    COMSOL uses it to develop all physics and math interfaces

    ▪ Model development in the Model Builder

    Physics and math interfaces for modeling and simulations

    Predefined multiphysics interfaces and couplings

    ▪ Application development in the Application Builder

    User interface design tools for creating applications

    Tailored applications built on top of models

    ▪ Standalone applications compiled with COMSOL Compiler™

    Create executables that you can distribute freely

  • From Physics to Application

  • ▪ The Physics Builder, Model Builder, and Application Builder are included in COMSOL Multiphysics®

    ▪ COMSOL Compiler™ is an add-on product

    Development Tools

    The COMSOL development tools

  • ▪ Create physics interfaces using the

    Physics Builder

    ▪ Use physics interfaces in multiphysics

    models and solve the model equations

    in the Model Builder

    ▪ Design dedicated user interfaces on

    top of an embedded model in the

    Application Builder

    ▪ Create standalone compiled

    applications with COMSOL Compiler™

    Development Tools

    The COMSOL development tools

  • Creating Physics InterfacesPhysics Builder

  • ▪ COMSOL uses it internally to create physics interfaces

    ▪ Included in COMSOL Multiphysics®

    ▪ Available for everyone, but requires some expertise in modeling

    Physics Builder

    The COMSOL development tools

  • Creating Physics Interfaces

    ▪ Allows for user-friendly modeling in cases when there is no ready-made physics interface in COMSOL Multiphysics®

    ▪ Experts in mathematical modeling can create physics interfaces for experts in a specific field of physics or engineering (or for themselves)

    ▪ Prototyping using math interfaces and implementation in the Physics Builder

    Turn your math-interface-based models into extensible and distributable physics interfaces

  • Physics Interface Tab Gives access to the functionality for adding physics features.

    RibbonIncludes buttons and drop-down lists for controlling all steps of the physics interface design.

    Manager BuilderClick this button to deploy physics interfaces for use in the Model Builder.

    Physics Builder WindowThe physics tree, with the associated toolbar buttons, gives you an overview of the physics features in a physics interface. The building process can be controlled from context-sensitive menus.

    Settings WindowGives access to all settings for the node selected in the Physics Builder tree.

    COMSOL Desktop®

    Physics Builder

    Physics Builder Manager Window Add and deploy physics interfaces in a COMSOL Multiphysics® installation.

  • EXAMPLE

    Creating a Physics Interface for Schrödinger’s Equation

    Declaration ofdependent variables

    Definition of alldomain and boundary settings

    Auxiliary variables

    Default plots

    Equation contributions can be defined in strong or weak form using tensor notation: Automatically formulates the numerical model equations for 1D, 2D, and 3D

  • Physics Builder Model Builder

    EXAMPLE

    Creating a Physics Interface for Schrödinger’s Equation

    Define the physics node in the Physics Builder Settings window for the corresponding node in the Model Builder

  • SUMMARY

    Creating Physics Interfaces with the Physics Builder

    ▪ Graphical development environment

    The physics interface developer does not have to be a programmer

    ▪ Generates and deploys the code for the physics interface

    Eliminate bugs and errors by automatically formulating the equations for all space dimensions using tensor notation

    ▪ The tools that COMSOL developers use are available for everyone

    Workflow and “look and feel” are identical for built-in and user-created physics interfaces

  • Physics and Multiphysics Interfaces

    Predefined Multiphysics Couplings

    Alternative Setups

  • Possible Approaches for Multiphysics Model Setup

    ▪ Predefined multiphysics interfaces

    ▪ Physics interfaces with predefined multiphysics couplings

    ▪ Physics interfaces with equation-based multiphysics couplings

    ▪ Math interfaces when there are no predefined alternatives at all

    A few interesting predefined multiphysics interfaces shownin the Model Wizard

  • Possible Approaches for Multiphysics Model Setup

    ▪ Predefined multiphysics interfaces:

    The physics interfaces and multiphysics couplings are defined automatically when the multiphysics interface is selected in the Model Wizard

    Selected multiphysics interface in the Model Wizard

  • Possible Approaches for Multiphysics Model Setup

    ▪ Predefined multiphysics interfaces:

    The physics interfaces and multiphysics couplings are defined automatically when the multiphysics interface is selected in the Model Wizard

    All multiphysics couplings are added automatically

  • Possible Approaches for Multiphysics Model Setup

    ▪ Physics interfaces with predefined multiphysics couplings:

    Physics interfaces are added to the model

    Predefined multiphysics couplings are manually added in the model tree

    Example: One predefined multiphysics interface for Joule heating and one manually added Solid Mechanics interface

    Predefined multiphysics interface

    Physics interface

  • Possible Approaches for Multiphysics Model Setup

    ▪ Physics interfaces with predefined multiphysics couplings:

    Physics interfaces are added to the model

    Predefined multiphysics couplings are manually added in the model tree

    Example: thermal expansion

    From predefined multiphysics interface

    We have to manually add the thermal expansion predefined multiphysics coupling

  • Possible Approaches for Multiphysics Model Setup

    ▪ Physics interfaces with equation-based multiphysics couplings

    Physics interfaces are added one by one to the model

    Multiphysics couplings are defined manually using equation-based modeling when predefined couplings are not available

    ▪ Math interfaces when there are no predefined alternatives at all

    Both the model equations and the multiphysics couplings are defined using equation-based modeling with the math interfaces

  • Multiphysics Strategies

  • Older Multiphysics Strategy

    Numerical model equations

    User interfacesfor model formulation

    Structural mechanics

    Electromagnetics Transport

    phenomena

    FEMFVMFD …

    User subroutines User subroutines

    Algebraic system of equations obtained

    through different discretization methods

    Algebraic system of equations obtained

    through different discretization methods

    Algebraic system of equations obtained

    through different discretization methods

  • COMSOL’s Multiphysics Strategy

    Numerical model equations

    Mathematical model equations

    Physics interfacesfor model formulation

    System of differential equations, all coupled using the variable’s notations:

    u, v, w, T, V, … ,x, y, z, t

    Algebraic system of equations obtained through different discretization methods

    Structural mechanics

    Electromagnetics Equation basedTransport

    phenomena

    PDEsODEsDAEs

    FEMBEMFD …

  • A Short ExampleA Shorter Alternative to the Thermal Actuator

  • Input in the form of material properties, BCs, ICs, constraints, loads, sources, sinks, …

    Equations shownfor transparencyand clarity

    Settings adapted for the selected engineering or physics field

    All properties, sources, and sinks can be analytical functions of u, T, …

  • Mathematical Model Equations “Under the Hood”

    ▪ Expressed like with pen and paper for all physics interfaces

    ▪ For example, an advective term in heat transfer

    ▪ Jacobian obtained with symbolic or numerical differentiation

    𝜕𝑢

    𝜕𝑥= 𝑢𝑥 ↔ ux

    rho*Cp*(Tx*u+Ty*v+Tz*w)𝜌𝐶𝑝 𝑇𝑥 ∙ 𝑢 + 𝑇𝑦 ∙ 𝑣 + 𝑇𝑧 ∙ 𝑤 ↔

  • Numerical Model Equations

    ▪ Space discretization using finite element methods (FEM), discontinuous Galerkin (DG), and boundary element methods (BEM)

    ▪ Method of lines for time-dependent problems

    Solution of the numerical model equations in space and time


Recommended