54
In The Name of Absolute In The Name of Absolute Power & Absolute Power & Absolute Knowledge Knowledge

In The Name of Absolute Power & Absolute Knowledge

  • Upload
    iain

  • View
    49

  • Download
    0

Embed Size (px)

DESCRIPTION

In The Name of Absolute Power & Absolute Knowledge. COMSOL Multiphisics Prepared by: Mastaneh Hajipour Supervisor: Dr. Pishvaie January 2010. Sharif University of Technology Department of chemical and petroleum engineering. COMSOL Multiphysics. - PowerPoint PPT Presentation

Citation preview

Page 1: In The Name of Absolute Power & Absolute Knowledge

In The Name of Absolute Power In The Name of Absolute Power

& Absolute Knowledge& Absolute Knowledge

Page 2: In The Name of Absolute Power & Absolute Knowledge

COMSOL MultiphisicsCOMSOL Multiphisics

Prepared by:Mastaneh Hajipour

Supervisor: Dr. Pishvaie

January 2010

Sharif University of TechnologyDepartment of chemical and petroleum engineering

Page 3: In The Name of Absolute Power & Absolute Knowledge

3

COMSOL Multiphysics

COMSOL Multiphysics is a powerful interactive

environment for modeling and solving all kinds of scientific

and engineering problems based on partial differential

equations (PDEs).

With this software you can easily extend conventional

models for one type of physics into multiphysics models

that solve coupled physics phenomena - and do so

simultaneously.

Page 4: In The Name of Absolute Power & Absolute Knowledge

4

COMSOL Multiphysics

It is possible to build models by defining the physical quantities - such as material properties, loads, constraints, sources, and fluxes - rather than by defining the underlying equations.

You can always apply these variables, expressions, or numbers directly to solid domains, boundaries, edges, and points independently of the computational mesh.

COMSOL then internally compiles a set of PDEs representing the entire model. You access the power of COMSOL through a flexible graphical user interface, or by script programming in the COMSOL Script language.

Page 5: In The Name of Absolute Power & Absolute Knowledge

5

COMSOL Multiphysics

PDEs form the basis for the laws of science and provide the

foundation for modeling a wide range of scientific and

engineering phenomena.

When solving the PDEs, COMSOL Multiphysics uses the

finite element method (FEM). The software runs the finite

element analysis together with adaptive meshing and error

control using a variety of numerical solvers.

Page 6: In The Name of Absolute Power & Absolute Knowledge

6

COMSOL Application

You can use COMSOL Multiphysics in many application areas, just a few examples being: Chemical reactions Diffusion Fluid dynamics Fuel cells and electrochemistry Bioscience Acoustics Electromagnetics Geophysics

Page 7: In The Name of Absolute Power & Absolute Knowledge

7

COMSOL Application

Heat transfer Microelectromechanical systems (MEMS) Microwave engineering Optics Photonics Porous media flow Quantum mechanics Radio-frequency components Semiconductor devices Structural mechanics Transport phenomena Wave propagation

Page 8: In The Name of Absolute Power & Absolute Knowledge

8

COMSOL M-file

You can build models of all types in the COMSOL user interface. For additional flexibility, COMSOL also provides its own scripting language, COMSOL Script, where you can access the model as a Model M-file or a data structure.

COMSOL Multiphysics also provides a seamless interface to MATLAB. This gives you the freedom to combine PDE-based modeling, simulation, and analysis with other modeling techniques. For instance, it is possible to create a model in COMSOL and then export it to Simulink as part of a control-system design.

Page 9: In The Name of Absolute Power & Absolute Knowledge

9

COMSOL Multiphysics

Many real-world applications involve simultaneous couplings in a system of PDEs - multiphysics.

COMSOL Multiphysics offers modeling and analysis power for many application areas. For several of the key application areas optional modules are provided. These application-specific modules use terminology and solution methods specific to the particular discipline, which simplifies creating and analyzing models. The COMSOL 3.4 product family includes the following modules:

Page 10: In The Name of Absolute Power & Absolute Knowledge

10

The COMSOL Modules

1. AC/DC Module2. Acoustics Module3. Chemical Engineering Module4. Earth Science Module5. Heat Transfer Module6. MEMS Module7. RF Module8. Structural Mechanics Module

The optional modules are optimized for specific application areas. They offer discipline standard terminology and interfaces, materials libraries, specialized solvers, elements, and visualization tools.

Page 11: In The Name of Absolute Power & Absolute Knowledge

11

The AC/DC Module

The AC/DC Module provides a unique environment for

simulation of AC/DC electromagnetics in 2D and 3D. The

AC/DC Module is a powerful tool for detailed analysis of coils,

capacitors, and electrical machinery. With this module you can

run static, quasi-static, transient, and time-harmonic simulations

in an easy-to-use graphical user interface.

Page 12: In The Name of Absolute Power & Absolute Knowledge

12

The AC/DC Module

The available application modes cover the following types of

Electromagnetics field simulations:

Electrostatics

Conductive media DC

Magnetostatics

Low-frequency electromagnetics

Page 13: In The Name of Absolute Power & Absolute Knowledge

13

The Acoustics Module

The Acoustics Module provides an environment for modeling of acoustics in fluids and solids. The module supports time-harmonic, modal, and transient analyses for fluid pressure as well as static, transient, eigenfrequency, and frequency-response analyses for structures. The available application modes include: Pressure acoustics Aeroacoustics (acoustics in an ideal gas with an irrotational

mean flow) Compressible irrotational flow Plane strain, axisymmetric stress/strain, and 3D stress/strain

Page 14: In The Name of Absolute Power & Absolute Knowledge

14

The Acoustics Module

Typical application areas for the Acoustics Module include:

Modeling of loudspeakers and microphones

Aeroacoustics

Underwater acoustics

Automotive applications such as mufflers and car interiors

Page 15: In The Name of Absolute Power & Absolute Knowledge

15

The Chemical Engineering Module

The Chemical Engineering Module presents a powerful way of modeling equipment and processes in chemical engineering.

It provides customized interfaces and formulations for momentum, mass, and heat transport coupled with chemical reactions for applications such as: Reaction engineering and design Heterogeneous catalysis Separation processes Fuel cells and industrial electrolysis Process control together with Simulink

Page 16: In The Name of Absolute Power & Absolute Knowledge

16

The Chemical Engineering Module …

COMSOL Multiphysics excels in solving systems of coupled nonlinear PDEs that can include: Heat transfer Mass transfer through diffusion and convection Fluid dynamics Chemical reaction kinetics Varying material properties

The multiphysics capabilities of COMSOL can fully couple and simultaneously model fluid flow, mass and heat transport, and chemical reactions.

Page 17: In The Name of Absolute Power & Absolute Knowledge

17

The Chemical Engineering Module …

In fluid dynamics you can model fluid flow through porous media

or characterize flow with the Navier-Stokes equations.

It is easy to represent chemical reactions by source or sink terms

in mass and heat balances.

All formulations exist for both Cartesian and Cylindrical

coordinates (for axisymmetric models) as well as for stationary

and time-dependent cases.

Page 18: In The Name of Absolute Power & Absolute Knowledge

18

The Chemical Engineering Module …

The available application modes are:1. Momentum balances

Incompressible Navier-Stokes equations Darcy’s law Brinkman equations Non-Newtonian flow Nonisothermal and weakly compressible flow Turbulent flow, k-ε turbulence model Turbulent flow, k-ω turbulence model Multiphase flow

Page 19: In The Name of Absolute Power & Absolute Knowledge

19

The Chemical Engineering Module …

2. Energy balances Heat conduction Heat convection and conduction

3. Mass balances Diffusion Convection and diffusion Electrokinetic flow Maxwell-Stefan diffusion and convection Nernst-Planck transport equations

Page 20: In The Name of Absolute Power & Absolute Knowledge

20

The Earth Science Module

The Earth Science Module combines application modes for fundamental processes and structural mechanics and electromagnetics analyses.

Available application modes are: Darcy’s law for hydraulic head, pressure head, and pressure Solute transport in saturated and variably saturated porous media Richards’ equation including nonlinear material properties. Heat transfer by conduction and convection in porous media with

one mobile fluid, one immobile fluid, and up to five solids Brinkman equations Incompressible Navier-Stokes equations

Page 21: In The Name of Absolute Power & Absolute Knowledge

21

The Heat Transfer Module

The Heat Transfer Module supports all fundamental mechanisms of heat transfer.

Available application modes are: General heat transfer, including conduction, convection, and

surface-to-surface radiation Bioheat equation for heat transfer in biomedical systems Highly conductive layer for modeling of heat transfer in thin

structures. Nonisothermal flow appliction mode . Turbulent flow, k-ε turbulence model applications in electronics and power systems, process

industries, and manufacturing industries.

Page 22: In The Name of Absolute Power & Absolute Knowledge

22

The MEMS Module

One of the most exciting areas of technology to emerge in

recent years is MEMS (microelectromechanical systems),

where engineers design and build systems with physical

dimensions of micrometers.

These miniature devices require multiphysics design and

simulation tools because virtually all MEMS devices

involve combinations of electrical, mechanical, and fluid-

flow phenomena.

Page 23: In The Name of Absolute Power & Absolute Knowledge

23

The MEMS Module

Available application modes are: Plane stress Plane strain Electrokinetic flow Axisymmetry, stress-strain Piezoelectric modeling in 2D plane stress and plane strain,

axisymmetry, and 3D solids. 3D solids General laminar flow

Page 24: In The Name of Absolute Power & Absolute Knowledge

24

The RF Module

The RF Module provides a unique environment for the simulation of electromagnetic waves in 2D and 3D.

The RF Module is useful for component design in virtually all areas where you find electromagnetic waves, such as: Optical fibers Antennas Waveguides and cavity resonators in microwave engineering Photonic waveguides Photonic crystals Active devices in photonics

Page 25: In The Name of Absolute Power & Absolute Knowledge

25

The RF Module

The available application modes cover the following types of

electromagnetics field simulations:

In-plane wave propagation

Axisymmetric wave propagation

Full 3D vector wave propagation

Full vector mode analysis in 2D and 3D

Page 26: In The Name of Absolute Power & Absolute Knowledge

26

The Structural Mechanics Module

The Structural Mechanics Module solves problems in structural and solid mechanics, adding special element types—beam, plate, and shell elements—for engineering simplifications.Available application modes are: Plane stress/ strain Axisymmetry, stress-strain Piezoelectric modeling 2D beams, Euler theory 3D beams, Euler theory 3D solids Shells

Page 27: In The Name of Absolute Power & Absolute Knowledge

27

The Modeling Process

The modeling process in COMSOL consists of six main steps:

1. Selecting the appropriate application mode in the Model Navigator.

2. Drawing or importing the model geometry in the Draw Mode.

3. Setting up the subdomain equations and boundary conditions in the Physics Mode.

4. Meshing in the Mesh Mode.

5. Solving in the Solve Mode.

6. Postprocessing in the Postprocessing Mode.

Page 28: In The Name of Absolute Power & Absolute Knowledge

28

1. The Model Navigator

When starting COMSOL Multiphysics, you are greeted by the

Model Navigator. Here you begin the modeling process and

control all program settings. It lets you select space dimension

and application modes to begin working on a new model, open

an existing model you have already created, or open an entry in

the Model Library.

COMSOL Multiphysics provides an integrated graphical user

interface where you can build and solve models by using

predefined physics modes

Page 29: In The Name of Absolute Power & Absolute Knowledge

29

2. Creating Geometry

An important part of the modeling process is creating the

geometry. The COMSOL Multiphysics user interface contains

a set of CAD tools for geometry modeling in 1D, 2D, and 3D.

The CAD Import Module provides an interface for import of

Parasolid, SAT (ACIS), STEP, and IGES formats.

In combination with the programming tools, you can even use

images and magnetic resonance imaging (MRI) data to create a

geometry.

Page 30: In The Name of Absolute Power & Absolute Knowledge

30

Axes and Grid

In the COMSOL Multiphysics user interface you can set limits

for the model axes and adjust the grid lines. The grid and

axis settings help you get just the right view to produce a

model geometry. To change these settings, use the Axes/Grid

Settings dialog box that you open from the Options menu.

You can also set the axis limits with the zoom functions.

Page 31: In The Name of Absolute Power & Absolute Knowledge

31

Axes and Grid

The default names for coordinate systems vary with the space dimension:

Models that you open using the space dimensions 1D, 2D, and 3D use the Cartesian coordinates x, y, and z.

In 1D axisymmetric geometries the default coordinate is r, the radial direction. The x-axis represents r.

In 2D axisymmetric geometries the x-axis represents r, the radial direction, and the y-axis represents z, the height coordinate.

Page 32: In The Name of Absolute Power & Absolute Knowledge

32

3. Modeling Physics and Equations

From the Physics menu you can specify all the physics and

equations that define a model including:

Boundary and interface conditions

Domain equations

Material properties

Initial conditions

Page 33: In The Name of Absolute Power & Absolute Knowledge

33

4. Creating Mesh

When the geometry is complete and the parameters are defined,

COMSOL Multiphysics automatically meshes the geometry.

However, you can take charge of the mesh-generation process

through a set of control parameters.

For a 2D geometry the mesh generator partitions the subdomains

into triangular or quadrilateral mesh elements.

Similarly, in 3D the mesh generator partitions the subdomains into

tetrahedral, hexahedral, or prism mesh elements.

Page 34: In The Name of Absolute Power & Absolute Knowledge

34

5. Solution

Next comes the solution stage. Here COMSOL Multiphysics comes with a suite of solvers for stationary, eigenvalue, and time-dependent problems.

For solving linear systems, the software features both direct and iterative solvers. A range of preconditioners are available for the iterative solvers. COMSOL sets up solver defaults appropriate for the chosen application mode and automatically detects linearity and symmetry in the model.

A segregated solver provides efficient solution schemes for large multiphysics models, turbulence modeling, and other challenging applications.

Page 35: In The Name of Absolute Power & Absolute Knowledge

35

6. Postprocessing

For postprocessing, COMSOL provides tools for plotting and postprocessing any model quantity or parameter: Surface plots Slice plots Isosurfaces Contour plots Arrow plots Streamline plots and particle tracing Cross-sectional plots Animations Data display and interpolation Integration on boundaries and subdomains

Page 36: In The Name of Absolute Power & Absolute Knowledge

36

Report Generator

To document your models, the COMSOL Report Generator

provides a comprehensive report of the entire model,

including graphics of the geometry, mesh, and postprocessing

quantities.

You can print the report directly or save it as an HTML file for

viewing through a web browser and further editing.

Page 37: In The Name of Absolute Power & Absolute Knowledge

37

Expression Variables

Add symbolic expression variables or expressions using the dialog boxes that you open from the Expressions submenu on the Options menu.

Global expressions are available globally in the model, and scalar expressions are defined the same anywhere in the current geometry.

With boundary expressions, subdomain expressions, point expressions, and interior mesh boundary expressions you can also create expressions that have different meanings in different parts of the model.

Page 38: In The Name of Absolute Power & Absolute Knowledge

38

Expression Variables

Expression variables can make a model easier to understand by

introducing short names for complicated expressions.

Another use for expression variables is during postprocessing. If

you need to view a field variable throughout the model, but it

has different names in different domains, create an expression

variable made up of the different domains and then plot that

variable.

Page 39: In The Name of Absolute Power & Absolute Knowledge

39

Example 1: fluid flow between two parallel plates

This example models the developing flow between two parallel

plates. The purpose is to study the inlet effects in laminar flow

at moderate Reynolds numbers, in this case around 40.

The model’s input data are tabulated below.

Page 40: In The Name of Absolute Power & Absolute Knowledge

40

Step 1: The Model Navigator

Selecting the appropriate application mode in the Model

Navigator.

In the Model Navigator, click the New page.

Select:

Chemical Engineering Module>Momentum Transport>

Laminar Flow>Incompressible Navier-Stokes.

Page 41: In The Name of Absolute Power & Absolute Knowledge

41

Step 2: Creating Geometry

Drawing or importing the model geometry in the Draw Mode. Simultaneously press the Shift key and click the

Rectangle/Square button.

Type the values below in the respective edit fields for the

rectangle dimensions.

Use the Draw Point button to

place two points by clicking

at (−0.01, 0.01) and (0.01, 0.01).

Page 42: In The Name of Absolute Power & Absolute Knowledge

42

Step 3: Modeling Physics and Equations

The first step of the modeling process is to create a temporary

data base for the input data. Define the constants in the

Constants dialog box in the Option menu.

Setting up the subdomain equations and boundary conditions in

the Physics Mode.

Select Subdomain Settings, select Subdomain 1, Define the

physical properties of the fluid.

Page 43: In The Name of Absolute Power & Absolute Knowledge

43

Boundary Conditions

From the Physics menu, select Boundary Settings.

Enter boundary conditions according to the following table.

Page 44: In The Name of Absolute Power & Absolute Knowledge

44

Step 4: Mesh Generation

In this case you want to customize some settings for the initial mesh.

1. From the Mesh menu, select Free Mesh Parameters.

2. On the Boundary page, select Boundaries 3 and 6 from the Boundary Selection list.

3. In the Maximum element size edit field, type 1e-3. This creates elements with a maximum edge length of 10-3 m for Edges 3 and 6.

4. Click the Remesh button.

Page 45: In The Name of Absolute Power & Absolute Knowledge

45

Step 5 : Solve

Computing the solution,

Click the Solve button on the Main toolbar.

Step 6 : Postprocessing

The resulting plots show how the velocity profile develops

along the flow direction. At the outlet, the flow is almost a

fully developed parabolic velocity profile.

Page 46: In The Name of Absolute Power & Absolute Knowledge

46

Velocity Field Surface Plot

Page 47: In The Name of Absolute Power & Absolute Knowledge

47

Example 2: Coupled Free and Porous Media Flow

This is a model of the coupling between flow of a gas in an open

channel and in a porous catalyst attached to one of the channel

walls. The flow is described by the Navier-Stokes equation in

the free region and the Brinkman equations in the porous region.

Page 48: In The Name of Absolute Power & Absolute Knowledge

48

Step 1: The Model Navigator

Selecting the appropriate application mode in the Model

Navigator.

In the Model Navigator, click the New page.

Select:

Chemical Engineering Module>Momentum Transport>

Laminar Flow>Incompressible Navier-Stokes.

Page 49: In The Name of Absolute Power & Absolute Knowledge

49

Step 2: Creating Geometry

Drawing or importing the model geometry in the Draw Mode. Simultaneously press the Shift key and click the

Rectangle/Square button. Type the values below in the respective edit fields for the

rectangle dimensions.

Page 50: In The Name of Absolute Power & Absolute Knowledge

50

Step 3: Modeling Physics and Equations

Define the constants in the Constants dialog box in the Option menu.

Setting up the subdomain equations and boundary conditions in the Physics Mode.

Select Subdomain Settings, select Subdomain 1, Set ρ to rho and η to eta.

Select Subdomain 2, select the Flow in porous media (Brinkman equations) check box.

Set ρ to rho, η to eta, εp to epsilon, and k to k.

Page 51: In The Name of Absolute Power & Absolute Knowledge

51

Boundary Conditions

From the Physics menu, select Boundary Settings.

Enter boundary conditions according to the following table.

Page 52: In The Name of Absolute Power & Absolute Knowledge

52

Step 4: Mesh Generation

In order to resolve the velocity profile close to the interface between the open channel and the porous domain, a finer mesh is required at this boundary.

1. From the Mesh menu, select Free Mesh Parameters.

2. Click the Custom mesh size option button.

3. In the Maximum element size edit field, type 2e-4.

4. In the Boundary tab, Select Edge 5, then type 1e-4 in the Maximum element size edit field.

5. Click the Remesh button.

Page 53: In The Name of Absolute Power & Absolute Knowledge

53

Step 5 : Solve

Click the Solve button on the Main toolbar.

Step 6 : PostprocessingTo visualize the velocity in a horizontal cross-section across the channel and the porous domain, follow these steps:

1. From the Postprocessing menu, select Cross-Section Plot Parameters.

2. Specify the following

Cross-section line data:

Page 54: In The Name of Absolute Power & Absolute Knowledge

54

Cross Section Plot of Velocity Field