Comsol-acoustics

June 15, 2017 | Autor: Hoàng Ngô | Categoría: Applied Mathematics, Numerical Analysis
Share Embed


Descripción

Tutorial Created in Comsol 4.3 (2012)

R. White, Comsol Acoustics Introduction, © 2012

Finite Element Analysis (FEA / FEM) –

Numerical Solution of Partial Differential Equations (PDEs). The Mathematical Problem: 1. PDE representing the physics. 2. Geometry on which to solve the problem. 3. Boundary conditions (for static or steady state problems) and initial conditions (for transient problems). - boundary (or dW)

x

W - domain y

Unknowns – e.g. u(x,y,z)

R. White, Comsol Acoustics Introduction, © 2012

Independent Variables – space and time (x,y,z,t) Dependent Variables – unknown field (such as u)

Finite Element Analysis (FEA / FEM) –

The Mathematical Problem: Boundary Conditions. On each boundary you must specify either: 1) The dependent variable itself (e.g. u) – “Essential Boundary Condition” or “Dirichlet Boundary Condition” 2) The derivative of the variable itself (e.g. du/dn) – “Natural Boundary Condition” or “Neumann Boundary Condition” 3) The relationship between the dependent variable and its normal derivative (e.g. du/dn=(1/z)·u)). - boundary (or dW)

x

W - domain y

Unknowns – e.g. u(x,y,z,t)

R. White, Comsol Acoustics Introduction, © 2012

Independent Variables – space and time (x,y,z,t) Dependent Variables – unknown field (such as u)

Finite Element Analysis (FEA / FEM) –

The Finite Element Part: 1) Discretization of the space into pieces (the elements) – this is called the Mesh. 2) Choice of element type - shape (triangle, quadrilateral, etc.), number of nodes (3, 4, 5, 8, etc.) and shape function (linear, quadratic, etc.). 3) Choice of solver (direct, iterative, preconditioning). 4) Post-processing – looking at the solution in various ways. The shape is now “meshed” with triangle elements.

R. White, Comsol Acoustics Introduction, © 2012

So, this is always the sequence for any FEA problem: 1. Decide on the representative physics (choose the PDE).

2. Define the geometry on which to solve the problem. 3. Set the “material properties”… that is, all the constants that appear in the PDE. 4. Set the boundary conditions (for static or steady state problems) and initial conditions (for transient problems). 5. Choose an element type and mesh the geometry. 6. Choose a solver and solve for the unknowns. 7. Post-process the results to find the information you want.

R. White, Comsol Acoustics Introduction, © 2012

Finite Element Packages - Here are some of the common ones

R. White, Comsol Acoustics Introduction, © 2012

Comsol Multiphysics - More recent than Ansys, Nastran, Abaqus. - Integrates well with Matlab (uses Matlab syntax too). - Focuses on “Multiphysics” – coupling different physics together (e.g. acoustics and solid mechanics). - Highly flexible… allows you to program in your own differential equations if they are not already implemented.

R. White, Comsol Acoustics Introduction, © 2012

COMSOL – Here we go!!

Tutorial Created in Comsol 4.3 (2012)

I will focus on acoustics as an application, but the steps are similar for other physics. 1.

Decide on the representative physics (choose the PDE). Choose how many dimensions to work in. Warning: 3D is usually a large computational problem, avoid if at all possible!! Make use of symmetries to get to 2D or 2D axisymmetric. Choose your type of physics. You may select more than one if you want coupling.

“Pressure Acoustics” is what we have been doing in ME139 – this solves the Helmholtz equation for the complex acoustic pressure. R. White, Comsol Acoustics Introduction, © 2012

1.

Decide on the representative physics (choose the PDE) : Choose Type of “Study”.

Here you are choosing what kinds of solutions you want at the end of the study. You can always add other kinds later. • Frequency Domain : This is what we have been doing for the most part in ME139. The Helmholtz equation … you are solving for steady state pressure at a single frequency. • Eigenfrequency : This will allow you to find the acoustic modes of a domain. These are frequencies and corresponding pressure fields where the Helmholtz equation and boundary conditions can be satisfied with no external drive (Homogeneous Solutions)

R. White, Comsol Acoustics Introduction, © 2012

1.

Decide on the representative physics (choose the PDE). Complete. At this point I have chosen my PDE and number of spatial dimensions. For pressure acoustics, my PDE is the Hemholtz equation … but I can allow r0 and c to vary in space if desired.

  1    1   w 2      p       p  0   r0    r0   c 

Constant density

w  2 p    p  0 c 2

Remember, since I have chosen “Pressure Acoustics”, I have selected timeharmonic acoustics… time-harmonic means single frequency… we are assuming time dependence ejwt. The pressure I solve for will be the complex pressure,

p( x, y, z )

Solved for in Comsol



p( x, y, z , t )  Re p( x, y, z )  e jwt



1 prms ( x, y, z )  p ( x, y , z ) 2  prms ( x, y, z )  SPL( x, y, z )  20 log10    pref  

Can be easily computed in post processing using post processing tools inside Comsol.

R. White, Comsol Acoustics Introduction, © 2012

Comsol 4.3 Graphical User Interface

Tools related to zooming, viewing, saving graphics objects.

Model tree shows all parts of the model … geometry, boundary conditions, materials, types of study to run, results. Right click on things to interact.

Various useful tools, depending on what you have selected in the model tree.

Geometry and various results plots will be shown in the main Graphics window.

R. White, Comsol Acoustics Introduction, © 2012

2. Define the geometry on which to solve the problem.

Default units are mks units (SI units). You can change units by selecting the (root) object in the model tree (the very very top object). Draw the geometry of the acoustic domain (the domain over which you want to solve the PDE) by right clicking on geometry and using various tools (tools also appear in the toolbar at the top when geometry is selected in the model tree).

For complicated geometry you may choose to import it from a CAD program.

If you select some objects in the graphics window then Boolean tools (like subtract, intersect, union) will also appear under geometry. If you change or delete geometry objects, sometimes you may need to ask Comsol to Build All the geometry again to get it to refresh. R. White, Comsol Acoustics Introduction, © 2012

2. Define the geometry on which to solve the problem.

For axisymmetric, the axis of symmetry will be r=0 and be drawn as a line in the graphics window.

Drawing tools.

Here are all the geometry objects I defined. Edit them by clicking and/or right clicking them in the model tree.

Objects appear in here.

R. White, Comsol Acoustics Introduction, © 2012

3. Set the “material properties”… that is, all the constants that appear in the PDE. For pressure acoustics, all that matters is r0 and c. (And frequency… although that is set under “Study | Frequency Domain”, not under materials.)

Find the material you want in the browser, or create your own material with “+ Material”. After you find it, right click and “Add Material to Model”

Under “materials” select “open material browser” or “+ material”.

For pressure acoustics, the only properties that matter are density and speed of sound. If you did a coupled thermal problem these could be functions of temperature … etc … or you can just enter them as constants. R. White, Comsol Acoustics Introduction, © 2012

3. Set the “material properties”… that is, all the constants that appear in the PDE.

Once the materials you want are added, assign them to whichever geometric objects you want to have those properties.

Also set up frequency for the problem … I am thinking of this as a global material property … it appears as a constant in the Helmholtz equation. R. White, Comsol Acoustics Introduction, © 2012

4. Set up the boundary conditions. Right click on the “Pressure Acoustics” physics in the model to bring up options for boundary conditions for this physics.

We have a lot of choices… for each kind of boundary condition you will want to add it to the model, and then apply it to the boundaries you want it applied to.

R. White, Comsol Acoustics Introduction, © 2012

4. Set the boundary conditions For pressure acoustics mode, we will be solving for the complex pressure p. You can therefore use complex numbers for any of your pressure or velocity boundary conditions; these specify magnitude and phase. Choices of boundary conditions (pressure acoustics mode): 1. Sound Hard Boundary – Neumann condition; dp/dn = 0 (normal velocity = 0) 2. Sound Soft Boundary – Dirichlet condition; p = 0 (pressure release) 3. Pressure – Dirichlet condition; p=p0 (sets acoustic pressure amplitude… remember, everything is oscillating as ejwt) 4. Normal Acceleration – Neumann condition since Euler says dp/dn=-r0an (sets normal acceleration amplitude… remember, everything is oscillating as ejwt) 5. Impedance Condition – set normal specific acoustic impedance zn at the boundary (zn=p/un→ (dp/dn)=-r0jw·p/zn). This is how you could approximate an absorbing panel or something like that … set zn to get the desired NRC. 6. Radiation Condition – set a boundary that will not reflect normally incident plane waves or cylindrical waves or spherical waves…. This is how you try to approximate an infinite space; only perfect if the incident wave is a perfect plane wave (or cylindrical/spherical wave). You can include a source term in this condition to send in a wave at the boundary. A preferred method is to use a “Perfectly Matched Layer” … but radiation condition should be sufficient for our purposes. R. White, Comsol Acoustics Introduction, © 2012

4. Set the boundary conditions.

Select the part of the boundary you want to apply that condition to and add it to the boundary selection.

Note that boundary conditions can be functions of space … use Matlab syntax … so here I have set an = 1 mm/s2 for r0.1 meters. Remember the Matlab expression r
Lihat lebih banyak...

Comentarios

Copyright © 2017 DATOSPDF Inc.