Tesla Microvalve Optimization
Tesla Microvalve Optimization
This model is licensed under the COMSOL Software License Agreement 6.1.
All trademarks are the property of their respective owners. See www.comsol.com/trademarks.
Introduction
A Tesla valve inhibits backward 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 up to 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
p forward = p dS – p dS
inlet outlet
For the reverse flow the same expression is used, except the inlet and outlet correspond to
different boundaries in the model. The ratio of the pressure drop between the reverse and
forward flow is then
p backward
D i = -------------------------
-
p forward
An alternative expression based on the dissipation is used for the optimization problem, so
that the effect of the in- and outlet boxes can be disregarded. The energy dissipation is
= :S + u u dV
1 T
S = --- u + u
2
T
u u = – p + u + u – u
u = 0
where the coefficient depends on the distribution of material that impedes the flow
within the device. In this example, is given by
where c and f are the control- and filtered material volume factors. To avoid the effect
of grayscale, the filtered field is projected to construct the material volume factor, .
Finally, the damping term, p, is expressed in terms of the maximum damping, 0, and
the penalized material volume factor, p. This model involves fluid flow, so a convex
function is used for the interpolation; see Ref. 3. The scheme avoids grayscale and spurious
holes; see Figure 1.
Finally, the optimized results is transferred to a new component for verification. This
results in a larger diodicity.
References
1. S. Lin, “Topology Optimization of Micro Tesla Valve in low and moderate Reynolds
number,” Chinese Academy of Sciences, China, September 27, 2011.
Modeling Instructions
From the File menu, choose New.
NEW
In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select Physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
Add two Laminar Flow interfaces for the forward and backward flow, respectively.
3 Click Add.
4 In the Select Physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
5 Click Add.
6 Click Study.
7 In the Select Study tree, select General Studies>Stationary.
8 Click Done.
GEOMETRY 1
The geometry is on the order of millimeters, so change the geometry unit.
Parameters 1
1 In the Model Builder window, under Global Definitions click Parameters 1.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
Rectangle 1 (r1)
1 In the Geometry toolbar, click Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type L.
4 In the Height text field, type H.
Rectangle 2 (r2)
1 In the Geometry toolbar, click Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type D/2.
4 In the Height text field, type D/2.
5 Locate the Position section. In the x text field, type -D/2.
6 Click Build Selected.
Rectangle 3 (r3)
1 In the Geometry toolbar, click Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
Symmetry
1 In the Geometry toolbar, click Selections and choose Box Selection.
2 In the Settings window for Box Selection, type Symmetry in the Label text field.
3 Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4 Locate the Box Limits section. In the y maximum text field, type 1e3*eps.
5 Locate the Output Entities section. From the Include entity if list, choose
Entity inside box.
Left
1 In the Geometry toolbar, click Selections and choose Box Selection.
2 In the Settings window for Box Selection, type Left in the Label text field.
3 Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4 Locate the Box Limits section. In the x maximum text field, type -D/2+1e3*eps.
5 Locate the Output Entities section. From the Include entity if list, choose
Entity inside box.
Right
1 In the Geometry toolbar, click Selections and choose Box Selection.
2 In the Settings window for Box Selection, type Right in the Label text field.
3 Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4 Locate the Box Limits section. In the x minimum text field, type L+D/2-1e3*eps.
5 Locate the Output Entities section. From the Include entity if list, choose
Entity inside box.
6 Click Build All Objects.
7 Click the Zoom Extents button in the Graphics toolbar.
GLOBAL DEFINITIONS
Add a blank material for rho0 and mu0.
Material 1 (mat1)
1 In the Model Builder window, under Global Definitions right-click Materials and choose
Blank Material.
MATERIALS
Inlet 1
1 In the Model Builder window, under Component 1 (comp1) right-click Laminar Flow (spf)
and choose Inlet.
2 In the Settings window for Inlet, locate the Boundary Selection section.
Outlet 1
1 In the Physics toolbar, click Boundaries and choose Outlet.
2 In the Settings window for Outlet, locate the Boundary Selection section.
3 From the Selection list, choose Right.
Wall 2
1 In the Physics toolbar, click Boundaries and choose Wall.
2 In the Settings window for Wall, locate the Boundary Selection section.
3 From the Selection list, choose Symmetry.
4 Locate the Boundary Condition section. From the Wall condition list, choose Slip.
Inlet 1
1 In the Physics toolbar, click Boundaries and choose Inlet.
2 In the Settings window for Inlet, locate the Boundary Selection section.
3 From the Selection list, choose Right.
4 Locate the Boundary Condition section. From the list, choose Fully developed flow.
5 Locate the Fully Developed Flow section. In the Uav text field, type Uin.
Outlet 1
1 In the Physics toolbar, click Boundaries and choose Outlet.
2 In the Settings window for Outlet, locate the Boundary Selection section.
3 From the Selection list, choose Left.
Wall 2
1 In the Physics toolbar, click Boundaries and choose Wall.
2 In the Settings window for Wall, locate the Boundary Selection section.
3 From the Selection list, choose Symmetry.
4 Locate the Boundary Condition section. From the Wall condition list, choose Slip.
Free Triangular 1
In the Mesh toolbar, click Free Triangular.
Size
1 In the Model Builder window, click Size.
2 In the Settings window for Size, 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 text field, type
meshsz.
STUDY 1
In the Home toolbar, click Compute.
RESULTS
Mirror 2D 1
1 In the Results toolbar, click More Datasets and choose Mirror 2D.
2 In the Settings window for Mirror 2D, locate the Axis Data section.
3 In row Point 2, set x to 1 and y to 0.
Velocity (spf)
1 In the Model Builder window, under Results click Velocity (spf).
2 In the Velocity (spf) toolbar, click Plot.
3 Click the Zoom Extents button in the Graphics toolbar.
Velocity (spf2)
1 In the Model Builder window, click Velocity (spf2).
2 In the Velocity (spf2) 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.
Average 1 (aveop1)
1 In the Definitions toolbar, click Nonlocal Couplings and choose Average.
2 In the Settings window for Average, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose Left.
Average 2 (aveop2)
1 In the Definitions toolbar, click Nonlocal Couplings and choose Average.
2 In the Settings window for Average, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose Right.
Integration 1 (intop1)
1 In the Definitions toolbar, click Nonlocal Couplings and choose Integration.
2 Select Domain 2 only.
Define a variable corresponding to the ratio of the pressure difference between the
forward and backward flow.
Variables 1
1 In the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, 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.
STUDY 1
In the Study toolbar, click Update Solution.
Diodicity
1 In the Results toolbar, click Evaluation Group.
2 In the Settings window for Evaluation Group, type Diodicity in the Label text field.
Global Evaluation 1
1 Right-click Diodicity and choose Global Evaluation.
2 In the Settings window for Global Evaluation, click Add Expression in the upper-right
corner of the Expressions section. From the menu, choose Component 1 (comp1)>
Definitions>Variables>Di - Ratio of pressure differences.
3 In the Diodicity toolbar, click Evaluate.
TABLE
1 Go to the Table window.
Observe that the ratio of the pressure differences is very close to 1. This concludes
solving of the forward problem; now set up the optimization problem.
Add a density topology feature, which can be used to distinguish between free flow and
solid regions. This variable will be coupled back to the Laminar Flow interfaces later. The
filter radius should not be smaller than the mesh element size. The default value will work,
but a fixed value has to be chosen to make the result of the optimization mesh
independent.
COMPONENT 1 (COMP1)
DEFINITIONS
Variables 1
1 In the Model Builder window, under Component 1 (comp1)>Definitions click Variables 1.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
Volume Force 1
1 In the Physics toolbar, click Domains and choose Volume Force.
2 Select Domain 2 only.
3 In the Settings window for Volume Force, locate the Volume Force section.
4 Specify the F vector as
-alpha*u x
-alpha*v y
Volume Force 1
1 Select Domain 2 only.
2 In the Settings window for Volume Force, locate the Volume Force section.
3 Specify the F vector as
-alpha*u2 x
-alpha*v2 y
OPTIMIZATION
1 In the Model Builder window, click Study 1.
2 In the Settings window for Study, type Optimization in the Label text field.
Topology Optimization
1 In the Study toolbar, click Optimization and choose Topology Optimization.
2 In the Settings window for Topology Optimization, locate the Optimization Solver section.
3 In the Maximum number of iterations text field, type 200.
4 Select the Move limits check box. In the associated text field, type 0.2.
5 Click Add Expression in the upper-right corner of the Objective Function section. From
the menu, choose Component 1 (comp1)>Definitions>Variables>comp1.obj -
Objective function.
6 Locate the Objective Function section. From the Type list, choose Maximization.
7 In the Study toolbar, click Get Initial Value.
Solution 1 (sol1)
The old version of MMA (1987) is less prone to premature convergence.
RESULTS
Mirror 2D 1
Use the mirrored dataset to plot the value of theta during the optimization.
Topology
1 In the Home toolbar, click Add Plot Group and choose 2D Plot Group.
2 In the Settings window for 2D Plot Group, type Topology in the Label text field.
3 Locate the Data section. From the Dataset list, choose Mirror 2D 1.
Surface 1
1 Right-click Topology and choose Surface.
2 In the Settings window for Surface, locate the Expression section.
3 In the Expression text field, type dtopo1.theta.
4 Locate the Coloring and Style section. Click Change Color Table.
5 In the Color Table dialog box, select Linear>GrayScale in the tree.
6 Click OK.
7 In the Settings window for Surface, locate the Coloring and Style section.
8 Clear the Color legend check box.
9 Click to expand the Range section. Select the Manual color range check box.
10 In the Maximum text field, type 1.
11 In the Topology toolbar, click Plot.
OPTIMIZATION
Topology Optimization
1 In the Model Builder window, under Optimization click Topology Optimization.
RESULTS
Forward Flow
The forward and backward flow patterns computed using the optimization solver can now
be visualized.
1 In the Settings window for 2D Plot Group, locate the Data section.
2 From the Dataset list, choose Mirror 2D 1.
3 In the Velocity (spf) toolbar, click Plot.
4 In the Label text field, type Forward Flow.
Arrow Surface 1
1 Right-click Forward Flow and choose Arrow Surface.
2 In the Settings window for Arrow Surface, locate the Arrow Positioning section.
3 Find the x grid points subsection. In the Points text field, type 30.
4 Find the y grid points subsection. In the Points text field, type 30.
5 In the Forward Flow toolbar, click Plot.
Surface 2
1 Right-click Forward Flow and choose Surface.
2 In the Settings window for Surface, locate the Expression section.
3 In the Expression text field, type dtopo1.theta.
4 Locate the Coloring and Style section. From the Coloring list, choose Uniform.
5 From the Color list, choose White.
6 Locate the Range section. Select the Manual data range check box.
7 In the Maximum text field, type 0.5.
8 In the Forward Flow toolbar, click Plot.
9 Click the Zoom Extents button in the Graphics toolbar.
Now follow a similar procedure for the backward flow.
Backward Flow
1 In the Model Builder window, under Results click Velocity (spf2).
2 In the Settings window for 2D Plot Group, type Backward Flow in the Label text field.
Arrow Surface 1
1 Right-click Backward Flow and choose Paste Multiple Items.
2 In the Settings window for Arrow Surface, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Component 1 (comp1)>
Laminar Flow 2>Velocity and pressure>u2,v2 - Velocity field.
3 In the Backward Flow toolbar, click Plot.
Backward Flow
1 In the Model Builder window, click Backward Flow.
2 In the Settings window for 2D Plot Group, locate the Data section.
3 From the Dataset list, choose Mirror 2D 1.
4 In the Backward Flow toolbar, click Plot.
5 Click the Zoom Extents button in the Graphics toolbar.
6 In the Backward Flow toolbar, click Plot.
Topology
1 In the Model Builder window, click Topology.
2 In the Topology toolbar, click Plot.
3 Click the Zoom Extents button in the Graphics toolbar.
Optimized Design
In the Settings window for Group, type Optimized Design in the Label text field.
Next, evaluate the damping with respect to the relative amount of dissipation in the solid
region to see if the optimization result can be trusted.
Global Evaluation 1
1 Right-click Dissipation in Solid Regions and choose Global Evaluation.
2 In the Settings window for Global Evaluation, locate the Expressions section.
3 In the table, enter the following settings:
The Density Model generates a Filter Dataset when the default plots are created. However,
since Density Model was added later, a Filter Dataset must be added manually.
Filter 1
1 In the Results toolbar, click More Datasets and choose Filter.
2 In the Settings window for Filter, locate the Expression section.
3 In the Expression text field, type dtopo1.theta.
4 Locate the Filter section. In the Lower bound text field, type 0.5.
5 Locate the Evaluation section. Clear the Use derivatives check box.
Create a new component from the filter dataset.
6 Right-click Filter 1 and choose Create Mesh in New Component.
MESH 2
Import 1
1 In the Settings window for Import, locate the Import section.
2 Click Import.
Adapt 1
1 In the Mesh toolbar, click Modify and choose Adapt.
MATERIALS
Inlet 1
1 In the Model Builder window, expand the Component 2 (comp2)>Laminar Flow (spf3)
node, then click Inlet 1.
2 In the Settings window for Inlet, locate the Boundary Selection section.
3 From the Selection list, choose Left.
Outlet 1
1 In the Model Builder window, click Outlet 1.
Wall 2
1 In the Model Builder window, click Wall 2.
2 In the Settings window for Wall, locate the Boundary Selection section.
3 From the Selection list, choose Symmetry.
Volume Force 1
In the Model Builder window, under Component 2 (comp2)>Laminar Flow (spf3) right-click
Volume Force 1 and choose Delete.
Inlet 1
1 In the Model Builder window, expand the Component 2 (comp2)>Laminar Flow 2 (spf4)
node, then click Inlet 1.
2 In the Settings window for Inlet, locate the Boundary Selection section.
3 From the Selection list, choose Right.
Outlet 1
1 In the Model Builder window, click Outlet 1.
2 In the Settings window for Outlet, locate the Boundary Selection section.
3 From the Selection list, choose Left.
Wall 2
1 In the Model Builder window, click Wall 2.
2 In the Settings window for Wall, locate the Boundary Selection section.
3 From the Selection list, choose Symmetry.
Volume Force 1
In the Model Builder window, under Component 2 (comp2)>Laminar Flow 2 (spf4) right-click
Volume Force 1 and choose Delete.
DEFINITIONS (COMP2)
Set up a new average operator so that a new diodicity variable can be defined for the new
component.
Average 3 (aveop3)
1 In the Definitions toolbar, click Nonlocal Couplings and choose Average.
Average 4 (aveop4)
1 Right-click Average 3 (aveop3) and choose Duplicate.
2 In the Settings window for Average, locate the Source Selection section.
3 From the Selection list, choose Right.
Variables 2
1 In the Model Builder window, right-click Definitions and choose Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>Stationary.
4 Find the Physics interfaces in study subsection. In the table, clear the Solve check boxes
for Laminar Flow (spf) and Laminar Flow 2 (spf2).
5 Click Add Study in the window toolbar.
6 In the Model Builder window, click the root node.
7 In the Home toolbar, click Add Study to close the Add Study window.
OPTIMIZATION
Step 1: Stationary
1 In the Settings window for Stationary, locate the Physics and Variables Selection section.
2 In the table, clear the Solve for check boxes for Laminar Flow (spf3) and
Laminar Flow 2 (spf4).
Step 1: Stationary
1 In the Model Builder window, under Study 2 click Step 1: Stationary.
2 In the Settings window for Stationary, locate the Physics and Variables Selection section.
3 In the table, clear the Solve for check box for Topology Optimization (Component 1).
4 In the Model Builder window, click Study 2.
5 In the Settings window for Study, type Verification in the Label text field.
6 In the Home toolbar, click Compute.
RESULTS
Verification
In the Settings window for Group, type Verification in the Label text field.
Topology Optimization
In the Model Builder window, under Results right-click Topology Optimization and choose
Delete.
Diodicity
Compute the diodicity for the component (without power loss in solid domains).
Global Evaluation 2
1 In the Model Builder window, right-click Diodicity and choose Global Evaluation.
2 In the Settings window for Global Evaluation, locate the Data section.
3 From the Dataset list, choose Verification/Solution 2 (3) (sol2).
4 Click Add Expression in the upper-right corner of the Expressions section. From the
menu, choose Component 2 (comp2)>Definitions>Variables>Di -
Ratio of pressure differences.
5 In the Diodicity toolbar, click Evaluate.
The diodicity is actually higher for the verification simulation, so optimization has found
a good design topology.