FEMLAB Getting Started

68
:,1'2:6 81,; /,18; 0$&,1726+ 9(56,21 *HWWLQJ6WDUWHG

Transcript of FEMLAB Getting Started

) 2 5 � 8 6 ( �: , 7 + �0 $7 / $ %

�������

�� ��

����

�� �� ���

� � � � � � � � �

�� � � � � � � � � � � �

+RZ�WR�FRQWDFW�&2062/�

������� ���������� ������������� ���� ������!" #���$�%�������%&'''�()�� ��*�� %+��,�����-� .�$���� �, �����/�����)'#)"

���

0(1�2)3#&('!45)) 0'�6#'&!6"&""!! -7/��

0(1�2)3#&('!45') 0'�6#'&!6"&11)" 8�+

http://www.femlab.com 8%���7/9��:���ftp://ftp.femlab.com 8 -��� �� http://www.comsol.se http://www.comsol.com �/9:��;�7/9��:���

[email protected][email protected] ��7�������,::/ �[email protected]� - /�,�����7����9���[email protected][email protected] �������: ����������

���� �����</ 9���/�

FEMLAB Getting Started COPYRIGHT 1994 - 2002 by COMSOL AB. All rights reservedPatent pendingThe software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from COMSOL AB.

FEMLAB is a registered trademark of COMSOL AB.

MATLAB, Simulink, and Handle Graphics are registered trademarks of The MathWorks, Inc.

Other product or brand names are trademarks or registered trademarks of their respective holders.

Printing History: September 2002 First printing FEMLAB 2.3

C O N T E N T S

G e t t i n g S t a r t e d

Preface 2

Introduction 3

Modeling in FEMLAB . . . . . . . . . . . . . . . . . . . . . 9

The Chemical Engineering Module 17

Simulation of a Fixed-Bed Reactor for Catalytic Hydrocarbon Oxidation . . 18

The Electromagnetics Module 26

Cold Crucible . . . . . . . . . . . . . . . . . . . . . . . . 26

Stress-Optical Effects in a Silica-on-Silicon Waveguide . . . . . . . . . 31

The Structural Mechanics Module 37

Modeling of a Pressure Vessel Using Shell Elements . . . . . . . . . . 38

Appendix: Chemical Engineering Module 43

Application Modes . . . . . . . . . . . . . . . . . . . . . . 43

Modeling Instructions for Tubular Reactor . . . . . . . . . . . . . 44

Appendix: Electromagnetics Module 47

Application Modes . . . . . . . . . . . . . . . . . . . . . . 47

Modeling Instructions for Crucible . . . . . . . . . . . . . . . . 48

Modeling Instructions for Stress-Optical Effects . . . . . . . . . . . 52

Appendix: Structural Mechanics Module 59

Application Modes . . . . . . . . . . . . . . . . . . . . . . 59

Modeling Instructions for Pressure Vessel . . . . . . . . . . . . . 59

& 2 1 7 ( 1 7 6 �| L

LL | & 2 1 7 ( 1 7 6

1

G e t t i n g S t a r t e d

P r e f a c e

Modeling has become the domain of the typical engineer. As computational power has increased, the ability for engineers and scientists to simulate processes by directly using the laws of physics is becoming paramount. Often, the major stumbling in integrating modeling into the engineer’s work environment has been the complexity and mystery surrounding the modeling tools themselves.

FEMLAB is a modeling software that is intuitive and easy to learn. Modeling is done in the same intuitive way as you would investigate a new design or application. You would draw your geometry, choose the physical equations that describe your model, define your boundary and initial conditions, mesh and then solve the problem. You model processes directly by considering the physical equations. These are provided directly in the graphical user interface, or can be typed in as you would write the equations using pen and paper. FEMLAB is not a modeling “black-box”, but a tool that is open and flexible for the user to manipulate how they would like.

The Getting Started manual is aimed at introducing FEMLAB and how modeling is done with the software. The manual will introduce the fundamental features of FEMLAB and the different ways you can approach the modeling of an application using the software. Four examples have been provided that exemplify FEMLAB's capabilities within the fields of chemical engineering, fluid dynamics, electromagnetics and structural mechanics. These examples are all accompanied by step-by-step instructions so that you can set up the models yourself. You can use this manual to get acquainted with FEMLAB's modeling practices, and as a first step in learning to know the software, or as an indication of how it works and the types of applications it handles.

We hope that FEMLAB Getting Started will be helpful and informative and that you will achieve a lot from your modeling.

2 | G E T T I N G S T A R T E D

I n t r o du c t i o n

The use of modeling software has become increasingly widespread as computers become faster, better and more accessible to all engineers and scientists. These software applications primarily serve as tools for both understanding existing phenomena and for investigating new concepts. FEMLAB is an intuitive mathematical modeling tool that accomplishes this by its powerful ability to model applications in all fields of engineering and science.

Built on the finite element method (FEM), FEMLAB is an interactive environment for modeling processes and phenomena that are based on partial differential equations (PDEs) - the fundamental equations within science and engineering. The FEMLAB graphical user interface (GUI) offers a complete modeling environment including built-in CAD tools, problem definition, automatic and adaptive meshing, solver settings, and extensive postprocessing.

There are two ways you can model processes using FEMLAB:

1 by using ready-to-use application modes, which allow you to model simply by defining the relevant physical properties within predefined equations.

2 by using equation-based modeling, which gives you the freedom to define your own equation systems.

FEMLAB provides a number of ready-to-use application modes within the fields of engineering and science. The following are some areas covered by these modes:

• AC and DC electromagnetics

• Electrostatics and magnetostatics

• In-plane, axisymmetric, and 3D vector wave propagation

• Heat and mass balances coupled to reaction kinetics

• Fluid mechanics

• 2D and 3D structural mechanics and analyses

FEMLAB allows different systems of equations to be coupled and simultaneously solved. You can model problems that span the physics of different fields of engineering and science - Multiphysics Modeling. FEMLAB allows its models to be exported and processed by MATLAB and its toolboxes. You also have the ability to model from the MATLAB command line using FEMLAB’s built-in commands.

I N T R O D U C T I O N | 3

R E A D Y - T O - U S E A P P L I C A T I O N S

The easiest and most common way to model within FEMLAB is by using the ready-to-use application modes available within FEMLAB and the Chemical Engineering, Electromagnetics, and Structural Mechanics modules. The standard FEMLAB software is required to run the modules, which also include a suite of explained and solved examples in additional model libraries. A number of commonly used predefined application modes from all fields of engineering are available under the Physics Modes menu, while the modules provide modes, some with extended functionality, specific for their fields of engineering. These are all run from FEMLAB’s intuitive GUI.

The Chemical Engineering Module is set-up to model problems involving transport phenomena - momentum, mass, and energy balances. It includes application modes for modeling non-Newtonian, turbulent, laminar, and compressible flow, as well as heat and mass transport that includes multi-component transport by diffusion, migration and convection. Arbitrary expressions for reaction kinetics are easily handled in this module.

The figure below shows a model of a micro reactor, where a heterogeneous reaction takes place on one of the reactor’s walls. The model defines and automatically couples mass and momentum balances for a solution with three different species in the Chemical Engineering Module.

4 | G E T T I N G S T A R T E D

The Electromagnetics Module includes application modes for the simulation of wave propagation in radio frequency and microwave engineering, photonics, optoelectronics, as well as AC-DC electromagnetics for electromachinery and magnets. All modeling can be done in cartesian and axisymmetric coordinate systems, in 2D and 3D.

The figure below shows a model of a silica-on-silicon waveguide, where the refractive index is affected by stresses, induced by thermal expansion produced in the material through the manufacturing process. FEMLAB and the Electromagnetics Module allows for full coupling of the heat transfer, structural, and optical analyses that is needed to examine the shape and effective index of the fundamental mode.

The Structural Mechanics Module contains application modes for modeling using shell and plate elements for thin structures, beam elements, and solid elements in 2D and 3D. The module includes stationary, time-dependent, as well as eigenfrequency analyses. The Structural Mechanics Module offers predefined application modes for traditional structural analysis, in combination with nonstandard equation-based modeling, and unlimited multiphysics capabilities.

I N T R O D U C T I O N | 5

The figure below shows a shell model of a pressure vessel subjected to an internal pressure. The rotation and the displacement at any given coordinate level can be easily plotted with the cross-section plot feature in the Structural Mechanics Module.

Type-in Your Expressions in Ready-to-Use Application ModesDespite the fact that the ready-to-use application modes are predefined, they offer large flexibility in problem definition and postprocessing. This implies that you can use arbitrary expressions for physical properties, equation coefficients, and boundary conditions directly in the GUI. The expressions can be any function of the modeled variables, its spatial and time derivatives, x, y, z, and time, t.

In the example below, electrical conductivity is highly dependent on the temperature according to a given analytical function. This expression can be written directly in the graphical user interface, where rho0, alpha, and T0 are constants defined in a temporary database, and T is a dependent variable. Nothing special is required for entering your own expressions, you just type them in.

The ability to type arbitrary expressions for physical properties, sources, sinks, and boundary conditions eliminates the need for external subroutines and extensive code generation in the definition of a problem. The fact that the expressions are written

6 | G E T T I N G S T A R T E D

directly into the FEMLAB GUI allows for a full numerical treatment of non-linearities, which grants stability in the numerical solution.

E Q U A T I O N - B A S E D A P P L I C A T I O N S

FEMLAB’s equation-based modeling application modes, the PDE Modes, allow you to define your own systems of partial differential equations. You can define these equations in three different ways:

1 Coefficient form: where you define the coefficients in front of different differential operators. This is a suitable form for linear or almost linear problems.

2 General form: where you freely define your equations. This form is suitable for highly nonlinear problems.

3 Weak form: where you can define equations in an integral formulation. The weak form is at the heart of the finite element method, and it gives you complete control of the finite element model.

Type-in Your Expressions in Equation-based ApplicationsIn the FEMLAB GUI, dialogue boxes are provided where equations can be entered in a symbolic fashion, similar to you writing equations using a pen and paper. FEMLAB can interpret these expressions and arrange the equations so that they can be solved in an effective and robust manner. The figure below shows the formulation of the stream-vorticity formulation of the equations of motion for fluid dynamics.

I N T R O D U C T I O N | 7

Once an identification of the different terms is done, the equations are directly typed into the FEMLAB graphical user interface.

The PDE Modes allows you to define expressions of the dependent variable, coupled variables, their spatial and time derivatives, and of x, y, z, and time, t. They also handle expressions using complex numbers, a feature that is of great use for time-harmonic problems.

U N L I M I T E D M U L T I P H Y S I C S C O U P L I N G

The Multiphysics feature sets up models that are defined by more than one physical description, equation system or application mode. FEMLAB allows you to couple physics defined by predefined application modes, which may also include your own specified expression for the material properties, as well as those defined by the equation-based modeling feature.

8 | G E T T I N G S T A R T E D

In order to do this, you simply pick from a list of all the available modes and transfer the desired mode to your model description (see the figure below). The PDE mode for user-defined equation systems can also be transferred, which means that you can couple between systems involving any arbitrary physical description of a phenomenon. There is no inherent limit to the number of couplings you are able to involve.

M A N I P U L A T E Y O U R M O D E L F R O M T H E M AT L A B E N V I R O N M E N T

FEMLAB is based on MATLAB and allows you to manipulate model data and the models themselves in the MATLAB environment. FEMLAB models can be directly exported as Simulink or State-space models and optimizations can be run using command-line programming. MATLAB functions can be implemented back into FEMLAB for defining material and physical properties within the different modes.

Modeling in FEMLAB

The modeling procedure explained in this section is general for both the ready-to-use application modes and the equation-based PDE modes. The only difference in the procedure is that while you define physical properties in the ready-to-use application modes, you define coefficients in front of the differential operators or mathematical functions in the equation based application modes.

I N T R O D U C T I O N | 9

The modeling procedure in FEMLAB consists of eight different steps:

• Within the Model Navigator, select the appropriate application mode.

• Draw or import the geometry.

• Define the interaction of the modeled device with the surrounding environment by defining the boundary conditions.

• Define the physical properties or equations in the subdomain or subdomains and define the initial conditions.

• Mesh the subdomains by using the built-in automatic or adaptive meshing tools.

• Solve the problem using the stationary, time-dependent, eigenvalue or eigenfrequency, and parametric solver.

• Visualize and manipulate the results using the extensive postprocessing capabilities.

Here is a brief example using the modeling steps mentioned above. Later on in this booklet, we will give detailed step-by-step examples of how you can set-up a model within FEMLAB.

Let us now look at simple laminar fluid flow in a micro mixer unit cell, shown in the figure below.

In order to model such a device, we can select the Navier-Stokes application mode for fluid dynamics within the Model Navigator.

10 | G E T T I N G S T A R T E D

T H E M O D E L N A V I G A T O R

This user interface tool is a multi-purpose dialog box in which you control the overall settings of a FEMLAB session. The New page initializes models in the various application modes, while the Multiphysics page lets you add additional application modes to create a multiphysics model. The Model Library page loads complete models supplied with FEMLAB and its modules. On the User Models page, you can browse your own set of saved models.

Laminar flow in the micro mixer model is best modeled by the Navier-Stokes application mode, see the figure below. There are additional application modes for fluid mechanics in the Chemical Engineering Module.

T H E D R A W M O D E

FEMLAB provides powerful CAD tools for creating 1D, 2D, and 3D geometry objects, where Boolean operations (union, subtraction, intersection, etc.) are used for creating composite solid models.

Objects created by other modeling software can be imported and used in FEMLAB models. The geometry import and built-in repair function handles IGES format files in 3D and DXF format files in 2D. It is also possible to convert 2D images in JPG, TIF, BMP formats, as well as 3D magnetic resonance imaging (MRI) data into FEMLAB geometry objects.

I N T R O D U C T I O N | 11

You can very easily generate the micro mixer geometry in this example, simply by drawing 2D cross-sections and extruding them to create the 3D object.

S E T T I N G U P T H E P H Y S I C A L P R O P E R T I E S I N B O U N D A R Y A N D

S U B D O M A I N M O D E S

The boundary mode defines the interaction of the device and its defining physics with the surrounding environment. The boundaries can be defined individually and are tailored to the application mode that you are currently running.

The figure below shows the boundary conditions for the Navier-Stokes application mode’s inlet, outlet, neutral, non-slip and slip boundary conditions.

The Subdomain Mode is used to define the physical properties inside the device. It contains dialog boxes for each of the terms and coefficients related to the physical equations of the application mode you are running. Arbitrary functions of the modeled variables, and their spatial and time derivatives can be entered in these dialog boxes.

The physical properties of the micro mixer, such as viscosity and density in the Navier-Stokes application mode, have been defined in the figure below. The parameter names, ro and mu, are constants defined in a temporary database. The predefined application mode structures the physics of the model for a certain type of problem, yet still allows substantial flexibility within the physics of the problem. The

12 | G E T T I N G S T A R T E D

dialog boxes for density and viscosity could also include expressions that depend on the velocity and the derivatives of the velocity, if your fluid is non-Newtonian.

T H E M E S H M O D E

FEMLAB includes a powerful built-in tool that creates the finite element mesh in the model. The triangular or tetrahedral shaped unstructured mesh is automatically defined by the mesh generator, see the figure below. The adaptive meshing

functionality minimizes the numerical error by refining the mesh according to the solution of your problem. In addition, you can control the parameters of the mesh generator in order to resolve the nature of your problem, for instance, by setting a maximum element length along an edge or face of your geometry. In 2D, the mesh

I N T R O D U C T I O N | 13

can be manipulated interactively in the graphical user interface by manually selecting elements and locally refining them.

The figure above shows the mesh generated for the micro mixer, which had been automatically refined once in order to resolve the nature of the laminar flow in the mixer.

S O L V I N G T H E P R O B L E M I N S O L V E M O D E

The application modes use solver settings adapted for the specific physics of the model. In addition, you have the freedom to alter this setting when this is required, for example when a nonlinear expression is used in an otherwise linear mode. You can run time-dependent or stationary simulations for linear and nonlinear systems, while FEMLAB’s solver options include direct and iterative methods, as well as eigenmode and eigenfrequency analyses.

FEMLAB also features a parametric solver, which offers an ideal way to examine a parameterized series of models. The varied parameter typically represents a material property or frequency.

For highly nonlinear models, parameter sweeping can also be used for smoother convergence. In the micro mixer above, the problem becomes more difficult to solve as the velocity increases. The parametric solver decreases the difficulty of the convergence by using the earlier solution as the starting point for the next velocity value.

P O S T P R O C E S S I N G A N D V I S U A L I Z A T I O N

FEMLAB features a built-in postprocessing tool for direct manipulation and visualization of the results. It provides extensive visualization and postprocessing capabilities, including:

• Interactive plotting of any function of the modeled variables and its derivatives

• Simultaneous visualization of several solution properties using slices, isosurfaces, contours, streamlines, height, and vector-field plots

• Animations of arbitrary functions of your solution

• Integration along boundaries and subdomains

• Cross-sectional plot feature for projection of solution variables along surfaces, lines or at points as functions of time.

The figure below shows iso-concentration surfaces, flow lines, and surface concentration for the micro mixer. The mixing effect in the micro mixer is obtained

14 | G E T T I N G S T A R T E D

through multi-lamination of the flow, which reduces the diffusion length for the species in the A and B inlets.

The cross-sectional plotting capabilities allow you to quickly extract any function of the modeled variables or their derivatives along lines, points, and surfaces. The figure

I N T R O D U C T I O N | 15

above shows an example of concentration lines along the width of the outlet channel in the micro mixer at different heights above the base structure of the mixer.

The cross-sectional plotting capabilities, in the graphical user interface, allow you to quickly extract any function of the modeled variables or their derivatives along lines, points, and surfaces. The figure above shows an example of concentration lines along the width of the outlet channel in the micro mixer at different heights above the base structure of the mixer.

16 | G E T T I N G S T A R T E D

Th e Ch em i c a l Eng i n e e r i n g Modu l e

The Chemical Engineering Module is the perfect tool for the researcher, developer, teacher and student interested in transport phenomena coupled to chemical reactions.

Typical processes in Chemical Engineering contain couplings between different physical phenomena. The performance of a reactor might depend on mass transport characteristics and temperature distribution in the reactor, which implies that mass, momentum, and heat balances are coupled, often in a highly nonlinear way. The Chemical Engineering Module is specially developed to easily perform these couplings in an arbitrary fashion.

The notations and structure of the module are inspired from the books “Transport Phenomena” by Bird, Stewart and Lightfoot and “Elements in Chemical Reaction Engineering” by H. Scott Fogler.

The FEMLAB Chemical Engineering Module consists of a number of so called application modes. These application modes are predefined equations or predefined sets of equations adapted to the field of Chemical Engineering. The module treats problems in 1D, 2D, as well as 3D, and the three main modes encompass:

• Momentum balances. In this application mode group, the velocity distribution is defined for the problem of interest. The equations that are incorporated are the Navier-Stokes equations, general equations for non-Newtonian fluids, a k-ε turbulence model in 2D, the compressible Euler equations in 2D, and equations that describe the flow in porous media, as given by Darcy’s law and the Brinkman equations.

• Energy balances. In this application mode group, the temperature distribution for non-isothermal systems is defined. This mode treats problems that involve heat transfer by convection and conduction.

• Mass balances. In this application mode group, the transport vector for all the species of interest is defined. This mode encompasses equations that describe mass transfer of different species by convection and diffusion, and for electrochemical systems and systems comprising electrokinetic effects that additionally have transport by migration. For convection-diffusion applications, multi-component diffusion by the Maxwell-Stefan equations is available.

T H E C H E M I C A L E N G I N E E R I N G M O D U L E | 17

The next section contains an example that shows some of the modeling possibilities in the Chemical Engineering Module. It deals with a classical chemical reaction engineering problem involving coupled mass and heat balances in a catalytic tubular reactor. The model shows the simplicity of introducing arbitrary expressions for the reaction kinetics in a reactor. A detailed documentation of how to reproduce the example, using the FEMLAB Chemical Engineering Module, is included in the appendix of this manual.

Simulation of a Fixed-Bed Reactor for Catalytic Hydrocarbon Oxidation

The model below treats the simultaneous coupling of mass and heat balances for tubular reactors in combination with arbitrary expressions for the reaction kinetics. It can treat the dynamic (time dependent) and steady-state behavior of a fix-bed tubular reactor, where we will study the steady-state behavior.

The example deals with a process of great industrial importance, that is, partial oxidation of o-xylene in air to phthalic anhydrid (PA) in a multitube fixed-bed reactor. The total production of PA is currently about 7 million lb/year, and almost all of it is manufactured by the multitube fixed-bed process [1,2].

In this process, the temperature is usually kept between 400-475oC, while the residence time varies between 0.5-5 seconds. The catalyst of choice is usually a mix of vanadium oxide and potassium sulfate on a silica support. The most important factor to consider for this process is the temperature throughout the reactor. The reactions taking place are highly exothermic, and in order to eliminate runaway conditions, the reactor needs to be cooled. The temperature distribution will, in turn, affect the yield of the PA, which is to be maximized. We can control the temperature distribution by varying tube diameter, residence time, wall temperature (cooling rate), as well as the inlet temperature of the feed.

Most of the time, fixed-bed tubular reactors are modeled with the assumption that concentration and temperature gradients only occur in the axial direction. The only transport mechanism operating in this direction is the overall flow itself, which is considered to be of plug-flow type, that is, all the fluid elements are assumed to move with a uniform velocity along parallel streamlines. In this example, we will take a more general approach, and we will account for variations of the concentrations and temperature in the axial direction. We will also account for mixing in the axial

18 | G E T T I N G S T A R T E D

direction, which is due to turbulence and the presence of packing through effective diffusivities and conductivities.

P R O B L E M D E F I N I T I O N

We will investigate this system by first setting up a 2D rotational symmetric model. This type of systems are included as ready-to-use application modes in the Chemical Engineering Module.

The reaction kinetics of this process is of a rather complex nature, yet can be explained by the following scheme to a satisfactory extent [2-4]:

A represents o-xylene, B phthalic anhydride, and C is the total amount of carbon monoxide and carbon dioxide. Due to a very high excess of oxygen, the reactions can be considered to be pseudo-first-order, and we can then describe the reaction kinetics as follows:

where y0 represents the mole fraction of oxygen, and yA0 is the inlet mole fraction of o-xylene. Furthermore, xA is the total conversion of o-xylene, xB is the conversion of o-xylene into phthalic anhydride, and xC represents the total conversion into carbon monoxide and carbon dioxide.

The rate coefficients depend on temperature as described by the following Arrhenius law:

where T0 is the inlet temperature of the reactor, and T’ = T-T0.

A

B(+O2)

k1

k2C

k3

(+O2)

C

(+O2)

rA yA0y0 k1 k3+( ) 1 xA–( )=

rB yA0y0 k1 1 xA–( ) k2xB–[ ]=

rC yA0y0 k2xB k3 1 xA–( )+[ ]=

ki Ai

Bi–

T ′ T0+-------------------

exp=

T H E C H E M I C A L E N G I N E E R I N G M O D U L E | 19

A schematic description of the rector is given in the figure below. The convective flow of gas takes place from bottom to top and, by assuming axisymmetry, we can reduce the 3D geometry to a two dimensional description.

The equations presented below are all predefined in the diffusion-convection application mode in the Chemical Engineering Module. This implies that we only need to give the input data to the model. In order to avoid any misunderstanding, we can review the ready-to-use equations.

The design equations for this system can be described by [3,4]. We will now make use of the fact that xA = xB + xC, which means that we only need to solve for two mass balances, resulting in the following design equations:

where Deff is the effective diffusivity, λeff is the thermal conductivity, us is the superficial velocity, ρg is the gas density, ρb is the catalyst bulk density, ctot the total concentration and yA0 the inlet mole fraction of o-xylene. The expressions for the

∇ Deff xB usxB+∇–( )⋅ρb

ctotyA0-------------------rB=

∇ Deff xC usxC+∇–( )⋅ρb

ctotyA0-------------------rC=

∇ λ eff T′ usρgcpT ′+∇–( )⋅ ρb ∆H1–( )rB ∆H3–( )rC+[ ]=

20 | G E T T I N G S T A R T E D

reaction kinetics are defined in the edit fields for the reaction kinetics, in the Chemical Engineering Module, and we can just type them in as they read:

The boundary conditions for this system are as follows:

At the outlet of the reactor, we will assume that the convective part of the mass and heat transport vector is dominating.

Due to the large aspect ratio of our model geometry, we are going to scale our equations. In this case, the reactor is about 200 times its radial dimension, more specifically, 3 meter long and 0.0127 meter in radius. By scaling our equations, we avoid excessive number of elements and node points when setting up the mesh. The new scaled r and z-coordinates, and the new differentials for the mass balances, can be written as

In the mass balances, c is differentiated twice in the diffusion term, which implies that the z-component of diffusion in the mass balance has to be multiplied by (1/scalez)2 and by (1/scaler)2 for the r-component. The convective part is only differentiated once, and has to be multiplied by (1/scalez). The scaling of the diffusive part of the flux can be introduced as an anisotropic diffusion coefficient. This gives the diffusion coefficient according to the matrix below:

rB yA0y0 k1 1 xB– xC–( ) k2xB–[ ]=

rC yA0y0 k2xB k3 1 xB– xC–( )+[ ]=

r∂∂xB 0 z,( )

r∂∂xC 0 z,( ) 0= =

T ′∂r∂

-------- 0 z,( ) 0=

r∂∂xB R z,( )

r∂∂xC R z,( ) 0= = λeff

T ′∂r∂

-------- R z,( ) λeffT′–=

r rscaler----------------- and r∂ scaler r∂⋅= =

z zscalez------------------ and z∂ scalez z∂⋅= =

D

D

scaler2-------------------- 0

0 D

scalez2--------------------

=

T H E C H E M I C A L E N G I N E E R I N G M O D U L E | 21

Similarly for the heat balance, we get thermal conductivity according to the following matrix:

We can find a more detailed description of the input data to this model in the appendix.

R E S U L T S O F T H E A N A L Y S I S

The figure below shows the temperature distribution in the reactor where the inlet is placed at the lower horizontal edge of the rectangle and the left vertical edge represents the symmetry axis. The steady-state solution clearly shows the risk of hot-spot formation. The increase of temperature upstream is as high as 40 C°, compared to the inlet temperature.

At first, the temperature increases right after the inlet as the reaction rate increases in the exothermic reaction. The temperature itself also increases with the rate of reaction, which in turn increases the temperature even more. However, the reaction rate also depends on the concentration of the reactants. Therefore, the temperature decreases as the reactants are depleted upstreams. This is the reason for the formation of a maximum in temperature close to the reactor inlet. The position of the potential

λ

λscaler2-------------------- 0

0 λscalez2--------------------

=

22 | G E T T I N G S T A R T E D

hot-spot therefore depends on the inlet temperature, flow rate of the reactants, and the cooling capacity in the reactor.

In order to compare this to published data for the phthalic anhydride process, we need to calculate the radial mean concentrations of the different species and the radial mean temperature along the length of the reactor. In order to do this, we need to integrate the values of the involved variables for several cross sections along the reactor. The radial mean values are then calculated by numerical integration. Recalling that we are dealing with cylindrical coordinates, the radial mean of a function is defined as:

The integration can be done interactively in the graphical user interface using the functionality in the post mode. When this needs to be done many times, we can also write a MATLAB script that does this automatically.

The figure below shows the composition and temperature distribution in the reactor in the axial direction. The bulk mean conversions and temperature profiles are valid for an inlet temperature of 354oC. We can see that the phthalic anhydride conversion falls off somewhat along the tube (middle line), which is typical for consecutive reactions. As expected from the 2D plot, we can also see that the mean temperature also goes through a maximum not far from the inlet to the reactor. The simulations show very good agreement with published data for these types of reactors [1-4]. We can also see the quick increase in production of B and C, which corresponds to an equally quick decrease in the concentration of reactant A.

fav

2π rf r( ) rd

0

R

2π r rd

0

R

∫------------------------------=

T H E C H E M I C A L E N G I N E E R I N G M O D U L E | 23

The formation of the hot-spot can be avoided by controlling the inlet temperature to the reactor. In this case, we can show that the maximum temperature in the reactor is very sensitive to the value of the inlet temperature. In order to investigate this, we can run a parameter study that varies the inlet temperature according to the table below.

We can do this analysis by running the parametric solver, which effectively makes use of the previous solution to run a new solution with a new inlet temperature. In addition, the solver also uses step length control, which minimizes the risks of numerical errors the highly nonlinear kinetics.

The parameter study of the inlet temperature gives the figure below for the average temperature in the axial direction. From this figure, we can see that the inlet temperature of the tubular reactor does affect the axial temperature quite dramatically. A high temperature increases the production rate of phthalic anhydride, but it may also increase the production of carbon monoxide and carbon dioxide. Furthermore, too high a temperature may be detrimental to the catalyst, which

NAME OF PARAMETER LIST OF PARAMETER VALUES

To 625 626 627 628 629

xB

xC

T

Total conversion

24 | G E T T I N G S T A R T E D

means that it is very important to have good control of the feed temperature of the reactor.

The above example has shown a fraction of the power in the Chemical Engineering Module. We can find models from all different fields in chemical engineering in the on-line Model Library included in the Chemical Engineering Module.

R E F E R E N C E S

[1] G. F. Froment, “Fixed Bed Catalytic Reactors”, Ind. Eng. Chem., 59(2), 18, 1967.

[2] SRI International Consulting, http://pep.sric.sri.com/, 2001.

[3] G. F. Froment and K. B. Bischoff, Chemical Reactor Analysis and Design, John Wiley & Sons, 1990.

[4] C. N. Saterfield, Heterogeneous Catalysis in Industrial Practice, Mc Graw-Hill, 1991.

T H E C H E M I C A L E N G I N E E R I N G M O D U L E | 25

Th e E l e c t r omagne t i c s Modu l e

The Electromagnetics Module covers a broad range of application areas spanning from the static and low-frequency range to very high-frequency phenomena such as optics and photonics. A brief list follows:

• Electrostatic analysis for DC currents, insulators, and capacitors.

• Magnetostatic analysis for permanent magnets, electromagnets, and electromachinery.

• Quasi-static analysis for induction heaters and transient analysis in general.

• Full-wave analysis for 3D microwave engineering—waveguides and cavity resonators.

• Microwave port computations in 2D for TE, TM, and hybrid-wave modes

• Hybrid-wave mode analysis for photonic waveguide cross-sections.

• In-plane analysis for planar rectangular waveguides for microwaves and photonics.

We will study two models solved using the Electromagnetics Module. The first model treats a so-called cold crucible and illustrates the use of the 3D quasi-static application mode for an AC-device operating at 10 kHz. At this frequency, the skin-effect dominates and currents have to be treated as surface currents in order to keep the mesh size at a manageable level. The second model utilizes multiphysics for coupling thermal, strain, and optical effects in a planar photonic waveguide. The thermal stress, introduced in the manufacturing process, causes a split in the degenerate fundamental mode, resulting in a pulse broadening for the transmitted signal. Both these models are available, with detailed descriptions, in the Model Library in the Electromagnetics Module and in the appendix in this manual.

Cold Crucible

This example studies the currents induced in a copper crucible used for manufacturing very pure metals, such as titanium for the aeronautics industry.

The so-called cold crucible is made of several water cooled copper sectors, which in industrial applications have circular or trapezoidal cross-sections. In our case, a high frequency current is fed in a coil around the crucible, which induces current in the alloy inside the crucible. The heat generated from the currents inside the crucible melts the contained metal.

26 | G E T T I N G S T A R T E D

The major advantage in using a cold crucible, compared to traditional crucibles, is that there is no contamination of the sample and no crucible consumption. The electromagnetic fields produce a mixing effect in the melt, which gives a uniform quality to the alloy.

The disadvantage of using a cold crucible is that significant power is consumed cooling the crucible. Therefore, the operating cost of a cold crucible can only be justified when a high degree a purity is required.

We will study the model of a simplified geometry consisting of a single copper sector of the crucible, sketched in the figure below. The harmonic current flowing in the coils induces a current in the crucible, flowing in the opposite direction along the edge of the crucible. The purpose of the model is to study the induced currents in the copper sector. The example shows a few of the FEMLAB Electromagetics Module’s capabilities in problem definition and postprocessing.

P R O B L E M D E F I N I T I O N

The study of the crucible can be done using a predefined application mode in the Electromagnetics Module, which is based on the Maxwell equations.

A consequence of Maxwell’s equations is that dynamic changes in currents and charges are not synchronized with changes of the electromagnetic fields. The changes of the fields are always retarded, reflecting the finite speed of electromagnetic wave propagation. Under the assumption that this effect can be ignored, the electromagnetic fields can be obtained by considering stationary currents at every instant. This is called the quasi-static approximation. The approximation is valid provided that time variations are small, and that the studied geometries are considerably smaller than the wavelength [1]. For time-harmonic, quasi-static approximations, the Maxwell equations can be reduced to static partial differential equations defined in a complex form, using the j-ω method.

T H E E L E C T R O M A G N E T I C S M O D U L E | 27

The crucible operates at 10 kHz, which implies that the current flows very close to the surface of the conducting regions and that the wavelength is substantially larger than the crucible geometry.

The skin depth is less than one millimeter while the inner radius of the crucible is 5 cm, therefore the currents are properly modeled as surface currents. We can therefore apply a surface current of 16 A/m to the coil surfaces, which corresponds to a current of 3.5 A.

In order to save computation time, we can assume symmetry so that only one quarter of the crucible needs to be treated.

Provided symmetry, the flow lines of the magnetic field should be normal to the symmetry plane shown in the figure below, since the current is tangential to the plane. The plane can therefore be treated as a boundary where the tangential component of the magnetic field is set to zero.

The second symmetry plane is shown in the figure below. The flow lines of the magnetic field are known to make closed loops around the coils and therefore the field is tangential to the symmetry plane. This symmetry implies that the tangential component of the magnetic potential is set to zero.

28 | G E T T I N G S T A R T E D

In order to model the fields surrounding the crucible, we have to introduce an encompassing domain that is large enough to assume a constant magnetic potential on its boundaries far away from the crucible. This means that we consider our model, including the crucible and the air surrounding it, as magnetically insulated.

R E S U L T S O F T H E A N A L Y S I S

The post mode in the Electromagnetics Module allows us to plot any expression of the modeled variables. In addition, a set of predefined expressions appropriate for analysis in AC-DC applications are available in the quasi-static mode.

Let us look at the most interesting results from the simulation, namely the induced current on the surface of the crucible. The surface plot below shows the magnitude of the current density and the arrows show the direction of current.

On the inner surface of the annular geometry the current density is practically constant, gray color, while only a small part of the current flows on top of the crucible.

T H E E L E C T R O M A G N E T I C S M O D U L E | 29

It can be difficult to visually verify that current conservation holds in the model. We can select the quadratic boundary inside the crucible highlighted in the figure below and perform a surface current balance.

In order to study the accuracy of the result, we can calculate the integral of the surface currents entering and leaving the four edges of the square. These integrals can be calculated interactively in the graphical user interface. The integral of of the x component of the surface current along a vertical line, as a function of x, is given by the expression below.

The graph below shows the value of this integral as we move along the x-axis from the inner edge of rectangle to the outer edge facing the coil. From the plot, we see that the inflow is approximately 1.34 A and the outflow approximately 1.15 A.

Isx x( ) Jsx x z,( ) zd∫=

30 | G E T T I N G S T A R T E D

Similarly, we can calculate the integral of the z component of the surface current, along a horizontal line, as a function of z,

The resulting plot shows zero current at the bottom edge, which is due to symmetry, and an outflow of 0.21 A at the upper edge.

We can add and subtract the incoming and outgoing current flows in both directions and see that the current is basically conserved by up to 0.02/1.34 = 1.5%. For even higher accuracy, we would have to increase the density of the mesh.

R E F E R E N C E S

[1] D. K. Cheng, Field and Wave Electromagnetics, Addison-Wesley, 1991, 2nd edition.

Stress-Optical Effects in a Silica-on-Silicon Waveguide

This example shows the possibilities of modeling high-frequency devices, like antennas and photonic wave guides, and of performing multiphysics analysis. The model presented below allows us to study the coupling of structural mechanics and wave propagation in a photonic waveguide.

Planar photonic waveguides in silica (SiO2) have a great potential for use in wavelength routing applications. The major problem with these kinds of waveguides

Isz z( ) Jsz x z,( ) xd∫=

T H E E L E C T R O M A G N E T I C S M O D U L E | 31

is birefringence. Anisotropic refractive indices result in fundamental mode splitting and pulse broadening. The goal is to minimize birefringence effects by adapting materials and manufacturing processes. One source of birefringence occurs through the use of a silicon (Si) wafer on which the waveguide structure is deposited. After annealing at high temperature (approximately 1000 °C), mismatch in thermal expansion between the silica and silicon layers results in thermally induced stresses in the structure at the operating temperature (typically room temperature, 20 °C).

P R O B L E M D E F I N I T I O N

The below sections present the assumptions and equations used in this model. The equations are predefined in FEMLAB and the Electromagnetics Module. However, we have to know the coupling between the structural and wave propagation problem. This coupling is entered in the graphical user interface in an almost identical form to the written formulation.

The Stress-Optical Effect and Plane StrainThe linear stress-optical relation used in this model is

Using the two parameters, B1 and B2, it is assumed that the non-diagonal parts of the refractive index tensor, nij, and the stress tensor, σkl, are negligible. Here, n0 is the refractive index for a stress-free material. The diagonal parts of the refractive index tensor are denoted nx=n11, ny=n22, and nz=n33 with a similar notation for the stress tensor.

Air

Cladding (Silica)

Buffer (Silica)

Silicon Wafer Core

Optical Computation Domain Boundary

nx n0 B2σx– B1 σy σz+( )–=

ny n0 B2σy– B1 σz σx+( )–=

nz n0 B2σz– B1 σx σy+( )–=

32 | G E T T I N G S T A R T E D

This model uses a simple plane strain approximation that holds in a situation where the structure is free in the x and y direction but where the z strain is assumed to be zero.

The first part of this model utilizes the plane strain application mode of the Structural Mechanics Module. The resulting birefringent refractive index is computed using expression variables and can be considered a postprocessing step of the plane strain model. The refractive index tensor is used as material data for the second part of the model, the mode analysis.

This model is also available in an extended version, “Stress-Optical Effects with Generalized Plane Strain”, that demonstrates a computation where the structure is free in the z direction, using a formulation called generalized plane strain.

Perpendicular Hybrid-Mode WavesFor a given frequency, ν, or equivalently, free-space wavelength λ0 = c0/ν, the Perpendicular hybrid-mode waves application mode of the Electromagnetics Module can be used for the mode analysis. In this model, the free-space wavelength is chosen to be 1.55 µm. The simulation is set up with the normalized magnetic field components H=(Hx, Hy, Hz) as dependent variables, and the propagation constant β is obtained from the eigenvalues.

Using this application mode, the wave is assumed to have the form

The computations will show a shift in propagation constant due to the stress-induced change in refractive index. The birefringence will cause the otherwise two-fold degenerate fundamental mode propagation constant to split.

R E S U L T S O F T H E A N A L Y S I S

The structural stresses is independent of the wave propagation problem. Since the stresses influence the wave propagation, the multiphysics coupling is one-way. This implies that we can independently validate the results from the structural analysis.

Plane Strain AnalysisIn the plane strain analysis, the strains are thermally induced and the inputs are, apart from the material parameters for silicon and silica, the manufacturing and operating temperature.

H H x y,( )ej ωt βz–( ) Hx x y,( ) Hy x y,( ) Hz x y,( ), ,( )ej ωt βz–( )= =

T H E E L E C T R O M A G N E T I C S M O D U L E | 33

The computed stress-induced birefringence nx − ny can easily be visualized in the GUI by entering the expression Nx-Ny in the plot dialog box.

This also allows us to look at a cross-section plot of the birefringence nx − ny on a vertical line along the middle of the structure. The resulting plot above shows that the birefringence varies linearly from about 2.9⋅10-4 at the bottom of the core to 2.4⋅10-4 at the top. A corresponding plot of the birefringence on a horizontal line shows that it is constant, thus the influence of the edges is indeed reduced to a minimum.

O P T I C A L M O D E A N A L Y S I S

The optical modes are computed for a free-space wavelength of 1.55 µm.

We can reduce the computational domain significantly for the optical mode analysis since the energy of the fundamental modes will be concentrated in the core region of the waveguide, and the energy density rapidly decays in the cladding and buffer regions. We can therefore use a rectangular region containing the optically active domains, which we can enlarge later for validating the results. We should choose a large enough rectangular region so that the computed propagation constants do not change significantly if the region is enlarged.

For all active domains, we can set Nx, Ny, and Nz as anisotropic refractive indices by entering the entries on the diagonal in the refractive index matrix, in the corresponding dialog box in the GUI.

For the boundaries, we can use the default PEC (perfectly electric conducting) option as the boundary condition. In this case, the E and H fields are assumed to be negligible at the boundaries, hence any one of them can be set to zero at the boundary.

0 1 2 3 4 5 6

x 10−6

2.4

2.5

2.6

2.7

2.8

2.9

3x 10

−4

Arc Length

Nx−

Ny

Nx−Ny

34 | G E T T I N G S T A R T E D

The mode solver is set to search for the 6 eigenmodes with propagation constant closest to the value 5901982. This value is an estimate of the propagation constant for the fundamental mode according to the condition below [1].

The default eigenmode is the one with the highest propagation constant corresponding to one of the fundamental modes.

In order to check the validity of the results, we can evaluate the propagation constants for several different mesh sizes. These propagation constants are tabulated below.

It is evident from the table that the fundamental modes, corresponding to the two lowest eigenmodes with the highest propagation constants, are nearly degenerate. It is also clear that the split of the degenerate fundamental modes, which is expected due to the stress-induced anisotropic refractive index, has been properly resolved with these mesh sizes. The power flow in the z direction (out of the plane) for this eigenmode is shown in the figure below.

MESH SIZE, CORE SUBDOMAIN

1E-6 5E-7 2.5E-7 1.25E-7 6.25E-8

PROPAGATION CONSTANT

*1e6 *1e6 *1e6 *1e6 *1e6

β1 5.882341 5.882389 5.882409 5.882414 5.882416

β2 5.881236 5.881314 5.881337 5.881342 5.881343

β3 5.859125 5.859149 5.859164 5.859165 5.859167

β4 5.858016 5.858072 5.858086 5.858088 5.858091

β5 5.857781 5.857996 5.858066 5.858085 5.858088

β6 5.856661 5.856923 5.856992 5.857010 5.857013

β ncorek0< 5.901982 106 m 1–⋅=

5.8 6 6.2 6.4 6.6 6.8 7 7.2 7.45.8812

5.8814

5.8816

5.8818

5.882

5.8822

5.8824

5.8826x 10

6 Computed value of β vs. mesh size h in core subdomain

−log10(h)

pro

pa

ga

tion

co

nst

an

t β

T H E E L E C T R O M A G N E T I C S M O D U L E | 35

We can also control the sensitivity of the eigenvalues with respect to changes in the mesh density, in the plot on the right hand side above. The relative changes are fairly small and the eigenvalues seem to reach an asymptotic value as the mesh density is increased.

The higher eigenmodes have a larger portion of energy leakage into the cladding and buffer, and are thus more affected by the distance to the air and silicon layers. Because of this leakage, the PEC boundary condition will affect the higher eigenmodes more than the fundamental mode. For this reason, a refined analysis of the higher modes requires that we enlarge the computation domain further.

The figure below shows the z component of the Poynting vector for the fourth eigenmode. The plot shows that the power flow in the z direction leaks into the cladding to a higher extent than for the lower eigenmode above.

References[1] Amnon Yariv, Optical Electronics in Modern Communications, 5th edition, Oxford University Press, 1997.

36 | G E T T I N G S T A R T E D

T h e S t r u c t u r a l Me c h an i c s Modu l e

The Structural Mechanics Module 2.3 extends the FEMLAB modeling environment to provide customized user interfaces for structural analysis. It solves problems in the structural and solid mechanics field of engineering in 2D and 3D, and includes special structural mechanics elements: beams, plates, and shells, for different engineering applications. The Module also includes specific 2D formulations such as plane stress or strain and axisymmetry. The Model Library includes pre-solved models with detailed instructions from all different types of analysis.

The Structural Mechanics Module includes static, eigenfrequency, transient, and frequency response analyses in ready-to-use formulations, so-called application modes. The application modes allow for full multiphysics coupling, and you can use them in combination with any other physics application mode in FEMLAB or the other modules. Coupling temperature effects is one example of how multiphysics is easily implemented with the Structural Mechanics Module. Multiphysics couplings are one of the major strengths in FEMLAB and can involve structural interactions with fluid flow, chemical reactions, acoustics, electric and magnetic fields, and optical wave propagation.

The underlying equations for structural mechanics are available for manipulation in several of the application modes—a feature unique to FEMLAB. This greatly simplifies non-standard modeling, for example changing material models from isotropic to orthotropic. The Structural Mechanics Module also features an extensible material and beam cross-section library.

Below follows an introductory example that shows the modeling capabilities in the Structural Mechanics Module. The model treats a pressure vessel with thin walls. Due to the large difference in wall thickness and vessel dimensions, the model is solved using the ready-to-use shell modeling application mode. The model is available with detailed instructions in the Structural Mechanics Module Model Library and the appendix in this manual.

T H E S T R U C T U R A L M E C H A N I C S M O D U L E | 37

Modeling of a Pressure Vessel Using Shell Elements

This model treats the static analysis of a vessel subjected to an internal pressure. In order to save material and weight, we require the vessel walls to be as thin as possible, but thick enough to withstand the maximum stress.

For this purpose, we can define a parameterized model in the Structural Mechanics Module, where the wall thickness is varied in order to study the impact on the maximum von Mises stress. Since the walls are very thin in comparison to the vessel dimensions, we can use shell elements to model the tank walls.

P R O B L E M D E F I N I T I O N

The model is very simple to define in the Structural Mechanics Module. The geometry of the vessel is shown in the figure below, where the material is structural steel of a thickness of 3 mm for the basic analysis.

The arrows symbolize the loads and constraints applied to the structure. No displacements or rotations are assumed at the base of the vessel, which implies that constraints are applied on the four arcs that make up the tube cross-section.

The inner pressure is applied as a load on all faces of the vessel. Such a load can be applied in any direction or selected as a pre-defined direction perpendicular or tangential to a surface. The symbols in the figure also display the direction of the surface load, which in this case is normal and outwards from the vessel surface.

Apart from surface loads and edge constraints, we can also set point and edge loads. In this case, we assume that the two horizontal and the vertical pipe at the top of the

38 | G E T T I N G S T A R T E D

vessel are subjected to loads on their edges in the axial direction, according to the figure below.

In this case, we are interested in doing a static analysis of the vessel. The shell elements also allow for dynamic, eigenfrequency, and harmonic analyses directly from the graphical user interface.

R E S U L T S O F T H E A N A L Y S I S

The interesting question in our analysis is if the stresses induced by the loads exceed the yield strength for the material. The post mode in the Structural Mechanics Module is able to plot any function of the modeled displacements and their derivatives. In addition, a set of predefined entities are available, such as the von Mises stresses.

The figure below shows the von Mises stresses and the displacements in the vessel under load. The color map represents the von Mises stresses according to the color bar while the deformation of the plot represents the displacements. The deformation is exaggerated by a factor of approximately 2600 in order to clearly visualize the deformed shape. We have also used a transparent visualization option in order to display the backside of the structure. The solid lines inside the structure represent the

T H E S T R U C T U R A L M E C H A N I C S M O D U L E | 39

edges of the non-deformed structure, which can be used to reveal the parts of the structure that are deformed the most.

We can see from this figure that the maximum deformation is around the equator of the tank. The maximum von Mises stresses seem to be around the join between the tubes and the tank. Let us rotate the plot and look at the structure from below.

40 | G E T T I N G S T A R T E D

We can see from the plot above that the von Mises stresses on the left pipe are quite large and that the edge load on the pipes adds to the deformation from the internal pressure. We can confirm the position of the maximum stress by clicking on the max/min marker option. The resulting plot shows that the maximum stresses are found in the tube joint and that the value is approximately 38.6 Mpa. This is well inside the acceptable range, which implies that we might be able to decrease the thickness of the tank wall.

The post mode in the Structural Mechanics Module also features cross-sectional plots and point plots. These cross-sections can be placed interactively in the graphical user interface by dragging the mouse, by specifying a set of coordinates, or by specifying an edge or point label for the geometry. The figure below shows the section of the tank surface that is subjected to the maximum stress seen from the inside of the tank (left side corresponds therefore to right side in the above figure). We can see that the maximum occurs at the upper part of the tube-tank joint, where the joint is both pulled and rotated.

The modeling procedure for this model in FEMLAB is described in detail in the appendix to this document.

38.6 Mpa

T H E S T R U C T U R A L M E C H A N I C S M O D U L E | 41

42 | G E T T I N G S T A R T E D

Append i x : C h em i c a l Eng i n e e r i n g Modu l e

Application Modes

APPLICATION MODE

MOMENTUM BALANCES

Brinkman equations for porous media flow √ √ √ √ √Compressible Euler √ √ √ √Darcy’s law √ √ √K-epsilon turbulence model √ √Navier-Stokes √ √ √ √ √Non-Newtonian flow √ √ √ √ √ENERGY BALANCES

Heat conduction √ √ √ √ √ √Convection and conduction √ √ √ √ √Convection and conduction, pseudo dimension

√ √ √ √

MASS BALANCES

Diffusion √ √ √ √ √ √ √Diffusion-convection √ √ √ √ √ √ √Diffusion-convection, pseudo dimensional √ √ √ √ √Maxwell-Stefan √ √ √ √ √ √ √Maxwell-Stefan, pseudo dimensional √ √ √ √ √Nernst-Plank, electrokinetic √ √ √ √ √ √ √Nernst-Plank, electrokinetics, pseudo √ √ √ √ √Nernst-Plank, electroneutrality √ √ √ √ √ √ √Nernst-Plank, electroneutrality, pseudo √ √ √ √ √

Axi

sym

met

ry

A P P E N D I X : C H E M I C A L E N G I N E E R I N G M O D U L E | 43

Modeling Instructions for Tubular Reactor

Model Navigator• In the Model Navigator, select the 2D application mode ChEM: Axisymmetry,

convection and diffusion. Set the application mode name to massbal and the dependent variables to xb and xc (simply type xb <space> xc). Add the application mode by pressing the right-arrow button.

• Add the application mode ChEM: Axisymmetry, convection and conduction.

• Name the application mode energybal, the dependent variable to T, and press OK.

Options• Define the following constants:

NAME EXPRESSION

Deff 3.19e-7

us 1.064e-3

rhob 1300

rhog 1293

lambda .78e-3

cp .992

ctot 44.85

alpha .156

To 627

scaler 0.0127/1

scalez 3/5

deltaH1 -1.285e6

deltaH3 -4.564e6

yao 0.00924

yo .208

A1 exp(19.837)/3600

A2 exp(20.86)/3600

A3 exp(18.97)/3600

B1 13588

B2 15803

B3 14394

44 | G E T T I N G S T A R T E D

Draw Mode• Select the Draw Rectangle toolbar button and draw a rectangle of arbitrary

dimensions.

• Double-click on the rectangle R1 and type the below values in the corresponding edit fields, and press the Zoom Extents button in the main toolbar.

Boundary Mode• Select 1 Geom1: Convection and diffusion, Axisymmetry (massbal) from the

Multiphysics menu.

• Enter the boundary conditions according to the following table:

Subdomain Mode• Enter the PDE coefficients according to the following table.

Expressions• Open the Add/Edit Expressions dialog from the Options menu.

• The first expression should be named k1 and be of a Geometry Variable type. Press Add and switch to the Definition tab.

• Select Level geometry and type A1*exp(-B1/(T+To)) in the Expression edit field.

OBJECT DIMENSIONS EXPRESSION

X min 0

X max 1

Y min 0

Y max 5

BOUNDARY 1,4 2 3

Type Insulation/symmetry

Concentration Convective flux

xb, xc 0

SPECIES XB XC

Di,x Deff/scaler^2 Deff/scaler^2

Di,y Deff/scalez^2 Deff/scalez^2

Ri rb*rhob/ctot/yao rc*rhob/ctot/yao

u 0 0

v us/scalez us/scalez

A P P E N D I X : C H E M I C A L E N G I N E E R I N G M O D U L E | 45

• Similarly, go on and define the following expressions:

• Finish by pressing OK.

Boundary Mode• Select 2 Geom1: Convection and conduction, Axisymmetry (heatbal) from the

Multiphysics menu.

• Enter the boundary conditions according to the following table:

Subdomain Mode• Enter the PDE coefficients according to the following table.

Mesh Mode• Initialize the mesh.

• Refine the mesh once.

Solve mode• Press the Solver Parameters button and select stationary nonlinear solver.

• Solve the problem by clicking on the Solve button, which will automatically display the solution in Post Mode.

NAME EXPRESSION

k2 A2*exp(-B2/(T+To))

k3 A3*exp(-B3/(T+To))

rb yao*yo*(k1*(1-xb-xc)-k2*xb)

rc yao*yo*(k2*xb+k3*(1-xb-xc))

BOUNDARY 1 2 3 4

Type Insulation/symmetry

Temperature Convective flux

Flux

T 0 -alpha*T/scaler

SUBDOMAIN 1

ρ rhog

Cp cp

Di,r lambda/scaler^2

Di,z lambda/scalez^2

Q rhob*((-deltaH1)*rb+(-deltaH3)*rc)

u 0

v us/scalez

46 | G E T T I N G S T A R T E D

Append i x : E l e c t r omagne t i c s Modu l e

Application Modes

APPLICATION MODE ANALYSIS CAPABILITIES

ELECTROSTATICS

3D electrostatics √ √In-plane electrostatics √ √Axisymmetric electrostatics √ √QUASI-STATICS

3D magnetostatics √ √3D quasi-statics √ √In-plane quasi-statics, perpendicular currents

√ √ √ √

Axisymmetric quasi-statics, azimuthal currents

√ √ √ √

In-plane quasi-statics, in-plane currents

√ √ √ √

Axisymmetric quasi-statics, meridional currents

√ √ √ √

ELECTROMAGNETIC WAVES

3D electromagnetic waves √ √ √In-plane waves, TE modes √ √ √Axisymmetric waves, TE modes √ √ √In-plane waves, TM modes √ √ √Axisymmetric waves, TM modes √ √ √

A P P E N D I X : E L E C T R O M A G N E T I C S M O D U L E | 47

Modeling Instructions for Crucible

Model Navigator• Select the 3D, Electromagnetics Module, Quasi-Statics mode in the Model Navigator.

• Select A - Vector, V - Linear from the Element popup menu.

Options and Settings• In the Add/Edit Constants dialog box, enter the following names and expressions.

The conductivity σ = 1 S/m for air is obviously not the physically correct value, but too large a contrast between the conductivities makes it difficult for the numerical algorithms to find a solution. The error we make by using an incorrect value for the conductivity in air is negligible for the currents on the surfaces.

• Set the application scalar variable omega (angular frequency) to 2*pi*10000.

Perpendicular waves, TM modes √ √Perpendicular waves, TE modes √ √Perpendicular waves, hybrid modes

√ √

Perpendicular waves, hybrid modes, fixed mode index

√ √

NAME EXPRESSION

sigMetal 5e7

sigAir 1

Js0 100

APPLICATION MODE ANALYSIS CAPABILITIES

48 | G E T T I N G S T A R T E D

Draw ModeWe will first draw the crucible and inductor in a 2D work plane and then extrude them to 3D objects.

• Select Work plane 1 from the Draw menu to use the default x-y plane as work plane.

• Set axis and grid settings according to the following table.

• Draw a circle C1 with radius 0.17 and a circle C2 with radius 0.16, both centered at the origin.

• Select C1 and C2 and press the Difference button to create the solid object CO1.

• Draw a circle C1 with radius 0.15 and a circle C2 with radius 0.05, both centered at the origin.

• Select C1 and C2 and press the Difference button to create the solid object CO2.

• Draw a rectangle R1 with corners in (-0.2, -0.2) and (0.2, 0).

• Open the Create Composite Object dialog box and enter the set formula CO1-R1 to create the composite object CO1.

• Draw a new rectangle R1 with corners in (-0.2, -0.2) and (0.2, 0).

• Open the Create Composite Object dialog box and enter the set formula CO2-R1 to create the composite object CO2.

• Draw a rectangle R1 with corners in (0, 0) and (0.155, 0.01).

• Open the Create Composite Object dialog box and enter the set formula CO2-R1 to create the composite object CO2.

• Select Extrude from the Draw menu to open the Extrude dialog box. Select the object CO1 and set the Distance to 0.05. Click OK to close the dialog box and create the extruded object EXT1.

• Select Work plane 1 from the Draw menu to return to the work plane.

• Open the Extrude dialog box again, and select the object CO2 and set the Distance to 0.1 to create the extruded object EXT2.

AXIS GRID

X min -0.3 X spacing 0.1

X max 0.3 Extra X -0.17 -0.16 0.155

Y min -0.2 Y spacing 0.05

Y max 0.2 Extra Y 0.01

A P P E N D I X : E L E C T R O M A G N E T I C S M O D U L E | 49

• Now create a region of air surrounding the crucible. Press the Block button to open the Block dialog box and set the Length coordinates to (1, 0.5, 0.5). Click More and set the coordinates of the Axis base point to (-0.5, 0, 0). Click OK to close the dialog box and create the block BLK1.

• Press the Cylinder button to open the Cylinder dialog box and set the Radius to 0.5 and the Height to 0.5. Click OK to close the dialog box and create the cylinder CYL1.

• Open the Create Composite Object dialog box and enter the set formula BLK1*CYL1. Click the Apply button to create the object CO1.

• Enter the set formula CO1-EXT1-EXT2 and click OK.

Boundary Mode• Enter boundary conditions according to the following table.

Subdomain Mode• Enter PDE coefficients according to the following table.

Options and Settings• We will now study how the current flows on the rectangular end of the crucible

(boundary 17). To prepare for that, we define two coupling variables, which are the integrated current over a cross-section of this boundary. In the Coupling

Variable Settings dialog box, enter the Variable name Isx, and set the Variable type to projection. Then click Add to add this variable. On the Source page, select boundary 17 and set the Integrand to Jsx, the Integration order to 4, and the Local

mesh transformation coordinates to x and z. The integration will be performed over the second coordinate, z, and Isx will therefore be a function of x. On the

BOUNDARY 1, 2, 4, 16 3, 8 5, 6, 7, 14, 15 9-13, 17

Type Ground, magnetic insulation

Electric insulation/Continuity

Surface current Impedance boundarycondition

Js -y*Js0 x*Js0 0

σ sigMetal

µr 1

εr 1

SUBDOMAIN 1

σ sigAir

50 | G E T T I N G S T A R T E D

Destination page, select edge 38, which is one of the edges of boundary 17, and set the Evaluation point transformation to x.

Jsx is the x component of the surface current, and Isx is the integral of Jsx in the vertical direction across boundary 17,

• Go back to the Variables page and add a second projection variable, Isz. On the Source page, select boundary 17 and set the Integrand to Jsz, the Integration order to 4, and the Local mesh transformation coordinates to z and x. In this case the integration will be performed over x. On the Destination page, select edge 40, and set the Evaluation point transformation to z.

Jsz is the z component of the surface current, and Isz is the integral of Jsz in the horizontal direction across boundary 17,

The variable definitions are summarized in the table below.

Mesh Mode• Open the Mesh Parameters dialog box and enter the Mesh growth rate 1.8, and the

Mesh curvature factor 0.2. To make the mesh finer on the surface of the crucible, click the More button, and enter the Max element size for faces 9 0.01 11 0.005 12 0.005 13 0.01 17 0.005.

• Initialize the mesh.

Isx x( ) Jsx x z,( ) zd∫=

Isz z( ) Jsz x z,( ) xd∫=

VARIABLE TYPE SOURCE DESTINATION

Isx Projection Boundary: 17Integrand: JsxIntegration order: 2Local mesh transformation, x: xLocal mesh transformation, y: z

Edge: 38Evaluation point transformation: x

Isz Projection Boundary: 17Integrand: JszIntegration order: 2Local mesh transformation, x: zLocal mesh transformation, y: x

Edge: 40Evaluation point transformation: z

A P P E N D I X : E L E C T R O M A G N E T I C S M O D U L E | 51

Solve Problem• Open the Solver Parameters dialog box and make sure that Iterative solver is

checked among the Solver options. On the iterative page set the Drop tolerance to 1e-7.

• On the Multiphysics page, check Show variables, and select the magnetic potential variable tAxAyAz. This will make FEMLAB only solve the equations for the magnetic potential, and ignore the one for the electric potential.

• Press the Solve Problem button.

Post Mode• The current on the surface of the crucible can be visualized with a surface and an

arrow plot. Deselect Slice plot and select Surface plot and Arrow plot in the Plot

Parameters dialog box. On the Surface page select surface current (normJs) as Surface expression. On the Arrow page select to plot arrows on boundaries. Set Type to arrow and the Scale factor to 3.

• Open the Boundary Suppression dialog box from the Boundary menu and suppress the boundaries 1-4, 8 and 16.

• To verify the current conservation on the end boundary of the crucible, boundary 17, we make use of the coupling variables Isx and Isz. In the Cross-Section Plot

Parameters dialog box, select Line plot. On the Line page choose to select lines via edges, and select edge 38. Then enter the Line expression abs(Isx). Click Apply to make the plot. The left side of the plot corresponds to x = 0.15 and the right side to x = 0.05. The value at x = 0.15 is the total current flowing in through the right edge of the boundary, and the value at x = 0.05 is the total current flowing out through the left edge of the boundary.

• Select edge 40 and change the Line expression to abs(Isz). The left side of the plot corresponds to z = 0 and the right side to z = 0.05. The value at z = 0.05 is the total current flowing out through the top edge of the boundary.

Modeling Instructions for Stress-Optical Effects

Let us start by doing the structural analysis in the waveguide.

����������� �����

• Go to the Multiphysics page in the Model Navigator.

• Select the EM: Perpendicular Hybrid-Mode Waves application mode, and transfer it to the list of selected application modes for this model by clicking the >> button.

52 | G E T T I N G S T A R T E D

• Next select the SME: Plane Strain application mode available in the Structural Mechanics Module. Do not confuse this application mode with the corresponding Physics mode in the FEMLAB basic package.

• In the Dependent variables text field, change the dependent variable names to u1 v1 to avoid name collisions with the Perpendicular hybrid-mode waves application mode.

• Click the >> button to add the SME: Plane Strain application mode to the model.

• Select Linear stationary as Solver type. The plane strain problem will not be part of the eigenmode computation.

The Plane strain application mode will be the active application mode in the first stage of the modeling.

Options and Settings• In the Add/Edit Constants dialog box enter the following names and expressions.

NAME EXPRESSION DESCRIPTION

nSi 3.5 Refractive index, silicon (Si)

nBuf 1.445 Refractive index, silica (SiO2)

nClad 1.445 Refractive index, silica

nAir 1 Refractive index, air

deltan 0.0075 Relative index difference:

nCore nClad/sqrt(1-2*deltan) Refractive index, core

lambda0 1.55e-6 Free-space wavelength (m)

k0 2*pi/lambda0 Wave number (m−1)

c0 299792458 Speed of light (m/s)

w k0*c0 Angular frequency (rad/s)

alphaSi 2.5e-6 Thermal expansion coefficient, silicon (K−1)

alphaSiO2 0.35e-6 Thermal expansion coefficient, silica (K−1)

ESi 110e9 Young’s modulus, silicon (N/m2)

ESiO2 78e9 Young’s modulus, silica (N/m2)

nuSi 0.19 Poisson’s ratio, silicon

∆ncore

2 ncladding2

–( )

2ncore2

-------------------------------------------=

A P P E N D I X : E L E C T R O M A G N E T I C S M O D U L E | 53

Notice that the temperatures are given in degrees Celsius. This works well since the model is linear.

• Give axis and grid settings according to the following table.

Draw Mode• Draw rectangles corresponding to the different regions.

nuSiO2 0.42 Poisson’s ratio, silica

B1 4.2e-12 First stress optical coefficient (m2/N)

B2 0.65e-12 Second stress optical coefficient (m2/N)

T1 20 Operating temperature (°C)

T0 1000 Reference temperature (°C)

AXIS GRID

X min -0.2e-3 X spacing 1e-5

X max 0.2e-3 Extra X

Y min -0.1e-3 Y spacing 1e-5

Y max 0.03e-3 Extra Y

REGION LOWER LEFT CORNER UPPER RIGHT CORNER

Silicon Wafer (-16e-5,-1e-4) (16e-5,-1.7e-5)

Buffer (-16e-5,-1.7e-5) (16e-5,-3e-6)

Cladding (-16e-5,-3e-6) (16e-5,1.3e-5)

Air (-16e-5,1.3e-5) (16e-5,3e-5)

Core (-3e-6,-3e-6) (3e-6,3e-6)

NAME EXPRESSION DESCRIPTION

54 | G E T T I N G S T A R T E D

Point Mode and Boundary ModeAll regions have free boundaries, which also is the default boundary condition. The problem becomes well-posed by adding constraints at points to keep the domain fixed.

• Open the Point Settings dialog box, and check the constraints Rx and Ry at point 1, the lower left corner, for both the x and y direction. This will keep the domain from moving (translational move).

• Check the constraint Ry at point 10, the lower right corner, for the y direction only, keeping the domain from rotating but allowing it to slide in the x direction.

Subdomain ModeThe air domain need not be part of the plane strain model.

• Deactivate the Plane strain application mode equation in subdomain 4 by clearing the checkbox Active in this domain in the Subdomain Settings dialog box.

• Specify the subdomain settings for the Plane strain application mode according to the following table.

The other material parameters, rho, alphadM, and betadK, need not be specified because they do not enter the equation for static problems.

• In the Expression Variables dialog box in the Options menu, define the following variables.

SUBDOMAIN 1 1 2,3,5 2,3,5

Page Material Loads Material Loads

E ESi Tflag check E ESiO2 Tflag check

nu nuSi Temp T1 nu nuSiO2 Temp T1

alpha alphaSi Tempref T0 alpha alphaSiO2 Tempref T0

VARIABLE NAME VARIABLE TYPE SUBDOMAIN EXPRESSION

N Subdomain 1

2

3

4

5

nSi

nBuf

nClad

nAir

nCore

Nx Subdomain 1,4

2,3,5

N

N-B1*sx_pn-B2*(sy_pn+sz_pn)

A P P E N D I X : E L E C T R O M A G N E T I C S M O D U L E | 55

Mesh Mode• Initialize a mesh and refine it twice. This will create a mesh with approximately

12000 elements.

Solve Problem• On the Multiphysics page in the Solver Parameters dialog box, select the Plane Strain

application mode. This will make sure that only the Plane strain application mode equations are solved in the first run.

• On the Iterative page, check Iterative solver and select Incomplete LU as Preconditioner with a Drop tolerance 1e-5.

You can also use the default direct solver. However, this will require more memory.

• Press the Solve Problem button.

Post ModeThe default plot shows the von Mises effective stress as a colored surface plot. To view the stress-induced birefringence nx − ny, type Nx-Ny as Surface expression in the Plot

Parameters dialog box.

• Now create a cross-section plot of the birefringence nx − ny on the vertical line from (0,-3e-6) to (0,3e-6). Do this by entering Nx-Ny as Line expression, and setting X1 to 0, Y1 to -3e-6, X2 to 0, and Y2 to 3e-6 in the Cross-Section Plot

Parameters dialog box. The birefringence varies linearly from about 2.9⋅10-4 at the bottom of the core to 2.4⋅10-4 at the top.

• Now type hold on

at the MATLAB command-line and then create another cross-section plot of the birefringence on the horizontal line from (-3e-6,0) to (3e-6,0). The hold on command will make the new plot rendered on top of the previous one.

Ny Subdomain 1,4

2,3,5

N

N-B1*sy_pn-B2*(sx_pn+sz_pn)

Nz Subdomain 1,4

2,3,5

N

N-B1*sz_pn-B2*(sx_pn+sy_pn)

VARIABLE NAME VARIABLE TYPE SUBDOMAIN EXPRESSION

56 | G E T T I N G S T A R T E D

Multiphysics SettingsWe can now go back to the model navigator and add the mode analysis to the current structural analysis.

• Select the Perpendicular Hybrid-Mode Waves application mode from the Multiphysics menu.

Options and Settings• In the Application Scalar Variables dialog box, set w as angular frequency. Recall that

the constant w was defined in the Add/Edit Constants dialog box.

The constant w represents an angular frequency ω = 2πν of about 1.2⋅1015 rad/s corresponding to a free-space wavelength of 1.55 µm.

Draw ModeThe computational domain can be reduced significantly for the optical mode analysis due to the fact that the energy of the fundamental modes will be concentrated in the core region and the energy density is rapidly decaying in the cladding and buffer regions.

• Draw a rectangle with corners at (-1e-5,-1e-5) and (1e-5,1e-5).

The rectangular region containing the active domains can be enlarged later on for validating the results.

Subdomain Mode• Deactivate the Perpendicular hybrid-mode waves application mode in all

subdomains except 5, 6, and 7. This will make sure the problem is only solved in the newly drawn rectangle.

• For all active domains, set Nx, Ny, and Nz, respectively, as anisotropic refractive indices by changing the entries on the diagonal in the refractive index matrix, which is opened when the View/Specify button for n (anisotropic) is clicked in the Subdomain Setttings dialog box.

Boundary ModeThe default PEC boundary condition will suffice. The PMC boundary condition could have been chosen as well. Both the E and the H fields are assumed to be of negligible size at the boundaries, hence any one of them can be set equal to zero at the boundary.

A P P E N D I X : E L E C T R O M A G N E T I C S M O D U L E | 57

Mesh Mode• Click the More button in the Mesh Parameters dialog box. Set Max. element size for

subdomains for the active subdomains 5, 6, and 7 to 5 2e-6 6 2e-6 7 1e-6. This will make the mesh dense in the activated regions.

• Initialize the mesh. The mesh will contain approximately 1700 elements.

Solve Problem• On the General page in the Solver Parameters dialog box, select the Eigenvalue

solver and clear the Iterative solver check box.

• Select the Null space function called Sparse (flspnull). This is necessary for problems using vector elements. The default settings of the Perpendicular hybrid-mode waves application mode uses vector elements for the Hx and Hy components and linear Lagrange elements for the Hz component.

• On the Eigenvalue tab, select Work with prop. constants (work with propagation constants). Type 5901982 as Shift. The default Desired number of prop. constants is set to 6, which is fine in this case. These settings will make the eigenmode solver search for the 6 eigenmodes with propagation constant closest to the value 5901982.

• On the Multiphysics page, select the Perpendicular Hybrid-Mode Waves application mode. This will ensure that the Plane strain application mode will not be part of the eigenmode computation. Click OK to close the dialog box.

• Press the Restart button to start the mode analysis. Using the Restart button takes the plane strain solution and uses it to evaluate the refractive indices.

Post Mode• On the Surface page in the Plot Parameters dialog box, change the Surface

expression to power flow (Pozav_whev).

• The default eigenmode is the one with the highest propagation constant corresponding to one of the fundamental modes.

• To get the propagation constants with full decimal expansion, select Export FEM

Structure as ’fem’ from the File menu and then type at the MATLAB prompt:

format long esqrt(-fem.sol.lambda’)

58 | G E T T I N G S T A R T E D

App end i x : S t r u c t u r a l Me c h an i c s Modu l e

Application Modes

Modeling Instructions for Pressure Vessel

Select the 3D, Structural Mechanics Module, Shell, Stationary mode in the Model

Navigator.

APPLICATION MODE ANALYSIS CAPABILITIES DOMAINS

ST

AT

IC

EIG

EN

FR

EQ

UE

NC

Y

TR

AN

SIE

NT

FR

EQ

UE

NC

Y R

ES

PO

NS

E

BU

ILT

IN

TE

MP

ER

AT

UR

E C

OU

PL

ING

MU

LTIP

HY

SIC

S

PO

INT

ED

GE

BO

UN

DA

RY

SU

BD

OM

AIN

2D EQUATION BASED

Plane stress √ √ √ √ √ √ √ √ √

Plane strain √ √ √ √ √ √ √ √ √

Axisymmetry, stress-strain √ √ √ √ √ √ √ √ √

Axisymmetry, heat transfer √ √ √ √ √PLATES

Mindlin plate √ √ √ √ √ √ √ √BEAMS

2 D Euler beam √ √ √ √ √ √ √

3 D Euler beam √ √ √ √ √ √ √3D SOLIDS AND SHELLS

Solid √ √ √ √ √ √ √ √ √ √

Shell √ √ √ √ (√) √ √ √

A P P E N D I X : S T R U C T U R A L M E C H A N I C S M O D U L E | 59

������������ �����

• Enter the following constant names and expressions.

Draw ModeThe vessel is modeled by revolving a profile around the z-axis and adding some cylinders that model the pipes on the sides.

• Select Add/Edit/Delete Work Plane from the Draw menu.

• Select y-z as Plane on the Quick page. Press OK to enter the plane.

• Set axis and grid settings in work plane 1 according to the following table.

• Draw a rectangle from (0,-2) to (0.5,-1).

• Draw a rectangle from (0,1) to (0.25,2).

• Choose Draw Arc and click at (0,-1.5), (1,-1.5) and (1,-0.5).

• Choose Draw Line and click at (1,0.5).

• Choose Draw Arc and click at (1,1.5) and (0,1.5).

• Right click to close the curve and for a solid.

NAME EXPRESSION

Pressure 8e5

ttank 0.03

Dpipe1 0.25

Dpipe2 0.20

Dpipe3 0.50

tpipe1 0.03

tpipe2 0.03

tpipe3 0.03

Fpipe1 Dpipe1/4*Pressure

Fpipe2 Dpipe2/4*Pressure

Fpipe3 Dpipe3/4*Pressure

AXIS GRID

X min -3 X spacing 0.25

X max 3 Extra X

Y min -2 Y spacing 0.25

Y max 2 Extra Y

60 | G E T T I N G S T A R T E D

• Open the Create Composite Object dialog box and uncheck Keep internal borders. Enter the Set formula CO1+R2 and press Apply.

• Check Keep internal borders. Enter the Set formula CO1+R1 and press OK.

• Press the Coerce to Curve button to coerce the selected solid object to a curve object.

• Some of the internal curves should be removed. Press the Split button to split the curve into its parts.

• Select the curves B1, B3, B4, B5, B6, B7 and B11 and press the Delete key on your keyboard to remove these curves.

• Select the curves B2 and B10 and press the Coerce to Curve button to create one curve object from these two curves.

• Select the curves B8, B9, B12, B13, B14 and B15 and press the Coerce to Curve button to create one curve object from these curves.

• Open the Revolve dialog box, select both curve objects and press OK.

You will now enter 3D draw mode again and the revolved geometry is shown. The two pipes on the side of the geometry are added as cylinders in 3D.

• Create two cylinders with properties given in the following table.

• Select the revolved geometry REV2 and press the Coerce to Solid button to create a solid object.

PARAMETER CYL1 CYL2

Radius 0.125 0.10

Height 1 1.8

Axis base point:

X 0.8 0

Y 0 0

Z -0.3 0

Axis direction vector:

X 1 0

Y 0 1

Z 0 0

A P P E N D I X : S T R U C T U R A L M E C H A N I C S M O D U L E | 61

• Open the Create Composite Object dialog box and uncheck Keep internal borders. Enter the Set formula CO1+CYL1+CYL2 and press OK.

• Select all geometry objects and press the Coerce to Face button to create a face object.

• The faces at the top of the cylinders should be removed. Press the Split button to split the face object into its parts. Select the face objects F9, F10, F15, F16, F19, F24, F27, F28, F30 and F42 and press the Delete key on your keyboard to remove these faces.

• Select all faces and press the Coerce to Face button to create the final face object.

Edge ModeThe vessel is constrained along the lower edges of the lower cylinder, and the top and side cylinders are subjected to forces due to the internal pressure in the vessel.

• Give edge settings according to the following table.

Boundary ModeA normal pressure affects all the boundaries of the vessel from the inside. This pressure can be specified using the local coordinate system on the faces. The normal of a face is usually directed outward from a solid, but in this case there is no solid and the direction of the normal depends on how the geometry was created. In such cases you can plot the normal to see what direction it has on each face. A coarse mesh and the initial value of the solution can be used to plot the normals.

• Open the Mesh Parameters dialog box.

• Select Extremely coarse in the Use default mesh settings popup.

• Select Get Initial Value on the Post menu to use the initial value of the solution as the solution.

• Open the Plot Parameters dialog box.

EDGE 9, 10, 30, 43 71, 72, 73, 74 22, 23, 54, 55 17, 18, 35, 41

Page Contraints Loads Loads Loads

Rx 0 Fx Fpipe1 Fx 0 Fx 0

Ry 0 Fy 0 Fy Fpipe2 Fy 0

Rz 0 Fz 0 Fz 0 Fz Fpipe3

Rthx 0

Rthy 0

Rthz 0

62 | G E T T I N G S T A R T E D

• Uncheck Surface and Deformed shape and check Arrow on the General page.

• On the Arrow page, select Boundaries in the Plot Arrows on popup menu.

• Enter nx, ny, and nz as X expression, Y expression, and Z expression.

• Press Apply to plot the normals on all faces.

Note that the normals are directed inward in the upper part of the vessel and outward in the lower part and on the pipes on the sides. There is also another coordinate system, used for postprocessing only. Using the defaults will result in having the z-direction swapping between different faces. Change the defaults to make the coordinate system continuous between the faces.

• Give boundary loads and specify coordinate system for postprocessing according to the following table.

• The constants defined for the wall thickness in different parts of the vessel can be used to try various thicknesses in order to minimize the maximum stress in the

BOUNDARY 1, 2, 5, 6, 11, 12, 15, 17, 20, 22, 23, 26 3, 4, 9, 10, 13, 14, 16, 19, 21, 25, 27, 28, 29, 30, 31, 32

Page Loads Loads

Fz -Pressure Fz Pressure

Page Coord. system Coord. system

local local

Page Post

nsidex x-nx

nsidey y-ny

nsidez z-nz

BOUNDARY 7, 8, 18, 24

Page Post

nsidex x-nx

nsidey y-ny

nsidez z-nz

A P P E N D I X : S T R U C T U R A L M E C H A N I C S M O D U L E | 63

vessel. Enter the thickness in the Boundary Settings dialog box according to the following tables.

Mesh Mode• Open the Mesh Parameters dialog box and enter the mesh parameters Mesh edge

size, scaling factor 0.25, Mesh curvature factor 0.5, and Mesh growth rate 1.5. Press OK.

• Initialize the mesh.

Solve ProblemChange to the iterative solver to save memory and shorten the solution time.

• Open the Solve Parameters dialog box.

• Check Iterative solver in the Solver options frame on the General page.

• Enter 1e-4 as Drop tolerance on the Iterative page.

• Press the Solve Problem toolbar button to start solving the problem (time to solve: 196 s).

Post Mode• Open the Plot Parameters dialog box.

• Check Surface and Deformed shape and uncheck Arrow on the General page.

• Select von Mises stress (mises) as Surface expression on the Surface page.

• Press OK to close the Plot Parameters dialog box.

BOUNDARY 1-10, 15-19, 21, 23-26 29, 30, 31, 32

Page Material Material

thickness ttank thickness tpipe1

BOUNDARY 13, 14, 27, 28 11, 12, 20, 22

Page Material Material

thickness tpipe2 thickness tpipe3

64 | G E T T I N G S T A R T E D