Thin-Layer Diffusion

Solved with COMSOL Multiphysics 4.2
Thin-Layer Diffusion
Introduction
The following example shows how to link two separate geometries into a 3D thin-layer
diffusion model using identity boundary conditions. It uses mapped hexahedral
meshes, which reduces the number of degrees of freedom (DOFs) for this thin
geometry.
Model Definition
The physics in this model is single-species diffusion. The dependent variable is the
concentration, c. All boundaries are insulated except the inlet and the outlet. At the
inlet boundary the concentration is c0. At the outflow boundary (the bottom surface)
there is an outward flux of rsurf cc0 (COMSOL Multiphysics defines the inward flux
as positive), where rsurf is the reaction rate at the surface. The diffusion coefficient in
the top layer is 5·105 m2/s. An effective diffusion coefficient of 1·106 m2/s takes
the porous material in the thin bottom plate into account.
Results and Discussion
You can take advantage of the geometry shape and reduce the number of DOFs—and
thus the solution time—by using two mapped hexahedral meshes instead of an
unstructured tetrahedral mesh. The model has about 2000 DOFs using this approach.
©2011 COMSOL
1 |
THIN-LAYER DIFFUSION
Solved with COMSOL Multiphysics 4.2
Figure 1: Resulting concentration distribution in the full geometry.
Notes About the COMSOL Implementation
Build the geometry as an assembly of the bottom plate and the top layer to make it
possible to mesh the parts independently. Use a continuity condition at the connection
between the top and bottom parts to set the concentration c equal on both sides.
Model Library path: COMSOL_Multiphysics/Diffusion/
thin_layer_diffusion
Modeling Instructions
MODEL WIZARD
1 Go to the Model Wizard window.
2 Click Next.
2 |
THIN-LAYER DIFFUSION
©2011 COMSOL
Solved with COMSOL Multiphysics 4.2
3 In the Add physics tree, select Chemical Species Transport>Transport of Diluted Species
(chds).
4 Click Next.
5 In the Studies tree, select Preset Studies>Stationary.
6 Click Finish.
GLOBAL DEFINITIONS
Parameters
1 In the Model Builder window, right-click Global Definitions and choose Parameters.
2 Go to the Settings window for Parameters.
3 Locate the Parameters section. In the Parameters table, enter the following settings:
NAME
EXPRESSION
DESCRIPTION
r_surf
0.005[mol/(m^2*s)]
Reaction rate, outlet
c0
7[mol/m^3]
Concentration, inlet
D1
5e-5[m^2/s]
Diffusion coefficient, top
layer
D1_eff
1e-6[m^2/s]
Effective diffusion
coefficient, base block
GEOMETRY 1
1 In the Model Builder window, click Model 1>Geometry 1.
2 Go to the Settings window for Geometry.
3 Locate the Units section. From the Length unit list, select µm.
Geometry
Right-click Model 1>Geometry 1 and choose Work Plane.
Rectangle 1
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose
Rectangle.
2 Go to the Settings window for Rectangle.
3 Locate the Size section. In the Width edit field, type 11.
4 In the Height edit field, type 6.
5 Click the Build Selected button.
6 Click the Zoom Extents button on the Graphics toolbar.
©2011 COMSOL
3 |
THIN-LAYER DIFFUSION
Solved with COMSOL Multiphysics 4.2
Rectangle 2
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose
Rectangle.
2 Go to the Settings window for Rectangle.
3 Locate the Size section. In the Width edit field, type 8.
4 In the Height edit field, type 1.
5 Locate the Position section. In the x edit field, type 3.
6 In the y edit field, type 1.
7 Click the Build Selected button.
Rectangle 3
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose
Rectangle.
2 Go to the Settings window for Rectangle.
3 Locate the Size section. In the Width edit field, type 8.
4 In the Height edit field, type 1.
5 Locate the Position section. In the x edit field, type 3.
6 In the y edit field, type 4.
7 Click the Build Selected button.
4 |
THIN-LAYER DIFFUSION
©2011 COMSOL
Solved with COMSOL Multiphysics 4.2
Circle 1
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose Circle.
2 Go to the Settings window for Circle.
3 Locate the Size and Shape section. In the Radius edit field, type 2.
4 Locate the Position section. In the x edit field, type 3.
5 In the y edit field, type 3.
6 Click the Build Selected button.
Circle 2
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose Circle.
2 Go to the Settings window for Circle.
3 Locate the Size and Shape section. In the Radius edit field, type 1.
4 Locate the Position section. In the x edit field, type 3.
5 In the y edit field, type 3.
6 Click the Build Selected button.
Difference 1
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose Boolean
Operations>Difference.
2 Select the object c1 only to add it to the Objects_to_add list.
3 Go to the Settings window for Difference.
4 Locate the Difference section. Under Objects_to_subtract, click Activate Selection.
5 Select the object c2 only.
©2011 COMSOL
5 |
THIN-LAYER DIFFUSION
Solved with COMSOL Multiphysics 4.2
6 Click the Build Selected button.
Rectangle 4
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose
Rectangle.
2 Go to the Settings window for Rectangle.
3 Locate the Size section. In the Width edit field, type 2.
4 In the Height edit field, type 4.
5 Locate the Position section. In the x edit field, type 1.
6 In the y edit field, type 1.
7 Click the Build Selected button.
Intersection 1
1 In the Model Builder window, right-click Work Plane 1>Geometry and choose Boolean
Operations>Intersection.
2 Select the objects dif1 and r4 only.
6 |
THIN-LAYER DIFFUSION
©2011 COMSOL
Solved with COMSOL Multiphysics 4.2
3 Click the Build Selected button.
Extrude 1
1 In the Model Builder window, right-click Work Plane 1 and choose Extrude.
2 Select the object wp1.r1 only.
3 Go to the Settings window for Extrude.
4 Locate the Distances from Work Plane section. In the associated table, enter the
following settings:
DISTANCES (µm)
-0.4
5 Click the Build Selected button.
Extrude 2
1 In the Model Builder window, right-click Geometry 1 and choose Extrude.
2 Go to the Settings window for Extrude.
3 Locate the Distances from Work Plane section. In the associated table, enter the
following settings:
DISTANCES (µm)
0.2
4 Click the Build Selected button.
©2011 COMSOL
7 |
THIN-LAYER DIFFUSION
Solved with COMSOL Multiphysics 4.2
Form Union
1 In the Model Builder window, click Form Union.
2 Go to the Settings window for Finalize.
3 Locate the Finalize section. From the Finalization method list, select Form an assembly.
4 Clear the Create pairs check box.
5 Click the Build Selected button.
6 Click the Go to Default 3D View button on the Graphics toolbar.
DEFINITIONS
1 In the Model Builder window, right-click Model 1>Definitions and choose Identity Pair.
2 Select Boundary 4 only.
3 Go to the Settings window for Pair.
4 In the upper-right corner of the Destination Boundaries section, click Activate
Selection.
5 Select Boundaries 9, 17, and 23 only.
TR A N S P O R T O F D I L U T E D S P E C I E S
1 In the Model Builder window, click Model 1>Transport of Diluted Species.
2 Go to the Settings window for Transport of Diluted Species.
3 Locate the Transport Mechanisms section. Clear the Convection check box.
8 |
THIN-LAYER DIFFUSION
©2011 COMSOL
Solved with COMSOL Multiphysics 4.2
Diffusion
1 In the Model Builder window, expand the Transport of Diluted Species node, then click
Diffusion.
2 Go to the Settings window for Diffusion.
3 Locate the Diffusion section. In the Di edit field, type D1.
Diffusion 2
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Diffusion.
2 Select Domain 1 only.
3 Go to the Settings window for Diffusion.
4 Locate the Diffusion section. In the Di edit field, type D1_eff.
Flux 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose Flux.
2 Go to the Settings window for Flux.
3 Locate the Inward Flux section. Select the Species c check box.
4 Select Boundary 3 only.
5 In the N0,c edit field, type -r_surf*c/c0.
Concentration 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Concentration.
2 Go to the Settings window for Concentration.
3 Locate the Concentration section. Select the Species c check box.
4 In the c0,c edit field, type c0.
5 Select Boundary 26 only.
Continuity 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Pairs>Continuity.
2 Go to the Settings window for Continuity.
3 Locate the Pair Selection section. In the Pairs list, select Identity Pair 1.
©2011 COMSOL
9 |
THIN-LAYER DIFFUSION
Solved with COMSOL Multiphysics 4.2
MESH 1
Mapped 1
1 In the Model Builder window, right-click Model 1>Mesh 1 and choose More
Operations>Mapped.
2 Select Boundary 4 only.
Mapped 2
1 In the Model Builder window, right-click Mesh 1 and choose More
Operations>Mapped.
2 Select Boundaries 9, 17, and 23 only.
3 In the Model Builder window, right-click Mesh 1 and choose Swept.
Size
1 In the Model Builder window, click Size.
2 Go to the Settings window for Size.
3 Locate the Element Size section. From the Predefined list, select Extra fine.
4 Click the Build All button.
STUDY 1
1 In the Model Builder window, right-click Study 1 and choose Compute.
10 |
THIN-LAYER DIFFUSION
©2011 COMSOL
Solved with COMSOL Multiphysics 4.2
RESULTS
The default plot groups show the concentration as slice and surface (see Figure 1)
plots. Note that the solution is continuous between the two parts.
©2011 COMSOL
11 |
THIN-LAYER DIFFUSION
Solved with COMSOL Multiphysics 4.2
12 |
THIN-LAYER DIFFUSION
©2011 COMSOL