Models - Opt.tesla Microvalve Transient Optimization
Models - Opt.tesla Microvalve Transient Optimization
This model is licensed under the COMSOL Software License Agreement 6.2.
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. Note that the objective function is different from Optimization of a Tesla
Microvalve, because the objective is defined in terms of the flow rate with an oscillating
pressure difference (instead of the other way around with an objective defined in terms of
the pressure drop and oscillating flow rate).
Model Definition
The model solves the transient Navier–Stokes equations with an oscillating pressure drop.
The Reynolds number is 500 in this example. A measure of the effectiveness of the design
is the average flow rate in the x direction during the period Tperiod:
U average = u x̂ d dt Tperiod
T
where T is the simulation time taken as two periods of pressure oscillation. The model uses
an ODE to perform the time integration (see Figure 1):
d
------- t max = f step U
average
U scale
dt
where tmax 1.75Tperiod and fstep is defined so that integration occurs over the last period:
0 t t max – T period
f step =
1 otherwise
u u + -----
u- = – p + u + u T – u
t f
u = 0
where the coefficient depends on the distribution of material which 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, , which
is related to the damping term using a convex function; see Ref. 3.
Figure 1: The ODE variable (used to perform the time integration) is plotted for the optimized
design.
Figure 3: The flow velocity is plotted, while the pressure drop is driving the fluid backward.
Figure 5: The flow velocity is plotted, while the pressure drop is driving the fluid backward.
A fixed time step is combined with a segregated solver and recycling of the forward time
steps to ensure robustness of the adjoint problem.
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.
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).
3 Click Add.
4 In the Select Physics tree, select Mathematics>ODE and DAE Interfaces>
Global ODEs and DAEs (ge).
5 Click Add.
6 Click Study.
7 In the Select Study tree, select General Studies>Time Dependent.
8 Click Done.
GLOBAL DEFINITIONS
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 Click Load from File.
4 Browse to the model’s Application Libraries folder and double-click the file
tesla_microvalve_transient_optimization_parameters.txt.
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.
5 Locate the Selections of Resulting Entities section. Select the Resulting objects selection
check box.
Square 1 (sq1)
1 In the Geometry toolbar, click Square.
2 In the Settings window for Square, locate the Size section.
Move 1 (mov1)
1 In the Geometry toolbar, click Transforms and choose Move.
2 In the Settings window for Move, locate the Input section.
3 From the Input objects list, choose Square 1.
4 Select the Keep input objects check box.
5 Locate the Displacement section. In the x text field, type L+L1.
Symmetry
1 In the Geometry toolbar, click Selections and choose Box Selection.
2 In the Settings window for Box Selection, locate the Geometric Entity Level section.
3 From the Level list, choose Boundary.
4 In the Label text field, type Symmetry.
5 Locate the Box Limits section. In the y maximum text field, type eps.
6 Locate the Output Entities section. From the Include entity if list, choose
Entity inside box.
7 Right-click Symmetry and choose Duplicate.
Outlet
1 In the Model Builder window, under Component 1 (comp1)>Geometry 1 click
Symmetry 1 (boxsel2).
2 In the Settings window for Box Selection, type Outlet in the Label text field.
3 Locate the Box Limits section. In the x maximum text field, type -L1*0.999.
4 In the y maximum text field, type Inf.
5 Right-click Outlet and choose Duplicate.
Inlet
1 In the Model Builder window, under Component 1 (comp1)>Geometry 1 click
Outlet 1 (boxsel3).
2 In the Settings window for Box Selection, type Inlet in the Label text field.
3 Locate the Box Limits section. In the x minimum text field, type L+L1*0.999.
4 In the x maximum text field, type Inf.
MATERIALS
Water
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
2 In the Settings window for Material, type Water in the Label text field.
3 Locate the Material Contents section. In the table, enter the following settings:
COMPONENT 1 (COMP1)
Prescribed Material 1
1 In the Topology Optimization toolbar, click Prescribed Material.
2 In the Settings window for Prescribed Material, locate the Geometric Entity Selection
section.
3 From the Selection list, choose Square 1.
DEFINITIONS
Velocity Average
1 In the Definitions toolbar, click Probes and choose Domain Probe.
2 In the Settings window for Domain Probe, type Velocity Average in the Label text
field.
3 In the Variable name text field, type uAvg.
4 Locate the Source Selection section. From the Selection list, choose Rectangle 1.
5 Locate the Probe Type section. From the Type list, choose Integral.
6 Locate the Expression section. In the Expression text field, type u/L/H.
Symmetry 1
1 In the Model Builder window, under Component 1 (comp1) right-click Laminar Flow (spf)
and choose Symmetry.
2 In the Settings window for Symmetry, locate the Boundary Selection section.
3 From the Selection list, choose Symmetry.
Volume Force 1
1 In the Physics toolbar, click Domains and choose Volume Force.
2 In the Settings window for Volume Force, locate the Domain Selection section.
3 From the Selection list, choose Rectangle 1.
4 Locate the Volume Force section. Specify the F vector as
-alpha*dtopo1.theta_p*u x
-alpha*dtopo1.theta_p*v y
The boolean expression filters out initialization effects in the first period.
MESH 1
Free Triangular 1
In the Mesh toolbar, click Free Triangular.
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 Right-click Optimization and choose Optimization>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 25.
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)>Global ODEs and DAEs>comp1.obj -
State variable obj - 1.
6 Locate the Objective Function section. From the Type list, choose Maximization.
7 From the Objective scaling list, choose Manual.
8 In the Scale text field, type 1.5e-3.
9 Locate the Output While Solving section. From the Probes list, choose None.
RESULTS
OPTIMIZATION
Solver Configurations
In the Model Builder window, expand the Optimization>Solver Configurations node.
Solution 1 (sol1)
In this case the original MMA (1987) converges to the correct topology with fewer model
evaluations.
Topology Optimization
1 In the Model Builder window, under Optimization click Topology Optimization.
2 In the Settings window for Topology Optimization, locate the Output While Solving
section.
3 Select the Plot check box.
4 From the Plot group list, choose Output material volume factor.
5 In the Study toolbar, click Compute.
Objective
1 In the Model Builder window, under Results click 1D Plot Group 3.
2 In the Settings window for 1D Plot Group, type Objective in the Label text field.
3 In the Objective toolbar, click Plot.
Velocity (spf)
1 In the Model Builder window, under Results click Velocity (spf).
2 In the Settings window for 2D Plot Group, locate the Data section.
3 From the Dataset list, choose Filter.
4 From the Time (s) list, choose 0.03325.
It is obvious to see that there are significant approximation errors for the no-slip
boundary condition in the optimization.
5 In the Velocity (spf) toolbar, click Plot.
6 Click the Zoom Extents button in the Graphics toolbar.
Perform a verification in a new component to ensure that the optimization results does not
rely on unphysical effects.
Filter
1 In the Model Builder window, expand the Results>Datasets node, then click Filter.
2 In the Settings window for Filter, click Replace Expression in the upper-right corner of
the Expression section. From the menu, choose Component 1 (comp1)>Definitions>
Density Model 1>Auxiliary variables>dtopo1.theta_f - Filtered material volume factor.
3 Right-click Results>Datasets>Filter and choose Create Mesh Part.
MESH PART 1
Import 1
1 In the Settings window for Import, locate the Import section.
2 Click Import.
Copy/paste the physics, materials, and probe from the 1st component and correct the
selections.
COMPONENT 2 (COMP2)
In the Model Builder window, right-click Component 2 (comp2) and choose
Paste Multiple Items.
MATERIALS
Water (mat1)
In the Model Builder window, under Component 1 (comp1)>Materials right-click
Water (mat1) and choose Copy.
In the Model Builder window, under Component 2 (comp2) right-click Materials and choose
Paste Material.
DEFINITIONS (COMP1)
DEFINITIONS (COMP2)
In the Model Builder window, under Component 2 (comp2) right-click Definitions and
choose Paste Domain Probe.
Symmetry 1
1 In the Model Builder window, expand the Component 2 (comp2)>Laminar Flow (spf2)
node, then click Symmetry 1.
2 In the Settings window for Symmetry, locate the Boundary Selection section.
3 From the Selection list, choose Symmetry (Import 1).
Volume Force 1
In the Model Builder window, right-click Volume Force 1 and choose Delete.
MESH 2
Free Triangular 1
In the Mesh toolbar, click Free Triangular.
Size
Change the settings to give a uniform mesh with an element size half of that used for the
optimization.
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 Empty Study.
4 Click Add Study in the window toolbar.
5 In the Home toolbar, click Add Study to close the Add Study window.
STUDY 2
In the Model Builder window, right-click Study 2 and choose Paste Time Dependent.
1 In the Model Builder window, under Study 2 click Step 1: Time Dependent.
2 In the Settings window for Time Dependent, locate the Physics and Variables Selection
section.
3 In the table, enter the following settings:
4 Click to expand the Results While Solving section. From the Probes list, choose None.
OPTIMIZATION
1 In the Model Builder window, under Optimization click Step 1: Time Dependent.
2 In the Settings window for Time Dependent, locate the Physics and Variables Selection
section.
3 In the table, enter the following settings:
VERIFICATION
1 In the Model Builder window, click Study 2.
2 In the Settings window for Study, type Verification in the Label text field.
3 In the Home toolbar, click Compute.
Velocity (spf)
Drag and drop above Topology Optimization
Output material volume factor.
Topology Optimization 1
In the Model Builder window, under Results right-click Topology Optimization 1 and choose
Delete.
Objective (Verification)
1 In the Model Builder window, under Results click 1D Plot Group 8.
2 In the Settings window for 1D Plot Group, type Objective (Verification) in the
Label text field.
Verification
In the Settings window for Group, type Verification in the Label text field.
Evaluation Group 1
1 In the Results toolbar, click Evaluation Group.
2 In the Settings window for Evaluation Group, locate the Data section.
3 From the Time selection list, choose Last.
Global Evaluation 1
1 Right-click Evaluation Group 1 and choose Global Evaluation.
2 Right-click Global Evaluation 1 and choose Duplicate.
Global Evaluation 2
1 In the Model Builder window, click Global Evaluation 2.
2 In the Settings window for Global Evaluation, locate the Data section.
Velocity (spf2)
1 In the Model Builder window, under Results>Verification click Velocity (spf2).
2 In the Settings window for 2D Plot Group, click Plot Previous.
3 Click the Zoom Extents button in the Graphics toolbar.