Tutorial 16 Flow through a hole (in MEMS microperforation)

Numerical methods and mathematical models of Elmer
JJSz
Posts: 10
Joined: 14 Dec 2020, 18:36
Antispam: Yes

Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by JJSz »

Hello everyone,
I am new member of this community. Firstly I would like to thank whole Elmer team for distribution of manuals and tutorials online. They have already helped me to better understand FEM. These papers are really clear and easy to understand. I cannot thank enough for including parts of .sif file which gave me basis to start.

I am turning to you with a problem refering to tutorial 16. I have implemented example file hole.grd. I have generated case.sif file according to instructions from Elmer Tutorial (Solution procedure). My intention is to calculate acoustic impedance of a single hole in microperforation used in MEMS microphones. I plan to modify dimensions of initial model in hole.grd and observe how they would affect the results. I have read that in such case I should use equation:
Z = (Pin - Pout)/vin
where:
Pin - inlet pressure
Pout - outlet pressure
vin - inlet velocity

I have tried to conduct time-domain analysis (with parameters given in Simulation section of case.sif) and to plot the results in Paraview. To my concern, values of both velocity and pressure are suspiciously huge (regardless negative sign).
pressure.png
(126.54 KiB) Not downloaded yet
velocity.png
(122.21 KiB) Not downloaded yet
Besides I am not sure about distribution of these values. What should I anticipate?
Am I using proper equation for analysis at all? Is this a matter of boundary conditions? And what is the most important - is there any approximately minimum value of time period after which Pout is taken?

Thank to anyone that would be willing to help.

Here is code of my case.sif:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian 3D
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Transient
  Timestep Intervals = 10
  Timestep Sizes = 0.00001
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = case.sif
  Post File = flow.vtu
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
End

Solver 1
  Equation = Navier-Stokes
  Variable = Flow Solution[Velocity:3 Pressure:1]
  Procedure = "FlowSolve" "FlowSolver"
  Variable DOFs  = 4
  Exec Solver = After Timestep
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-5
  Nonlinear System Max Iterations = 1
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-8
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 200
  Linear System Convergence Tolerance = 1.0e-8
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Solver 2
  Exec Solver = After Timestep 
  Equation = Fluidic Force 
  Procedure ="FluidicForce" "ForceCompute" 
  Calculate Viscous Force = True
End

Solver 3 
  Exec Solver = After Timestep 
  Equation = SaveScalars 
  Procedure = "SaveData" "SaveScalars" 
  Filename = "flowdata.dat" 
  Save Variable 1 = Velocity 3 
  Save Coordinates(1,2) = 0.0 0.0 
End 

Equation 1
  Name = "Equation 1"
  NS Convect = True
  Active Solvers(3) = 1 2 3
End

Material 1
  Name = "Air (room temperature)"
  Density = 1.205
  Sound speed = 343.0
  Heat Capacity = 1005.0
  Viscosity = 1.983e-5
  Heat expansion Coefficient = 3.43e-3
  Heat Conductivity = 0.0257
  Relative Permittivity = 1.00059
End

Boundary Condition 1
  Target Boundaries(1) = 4
  Flow Force BC = True   
  Name = "BoundaryCondition 1"
  Velocity 3 = 2.0e3
  Slip Coefficient 1 = 2e-4
  Normal-Tangential Velocity = True
  Slip Coefficient 2 = 2e-4
  Calculate Fluidic Force = True
End

Boundary Condition 2
  Target Boundaries(2) = 8 10 
  Name = "BoundaryCondition 2"
  Normal-Tangential Velocity = True
  Velocity 2 = 0.0
End

Boundary Condition 3
  Target Boundaries(2) = 2 3 
  Flow Force BC = True
  Name = "BoundaryCondition 3"
  Normal-Tangential Velocity = True
  Slip Coefficient 1 = 2e-4
  Velocity 3 = 0.0
  Slip Coefficient 2 = 2e-4
End

Boundary Condition 4
  Target Boundaries(2) = 6 9 
  Name = "BoundaryCondition 4"
  Normal-Tangential Velocity = True
  Velocity 1 = 0.0
End

Boundary Condition 5
  Target Boundaries(1) = 5 
  Name = "BoundaryCondition 5"
  Pressure = 0.0
  Normal-Tangential Velocity = True
End

Boundary Condition 6
  Target Boundaries(1) = 1 
  Flow Force BC = True
  Name = "BoundaryCondition 6"
  Slip Coefficient 2 = 2e-4
  Normal-Tangential Velocity = True
  Velocity 1 = 0.0
  Slip Coefficient 3 = 2e-4
End

Boundary Condition 7
  Target Boundaries(1) = 7 
  Flow Force BC = True
  Name = "BoundaryCondition 7"
  Normal-Tangential Velocity = True
  Slip Coefficient 3 = 2e-4
  Slip Coefficient 1 = 2e-4
  Velocity 2 = 0.0
End
I have also attached case.sif to this post
case.sif
(3.58 KiB) Downloaded 170 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by raback »

Hi

Did you reach convergence. If the results are diverged they are typically out of bounds and there is not much use analyzing them in detail.

-Peter
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by kevinarden »

Looks like an unconverged solution due to the flow being turbulent. The Navair-Stokes solver by itself does not converge well on turbulent flow. Search the forum for turbulent flow, or decrease the velocity/increase the viscosity to get below turbulent flow.
JJSz
Posts: 10
Joined: 14 Dec 2020, 18:36
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by JJSz »

Hello again,
sorry for keeping you waiting so long. I needed time to fix whatever I could on my own and to check your advices. I definitely would like to avoid turbulent flow. I have significantly decreased velocity value and slightly increased viscosity. I have also adjusted slip coefficients respectively. However, sumulations still seem to fall into turbulent flow and yet it should not be occuring (at least deducing from values that I had mentioned). After just several time-steps I receive note that simulations could not reach convergence and that results are diverged over maximum tolerance. I am lacking knowledge of Navier-Stokes solver. Please, could you possibly verify my .grd and .sif code? They are in attachments _holeBest.grd and case_slip_time.sif.
Please pay no mind to any comments in files. These are only leftovers of the past, but I am still considering reusing them.
_holeBest.grd
(1.27 KiB) Downloaded 184 times
case_slip_time.sif
(3.56 KiB) Downloaded 164 times
This model is upgraded from my last one.
Pressure distribution after these few time-steps in Paraview:
pressure_time.png
(113.39 KiB) Not downloaded yet
JJSz
Posts: 10
Joined: 14 Dec 2020, 18:36
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by JJSz »

Beside time-variant simulations I have also tried steady-state type on the same .grd model. I have tried to make results look as similar to these in tutorial 16 as possible. I have no other ideas how to obtain these neat isolines. Do I have any chances to see them even when using slip boudary conditions?
Here is pressure distribution after steady-state simulation (in two shots):
pressure_steady2.png
(127.51 KiB) Not downloaded yet
pressure_steady1.png
(126.42 KiB) Not downloaded yet
And here is .sif file for this case:
case.sif
(3.68 KiB) Downloaded 154 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by kevinarden »

With a KE solver to help with the turbulence it seems to do fairly well. Although elmer has a KE solver, This Kepsilon solver is made by compiling using Elmer's compiler.

elmerf90 KEpsSolver.F90 -o KEpsSolver

the compiled solver would be in the same directory as the sif file.

The steady state eventually diverged, often turbulent flow does not have a steady state.
transient.png
(146.42 KiB) Not downloaded yet
steadystate.png
(50.09 KiB) Not downloaded yet
hole.zip
(12.94 KiB) Downloaded 178 times
I modified other things in the sif. Specified velocity conditions on the outlet instead of pressure, let Elmer calculate pressure and exit velocity at the outlet
Modified the inlet to be parabolic flow
JJSz
Posts: 10
Joined: 14 Dec 2020, 18:36
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by JJSz »

Hello,
thank you for looking into my files. I am eternally grateful :D These screenshots look promising. Now I understand that turbulent flow is unavoidable in this case. I am trying now to start simulation following your instructions. I have copied KepsSolver file to the same directory as .sif file. I have also tried running your command:
elmerf90 KEpsSolver.F90 -o KEpsSolver
However I receive this note:
note.png
(115.76 KiB) Not downloaded yet
Do I need to install package f95 separately (if exists and if possible)? Or should I proceed with installation from other directory? Or do I need to update my ElmerSolver?
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by kevinarden »

you will need to install gfortran

if it is an ubuntu system

sudo apt install gfortran
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by kevinarden »

There is also a built in KE solver that does not require compiling as shown in this
test case

https://github.com/ElmerCSC/elmerfem/tr ... ts/Step_ke
JJSz
Posts: 10
Joined: 14 Dec 2020, 18:36
Antispam: Yes

Re: Tutorial 16 Flow through a hole (in MEMS microperforation)

Post by JJSz »

Thank you for advices. It worked. I am currently using your fistr mentioned Kepssolver.
I received the same velocity distribution and stream for time-variant simulation. But now after analysing these data I am focusing on pressure distribution again and I became concerned about a fact that pressure is concentrated on side boundary. I anticipated it to be directed into the hole. Is this a matter of boundary conditions? Or velocity value?
pressure.png
(229.13 KiB) Not downloaded yet
Post Reply