You are on page 1of 18

Solved with COMSOL Multiphysics 4.

4
1 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
Opt i mi z at i on of a T e s l a Mi c r ov al v e
Introduction
A Tesla valve inhibits backwards flow on a fixed geometry by utilizing friction forces
instead of moving parts, Ref. 1. This means fluid can flow freely in one direction but
not in the reverse direction. Typically the Reynolds number of the flow in microfluidics
is between 1 and 100.
Model Definition
The model solves two instances of the Navier-Stokes equations, one for the forward
flow and one for the reverse. The Reynolds number is 100 in this example. A measure
of the effectiveness of the design is the ratio of the pressure drop between the inlet and
outlet for the forward and reverse flow. The pressure drop is defined as:
(1)
where L is the length of the inlet and outlet. For the reverse flow the same expression
is used, except the inlet and outlet corresponds to different boundaries in the model.
The ratio of the pressure drop between the reverse and forward flow is then:
(2)
Unfortunately this expression does not form a well posed objective function, so an
alternative expression is required for the optimization problem. According to Ref. 2,
the energy dissipation is a well posed objective function for topological optimization:
(3)
where t is the viscous stress and S is the strain rate tensor:
. (4)
The fluid flow is described by the Navier-Stokes equations:
LAp
forward
p S d
inlet
}
p S d
outlet
}
=
D
i
Ap
backward
Ap
forward
-------------------------- =
obj t:S o u u ( ) + ( ) V d
O
}
=
S
1
2
--- u V u V ( )
T
+ ( ) =
Solved with COMSOL Multiphysics 4.4
2 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
(5)
where the coefficient o(c) depends on the distribution of material which impedes the
flow within the device. In this example, o(c) is given by:
. (6)
Results and Discussion
As expected, the forward and reverse flow are identical but in opposite directions for
the initial topology, Figure 1 and Figure 2. The forward flow in the optimized design
after 150 iterations can be seen in Figure 3. Material has been added close to the outlet
in a triangular shape which allows the forward flow to bend smoothly around it. This
smooth diversion of the flow from the point of impingement results in an overall low
pressure drop between the inlet and the outlet. The reverse flow, shown in Figure 4 is
far more interesting. The triangular shaped obstacle has a flat edge normal to the
incident fluid, which means the velocity is redirected upwards and downwards towards
the exterior walls. The redirected flow is then directed towards additional obstacles
which further impede the flow path.
u V ( )u V p V + q Vu Vu ( )
T
+ ( ) o c ( )u =
V u 0 =
o c ( )
o
0
1 c ( )
q c +
----------------------- =
Solved with COMSOL Multiphysics 4.4
3 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
Figure 1: Forward flow velocity field, initial geometry.
Figure 2: Reverse flow velocity field, initial geometry.
Solved with COMSOL Multiphysics 4.4
4 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
Figure 3: Forward flow, optimized topology.
Figure 4: Reverse flow, optimized topology.
Solved with COMSOL Multiphysics 4.4
5 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
Figure 5: Control variable after optimization.
Finally, a global evaluation is used to compute the ratio of the pressure drop between
the forwards and reverse flow. The computed value should be approximately 1.85.
References
1. Sen Lin, Topology Optimization of Micro Tesla Valve in low and moderate
Reynolds number http://www.senlin41.org/wp-content/uploads/2011/11/
Sen-Lin_Topology-Optimization-of-Tesla-Type-Microvalve.pdf.
2. L. Hjgaard Olesen, F. Okkels, and H. Bruus, A high-level programming-language
implementation of topology optimization applied to steady-state NavierStokes flow,
Int. J. Numer. Meth. Engng, vol. 65, pp. 9751001, 2006.
Notes About the COMSOL Implementation
The model is set up using two Laminar Flow interfaces, one for the forward flow and
one for the reverse.
Solved with COMSOL Multiphysics 4.4
6 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
Model Library path: Microfluidics_Module/Fluid_Flow/
tesla_microvalve_optimization
Modeling Instructions
From the File menu, choose New.
N E W
1 In the New window, click the Model Wizard button.
MO D E L WI Z A R D
1 In the Model Wizard window, click the 2D button.
2 In the Select physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
Add two Laminar Flow physics interfaces, one for the forward flow and one for the
backward flow.
3 Click the Add button.
4 In the Select physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
5 Click the Add button.
6 Click the Study button.
7 In the tree, select Preset Studies for Selected Physics>Stationary.
8 Click the Done button.
G E O ME T R Y 1
The geometry is on the order of millimeters, so change the geometry unit.
1 In the Model Builder window, under Component 1 click Geometry 1.
2 In the Geometry settings window, locate the Units section.
3 From the Length unit list, choose mm.
G L O B A L D E F I N I T I O N S
Add some parameters to compute the average inlet velocity for the flow, based on a
chosen Reynolds number, in this case, 100.
Parameters
1 On the Home toolbar, click Parameters.
Solved with COMSOL Multiphysics 4.4
7 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
2 In the Parameters settings window, locate the Parameters section.
3 In the table, enter the following settings:
G E O ME T R Y 1
Rectangle 1
1 Right-click Geometry 1 and choose Rectangle.
2 In the Rectangle settings window, locate the Size section.
3 In the Height edit field, type 0.35.
Rectangle 2
1 In the Model Builder window, right-click Geometry 1 and choose Rectangle.
2 In the Rectangle settings window, locate the Size section.
3 In the Width edit field, type 0.1.
4 In the Height edit field, type D/2.
5 Locate the Position section. In the x edit field, type -0.1.
6 Click the Build Selected button.
Rectangle 3
1 Right-click Geometry 1 and choose Rectangle.
2 In the Rectangle settings window, locate the Size section.
3 In the Width edit field, type 0.1.
4 In the Height edit field, type D/2.
5 Locate the Position section. In the x edit field, type 1.
6 Click the Build All Objects button.
Name Expression Value Description
Re 100 100.00 Reynolds number
D 0.2[mm] 2.0000E-4 m Characteristic dimension
mu0 1E-3[Pa*s] 0.0010000 Pas Dynamic viscosity
rho0 1E3[kg/m^3] 1000.0 kg/m Density
Uin Re*mu0/(rho0*D) 0.50000 m/s Average inlet velocity
Solved with COMSOL Multiphysics 4.4
8 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
MA T E R I A L S
Material 1
1 In the Model Builder window, under Component 1 right-click Materials and choose
New Material.
2 In the Material settings window, locate the Material Contents section.
3 In the table, enter the following settings:
L A MI N A R F L OW
1 In the Model Builder window, under Component 1 click Laminar Flow.
2 In the Laminar Flow settings window, locate the Physical Model section.
3 From the Compressibility list, choose Incompressible flow.
Use the Laminar Inflow boundary condition to specify that the fluid should be fully
developed as it enters the modeling domain.
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 1 only.
3 In the Inlet settings window, locate the Boundary Condition section.
4 From the Boundary condition list, choose Laminar inflow.
5 Locate the Laminar Inflow section. In the U
av
edit field, type Uin.
6 In the L
entr
edit field, type 1[mm].
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 12 only.
Wall 2
1 On the Physics toolbar, click Boundaries and choose Wall.
2 Select Boundaries 2, 5, and 9 only.
3 In the Wall settings window, locate the Boundary Condition section.
4 From the Boundary condition list, choose Slip.
Property Name Value Unit Property group
Density rho rho0 kg/m Basic
Dynamic viscosity mu mu0 Pas Basic
Solved with COMSOL Multiphysics 4.4
9 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
L A MI N A R F L OW 2
1 In the Model Builder window, under Component 1 click Laminar Flow 2.
2 In the Laminar Flow settings window, locate the Physical Model section.
3 From the Compressibility list, choose Incompressible flow.
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 12 only.
3 In the Inlet settings window, locate the Boundary Condition section.
4 From the Boundary condition list, choose Laminar inflow.
5 Locate the Laminar Inflow section. In the U
av
edit field, type Uin.
6 In the L
entr
edit field, type 1[mm].
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 1 only.
Wall 2
1 On the Physics toolbar, click Boundaries and choose Wall.
2 Select Boundaries 2, 5, and 9 only.
3 In the Wall settings window, locate the Boundary Condition section.
4 From the Boundary condition list, choose Slip.
ME S H 1
1 In the Model Builder window, under Component 1 click Mesh 1.
2 In the Mesh settings window, locate the Mesh Settings section.
3 From the Element size list, choose Extremely fine.
Size
1 Right-click Component 1>Mesh 1 and choose Free Triangular.
2 In the Size settings window, click to expand the Element size parameters section.
3 Locate the Element Size section. Click the Custom button.
4 Locate the Element Size Parameters section. In the Maximum element size edit field,
type 0.0075.
5 Click the Build All button.
6 In the Minimum element size edit field, type 2.4e-5.
Solved with COMSOL Multiphysics 4.4
10 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
S T U D Y 1
On the Home toolbar, click Compute.
R E S U L T S
Data Sets
1 On the Results toolbar, click More Data Sets and choose Mirror 2D.
2 In the Mirror 2D settings window, locate the Axis Data section.
3 In row Point 2, set x to 1.
4 In row Point 2, set y to 0.
Velocity (spf)
1 In the Model Builder window, under Results click Velocity (spf).
2 In the 2D Plot Group settings window, locate the Data section.
3 From the Data set list, choose Mirror 2D 1.
4 On the 2D plot group toolbar, click Plot.
5 Click the Zoom Extents button on the Graphics toolbar.
Velocity (spf2)
1 In the Model Builder window, under Results click Velocity (spf2).
2 In the 2D Plot Group settings window, locate the Data section.
3 From the Data set list, choose Mirror 2D 1.
4 On the 2D plot group toolbar, click Plot.
Now define two average operators on the inlet and outlet of the modeling domain.
These will be used to compute the pressure ratio between the inlet and outlet for
the forward and reverse flow.
D E F I N I T I O N S
Average 1
1 On the Definitions toolbar, click Component Couplings and choose Average.
2 In the Average settings window, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundary 1 only.
Average 2
1 On the Definitions toolbar, click Component Couplings and choose Average.
Solved with COMSOL Multiphysics 4.4
11 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
2 In the Average settings window, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundary 12 only.
Integration 1
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 Select Domain 2 only.
Define the variable corresponding to the ratio of the pressure difference between
the forward and backward flow.
Variables 1a
1 In the Model Builder window, right-click Definitions and choose Variables.
2 In the Variables settings window, locate the Variables section.
3 In the table, enter the following settings:
In order to evaluate the ratio of the pressure differences, the model needs updating.
Note that the model does not need to be solved again.
S T U D Y 1
On the Study toolbar, click Update Solution.
R E S U L T S
Derived Values
1 On the Results toolbar, click Global Evaluation.
2 In the Global Evaluation settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Definitions>Ratio of
pressure differences (Di).
3 Click the Evaluate button.
Name Expression Unit Description
dP_forward aveop1(p)-aveop2(p) Pa Pressure difference,
forwards direction
dP_backward aveop2(p2)-aveop1(p2) Pa Pressure difference,
backwards direction
Di dP_backward/dP_forward Ratio of pressure
differences
Solved with COMSOL Multiphysics 4.4
12 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
T A B L E
Observe the ratio of the pressure differences is very close to 1. This concludes solving
of the forward problem, now the optimization problem needs to be set up. Start by
adding an Optimization interface.
C O MP O N E N T 1
On the Home toolbar, click Add Physics.
A D D P HY S I C S
1 Go to the Add Physics window.
2 In the Add physics tree, select Mathematics>Optimization and Sensitivity>Optimization
(opt).
3 Find the Physics in study subsection. In the table, enter the following settings:
4 In the Add physics window, click Add to Component.
5 On the Home toolbar, click Add Physics.
R O O T
On the Home toolbar, click Add Study.
A D D S T U D Y
1 Go to the Add Study window.
2 Find the Studies subsection. In the tree, select Preset Studies>Stationary.
3 In the Add study window, click Add Study.
4 On the Home toolbar, click Add Study.
O P T I MI Z A T I O N
Add a control variable which can be used to distinguish between free flow and solid
regions. This variable will be coupled back to the Laminar Flow interfaces later.
Control Variable Field 1
1 On the Physics toolbar, click Domains and choose Control Variable Field.
2 Select Domain 2 only.
3 In the Control Variable Field settings window, locate the Control Variable section.
4 In the Control variable name edit field, type epsilon.
Studies Solve
Study 1
Solved with COMSOL Multiphysics 4.4
13 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
5 Locate the Discretization section. From the Element order list, choose Linear.
6 Locate the Control Variable section. In the Initial value edit field, type 1.
Control Variable Bounds 1
Add bounds to ensure that the value of epsilon is always between 0 and 1.
1 In the Model Builder window, right-click Control Variable Field 1 and choose Variable
Bounds.
2 In the Control Variable Bounds settings window, locate the Bounds section.
3 In the Upper bound edit field, type 1.
Now define the friction force to be used in the Laminar Flow interfaces, the viscous
and friction dissipation which can be integrated over the domain to obtain a suitable
objective function.
D E F I N I T I O N S
Variables 1a
1 In the Model Builder window, under Component 1>Definitions click Variables 1a.
2 In the Variables settings window, locate the Variables section.
3 In the table, enter the following settings:
Name Expression Unit Description
alpha 1E7[kg/
(m^3*s)]*(1-epsilon
)/(0.05+epsilon)
kg/(ms) Friction force
visc_forward spf.mu*(2*ux*ux+(uy
+vx)*uy+(uy+vx)*vx+
2*vy*vy)
Pa/s Viscous
dissipation,
forwards flow
visc_backward spf2.mu*(2*u2x*u2x+
(u2y+v2x)*u2y+(u2y+
v2x)*v2x+2*v2y*v2y)
Pa/s Viscous
dissipation,
backwards flow
fric_forward alpha*(u^2+v^2) W/m Friction
dissipation,
forwards flow
fric_backward alpha*(u2^2+v2^2) W/m Friction
dissipation,
backwards flow
E_forward intop1(visc_forward
+fric_forward)
W/m Energy dissipation,
forwards flow
Solved with COMSOL Multiphysics 4.4
14 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
L A MI N A R F L OW
Add the friction force to the Laminar Flow interfaces so that the fluid flows around
regions where epsilon is 1 and through regions where epsilon is 0.
Volume Force 1
1 In the Model Builder window, under Component 1 click Laminar Flow.
2 On the Physics toolbar, click Domains and choose Volume Force.
3 Select Domain 2 only.
4 In the Volume Force settings window, locate the Volume Force section.
5 Specify the F vector as
L A MI N A R F L OW 2
1 In the Model Builder window, under Component 1 click Laminar Flow 2.
2 On the Physics toolbar, click Domains and choose Volume Force.
3 Select Domain 2 only.
4 In the Volume Force settings window, locate the Volume Force section.
5 Specify the F vector as
O P T I MI Z A T I O N
Global Objective 1
1 In the Model Builder window, under Component 1 click Optimization.
2 On the Physics toolbar, click Global and choose Global Objective.
3 In the Global Objective settings window, locate the Global Objective section.
E_backward intop1(visc_backwar
d+fric_backward)
W/m Energy dissipation,
backward flow
obj (E_forward/
E_backward)^2
Objective function
-alpha*u x
-alpha*v y
-alpha*u2 x
-alpha*v2 y
Name Expression Unit Description
Solved with COMSOL Multiphysics 4.4
15 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
4 In the Objective expression edit field, type obj.
Add a regularization constraint on the derivatives of epsilon. This can help prevent
the checkboard instability for the quantity epsilon which may otherwise occur.
Integral Inequality Constraint 1
1 On the Physics toolbar, click Domains and choose Integral Inequality Constraint.
2 Select Domain 2 only.
3 In the Integral Inequality Constraint settings window, locate the Constraint section.
4 In the Constraint expression edit field, type epsilonx^2+epsilony^2.
5 Locate the Bounds section. Clear the Lower bound check box.
6 In the Upper bound edit field, type 150.
The maximum value of 150 is arbitrary and was chosen largely through
experimentation. This is often the case when applying regularization such as the one
used in this example.
D E F I N I T I O N S
Create two probes: one for the objective value and one monitoring the integral
constraint. For the first probe, the default setting are appropriate.
1 On the Definitions toolbar, click Probes and choose Global Variable Probe.
2 Again, on the Definitions toolbar, click Probes and choose Global Variable Probe.
3 In the Global Variable Probe settings window, click Replace Expression in the
upper-right corner of the Expression section. From the menu, choose
Optimization>Constraint value (opt.iconstr1).
S T U D Y 2
Optimization
1 In the Model Builder window, right-click Study 2 and choose Optimization.
2 In the Optimization settings window, locate the Optimization Solver section.
3 From the Method list, choose SNOPT.
4 In the Maximum number of objective evaluations edit field, type 150.
5 On the Study toolbar, click Get Initial Value.
6 In the Optimization settings window, locate the Output While Solving section.
7 Select the Plot check box.
8 From the Plot group list, choose 2D Plot Group 9.
Solved with COMSOL Multiphysics 4.4
16 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
9 On the Home toolbar, click Compute.
R E S U L T S
Velocity (spf) 1
The forward and backward flow pattern computed using the optimization solver can
now be visualized.
Data Sets
1 In the Model Builder window, expand the Results>Data Sets node.
2 Right-click Mirror 2D 1 and choose Duplicate.
3 In the Mirror 2D settings window, locate the Data section.
4 From the Data set list, choose Solution 2.
Velocity (spf) 1
1 In the Model Builder window, under Results click Velocity (spf) 1.
2 In the 2D Plot Group settings window, locate the Data section.
3 From the Data set list, choose Mirror 2D 2.
4 On the 2D plot group toolbar, click Plot.
5 Right-click Results>Velocity (spf) 1 and choose Rename.
6 Go to the Rename 2D Plot Group dialog box and type Forward flow in the New name
edit field.
7 Click OK.
Forward flow
1 In the Model Builder window, expand the Results>Forward flow node.
2 Right-click Results>Velocity (spf) 1 and choose Arrow Surface.
3 In the Arrow Surface settings window, locate the Arrow Positioning section.
4 In the Points edit field, type 30.
5 In the Points edit field, type 30.
6 On the 2D plot group toolbar, click Plot.
7 In the Model Builder window, right-click Forward flow and choose Surface.
8 In the Surface settings window, locate the Expression section.
9 In the Expression edit field, type epsilon.
10 Locate the Coloring and Style section. From the Coloring list, choose Uniform.
11 From the Color list, choose White.
Solved with COMSOL Multiphysics 4.4
17 | O P T I M I Z A T I O N O F A TE S L A M I C R O V A L V E
12 Click to expand the Range section. Select the Manual data range check box.
13 In the Minimum edit field, type 0.
14 In the Maximum edit field, type 0.5.
15 On the 2D plot group toolbar, click Plot.
16 Click the Zoom Extents button on the Graphics toolbar.
Now follow a similar procedure for the backward flow.
Velocity (spf2) 1
1 In the Model Builder window, click Results>Forward flow and select Surface 2 and
Arrow Surface 1, then right-click and choose Copy.
2 Right-click Velocity (spf2) 1 and choose Rename.
3 Go to the Rename 2D Plot Group dialog box and type Backward flow in the New
name edit field.
4 Click OK.
Backward flow
1 Right-click Results>Velocity (spf2) 1 and choose Paste Multiple Items.
2 In the Arrow Surface settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Laminar Flow 2>Velocity
field (u2,v2).
3 On the 2D plot group toolbar, click Plot.
4 In the Model Builder window, click Backward flow.
5 In the 2D Plot Group settings window, locate the Data section.
6 From the Data set list, choose Mirror 2D 2.
7 On the 2D plot group toolbar, click Plot.
8 Click the Zoom Extents button on the Graphics toolbar.
Now plot the value of epsilon to see where the optimization solver filled in the
channel to maximize the pressure ratio.
2D Plot Group 9
1 In the Model Builder window, under Results click 2D Plot Group 9.
2 In the 2D Plot Group settings window, locate the Data section.
3 From the Data set list, choose Mirror 2D 2.
4 In the Model Builder window, expand the 2D Plot Group 9 node, then click Surface 1.
5 In the Surface settings window, locate the Coloring and Style section.
Solved with COMSOL Multiphysics 4.4
18 | O P T I M I Z A T I O N O F A TE S L A M I C R OV A L V E
6 From the Color table list, choose GrayScale.
7 Clear the Color legend check box.
8 On the 2D plot group toolbar, click Plot.
9 Click the Zoom Extents button on the Graphics toolbar.
Derived Values
Finally, evaluate the ratio of the pressure drop between the forwards and backwards
flow.
1 On the Results toolbar, click Global Evaluation.
2 In the Global Evaluation settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Ratio of pressure differences
(Di).
3 Click the Evaluate button.

You might also like