Mesh lines, edges and material interfaces

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

Post Reply
terow
Posts: 7
Joined: Tue 09 Feb 2016, 12:08

Mesh lines, edges and material interfaces

Post by terow » Wed 17 Aug 2016, 15:18

Hi,
I've been using openEMS with Octave 4.0 on a Windows 7 PC.
I've a few basic questions.

So, openEMS uses Yee's grid, and the user defines the mesh lines for the simulation.

1) Just to confirm, these mesh lines coincide with the E-field/voltage edges of Yees scheme, right?

2) Assume we have 2 material boxes and they coincide only at x=0 (minimum overlap).

Box 1, x => 0,
eps1, priority=1
-------------------------------=>------------- x=0 (mesh line)
Box 2, x <= 0,
eps2, priority=2

If an E-field/voltage edge point is exactly at a material interface as shown above
(symbol '=>'), which material is used for this edge point?
Is it eps2 (because higher priority), or an average of eps1 and eps2?

3) If one wants to make sure that a mesh line (E-field/volt edge) is inside a PEC box, one maybe should extend this PEC box a little bit, ie by
Delta/100, for instance?

Thank you !

thorsten
Posts: 1464
Joined: Mon 27 Jun 2011, 12:26

Re: Mesh lines, edges and material interfaces

Post by thorsten » Wed 17 Aug 2016, 18:53

1) Just to confirm, these mesh lines coincide with the E-field/voltage edges of Yees scheme, right?
yes
2) Assume we have 2 material boxes and they coincide only at x=0 (minimum overlap).
The materials will be averaged from the surrounding 4 cells for each edge.
PEC is a different story, if the edge is inside the PEC, it will be set to zero and the surrounding material has no meaning.
That explains why PEC can be 1D/2D or 3D. But materials have to be 3D to have a meaning.
3) If one wants to make sure that a mesh line (E-field/volt edge) is inside a PEC box, one maybe should extend this PEC box a little bit, ie by
Delta/100, for instance?
In case of problems that can fix it. Usually this is not necessary (as you can see from almost all Tutorials), e.g. if you use pretty clear values, like 0 or 10.25
But if you define values with e.g. sqrt(2) or with sin(0.5*pi) ... it might be better to use some extra space...
It boils down to comparing floats for equality, thats not trivial.

regards
Thorsten

terow
Posts: 7
Joined: Tue 09 Feb 2016, 12:08

Re: Mesh lines, edges and material interfaces

Post by terow » Wed 17 Aug 2016, 20:14

Thank you for your quick response! :D

Related to my 2. question...
If we keep the setup same, but only slightly move the meshline from x=0 to
x = -Deltax/100000, what is the effective material parameter in this case?

Box 1, x => 0,
eps1, priority=1
------------------------------------------------x=0 (no mesh line here)
-------------------------------=>------------- x = -Deltax/100000 (mesh line)
Box 2, x <= 0,
eps2, priority=2

So, for the edge point ('=>'), is it now eps2,
or is it still an average value from 4 *nearest* cells?

I'm asking this, because those floats are sometimes causing surprises....
:|

thorsten
Posts: 1464
Joined: Mon 27 Jun 2011, 12:26

Re: Mesh lines, edges and material interfaces

Post by thorsten » Wed 17 Aug 2016, 21:51

I guess what you want to know is where is the material sampled.

The answer is that the adjacent cells are sampled at the center of the edge and a quarter of a cell-width inside in all four directions. It's bit difficult to explain.
The corresponding code is here: https://github.com/thliebig/openEMS/blo ... .cpp#L1428
But I'm not sure that this is easier to read.
But you can maybe recognize how it is done for all adjacent cells (up/down)/(left/right) around that edge.
n is the direction of the edge (e.g. x) and nP (e.g. y) and nPP (e.g. z) the two orthogonal directions.

That means in your case it does make no difference...

regards
Thorsten

terow
Posts: 7
Joined: Tue 09 Feb 2016, 12:08

Re: Mesh lines, edges and material interfaces

Post by terow » Thu 18 Aug 2016, 23:56

Ok, thank you. :)

Hale_812
Posts: 173
Joined: Fri 13 May 2016, 02:54

Re: Mesh lines, edges and material interfaces

Post by Hale_812 » Mon 22 Aug 2016, 03:38

Can I ask some stupid questions again?

Considering interdigital capacitors, slot/coplanar-line based circuits, and mushroom-like metamaterials:
- What is the recommended minimal number of mesh nodes in the gap between the metal surfaces (coplanar capacitor gap). 2? 3?
- Is the effect of metal plating thickness and the strip capacitive edge size taken into account by "AddConductingSheet"? Or should I use thick 3D model of the metal circuit (AddMetal)?

thorsten
Posts: 1464
Joined: Mon 27 Jun 2011, 12:26

Re: Mesh lines, edges and material interfaces

Post by thorsten » Mon 22 Aug 2016, 20:35

- What is the recommended minimal number of mesh nodes in the gap between the metal surfaces (coplanar capacitor gap). 2? 3?
The more the better ;) But I guess 2 or 3 should work. But increase it and see how much it still changes ...
- Is the effect of metal plating thickness and the strip capacitive edge size taken into account by "AddConductingSheet"? Or should I use thick 3D model of the metal circuit (AddMetal)?
I'm not really sure, but I think it does not. But in most cases it is not really an option to model the thickness as it destroys the time-step and does not change too much. I think the effect is rather small..
But again, only a test could tell...

Post Reply