Skip to content
Snippets Groups Projects
Commit e626bc60 authored by Denis Louis's avatar Denis Louis
Browse files

comb update

parent f2165429
No related branches found
No related tags found
No related merge requests found
scale = 2e-6; scale = 2e-6;
// USE WITH MINIMUM 2 FINS, else use longitudinal_comb.geo // USE WITH MINIMUM 2 FINS, else use longitudinal_comb.geo
N_fins = 7; // number of fins on one side of the comb N_fins = 3; // number of fins on one side of the comb // MAX 12 si on change ps la longueur
// WARNING: when using more fins the pull-in voltage decreases // WARNING: when using more fins the pull-in voltage decreases
n = 1; // FEM elements density n = 1; // FEM elements density
nBEM = 1; // BEM elements density
// mechanical properties and boundary conditions // mechanical properties and boundary conditions
SetNumber("Boundary Conditions/left/ux", 0.); // encastrement SetNumber("Boundary Conditions/left/ux", 0.); // encastrement
...@@ -32,7 +33,7 @@ SetNumber("Boundary Conditions/electrode_2/BEM_domain_2/dirichlet", phi_2); ...@@ -32,7 +33,7 @@ SetNumber("Boundary Conditions/electrode_2/BEM_domain_2/dirichlet", phi_2);
SetNumber("Boundary Conditions/outside_2/BEM_domain_2/neumann", 0); SetNumber("Boundary Conditions/outside_2/BEM_domain_2/neumann", 0);
SetNumber("Materials/BEM_domain_2/Epsilon", 8.8541878128e-12); // dielectric permittivity SetNumber("Materials/BEM_domain_2/Epsilon", 8.8541878128e-12); // dielectric permittivity
h_tot = 20*scale; h_tot = 30*scale;
h_base = 0.4*scale; h_base = 0.4*scale;
h_fin = 2.8*scale; h_fin = 2.8*scale;
h_space = 1*scale; // space between bout de l'electrode and base of the clamped beam of the comb h_space = 1*scale; // space between bout de l'electrode and base of the clamped beam of the comb
...@@ -41,7 +42,7 @@ h_fin_elec = 2.4*scale; // length of the fins of the electrode, can be longer th ...@@ -41,7 +42,7 @@ h_fin_elec = 2.4*scale; // length of the fins of the electrode, can be longer th
//l_bord = 10*scale; //l_bord = 10*scale;
//l_tot = 34.4*scale; //l_tot = 34.4*scale;
l_tot = 64*scale; l_tot = 40*scale;
l_fin = 0.8*scale; l_fin = 0.8*scale;
l_space = 0.8*scale; l_space = 0.8*scale;
t_electrode = 1*scale; // width of one electrode t_electrode = 1*scale; // width of one electrode
...@@ -52,14 +53,14 @@ l_bord = (l_tot - l_fin - (N_fins-1)*l_periodic)/2; ...@@ -52,14 +53,14 @@ l_bord = (l_tot - l_fin - (N_fins-1)*l_periodic)/2;
unit_l = 0.2*scale; // reference for the transfinite curves unit_l = 0.2*scale; // reference for the transfinite curves
// définition des points du contour // définition des points du contour
Point(1) = {0, -h_base/2, 0, 0.2*scale}; Point(1) = {0, -h_base/2, 0, nBEM*scale};
Point(2) = {0, -h_tot/2, 0, 0.2*scale}; Point(2) = {0, -h_tot/2, 0, nBEM*scale};
Point(3) = {l_tot, -h_tot/2, 0, 0.2*scale}; Point(3) = {l_tot, -h_tot/2, 0, nBEM*scale};
Point(4) = {l_tot, -h_base/2, 0, 0.2*scale}; Point(4) = {l_tot, -h_base/2, 0, nBEM*scale};
Point(5) = {l_tot, h_base/2, 0, 0.2*scale}; Point(5) = {l_tot, h_base/2, 0, nBEM*scale};
Point(6) = {l_tot, h_tot/2, 0, 0.2*scale}; Point(6) = {l_tot, h_tot/2, 0, nBEM*scale};
Point(7) = {0, h_tot/2, 0, 0.2*scale}; Point(7) = {0, h_tot/2, 0, nBEM*scale};
Point(8) = {0, h_base/2, 0, 0.2*scale}; Point(8) = {0, h_base/2, 0, nBEM*scale};
// définition des lignes du contour // définition des lignes du contour
Line(1) = {1, 2}; Line(1) = {1, 2};
Line(2) = {2, 3}; Line(2) = {2, 3};
...@@ -196,21 +197,21 @@ Physical Curve("BEM_FEM_boundary", 4) = {offsetl1:offsetl1+4*N_fins, offsetl2:of ...@@ -196,21 +197,21 @@ Physical Curve("BEM_FEM_boundary", 4) = {offsetl1:offsetl1+4*N_fins, offsetl2:of
x0_e = l_bord - l_space - t_electrode; // pour faciliter le bazar x0_e = l_bord - l_space - t_electrode; // pour faciliter le bazar
y0_e = h_base/2 + h_space; y0_e = h_base/2 + h_space;
offsetp3 = offsetp2 + 4*N_fins; offsetp3 = offsetp2 + 4*N_fins;
Point(offsetp3 + 1) = {l_tot - x0_e - t_electrode, -y0_e - h_fin_elec, 0, 0.2*scale}; Point(offsetp3 + 1) = {l_tot - x0_e - t_electrode, -y0_e - h_fin_elec, 0, nBEM*0.2*scale};
Point(offsetp3 + 2) = {l_tot - x0_e - t_electrode, -y0_e, 0, 0.2*scale}; Point(offsetp3 + 2) = {l_tot - x0_e - t_electrode, -y0_e, 0, nBEM*0.2*scale};
Point(offsetp3 + 3) = {l_tot - x0_e, -y0_e, 0, 0.2*scale}; Point(offsetp3 + 3) = {l_tot - x0_e, -y0_e, 0, nBEM*0.2*scale};
Point(offsetp3 + 4) = {l_tot - x0_e, -y0_e - h_fin_elec - t_electrode, 0, 0.2*scale}; Point(offsetp3 + 4) = {l_tot - x0_e, -y0_e - h_fin_elec - t_electrode, 0, nBEM*0.2*scale};
Point(offsetp3 + 5) = {x0_e, -y0_e - h_fin_elec - t_electrode, 0, 0.2*scale}; Point(offsetp3 + 5) = {x0_e, -y0_e - h_fin_elec - t_electrode, 0, nBEM*0.2*scale};
Point(offsetp3 + 6) = {x0_e, -y0_e, 0, 0.2*scale}; Point(offsetp3 + 6) = {x0_e, -y0_e, 0, nBEM*0.2*scale};
Point(offsetp3 + 7) = {x0_e + t_electrode, -y0_e, 0, 0.2*scale}; Point(offsetp3 + 7) = {x0_e + t_electrode, -y0_e, 0, nBEM*0.2*scale};
Point(offsetp3 + 8) = {x0_e + t_electrode, -y0_e - h_fin_elec, 0, 0.2*scale}; Point(offsetp3 + 8) = {x0_e + t_electrode, -y0_e - h_fin_elec, 0, nBEM*0.2*scale};
offsetp4 = offsetp3 + 8; offsetp4 = offsetp3 + 8;
For i In {1:N_fins-1} For i In {1:N_fins-1}
Point(offsetp4 + 4*i - 3) = {x0_e + l_periodic*i, -y0_e - h_fin_elec, 0, 0.2*scale}; Point(offsetp4 + 4*i - 3) = {x0_e + l_periodic*i, -y0_e - h_fin_elec, 0, nBEM*0.2*scale};
Point(offsetp4 + 4*i - 2) = {x0_e + l_periodic*i, -y0_e, 0, 0.2*scale}; Point(offsetp4 + 4*i - 2) = {x0_e + l_periodic*i, -y0_e, 0, nBEM*0.2*scale};
Point(offsetp4 + 4*i - 1) = {x0_e + l_periodic*i + t_electrode, -y0_e, 0, 0.2*scale}; Point(offsetp4 + 4*i - 1) = {x0_e + l_periodic*i + t_electrode, -y0_e, 0, nBEM*0.2*scale};
Point(offsetp4 + 4*i) = {x0_e + l_periodic*i + t_electrode, -y0_e - h_fin_elec, 0, 0.2*scale}; Point(offsetp4 + 4*i) = {x0_e + l_periodic*i + t_electrode, -y0_e - h_fin_elec, 0, nBEM*0.2*scale};
EndFor EndFor
// définition des lignes générales (indépendantes de N_fins) de la bottom electrode // définition des lignes générales (indépendantes de N_fins) de la bottom electrode
...@@ -249,21 +250,21 @@ Physical Curve("outside_1", 8) = {1, 2, 3}; ...@@ -249,21 +250,21 @@ Physical Curve("outside_1", 8) = {1, 2, 3};
// définition des points de la top electrode // définition des points de la top electrode
offsetp5 = offsetp4 + 4*(N_fins-1); offsetp5 = offsetp4 + 4*(N_fins-1);
Point(offsetp5 + 1) = {x0_e + t_electrode, y0_e + h_fin_elec, 0, 0.2*scale}; Point(offsetp5 + 1) = {x0_e + t_electrode, y0_e + h_fin_elec, 0, nBEM*0.2*scale};
Point(offsetp5 + 2) = {x0_e + t_electrode, y0_e, 0, 0.2*scale}; Point(offsetp5 + 2) = {x0_e + t_electrode, y0_e, 0, nBEM*0.2*scale};
Point(offsetp5 + 3) = {x0_e, y0_e, 0, 0.2*scale}; Point(offsetp5 + 3) = {x0_e, y0_e, 0, nBEM*0.2*scale};
Point(offsetp5 + 4) = {x0_e, y0_e + h_fin_elec + t_electrode, 0, 0.2*scale}; Point(offsetp5 + 4) = {x0_e, y0_e + h_fin_elec + t_electrode, 0, nBEM*0.2*scale};
Point(offsetp5 + 5) = {l_tot - x0_e, y0_e + h_fin_elec + t_electrode, 0, 0.2*scale}; Point(offsetp5 + 5) = {l_tot - x0_e, y0_e + h_fin_elec + t_electrode, 0, nBEM*0.2*scale};
Point(offsetp5 + 6) = {l_tot - x0_e, y0_e, 0, 0.2*scale}; Point(offsetp5 + 6) = {l_tot - x0_e, y0_e, 0, nBEM*0.2*scale};
Point(offsetp5 + 7) = {l_tot - x0_e - t_electrode, y0_e, 0, 0.2*scale}; Point(offsetp5 + 7) = {l_tot - x0_e - t_electrode, y0_e, 0, nBEM*0.2*scale};
Point(offsetp5 + 8) = {l_tot - x0_e - t_electrode, y0_e + h_fin_elec, 0, 0.2*scale}; Point(offsetp5 + 8) = {l_tot - x0_e - t_electrode, y0_e + h_fin_elec, 0, nBEM*0.2*scale};
offsetp6 = offsetp5 + 8; offsetp6 = offsetp5 + 8;
For i In {1:N_fins-1} For i In {1:N_fins-1}
Point(offsetp6 + 4*i - 3) = {x0_e + l_periodic*i, y0_e + h_fin_elec, 0, 0.2*scale}; Point(offsetp6 + 4*i - 3) = {x0_e + l_periodic*i, y0_e + h_fin_elec, 0, nBEM*0.2*scale};
Point(offsetp6 + 4*i - 2) = {x0_e + l_periodic*i, y0_e, 0, 0.2*scale}; Point(offsetp6 + 4*i - 2) = {x0_e + l_periodic*i, y0_e, 0, nBEM*0.2*scale};
Point(offsetp6 + 4*i - 1) = {x0_e + l_periodic*i + t_electrode, y0_e, 0, 0.2*scale}; Point(offsetp6 + 4*i - 1) = {x0_e + l_periodic*i + t_electrode, y0_e, 0, nBEM*0.2*scale};
Point(offsetp6 + 4*i) = {x0_e + l_periodic*i + t_electrode, y0_e + h_fin_elec, 0, 0.2*scale}; Point(offsetp6 + 4*i) = {x0_e + l_periodic*i + t_electrode, y0_e + h_fin_elec, 0, nBEM*0.2*scale};
EndFor EndFor
// définition des lignes générales (indépendantes de N_fins) de la top electrode // définition des lignes générales (indépendantes de N_fins) de la top electrode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment