550 likes | 783 Views
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.
E N D
COMSOL Multiphisics Prepared by: Mastaneh Hajipour Supervisor: Dr. Pishvaie January 2010 Sharif University of Technology Department of chemical and petroleum engineering
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.
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 underlyingequations. 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.
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.
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
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
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.
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:
The COMSOL Modules • AC/DC Module • Acoustics Module • Chemical Engineering Module • Earth Science Module • Heat Transfer Module • MEMS Module • RF Module • 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 visualizationtools.
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.
The AC/DC Module The available application modes cover the following types of Electromagnetics field simulations: • Electrostatics • Conductive media DC • Magnetostatics • Low-frequency electromagnetics
The Acoustics Module The Acoustics Module provides an environment for modeling of acousticsin 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
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
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 chemicalreactions for applications such as: • Reaction engineering and design • Heterogeneous catalysis • Separation processes • Fuel cells and industrial electrolysis • Process control together with Simulink
The Chemical Engineering Module … COMSOL Multiphysics excels in solving systems of couplednonlinear 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.
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.
The Chemical Engineering Module … The available application modes are: • 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
The Chemical Engineering Module … • Energy balances • Heat conduction • Heat convection and conduction • Mass balances • Diffusion • Convection and diffusion • Electrokinetic flow • Maxwell-Stefan diffusion and convection • Nernst-Planck transport equations
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
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.
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-flowphenomena.
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
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
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
The Structural Mechanics Module The Structural Mechanics Module solves problems in structural andsolid 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
The Modeling Process The modeling process in COMSOL consists of six main steps: • Selecting the appropriate application mode in the Model Navigator. • Drawing or importing the model geometry in the Draw Mode. • Setting up the subdomain equations and boundary conditions in the Physics Mode. • Meshing in the Mesh Mode. • Solving in the Solve Mode. • Postprocessing in the Postprocessing Mode.
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
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.
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.
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.
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
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.
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 segregatedsolver provides efficient solution schemes for large multiphysics models, turbulence modeling, and other challenging applications.
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
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.
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.
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.
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.
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.
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).
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.
Boundary Conditions From the Physics menu, select Boundary Settings. Enter boundary conditions according to the following table.
Step 4: Mesh Generation In this case you want to customize some settings for the initial mesh. • From the Mesh menu, select Free Mesh Parameters. • On the Boundary page, select Boundaries 3 and 6 from the Boundary Selection list. • 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. • Click the Remesh button.
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.
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.
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.
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.
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.