comsol44 introduction

162
VERSION 4.4 Introduction to C OMSOL Multiphysics ®

Upload: jc4d2g

Post on 23-Nov-2015

26 views

Category:

Documents


1 download

DESCRIPTION

Comsol44 Introduction

TRANSCRIPT

  • VERSION 4.4

    Introduction toComsol Multiphysics

  • C o n t a c t I n f o r m a t i o nVisit the Contact COMSOL page at www.comsol.com/contact to submit general inquiries, contact

    Technical Support, or search for an address and phone number. You can also visit the Worldwide

    Sales Offices page at www.comsol.com/contact/offices for address and contact information.

    If you need to contact Support, an online request form is located at the COMSOL Access page at

    www.comsol.com/support/case.

    Other useful links include:

    Support Center: www.comsol.com/support

    Product Download: www.comsol.com/product-download

    Product Updates: www.comsol.com/support/updates

    COMSOL Community: www.comsol.com/community

    Events: www.comsol.com/events

    COMSOL Video Center: www.comsol.com/video

    Support Knowledge Base: www.comsol.com/support/knowledgebase

    Part number: CM010004

    I n t r o d u c t i o n t o C O M S O L M u l t i p h y s i c s 19982013 COMSOL

    Protected by U.S. Patents 7,519,518; 7,596,474; 7,623,991; and 8,457,932. Patents pending.

    This Documentation and the Programs described herein are furnished under the COMSOL Software License Agreement (www.comsol.com/comsol-license-agreement) and may be used or copied only under the terms of the license agreement.

    COMSOL, COMSOL Multiphysics, Capture the Concept, COMSOL Desktop, and LiveLink are either registered trademarks or trademarks of COMSOL AB. All other trademarks are the property of their respective owners, and COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by those trademark owners. For a list of such trademark owners, see www.comsol.com/trademarks.

    Version: November 2013 COMSOL 4.4

  • Contents

    Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    COMSOL Desktop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    Example 1: Structural Analysis of a Wrench . . . . . . . . . . . . . . . . 28

    Example

    Advanc

    Para

    Mat

    Add

    Add

    Para

    Para

    Append

    Append

    Append

    Append

    Append | 3

    2: The BusbarA Multiphysics Model . . . . . . . . . . . . . 50

    ed Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    meters, Functions, Variables and Couplings. . . . . . . . . . 78

    erial Properties and Material Libraries. . . . . . . . . . . . . . . 82

    ing Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

    ing Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

    metric Sweeps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    llel Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

    ix ABuilding a Geometry . . . . . . . . . . . . . . . . . . . . . . 118

    ix BKeyboard and Mouse Shortcuts . . . . . . . . . . . . . 132

    ix CLanguage Elements and Reserved Names . . . . 135

    ix DFile Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

    ix EConnecting with LiveLink Add-Ons. . . . . . . . 153

  • 4 |

  • Introduction

    Computer simulation has become an essential part of science and engineering. Digital analysis of components, in particular, is important when developing new products or optimizing designs. Today, a broad spectrum of options for simulation is available; researchers use everything from basic programming languages to various high-level packages implementing advanced methods. Though each of these techniques has its own unique attributes, they all share a common conWhen considyou want a mcomputer simlaws into theiprocess helpsIt would be icapability to environmentrelevant physknowledge tocircumstancegives you theCertain charaCompatibilitsimulation inThis strict renature, electrcompatible. Eand the knowmodel again.Another notimodeling neincluding anomodel requirgeometry, into the ebbs aThe flexible making whaproduction letarget functioCOMSOL isIntroduction | 5

    cern: Can you rely on the results?ering what makes software reliable, its helpful to remember the goal: odel that accurately depicts what happens in the real world. A ulation environment is simply a translation of real-world physical

    r virtual form. How much simplification takes place in the translation to determine the accuracy of the resulting model.deal, then, to have a simulation environment that includes the add any physical effect to your model. That is what the COMSOL is all about. Its a flexible platform that allows users to model all ical aspects of their designs. Expert users can go deeper and use their develop customized solutions, applicable to their unique

    s. With this kind of all-inclusive modeling environment, COMSOL confidence to build the model you want with real-world precision.cteristics of COMSOL Multiphysics become apparent with use.

    y stands out among these. COMSOL requires that every type of cluded in the package has the ability to be combined with any other. quirement mirrors what happens in the real world. For instance, in icity is often accompanied by some thermal effect; the two are fully nforcing compatibility guarantees consistent multiphysics models ledge that you never have to worry about creating a disconnected

    ceable trait of the COMSOL platform is adaptability. As your eds change, so does the software. If you find yourself in need of ther physical effect, you can just add it. If one of the inputs to your

    es a formula, you can just enter it. Using tools like parameterized teractive meshing and custom solver sequences, you can quickly adapt nd flows of your requirements.nature of the COMSOL environment facilitates further analysis by t-if cases easy to set up and run. You can take your simulation to the vel by optimizing any aspect of your model. Parameter sweeps and ns can be executed directly in the user interface. From start to finish,

    a complete problem-solving tool.

  • 6 | COMSOL

    COMSOL Desktop

    MODEL BUILDERTOOLBAR

    QUICK ACCESS TOOLBARUse these buttons for access to functionality such as file open/save, undo/redo, copy/paste, and delete.

    RIBBONThe ribbon tabs have buttons and drop-down lists for controlling all steps of the modeling process.

    MODEL TREETmodel tree gives aoverview of the model and all the functionality and operations neededfor building and solving a model as well as processing tresults.Desktop

    MODEL BUILDER WINDOWThe Model Builder window with the model tree and the associated toolbar buttons gives you overview of the model. The modeling process can be controlled from context sensitive menus accessed by right-clicking a node.

    he n

    he SETTINGS WINDOWClick any node in the model tree to see its associated settings window displayed next to the Model Builder.

  • GRAPHICS Winteractive grOperations inselecting. It isvisualizations

    GRAPHICS WINDOW TOOLBAR

    INFORMATION WINmodel information duprogress, mesh statistCOMSOL Desktop | 7

    INDOWThe Graphics window presents aphics for the Geometry, Mesh, and Results. clude rotating, panning, zooming, and the default window for most Results and .

    DOWSThe Information windows will display vital ring the simulation, such as the solution time, solution ics, solver logs, and, when available, Results Tables.

  • 8 | COMSOL

    The screenshot on the previous pages is what you will see when you first start modeling in COMSOL. COMSOL Desktop provides a complete and integrated environment for physics modeling and simulation. You can customize it to your own needs. The desktop windows can be resized, moved, docked, and detached. Any changes you make to the layout will be saved when you close the session and used again the next time you open COMSOL. As you build your model, additional windows and widgets will be added. (See page 24 for an example of a more developed desktop). Among the available windows and user interface components are the following:

    Quick Acce

    The Quick ARedo, Copy,Customize Q

    Ribbon

    The ribbon amost modelinCOMSOL DOS X and L

    Settings Wi

    This is the mincluding theconditions anDesktop

    ss Toolbar

    ccess Toolbar gives access to functionality such as Open, Save, Undo, Paste, and Delete. You can customize its content from the uick Access Toolbar list.

    t the top of the desktop gives access to commands used to complete g tasks. The ribbon is only available in the Windows version of the esktop environment and is replaced by menus and toolbars in the inux versions.

    ndow

    ain window for entering all of the specifications of the model dimensions of the geometry, properties of the materials, boundary d initial conditions, and any other information that the solver will

  • need to carry out the simulation. The picture below shows the settings window for the Geometry node.

    Plot Windo

    These are thePlot windowto show mulwindow, an aindication of

    Information

    These are the Messages:

    session is Progress: Log: Infor

    solution tiCOMSOL Desktop | 9

    ws

    windows for graphical output. In addition to the Graphics window, s are used for Results visualization. Several Plot windows can be used tiple results simultaneously. A special case is the Convergence Plot utomatically generated Plot window that displays a graphical

    the convergence of the solution process while a model is running.

    Windows

    windows for non-graphical information. They include: Various information about events of the current COMSOL displayed in this window.Progress information from the solver in addition to stop buttons.mation from the solver such as number of degrees of freedom, me and solver iteration data.

  • 10 | COMSO

    Table: Numerical data in table format as defined in the Results branch. External Process: Provides a control panel for cluster, cloud and batch jobs.

    Other Windows

    Add Material and the Material Browser: Access the material property libraries. The Material Browser enables editing of material properties.

    Selection List: A list of geometry objects, domains, boundaries, edges and points that are currently available for selection.

    The More access to afind this in

    Progress Ba

    The Progresslocated in th

    Dynamic He

    The Help wimodel tree nF1 for exampor a window.items.L Desktop

    Windows drop-down list in the Home tab of the ribbon gives you ll COMSOL Desktop windows. (On OS X and Linux, you will the Windows menu.)

    r with Cancel Button

    Bar with a button for canceling the current computation, if any, is e lower right-hand corner of the COMSOL Desktop interface.

    lp

    ndow provides context dependent help texts about windows and odes. If you have the Help window open in your desktop (by typing le) you will get dynamic help (in English only) when you click a node From the Help window you can search for other topics such as menu

  • Preferences

    Preferences are settings that affect the modeling environment. Most are persistent between modeling sessions, but some are saved with the model. You access Preferences from the File menu.

    In the Prefernumber of dcomputationyour currentThere are thrSoftware Renin Windows

    installation. Ihave to switclist of recom

    www.comsolCOMSOL Desktop | 11

    ences window you can change settings such as graphics rendering, isplayed digits for Results, maximum number of CPU cores used for s, or paths to user-defined model libraries. Take a moment to browse settings to familiarize yourself with the different options.ee graphics rendering options available: OpenGL, DirectX, and dering. DirectX is not available in OS X or Linux but is available if you choose to install the DirectX runtime libraries during f your computer doesnt have a dedicated graphics card, you may h to Software Rendering for slower but fully functional graphics. A mended graphics cards can be found at:.com/system-requirements

  • 12 | COMSO

    Creating a New Model

    You can create a new model guided by the Model Wizard or start from a Blank Model.

    CREATING AThe Model Wstudy type, in1 Start by se

    Axisymme

    2 Now, add Physics bradirectly coL Desktop

    MODEL GUIDED BY THE MODEL WIZARDizard will guide you in setting up the space dimension, physics, and a few steps:

    lecting the space dimension for your model component: 3D, 2D tric, 2D, 1D Axisymmetric, or 0D.

    one or more physics interfaces. These are organized in a number of nches in order to make them easy to locate. These branches do not rrespond to products. When products are added to your COMSOL

  • installation, one or more branches will be populated with additional physics interfaces.

    3 Select the Sfor the com

    Finally, clicCOMSOL Desktop | 13

    tudy type that represents the solver or set of solvers that will be used putation.

    k Done. The desktop is now displayed with the model tree

  • 14 | COMSO

    configured according to the choices you made in the Model Wizard.

    CREATING A BLANK MODELThe Blank Model option will open the COMSOL Desktop interface without any Component or Study. You can right-click the model tree to add a Component of a certain space dimension, a physics interface, or a Study.

    The Ribbon and Quick Access Toolbar

    The ribbon tworkflow andstep..

    The Home tato a model anparameters fophysics, buildThere are staare ordered fPhysics, MesContextual tGroup tab wthe node is s

    Modal tabs aribbon may btab. When wpresent operaL Desktop

    abs on the COMSOL Desktop environment reflect the modeling gives an overview of the functionality available for each modeling

    b has buttons for the most common operations for making changes d for running simulations. Examples include changing model r a parameterized geometry, reviewing material properties and ing the mesh, running a study, and visualizing the simulation results.ndard tabs for each of the main steps in the modeling process. These rom left to right according to the workflow: Definitions, Geometry, h, Study, and Results.abs are shown only if and when they are needed, such as the 3D Plot hich is shown when the corresponding plot group is added or when elected in the model tree.

    re used for very specific operations, when other operations in the ecome temporarily irrelevant. An example is the Work Plane modal

    orking with Work Planes, other tabs are not shown since they do not tions relevant to.

  • THE RIBBON VS. THE MODEL BUILDERThe ribbon gives quick access to available commands and complements the model tree in the Model Builder window. Most of the functionally accessed from the ribbon is also accessible from contextual menus by right-clicking nodes in the model tree. Certain operations are only available from the ribbon, such as selecting which desktop window to display. In the COMSOL Desktop interface for OS X and Linux, this functionality is available from toolbars which replace the ribbon on these platforms. There are also operations that are only available from the model tree, such as reordering and disabling nodes.

    THE QUICKThe Quick Aribbon tab thToolbar: youundoing anddeleting nodAccess Toolb

    OS X ANDIn the COMreplaced by a

    The Mod

    The Model Bhow to solvemodel tree.You build a mediting the nAll of the noright-click onbeneath themWhen you clwindow. It isCOMSOL Desktop | 15

    ACCESS TOOLBARccess Toolbar contains a set of commands that are independent of the at is currently displayed. You can customize the Quick Access can add most commands available in the File menu, commands for redoing recent actions, for copying, pasting, duplicating, and es in the model tree. You can also choose to position the Quick ar above or below the ribbon.

    LINUXSOL Desktop environment for OS X and Linux, the ribbon is set of menus and toolbars:

    el Builder and the Model Tree

    uilder is the tool where you define the model and its components: it, the analysis of results, and the reports. You do that by building a

    odel by starting with the default model tree, adding nodes, and ode settings.des in the default model tree are top-level parent nodes. You can them to see a list of child nodes, or subnodes, that you can add . This is the means by which nodes are added to the tree.

    ick on a child node, then you will see its node settings in the settings here that you can edit node settings.

  • 16 | COMSO

    It is worth noting that if you have the Help window open (which is achieved either by selecting Help from the File menu, or by pressing the function key F1), then you will also get dynamic help (in English only) when you click on a node.

    THE ROOT, GLOBAL DEFINITIONS, AND RESULTS NODESA model tree always has a root node (initially labeled Untitled.mph), a Global Definitions node, and a Results node. The label on the root node is the name of the multiphysics model file, osaved to. Thename, defaulThe Global Dand couplingexample, to dforces, geomhas no settinThe Results nand where yofive subnode Data Sets:

    can work w Derived V

    from the spostproce

    Tables: a cDerived Vprobes thareal-time w

    Export: defiles.

    Reports: cmodel in H

    To these fivethat define gSome of thesyou are perfoResults nodeL Desktop

    r MPH file, that this model is root node has settings for author t unit system, and more.efinitions node is where you define parameters, variables, functions,

    s that can be used throughout the model tree. They can be used, for efine the values and functional dependencies of material properties,

    etry, and other relevant features. The Global Definitions node itself gs, but its child nodes have plenty of them.ode is where you access the solution after performing a simulation u find tools for processing the data. The Results node initially has

    s: contains a list of solutions you

    ith.alues: defines values to be derived olution using a number of ssing tools.onvenient destination for the alues or for Results generated by t monitor the solution in hile the simulation is running.fines numerical data, images, and animations to be exported to

    ontains automatically generated or custom reports about the TML or Microsoft Word format.

    default subnodes, you may also add additional Plot Group subnodes raphs to be displayed in the Graphics window or in Plot windows. e may be created automatically, depending on the type of simulations rming, but you may add additional figures by right-clicking on the and choosing from the list of plot types.

  • THE COMPONENT AND STUDY NODESIn addition to the three nodes just described, there are two additional top-level node types: Component nodes and Study nodes. These are usually created by the Model Wizard when you create a new model. After using the Model Wizard to specify what type of physics you are modeling, and what type of Study (e.g. steady-state, time-dependent, frequency-doautomaticallyIt is also possComponent the model. AComponent confusing if tTherefore, threnamed to bpurposes. If a model hathey can be csophisticatedNote that eadifferent typea separate CoTo be more sthat is made Component then rename create two Stbehavior of tcan rename tmodel is commodel tree inCOMSOL Desktop | 17

    main, or eigenfrequency analysis) you will carry out, the Wizard creates one node of each type and shows you their contents.ible to add additional and Study nodes as you develop model can contain multiple and Study nodes and it would be hey all had the same name. ese types of nodes can be e descriptive of their individual

    s multiple Component nodes, oupled together to form a more sequence of simulation steps.ch Study node may carry out a of computation, so each one has mpute button.pecific, suppose that you build a model that simulates a coil assembly up of two parts, a coil and a coil housing. You can create two nodes, one models the coil and the other the coil housing. You can each of the nodes with the name of the object. Similarly, you can also udy nodes, the first simulating the stationary, or steady-state, he assembly and the second simulating the frequency response. You hese two nodes to be Stationary and Frequency Domain. When the plete, save it to a file named Coil Assembly.mph. At that point, the the Model Builder looks like the figure below.

    Keyboard Shortcuts

  • 18 | COMSO

    In this figure, the root node is named Coil Assembly.mph, indicating the file in which the model is saved. The Global Definitions node and the Results node each have their default name. In addition there are two Component nodes and two Study nodes with the names chosen in the previous paragraph.

    PARAMETERS

    ParametersParameters arThat is to say Parameter Specifying Defining p

    variety of

    A Parameter functions witoperators. Foand Reservedbefore a simuLikewise, thedependent vaIt is importanL Desktop

    , VARIABLES, AND SCOPE

    e user-defined constant scalars that are usable throughout the model. , they are global in nature. Important uses are:izing geometric dimensions. mesh element sizes.arametric sweeps (that is, simulations that are repeated for a

    different values of a parameter such as a frequency or a load).

    Expression can contain numbers, parameters, built-in constants, h Parameter Expressions as arguments, and unary and binary r a list of available operators, see Appendix CLanguage Elements Names on page 135. Because these expressions are evaluated lation begins, Parameters may not depend on the time variable t. y may not depend on spatial variables, like x, y, or z, nor on the riables that your equations are solving for.t to know that the names of Parameters are case-sensitive.

  • You define Parameters in the model tree under Global Definitions.

    VariablesVariables cansubnode of avariable depethe model trParameter Exbuilt-in consVariables, likdependent vaderivatives.

    ScopeThe scopein an expressmodel tree. Tthe model trA Variable mscope, but thbe used in GVariable maystop).COMSOL Desktop | 19

    be defined either in the Global Definitions node or in the Definitions ny Component node. Naturally, the choice of where to define the nds on whether you want it to be global (that is, usable throughout ee) or locally defined within a single Component node. Like a pression, a Variable Expression may contain numbers, parameters,

    tants, and unary and binary operators. However, it may also contain e t, x, y, or z, functions with Variable Expressions as arguments, and riables that you are solving for in addition to their space and time

    of a Parameter or Variable is a statement about where it may be used ion. All Parameters are defined in the Global Definition node of the his means that they are global in scope and can be used throughout

    ee.ay also be defined in the Global Definitions node and have global ey are subject to other limitations. For example, Variables may not eometry, Mesh, or Study nodes (with the one exception that a be used in an expression that determines when the simulation should

  • 20 | COMSO

    A Variable that is defined, instead, in the Definitions subnode of a Component node has local scope and is intended for use in that particular Component (but, again, not in Geometry or Mesh nodes). They may be used, for example, to specify material properties in the Materials subnode or to specify boundary conditions or interactions. It is sometimes valuable to limit the scope of the variable to only a certain part of the geometry, such as certain boundaries. For that purpose, provisions are available in the settings for a Variable to select whether to apply the definition either to the entire geometry of the Component, or only to certain Domains, Boundaries, Edges, or Points.The picture bthe scope is l

    Such Selectiowhen defininVariable. To to the right oL Desktop

    elow shows the definition of two Variables, q_pin and R, for which imited to just two boundaries identified by numbers 15 and 19.

    ns can be named and then referenced elsewhere in a model, such as g material properties or boundary conditions that will use the give a name to the Selection, click the Create Selection button ( ) f the Selection list.

  • Although Variables defined in the Definitions subnode of a Component node are intended to have local scope, they can still be accessed outside of the Component node in the model tree by being sufficiently specific about their identity. This is done by using a dot-notation where the Variable name is preceded by the name of the Component node in which it is defined and they are joined by a dot. In other words, if a Variable named foo is defined in a Component node named MyModel, then this variable may be accessed outside of the Component node by using MyModel.foo. This can be useful, for example, when you want to use the variable to make plots in the Results node.

    Built- in C

    COMSOL coreserved namfor a user-deorange (a wathe text strinSome import Mathemat Physical co

    of light), o The time First and s

    whose namvariable na

    Mathemat

    See Appendmore inform

    The Mod

    The Model Ldocumentatiinstructions. with examplestep-by-step modeling anCOMSOL Desktop | 21

    onstants, Variables and Functions

    mes with many built-in constants, variables and functions. They have es that cannot be redefined by the user. If you use a reserved name fined variable, parameter, or function, the text you enter will turn rning) or red (an error) and you will get a tooltip message if you select g.ant examples are:ical constants such as pi (3.14...) or the imaginary unit i or jnstants such as g_const (acceleration of gravity), c_const (speed r R_const (universal gas constant)

    variable, tecond order derivatives of the Dependent variables (the solution) es are derived from the spatial coordinate names and Dependent mes (which are user-defined variables)ical functions such as cos, sin, exp, log, log10, and sqrt

    ix CLanguage Elements and Reserved Names on page 135 for ation.

    el Libraries

    ibraries are collections of model MPH-files with accompanying on that includes the theoretical background and step-by-step Each physics-based add-on module comes with its own model library s specific to its applications and physics area. You can use the instructions and the Model MPH-files as a template for your own d applications. To open the Model Libraries window, on the Home

  • 22 | COMSO

    or Main toolbar, click Model Libraries or select File>Model Libraries and then search by model name or browse under a module folder name.

    Click Open Mopen the moin COMSOLThe MPH-fiMPH-files or Full MPH

    window, th25MB, a tposition th

    Compact Mmeshes anthe settingdownloadmodels whModel Libcompact mmessage aL Desktop

    odel to open the model or click Open PDF Document to del documentation. Alternatively, select File>Help>Documentation to search by model name or browse by module.

    les in the COMSOL model library can have two formatsFull Compact MPH-files:-files, including all meshes and solutions. In the Model Libraries ese models appear with the icon. If the MPH-file size exceeds

    ooltip with the text Large file and the file size appears when you e cursor at the models node in the Model Library tree.PH-files have all of the settings for the model, but without built

    d solution data to save space. You can open these models to study s and to mesh and re-solve the models. It is also possible to

    the full versionswith meshes and solutionsof most of these en you update your model library. These models appear in the raries window with the icon. If you position the cursor at a odel in the Model Libraries window, a No solutions stored

    ppears. If a full MPH-file is available for download, the

  • corresponding nodes context menu includes a Download Full Model item ( ).

    The Model Libraries are updated on a regular basis by COMSOL. To check all available updates, select Update COMSOL Model Library ( ) from the File>Help menu (Windows users) or from the Help menu (OS X and Linux users). This connects you to the COMSOL website where you can access the latest models and model updates.The following spread shows an example of a customized desktop with additional windows.COMSOL Desktop | 23

  • 24 | COMSO

    MODEL BUILDER WINDOW

    MODEL TREE

    PLOT WINDOWvisualize Results qplots. Several Plotmultiple results si

    QUICK ACCESS TOOLBAR

    RIBBONL Desktop

    SETTINGS WINDOW

    The Plot window is used to uantities, probes, and convergence windows can be used to show multaneously.

  • DYNAMIC HELPContinuously updated with online access to the Knowledge Base and Model Gallery. The Help window enables easy browsing with extended search functionality.GRAPHICS WINDOW

    INFORMATION WINDOWCOMSOL Desktop | 25

    PROGRESS BAR WITH CANCEL BUTTON

  • 26 | COMSO

    Workflow and Sequence of Operations

    In the Model Builder window, every step of the modeling process, from defining global variables to the final report of results, is displayed in the model tree.

    From top to In the followyou can chanmodel tree: Geometry Material Physics MeshL Desktop

    bottom, the model tree defines an orderly sequence of operations.ing branches of the model tree, node order makes a difference and ge the sequence of operations by moving the nodes up or down the

  • Study Plot Groups

    In the Component Definitions branch of the tree, the ordering of the following node types also makes a difference: Perfectly Matched Layer Infinite Elements

    Nodes may be reordered by these methods: Drag-and- Right-clic Pressing CIn other bransequence of onodes to GloYou can viewsaving the mhaving selectkeeps a compsuch, it incluboundary cohistory remorecent form oAs you workwill grow to description onext chapterswith the softCOMSOL Desktop | 27

    dropking the node and selecting Move Up or Move Downtrl + up-arrow or Ctrl + down-arrowches, the ordering of nodes is not significant with respect to the perations, but some nodes can be reordered for readability. Child

    bal Definitions is one such example. the sequence of operations presented as program code statements by odel as a model file for MATLAB or as a model file for Java after ed Compact History in the File menu. Note that the model history lete record of the changes you make to a model as you build it. As des all of your corrections including changes to parameters and nditions and modifications of solver methods. Compacting this ves all of the overridden changes and leaves a clean copy of the most f the model steps.

    with the COMSOL Desktop interface and the Model Builder, you appreciate the organized and streamlined approach. But any f a user interface is inadequate until you try it for yourself. So, in the you are invited to work through two examples to familiarize yourself ware.

  • 28 | Example

    Example 1: Structural Analysis of a Wrench

    This simple example requires none of the add-on products to COMSOL Multiphysics. For more fully-featured structural mechanics models, see the Structural Mechanics Module model library.At some point in your life, it is likely that you have tightened a bolt using a wrench. This exercise takes you through a structural mechanics model that analyzes this basic task from the perspective of the structural integrity of the wrench subjected to a worst-caThe wrench iis too high, tbehavior whehandle is appis within the This tutorial opening the Ma geometry isother key stecondition fordefining the through visuIf you prefer familiarize yoExample 2: 1: Structural Analysis of a Wrench

    se loading.s, of course, made from steel, a ductile material. If the applied torque he tool will be permanently deformed due to the steels elastoplastic n pushed beyond its yield stress level. To analyze whether the wrench ropriately dimensioned, you will check if the mechanical stress level yield stress limit.gives a quick introduction to the COMSOL workflow. It starts with

    odel Wizard and adding a physics option for solid mechanics. Then imported and steel is selected as the material. You then explore the ps in creating a model by defining a parameter and boundary the load, selecting geometric entities in the Graphics window, Mesh and Study, and finally examining the results numerically and alization.to practice with a more advanced model, read this section to urself with some of the key features, and then go to the tutorial The BusbarA Multiphysics Model on page 50.

  • Model Wizard

    1 To start the software, double-click the COMSOL icon on the desktop which will take you to the New window with two options for creating a new model: Model Wizard or Blank Model.

    If you select Blank Model, you can right-click the root node in the model tree to manually add a Component and a Study. FoIf COMSOWizard byModel Wiz

    The Modesetting up dimension

    2 In the Sele

    3 In Select PMechanics(solid) . Without adMechanicsavailable infolder. In tStructural it appears wavailable.

    Click StudExample 1: Structural Analysis of a Wrench | 29

    r this tutorial, click the Model Wizard button.L is already open, you can start the Model

    selecting New from the File menu. Choose the ard.

    l Wizard will guide you through the first steps of a model. The next window lets you select the of the modeling space.

    ct Space Dimension window, select 3D.

    hysics, select Structural > Solid Mechanics Click Add.d-on modules, Solid

    is the only physics interface the Structural Mechanics he picture to the right, the Mechanics folder is shown as hen all add-on modules are

    y to continue.

  • 30 | Example

    4 Click Stationary under Preset Studies. Click Done once you have finished.Preset Studies have solver and equation settings adapted to the selected physics in this example, Solid Mechanics. A Stationary study is used in this casethere are no time-varying loads or material properties.Any selectibranch

    Geometr

    This tutorial COMSOL ngeometry, se

    File LocationThe locationvaries based ofile path will 1: Structural Analysis of a Wrench

    on from the Custom Studies requires manual settings.

    y

    uses a geometry that was previously created and stored in the ative CAD format,.mphbin. To learn how to build your own e Appendix ABuilding a Geometry on page 118.

    s of the model library that contains the model file used in this exercise n the software installation and operating system. In Windows, the

    be similar to C:\Program Files\COMSOL\COMSOL44\models\.

  • 1 In the Model Builder window, under Component 1, right-click Geometry 1 and select Import .

    As an alterGeometry

    2 In the ImpCOMSOL

    3 Click Browthe COMSC:\Progra

    Structura

    Double-cliExample 1: Structural Analysis of a Wrench | 31

    native, you can use the ribbon and click Import from the tab.ort settings window, from the Geometry import list, select Multiphysics file.

    se and locate the file wrench.mphbin in the model library folder of OL installation folder. Its default location in Windows ism Files\COMSOL\COMSOL44\models\COMSOL_Multiphysics\

    l_Mechanics\wrench.mphbin

    ck to add or click Open.

  • 32 | Example

    4 Click Import to display the geometry in the Graphics window.

    5 Click the wmoving it athe Zoom and Transphappens to

    - To rotat- To move- To zoom

    drag.

    Also see Apadditional inThe importedwrench. In th

    Pan: Right-click and drag

    Rotate: Click and drag1: Structural Analysis of a Wrench

    rench geometry in the Graphics window and then experiment with round. As you point to or click the geometry, it changes color. Click In , Zoom Out , Go to Default 3D View , Zoom Extents , arency buttons on the Graphics window toolbar to see what the geometry:

    e, click and drag anywhere in the Graphics window., right-click and drag. in and out, click the mouse scroll wheel, continue holding it, and

    pendix BKeyboard and Mouse Shortcuts on page 132 for formation. model has two parts, or domains, corresponding to the bolt and the is exercise, the focus will be on analyzing the stress in the wrench.

  • Materials

    The Materials node stores the material properties for all physics and all domains in a Component node. Use the same generic steel material for both the bolt and tool. Here is how to choose it in COMSOL.1 Open the Add Materials window.

    You open the Add Materials window in either of these two ways:- Right-cl

    Model BMaterial

    - From thtab and

    2 In the Addexpand thedown to firight-clickComponen

    3 Examine tsection in window toavailable. Pmarks are simulation

    Also CusmateExample 1: Structural Analysis of a Wrench | 33

    ick Materials in the uilder and select Add e ribbon, select the Home then click Add Material.

    Material window, click to Built-In directory. Scroll nd Structural Steel, and select Add to t 1.

    he Material Contents the Material settings see the properties that are roperties with green check

    used by the physics in the .

    see the busbar tutorial sections Materials on page 58 and tomizing Materials on page 82 to learn more about working with rials.

  • 34 | Example

    Global Definit ions

    You will now define a global parameter specifying the load applied to the wrench.

    Parameters1 In the Model Builder, right-click Global Definitions and choose

    Parameters .2 Go to the Parameters settings window. Under Parameters in the Parameters

    table or in the fields below the table, enter these settings: - In the N- In the E

    notationthe unitbased on

    - In the Dfield, en

    The sections on page 54 aFunctions, VCouplings omore about wparameters.1: Structural Analysis of a Wrench

    ame column or field, enter F.xpression column or field, enter 150[N]. The square-bracket is used to associate a physical unit to a numerical value, in this case of force in Newton. The Value column is automatically updated the expression entered once you leave the field or press Return.escription column or

    ter Applied force.

    Global Definitions nd Parameters, ariables and n page 78 show you orking with

  • So far you have added the physics and study, imported a geometry, added the material, and defined one parameter. The Model Builder node sequence should now match the figure to the right. The default feature nodes under Solid Mechanics are indicated by a D in the upper-left corner of the node icon .The default nodes for Solid Mechanics are: a Linear Elasboundary coboundaries tconstraint orspecifying inivalues for a n(not applicabAt any time, then open it which it was 3 From the F

    write permExample 1: Structural Analysis of a Wrench | 35

    tic Material model, Free nditions that allow all o move freely without a load, and Initial Values for tial displacement and velocity onlinear or transient analysis le in this case).you can save your model and later in exactly the state in saved.ile Menu, select File > Save As. Browse to a folder where you have issions, and save the file as wrench.mph.

  • 36 | Example

    Domain Physics and Boundary Conditions

    With the geometry and materials defined, you are now ready to set the boundary conditions.1 In the Model Builder,

    right-click Solid Mechanics (solid) and select Fixed Constraint .This bounconstrains each pointsurface to directions.

    You can alsselect, fromBoundarie

    2 In the Grathe geomeanywhere idrag the wshown. Clifront surfamodeled bturns blue been selectnumber inshould be

    3 Click the Gbutton 1: Structural Analysis of a Wrench

    dary condition the displacement of on a boundary be zero in all

    o use the ribbon and the Physics tab,

    s > Fixed Constraint.

    phics window, rotate try by clicking n the window and then rench into the position ck on the exposed ce of the partially olt. The boundary indicating that it has ed. The Boundary the Selection list 35.o to Default 3D View

    on the Graphics toolbar to restore the geometry to the default view.

  • 4 In the Model Builder, right-click Solid Mechanics (solid) and select Boundary Load. A Boundary Load node is added to the Model Builder sequence.

    5 In the GrapZoom Boxtoolbar anselect the sthe figure the mousethe selecte

    6 Select the (Boundaryboundary and add it Example 1: Structural Analysis of a Wrench | 37

    hics window, click the button on the d drag the mouse to quare region shown in to the right. Release button to zoom in on d region.

    top socket face 111) by clicking the to highlight it in blue to the Selection list.

  • 38 | Example

    7 In the Boundary Load settings window, under Force, select Total force as the Load type and enter -F in the text field for the z component. The negative sign indicates the negative z direction (downward). With these settings, the load of 150 N will be distributed uniformly across the selected suNote that tbolt and thcondition.COMSOLa material be done w

    Mesh

    The mesh setdiscretize theelements of gtetrahedron, displacementdirections.In this exampdefine a slighresolve the vathe mesh sizespeed and typ1 In the Mo

    settings wi

    2 Click the B1: Structural Analysis of a Wrench

    rface.o simplify the modeling process, the mechanical contact between the e wrench is approximated with a material interface boundary

    Such an internal boundary condition is automatically defined by and guarantees continuity in normal stress and displacement across interface. A more detailed analysis including mechanical contact can ith the Structural Mechanics Module.

    tings determine the resolution of the finite element mesh used to model. The finite element method divides the model into small eometrically simple shapes, in this case tetrahedrons. In each a set of polynomial functions is used to approximate the structural fieldhow much the object deforms in each of the three coordinate

    le, because the geometry contains small edges and faces, you will tly finer mesh than the default setting suggests. This will better riations of the stress field and give a more accurate result.Refining to improve computational accuracy always involves some sacrifice in ically requires increased memory usage.

    del Builder, under Component 1 click Mesh 1 . In the Mesh ndow, under Mesh Settings, select Fine from the Element size list.

    uild All button on the Mesh settings window toolbar.

  • 3 After a few seconds the mesh is displayed in the Graphics window. Zoom in to the mesh and have a look at the element size distribution.

    Study

    In the beginnimplies that Cassumption idefault solverthan 2 GB oinstructions buse up less m1 Right-click

    Compute Example 1: Structural Analysis of a Wrench | 39

    ing of setting up the model you selected a Stationary study, which OMSOL will use a stationary solver. For this to be applicable, the

    s that the load, deformation, and stress do not vary in time. The settings will be good for this simulation if your computer has more

    f in-core memory (RAM). If you should run out of memory, the elow show solver settings that make the solver run a bit slower but emory. To start the solver: Study 1 and select

    (or press F8).

  • 40 | Example

    If your computers memory is below 2 GB you may at this point get an error message Out of Memory During LU Factorization. LU factorization is one of the numerical methods used by COMSOL for solving the large sparse matrix equation system generated by the finite element method.

    You can easily solve this example model on a memory-limited machine by allowing the solver to use the hard drive instead of performing all of the computation using RAM. The steps below show how to do this. If your computer has more than 2 GB of RAM you can skip to the end of this section after step 5 below.1 If you did

    settings frochoose Sho

    2 Under Stuexpand the

    3 Expand thclick DirecA Direct soof solver thtuning in ophysics prorequire lar

    4 In the Direin the Genthe Out-ofLeave the memory (M512 MB.This settinyour compRAM durithe solver hard drive RAM. Allouse the harjust RAM computatio

    5 Right-clickAfter a few seGraphics winin the Messag1: Structural Analysis of a Wrench

    not already start the computation, you can get access to the solver m the Study node. In the Model Builder, right-click Study 1 and w Default Solver .

    dy 1>Solver Configurations, Solver 1 node.e Stationary Solver 1 node and t .lver is a fast and very robust type at requires little or no manual rder to solve a wide range of blems. The drawback is that it may

    ge amounts of RAM.ct settings window, eral section, select -core check box. default In-core

    B) setting of

    g ensures that if uter runs low of ng computation, will start using the as a complement to wing the solver to d drive instead of will slow the n down somewhat. Study 1 and select Compute (or press F8).conds of computation time, the default plot is displayed in the dow. You can find other useful information about the computation es and Log windows; click the Messages and Log tabs under the

  • Graphics window to see the kind of information available to you. The Messages window can also be opened from the More Windows drop-down list in the Home tab of the ribbon.

    Displayin

    The von Miswith the dispdefault unit (1 In the Mo

    (solid) nExample 1: Structural Analysis of a Wrench | 41

    g Results

    es stress is displayed in the Graphics window in a default Surface plot lacement visualized using a Deformation subnode. Change the N/m2) to the more suitable MPa as shown in the following steps. del Builder, expand the Results>Stress ode, then click Surface 1 .

  • 42 | Example

    2 In the settings window under Expression, from the Unit list select MPa (or enter MPa in the field).

    If yaccFrodoinfcoleacvissep

    3 Click the Pplot and th

    The plot isdistributio

    For a typical which means1: Structural Analysis of a Wrench

    ou wish to study the stress more urately, expand the Quality section. m the Recover list select Within

    mains. This setting will recover ormation about the stress level from a lection of elements rather than from h element individually. It is not active by default since it makes ualizations slower. The Within domain setting treats each domain arately, and the stress recovery will not cross material interfaces.lot button in the toolbar of the settings window for the Surface en the Zoom Extents button on the Graphics toolbar.

    regenerated with the updated unit and shows the von Mises stress n in the bolt and wrench under an applied vertical load.

    steel used for tools like a wrench, the yield stress is about 600 MPa, that we are getting close to plastic deformation for our 150 N load

  • (which corresponds to about 34 pounds force). You may also be interested in a safety margin of, say, a factor of three. To quickly assess which parts of the wrench are at risk of plastic deformation, you can plot an inequality expression such as solid.mises>200[MPa].1 Right-click the Results node and add a 3D Plot Group .2 Right-click the 3D Plot Group 2 node and select Surface .

    3 In the Surthe Replacselect SolidMises Stredouble-clicvariable naalso directlExpressionexpressionsolid.mi

    This is a bIn areas wHere, you

    4 Click the P5 In the Mo

    Plot GrouThe resultexercise is Example 1: Structural Analysis of a Wrench | 43

    face settings window click e Expression button and Mechanics>Stress>von

    ss (solid.mises)by king. When you know the me beforehand, you can y enter solid.mises in the field. Now edit this to: ses>200[MPa].oolean expression that evaluates to either 1, for true, or 0, for false. here the expression evaluates to 1, the safety margin is exceeded. also use the Recover feature described earlier.lot button .

    del Builder, click 3D Plot Group 2. Press F2 and in the Rename 3D p dialog box, enter Safety Margin. Click OK.ing plot shows that the stress in the bolt is high, but the focus of this on the wrench. If you wished to comfortably certify the wrench for a

  • 44 | Example

    150 N load with a factor-of-three safety margin, you would need to change the handle design somewhat, such as making it wider.

    You may hasymmetridifferent ifsame forcesee if there

    Converge

    To check theyou can nowmesh and the

    This belowanalyrecom

    EVALUATING1 To study th

    the model Maximum1: Structural Analysis of a Wrench

    ave noticed that the manufacturer, for various reasons, has chosen an c design of the wrench. Because of that, the stress field may be the wrench is flipped around. Try now, on your own, to apply the in the other direction and visualize the maximum von Mises stress to is any difference.

    nce Analysis

    accuracy of the computed maximum von Mises stress in the wrench, continue with a mesh convergence analysis. Do that by using a finer refore a higher number of degrees of freedom (DOFs).

    section will illustrate some more in-depth functionality and the steps could be skipped at a first reading. In order to run the convergence

    sis below, a computer with at least 4GB of memory (RAM) is mended.

    THE MAXIMUM VON MISES STRESSe maximum von Mises stress in the wrench, in the Results section of tree, right-click the Derived Values node and select >Volume Maximum .

  • 2 In the Volume Maximum settings window under Selection choose Manual and select the wrench domain 1 by clicking on the wrench in the Graphics window. We will only consider values in the wrench domain and neglect those in the bolt.

    3 In the Expression text field enter the function ppr(solid.mises). The function ppr() corresponds to the Recover setting in the earlier note on page 42 for Surface plots. The Recover setting with the ppr function is used to increase the quality of the stress field results. It uses a polynomial-preserving recovery (ppr) algorithm, which is a higher-order interpolation of the solution on a patch of mesh elements around each mesh vertex. It is not active by default since it ma

    4 Under Exp5 In the Vol

    click Evalustress. Thewindow an

    To see wheyou can us

    6 Right-click7 Right-click

    Volume 8 In the Max

    function p9 In the sett

    enter MPa Example 1: Structural Analysis of a Wrench | 45

    kes Results evaluations slower.ression, select or enter MPa as the Unit.

    ume Maximum settings window, ate to evaluate the maximum result will be displayed in a Table d will be approximately 366 MPa.

    re the maximum value is attained, e a Max/Min Volume plot. the Results node and add a 3D Plot Group . the 3D Plot Group 3 node and select More Plots>Max/Min ./Min Volume settings window, in the Expression text field, enter the pr(solid.mises).

    ings window under Expression, from the Unit list select MPa (or in the field).

  • 46 | Example

    10Click the Plot button . This type of plot simultaneously shows the location of the max and min values and also their coordinate location in the table below.

    PARAMETERIWe will now solving and tlets define th1 In the Mo2 Go to the

    table in th- In the N

    paramet- In the E- In the D1: Structural Analysis of a Wrench

    ZING THE MESHdefine a parametric sweep for successively refining the mesh size while hen finally plot the maximum von Mises stress vs. mesh size. First, e parameters that will be used for controlling the mesh density.

    del Builder, click Parameters under Global Definitions .Parameters settings window. In the Parameters table (or under the e fields), enter these settings: ame column or field, enter hd. This parameter will be used in the

    ric sweep to control the element size.xpression column or field, enter 1.escription column or field, enter Element size divider.

  • 3 Now, enter another parameter with Name h0, Expression 0.01, and Description Starting element size. This parameter will be used to define the element size at the start of the parametric sweep.

    4 In the Model Builder, under Component 1 click Mesh 1 . In the Mesh settings window select User-controlled mesh from the Sequence type list.

    5 Under Me6 In the Size

    Size, click Under Ele- h0/hd in- h0/(4*h

    field.- 1.3 in th

    field.- 0.1 in t- 0.2 in t

    field.See page 6

    PARAMETRICAs a next ste1 In the Mo

    Parametricadded to t

    2 In the Paratable, clickhd.Example 1: Structural Analysis of a Wrench | 47

    sh 1, click the Size node . settings window under Element the Custom button. ment Size Parameters, enter: the Maximum element size field.d) in the Minimum element size

    e Maximum element growth rate

    he Curvature factor field.he Resolution of narrow regions

    9 for more information on the Element Size Parameters.

    SWEEP AND SOLVER SETTINGSp, add a parametric sweep for the parameter hd.del Builder, right-click Study 1 and select Sweep . A Parametric Sweep node is he Model Builder sequence.metric Sweep settings window, under the

    the Add button . From the Parameter names list in the table, select

  • 48 | Example

    3 Enter a range of Parameter values to sweep for. Click the Range button and enter the values in the Range dialog box. In the Start field, enter 1. In the Step field, enter 1, and in the Stop field, enter 6. Click Replace. The Parameter value list will now display range(1,1,6).The settings above make sure that as the sweep progresses, the value of the parameter hd increaseminimum See page 1For the higTherefore,

    4 Under Stunode, righsolver optitailoring o

    5 Under GenRight. (Tha warning affect the rused to presolver.)

    6 Right-clickiterative sofinite elem

    7 Click the Sby right-clStudy tab. computer

    RESULTS ANAs a final stepmaximum vo1 In the Mo

    MaximumThe solutioSolution 21: Structural Analysis of a Wrench

    s and the maximum and element sizes decrease. 07 for more information on defining parametric sweeps.hest value of hd, the number of DOFs will exceed one million. we will switch to a more memory efficient iterative solver.dy 1>Solver Configurations>Solver 1, expand the Stationary Solver 1 t-click Stationary Solver 1 , and select Iterative . The Iterative on typically reduces memory usage but can require physics-specific f the solver settings for efficient computations.eral in the settings window for Iterative, set Preconditioning to is is an optional low-level solver option which in this case will avoid message that otherwise will appear. However, this setting does not esulting solution. Preconditioning is a mathematical transformation pare the finite element equation system for using the Iterative

    the Iterative 1 node and select Multigrid . The Multigrid lver uses a hierarchy of meshes of different densities and different ent shape function orders.tudy 1 node and select Compute , either in the settings window or icking the node. You can also click Compute in the ribbon Home or The computation time will be a few minutes (depending on the hardware) and memory usage will be about 4GB.

    ALYSIS

    , analyze the results from the parametric sweep by displaying the n Mises stress in a Table.del Builder under Results>Derived values, select the Volume node .ns from the parametric sweep are stored in a new Data set named

    . Now change the Volume Maximum settings accordingly:

  • 2 In the settings window for Volume Maximum, change the Data set to Solution 2.

    3 Click the arrow next to the Evaluate button at the top of the Volume Maximum settings window, select to evaluate in a New Table. This evaluation may take a minute or so.

    4 To plot the results in the Table, click the Table Graph button at the top of the Table window. Generating this plot may take a minute or so.It is more number of

    5 Right-click6 In the sett

    2.7 In the Exp8 From the E

    window, separameter

    This convergMises stress imesh with abDOFs. It also1,100,000 D

    This conclud

    DExample 1: Structural Analysis of a Wrench | 49

    interesting to plot the maximum value vs. the DOFs. This is possible by using a built-in variable numberofdofs. the Derived Values node and select Global Evaluation .

    ings window for Global Evaluation, change the Data set to Solution

    ressions field, enter numberofdofs.valuate toolbar button at the top of the Global Evaluation settings lect to evaluate in Table 2 (to display the DOF values for each next to the previously evaluated data).

    ence analysis shows that the computed value of the maximum von n the wrench handle will increase from the original 356 MPa, for a out 60,000 DOFs, to 370 MPa for a mesh with about 1,100,000 shows that 300,000 DOFs essentially gives the same accuracy as OFs; see the table below.

    es the wrench tutorial.

    EGREES OF FREEDOM COMPUTED MAX VON MISES STRESS (MPA)

    59,685 355.8

    176,706 364.2

    313,821 369.3

    584,691 368.7

    861,372 369.6

    1,130,300 369.9

  • 50 | Example

    Example 2: The BusbarA Multiphysics Model

    Electrical Heating in a BusbarThis tutorial demonstrates the concept of multiphysics modeling in COMSOL. We will do this by introducing different phenomena sequentially. At the end, you will have built a truly multiphysics model.The model that you are about to create analyzes a busbar designed to conduct direct currenthe busbar, flosses, a phenwhile the bolthe currents however, illuthrough the lower electricdensity.

    The goal of yup. Once youchance to invthe busbar anThe Joule heenergy. Onceelectric field,by natural coexposed parts2: The BusbarA Multiphysics Model

    t to an electric device (see picture below). The current conducted in rom bolt 1 to bolts 2a and 2b, produces heat due to the resistive omenon referred to as Joule heating. The busbar is made of copper

    ts are made of a titanium alloy. Under normal operational conditions are predominantly conducted through the copper. This example, strates the effects of an unwanted electrical loading of the busbar bolts. The choice of materials is important because titanium has a al conductivity than copper and will be subjected to a higher current

    our simulation is to precisely calculate how much the busbar heats have captured the basic multiphysics phenomena, you will have the estigate thermal expansion yielding structural stresses and strains in d the effects of cooling by an air stream.

    ating effect is described by conservation laws for electric current and solved for, the two conservation laws give the temperature and

    respectively. All surfaces, except the bolt contact surfaces, are cooled nvection in the air surrounding the busbar. You can assume that the of the bolt do not contribute to the cooling or heating of the device.

    Titanium Bolt 2b Titanium Bolt 1

    Titanium Bolt 2a

  • The electric potential at the upper-right vertical bolt surface is 20 mV and the potential at the two horizontal surfaces of the lower bolts is 0 V. This corresponds to a relatively high and potentially unsafe loading of this type of busbar. More advanced boundary conditions for electromagnetics analysis is available with the AC/DC Module, such the capability to give the total current on a boundary.

    Busbar Model OverviewMore in-depth and advanced topics included with this tutorial are used to show you some of the many options available in COMSOL. The following topics are covered: Paramete

    learn how Material

    customize Adding M

    two differ Adding P

    adding So Parametr

    busbar usiresult is a

    In the sectmodel usi

    Model W

    1 To open ththe deskto

    When the Or, if COMWizard by Model WizExample 2: The BusbarA Multiphysics Model | 51

    rs, Functions, Variables and Couplings on page 78, where you to define functions and component couplings.Properties and Material Libraries on page 82 shows you how to a material and add it to your own material library.

    eshes on page 84 gives you the opportunity to add and define ent meshes and compare them in the Graphics window.hysics on page 86 explores the multiphysics capabilities by lid Mechanics and Laminar Flow to the busbar model.ic Sweeps on page 107 shows you how to vary the width of the ng a parameter and then solve for a range of parameter values. The plot of the average temperature as a function of the width.ion Parallel Computing on page 115 you learn how to solve the ng Cluster Computing.

    izard

    e software, double-click the COMSOL icon on p.

    software opens, click the Model Wizard button. SOL is already open, you can start the Model

    selecting New from the File menu. Then, choose ard.

  • 52 | Example

    2 In the Select Space Dimension window, click 3D.

    3 In the Select Physics window, expand the Heat Transfer > Electromagnetic Heating folder, then right-click Joule Heating and choose Add Physics. Click the SYou can alAdd buttoAnother wthe Add Phright-clickithe ModelPhysics .Note, you physics listmodules inright is shoadd-on mo2: The BusbarA Multiphysics Model

    tudy button. so double-click or click the n to add physics.ay to add physics is to open ysics window by

    ng the Component node in Builder and selecting Add

    may have fewer items in your depending on the add-on stalled. The figure on the wn for the case where all dules are installed.

  • 4 In the Select Study window, click to select the Stationary study type. Click the Done button. Preset Studies are studies that have solver and equation settings adapted to the selected physics; in this example, Joule heating.Any selection from the Custom Studies branch Note, you your studyinstalled ad

    ThintintHewitthabrasoucouappit pcapphExample 2: The BusbarA Multiphysics Model | 53

    needs manual fine-tuning.may have fewer study types in list depending on the d-on modules.

    e Joule Heating multiphysics erface consists of two physics erfaces, Electric Currents and at Transfer in Solids, together h the multiphysics couplings t appear in the Multiphysics nch: the electromagnetic heat rces and a temperature pling. This multiphysics roach is very flexible and makes ossible to fully use the abilities of the participating

    ysics interfaces.

  • 54 | Example

    Global Definit ions

    To save time, its recommended that you load the geometry from a file. In that case, you can skip to Geometry on page 55.If, on the other hand, you want to draw the geometry yourself, the Global Definitions branch is where you define the parameters. First, compledefine the pathen skip to tBuilding a GThe Global DModel Buildand Functionmodel tree cacomponents Definitions wavailable for particular exaComponent scope to thisFunctions in Component Parameters aSince you wilthe geometrythe length forad_1, the thYou will alsocoefficient foacross the bu1 Right-click

    table, click2 Click the f

    enter the u3 Continue a

    according

    2 x rad_12: The BusbarA Multiphysics Model

    te steps 1 through 3 below to rameter list for the model, and he section Appendix Aeometry on page 118.efinitions node in the

    er stores Parameters, Variables, s with a global scope. The n hold several model simultaneously, and the ith a global scope are made

    all components. In this mple, there is only one node in which the parameters are used, so if you wish to limit the single component you could define, for example, Variables and the Definitions subnode available directly under the corresponding node. However, no Parameters can be defined here because re always global.l run a parametric study of the geometry later in this example, define using parameters from the start. In this step, enter parameters for r the lower part of the busbar, L, the radius of the titanium bolts, ickness of the busbar, tbb, and the width of the device, wbb.

    add the parameters that control the mesh, mh, a heat transfer r cooling by natural convection, htc, and a value for the voltage sbar, Vtot. Global Definitions and choose Parameters . In the Parameters the first row under Name and enter L. irst row under Expression and enter the value of L, 9[cm]. You can nit inside the square brackets.dding the other parameters: L, rad_1, tbb, wbb, mh, htc, and Vtot

    to the Parameters list below. It is a good idea to enter descriptions for

    wbbL

    tbb

  • variables in case you want to share the model with others and for your own future reference.

    4 Click the Sbusbar.m

    Geometr

    This section Libraries winthe model fil1 Select Mod

    Windows gExample 2: The BusbarA Multiphysics Model | 55

    ave button on the Quick Access Toolbar and name the model ph. Then go to Appendix ABuilding a Geometry on page 118.

    y

    describes how the model geometry can be opened from the Model dow. The physics, study, parameters, and geometry are included with e you are about to open.el Libraries from the roup in the Home tab.

  • 56 | Example

    2 In the Model Libraries tree under COMSOL Multiphysics > Multiphysics, select busbar geom.

    To open the model file you can:- Double-click the name- Right-click and select an option from

    the menu- Click one of the buttons under the tree

    You can seuntitled.

    The geomparameteriwill experithe width

    3 Under GloParametersIn the Parain the Expparameter the value o

    4 In the Mod1>Geometnode anto rerun thfrom the G2: The BusbarA Multiphysics Model

    lect No if prompted to save mph.

    etry in this model file is zed. In the next few steps, we ment with different values for parameter, wbb.bal Definitions click the node . meters settings window, click

    ression column for the wbb and enter 10[cm] to change f the busbar width.el Builder, under Component

    ry 1, click the Form Union d then the Build All button e geometry sequence. You can also use the ribbon and click Build All eometry group in the Home tab.

  • 5 In the Graphics toolbar click the Zoom Extents button to see the wider busbar in the Graphics window.

    6 Experimen- To rotat

    window.- To mov- To zoom

    - To get bbutton

    7 Return to change the

    8 In the MoUnion nodAll buttonsequence.

    9 On the GrZoom ExtExample 2: The BusbarA Multiphysics Model | 57

    t with the geometry in the Graphics window:e the busbar, click and drag the pointer anywhere in the Graphics

    e it, right-click and drag. in and out, click the scroll wheel, continue holding it, and drag.

    ack to the original position, click the Go to Default 3D View on the toolbar.

    the Parameters table and value of wbb back to 5[cm].del Builder, click the Form e and then click the Build

    to rerun the geometry

    aphics toolbar, click the ents button .

    wbb=10cmwbb=5cm

  • 58 | Example

    10If you built the geometry yourself, you are already using the busbar.mph file, but if you opened the model library file, select Save As from the File menu and rename the model busbar.mph.

    After creating or opening the geometry file, it is time to define the materials.

    Materials

    The Materialdomains in amade of a titmaterial data1 In the Mo

    default, thmove the wlocation. Uoptions for

    The Mto sothe n2: The BusbarA Multiphysics Model

    s node stores the material properties for all physics and geometrical Component node. The busbar is made of copper and the bolts are anium alloy. Both of these materials are available from the Built-In base.del Builder, right-click Materials and select Add Material . By e window will open at the right-hand side of the desktop. (You can

    indow by clicking on the window title, then drag it to the new pon releasing the mouse button, you will be presented with several docking.)

    aterials node will show a red in the lower-right corner if you try lve without first defining a material (you are about to define that in ext few steps).

  • 2 In the Add Material window, expand the Built-In materials folder and locate Copper. Right-click Copper and select Add to Component 1. A Copper node is added to the Model Builder.

    3 In the Add Material window, scroll to Titanium beta-21S in the Built-IRight-clickComponen

    4 In the Mothe Geomean overvie

    5 Under theExample 2: The BusbarA Multiphysics Model | 59

    n material folder list. and select Add to t 1.

    del Builder, collapse try 1 node to get

    w of the model.

    Materials node, click Copper .

  • 60 | Example

    6 In the Material settings window, examine the Material Contents section.

    The Materusage of a from the mby the phyproperty th

    The Cwill bthe m

    Because thmaterial asbolts, whic

    7 In the Mo2: The BusbarA Multiphysics Model

    ial Contents section has useful feedback about the material property model. Properties that are both required by the physics and available aterial are marked with a green check mark . Properties required

    sics but missing in the material are marked with a warning sign . A at is available but not used in the model is unmarked.oefficient of thermal expansion in the table above is not used, but

    e needed later when heat-induced stresses and strains are added to odel.e copper material is added first, by default all parts have copper signed. In the next step you will assign titanium properties to the h overrides the copper material assignment for those parts.del Builder, click Titanium beta-21S .

  • 8 Select All Domains from the Selection list and then click domain 1 in the list. Now remove domain 1 from the selection list. To remove a domain from the selection list (or any geometric entity such as boundaries, edges, or points), you can use either of these two methods:- Click domain 1 in the selection list found in the Material settings window,

    then click the Remove from Selection button or press Delete on your keyboard.

    - Alternatively, in the Graphics window, click domain 1 to remove it from the selection

    The doExample 2: The BusbarA Multiphysics Model | 61

    list.

    mains 2, 3, 4, 5, 6, and 7 are highlighted in blue.

  • 62 | Example

    9 In the Material settings window, be sure to inspect the Material Contents section for the titanium material. All the properties used by the physics should have a green check mark .

    10Close the Aeither by cupper righAdd MaterMaterials gtab.

    Physics

    Next you wilfor the heat tIn the Modemultiphysics 2: The BusbarA Multiphysics Model

    dd Material window licking the icon in the t corner or by clicking the ial toggle button in the roup of the ribbon Home

    l inspect the physics domain settings and set the boundary conditions ransfer problem and the conduction of electric current.l Builder window, examine the default physics nodes of the interface for Joule heating. First, collapse the Materials node. Then

  • click the Electric Currents , Heat Transfer in Solids , and Multiphysics nodes to expand them.

    The D in thThe equationsettings windThe default eFor Joule heand electric p

    To alSectioSelectwindoExample 2: The BusbarA Multiphysics Model | 63

    e upper left corner of a nodes icon ( ) means it is a default node.s that COMSOL solves are displayed in the Equation section of the ows of the respective physics nodes.quation form is inherited from the study added in the Model Wizard. ating, COMSOL displays the equations solved for the temperature otential.

    ways display the section in its expanded view, click the Expand ns button ( ) on the Model Builder toolbar and select Equations. ing this option expands all the Equation sections in physics settings ws.

  • 64 | Example

    The Heat Transfer in Solids (ht) and Electric Currents (ec) nodes have the settings for heat conduction and current conduction, respectively. Under the Electric Currents node, the Current Conservation node represents the conservation of electric current at the domain level and the Electric Insulation node contains the default bounElectric CurrUnder the Hnode, the domin Solids nodconservationInsulation noboundary cothe ElectromValues node,interfaces, coand initial coNow, define 2: The BusbarA Multiphysics Model

    dary condition for ents.eat Transfer in Solids ain level Heat Transfer

    e represents the of heat and the Thermal de contains the default

    ndition for heat transfer. The heat source for Joule heating is set in agnetic Heat Source node under the Multiphysics node. The Initial found in both the Electric Currents and Heat Transfer in Solids ntains initial guesses for the nonlinear solver for stationary problems nditions for time-dependent problems.the boundary conditions.

  • 1 Right-click the Heat Transfer in Solids node . In the second section of the context menuthe boundary sectionselect Heat Flux.

    2 In the Heawindow, sefrom the SAssume thboundarienor cooledIn the nexthe selectiofrom the hwhich leavTransfer in

    3 Rotate thecircular titremove th

    Domain sectionExample 2: The BusbarA Multiphysics Model | 65

    t Flux settings lect All boundaries election list.at the circular bolt s are neither heated by the surroundings.t step you will remove n of these boundaries eat flux selection list, es them with the default insulating boundary condition for the Heat terfaces. busbar to view the back. Move the mouse pointer over one of the anium bolt surfaces to highlight it in green. Click the bolt surface to is boundary selection from the Selection list. Repeat this step to

    Section divider

    Boundary section

  • 66 | Example

    remove the other two circular bolt surfaces from the selection list. Boundaries 8, 15, and 43 are removed.

    4 In the Heaunder Heaheat flux bHeat transThis paramin the ParaDefinitionimported wContinue bboundary electric cur

    Cross-check: Boundaries 8, 15, and 43 are removed from the Selection list.

    15

    82: The BusbarA Multiphysics Model

    t Flux settings window t Flux, click the Inward utton. Enter htc in the fer coefficient field, h.eter was either entered meter table in Global s on page 54 or

    ith the geometry.y setting the

    conditions for the rent according to the following steps:

    43

  • 5 In the Model Builder, right-click the Electric Currents node . In the second section of the context menuthe boundary sectionselect Electric Potential. An Electric Potential node is added to the model tree.

    6 Move the highlight i

    7 In the Elecwindow, epotential fThe last stethe two reExample 2: The BusbarA Multiphysics Model | 67

    mouse pointer over the circular face of the single titanium bolt to t and then click to add it (boundary 43) to the Selection list.

    tric Potential settings nter Vtot in the Electric ield.p is to set the surfaces of

    maining bolts to ground.

    43

  • 68 | Example

    8 In the Model Builder, right-click the Electric Currents node . In the boundary section of the context menu, select Ground. A Ground node is added to the Model Builder. The model tree node sequence should now match this figure.

    9 In the GraSelection l

    Repeat thiselection li

    10On the Gr

    15

    82: The BusbarA Multiphysics Model

    phics window, click one of the remaining bolts to add it to the ist.

    s step to add the last bolt. Boundaries 8 and 15 are added to the st for the Ground boundary condition.aphics toolbar, click the Go to Default 3D View button .

    Cross-check: Boundaries 8 and 15.

  • As an alternative to using the preconfigured multiphysics interface for Joule heating, you can manually combine the Electric Currents and Heat Transfer in Solids interfaces. For example, you can start by setting up and solving the model for Electric Currents and then subsequently add Heat Transfer in Solids. In that case, you right-click the Multiphysics node to add the required multiphysics couplings.

    Mesh

    The simplestperfect for thshown in A

    A physito skip settings

    1 In the Monode . Iselect UserSequence

    2 Under MeExample 2: The BusbarA Multiphysics Model | 69

    way to mesh is to create an unstructured tetrahedral mesh, which is e busbar. Alternatively, you can create several meshing sequences as dding Meshes on page 84. cs-controlled mesh is created by default. In most cases, it is possible to the Study branch and just solve the model. For this exercise, the are investigated in order to parameterize the mesh settings.del Builder, click the Mesh 1 n the Mesh settings window, -controlled mesh from the

    type list. sh 1, click the Size node .

  • 70 | Example

    3 In the Size settings window under Element Size, click the Custom button. Under Element Size Parameters, enter:- mh in the Maximum element size

    field. Note that mh is 6 mmthe value entered earlier as a global parameter. By using the parameter mh, element sizes are limited to this value.

    - mh-mh/3size fieldsize is slmaximu

    - 0.2 in t

    The Curvanumber ofboundariesmesh.The other unchangedThe Maximgrow fromgrowth ratThe Resolufactor.The asterisindicates th2: The BusbarA Multiphysics Model

    in the Minimum element . The Minimum element

    ightly smaller than the m size. he Curvature factor field.

    ture factor determines the elements on curved ; a lower value gives a finer

    two parameters are left .um element growth rate determines how fast the elements should

    small to large over a domain. The larger this value is, the larger the e. A value of 1 does not give any growth.tion of narrow regions works in a manner similar to the Curvature

    k (*) that displays in the upper-right corner of the Size node at the node is being edited.

  • 4 Click the Build All button in the Size settings window to create the mesh as in this figure:

    You can al

    Study

    1 To run a sBuilder, rigchoose Copress F8 oribbon Ho

    The Study nodefines a solusimulation baphysics and tsimulation onsolve. DuringConvergenceand availableGraphics winsolver algoritExample 2: The BusbarA Multiphysics Model | 71

    so click Build Mesh in the Home tab of the ribbon.

    imulation, in the Model ht-click Study 1 and

    mpute . You can also r click Compute in the me tab.de automatically tion sequence for the sed on the selected he study type. The ly takes a few seconds to the solution process, two Plots will be generated from tabs next to the dow. These plots show the convergence progress of the different hms engaged by the Study.

  • 72 | Example

    Results

    In the Results node, by default three plot groups are generated: a Multislice plot of the Electric Potential, a Surface plot of the Temperature, and a combined plot named Isothermal Contours containing an Isosurface plot of the temperature and an Arrow Volume plot of the heat flux.Click Resultsplot in the Gdifference in thermal condtemperature conducts doutemperature 1 Click and d

    in the Grapto rotate aback of the

    2 On the Graclick the G3D View bYou can noset the coloto visualizetemperatuin the copp

    3 In the ModSurface no2: The BusbarA Multiphysics Model

    > Temperature to view the temperature raphics window. The temperature the device is less than 10 K due to the high uctivity of copper and titanium. The

    variations are largest on the top bolt, which ble the amount of current compared to the two lower bolts. The

    is substantially higher than the ambient temperature of 293 K.rag the image hics window

    nd view the busbar.phics toolbar, o to Default utton .w manually r table range the

    re difference er part.

    el Builder, expand the Results > Temperature node and click the de .

  • 4 In the Surface settings window, click Range to expand the section. Select the Manual color range check box and enter 323 in the Maximum field (replace the default). Click the Plot button on the Surface settings window.

    5 On the Grplot.Example 2: The BusbarA Multiphysics Model | 73

    aphics toolbar, click the Zoom Extents button to view the updated

  • 74 | Example

    6 Click and drag in the Graphics window to rotate the busbar and view the back.

    The temperarunning betwthe upper boand you can consider usinNow, let us g1 In the Mo

    Results Group . Group 4node .2: The BusbarA Multiphysics Model

    ture distribution is laterally symmetric with a vertical mirror plane een the two lower titanium bolts and cutting through the center of lt. In this case, the model does not require much computing power model the entire geometry. For more complex models, you can g symmetries to reduce the computational requirements. enerate a Surface plot that shows the current density in the device.

    del Builder, right-click and add a 3D Plot Right-click 3D Plot and add a Surface

  • 2 In the Surface settings window under Expression, click the Replace Expression button . Go to Electric Currents > Currents and charge > Current density norm (ec.normJ) and double-click or press Enter to select.ec.normJ is the variable for the magnitude, or absolute value, of the current density vector. You can also enter ec.normJ in the Expression field when you know the variable name.

    3 Click the PThe plot ththe high cumanually cdistributio

    4 In the Surcheck box.Example 2: The BusbarA Multiphysics Model | 75

    lot button . at displays in the Graphics window is almost uniform in color due to rrent density at the contact edges with the bolts. The next step is to hange the color table range to visualize the current density n.face settings window under Range, select the Manual color range Enter 1e6 in the Maximum field and replace the default.

  • 76 | Example

    5 Click the Plot button . The plot automatically updates in the Graphics window. Click Go to Default 3D View on the toolbar in the Graphics window .The resulting plot shows that the current takes the shortest path in the 90-degree bend in the busbar. Notice that the edges of the busbar outside of the bolts are hardly utilized for current conduction.

    6 Click and drotating thof each of

    Makreus

    When you artoolbar and c2: The BusbarA Multiphysics Model

    rag the busbar in the Graphics window to view the back. Continue e image to see the high current density around the contact surfaces the bolts.

    e sure to save the model. This version of the model, busbar.mph, is ed and renamed during the next set of tutorials.e done, click the Go to Default 3D View button on the Graphics reate a model thumbnail image.

  • CREATING MODEL IMAGES FROM PLOTSWith any solution, you can create an image to display in COMSOL when browsing for model files. After generating a plot, in the Model Builder under Results click the plot. Then click the root node (the first node in the model tree). On the Root settings window under Model Thumbnail, click Set Model Thumbnail. There are two other ways to create images from a plot. One is to click the Image Snapshot button in the Graphics toolbar to directly create an image. You can also add an Image node to an Export node, for creating image files, by right-clickingThis completyour understsimulation toThese additio Paramete Material Adding M Adding P Parametr Parallel C AppendixExample 2: The BusbarA Multiphysics Model | 77

    the plot group of interest and then selecting Add Image to Export. es the Busbar example. The next sections are designed to improve anding of the steps implemented so far, and to extend your include additional effects like thermal expansion and fluid flow. nal topics begin on the following pages:rs, Functions, Variables and Couplings on page 78Properties and Material Libraries on page 82

    eshes on page 84 hysics on page 86ic Sweeps on page 107omputing on page 115 ABuilding a Geometry on page 118

  • 78 | Advanced

    Advanced Topics

    Parameters, Functions, Variables and Couplings

    This section explores working with Parameters, Functions, Variables, and Component Global Definyou to prepasimulations. organize moFunctions, avcontain a set multiphysics smooth step To illustrate uto the busbarfrom 0 V to 2to be multipl0 to 1 in 0.5

    DEFINING FFor this sectioprevious sectthe desktop. Topics

    Couplings.itions and Component Definitions contain functionality that help re model inputs and component couplings and to organize You have already used the functionality for adding Parameters to del inputs in Global Definitions on page 54.ailable as both Global Definitions and Component Definitions, of predefined functions templates that can be useful when setting up simulations. For example, the Step function template can create a function for defining different types of spatial or temporal transitions. sing functions, assume that you want to add a time dependent study model by applying an electric potential across the busbar that goes 0 mV in 0.5 seconds. For this purpose, you could use a step function

    ied with the parameter Vtot. Add a function that goes smoothly from seconds to find out how functions can be defined and verified.

    UNCTIONS

    n, you can continue working with the same model file created in the ion. Locate and open the file busbar.mph if it is not already open on

  • 1 Right-click the Global Definitions node and select Functions > Step .

    2 In the Stepof the mid

    3 Click Smozone field of continu

    4 Click the PAdvanced Topics | 79

    settings window, enter 0.25 in the Location field to set the location dle of the step, where it has the value of 0.5.

    othing to expand the section and enter 0.5 in Size of the transition to set the width of the smoothing interval. Keep the default Number ous derivatives at 2.lot button in the Step settings window.

  • 80 | Advanced

    If your plot matches the one below, this confirms that you have defined the function correctly.

    You can also 5 Right-click

    Model Bui Topics

    add comments and rename the function to make it more descriptive. the Step 1 node in the lder and select Properties .

  • 6 In the Properties window, enter any information you want.

    For the purpthat you wancomponent tdevice connethe titanium A first step wbusbar.1 Right-click2 In the Ren

    model.

    DEFINING CClick the De(comp1) to ithat compute(comp1) varithe electric dfor example, Definitions tThis variablecould, for exfor the curremodeled as aThe Compona wide rangeMaximum Advanced Topics | 81

    ose of this exercise, assume t to introduce a second o represent an electric cted to the busbar through bolts.ould be to rename Component 1 to specify that it represents the

    the Component 1 node and select Rename (or press F2).ame Component window, enter Busbar. Click OK and save the

    OMPONENT COUPLINGSfinitions node under Busbar ntroduce a Component Coupling s the integral of any Busbar able at the bolt boundaries facing evice. You can use such a coupling, to define a Variable in the Global hat calculates the total current. is then globally accessible and ample, form a boundary condition nt that is fed to an electric device second component.ent Couplings in Definitions have

    of use. The Average , , and Minimum couplings have applications in generating results

  • 82 | Advanced

    as well as in boundary conditions, sources, sinks, properties, or any other contribution to the model equations. The Probes are for monitoring the solution progress. For instance, you can follow the solution at a critical point during a time-dependent simulation, or for each parameter value in a parametric study. You can find an example of using the average operator in Parametric Sweeps on page 107. Also see Functions on page 139, for a list of available COMSOL functions.

    To learn more about working with definitions, in the Model Builder click the Definitiwindowand prowindow