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 !

## Mesh lines, edges and material interfaces

**Moderator:** thorsten

### Re: Mesh lines, edges and material interfaces

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

The materials will be averaged from the surrounding 4 cells for each edge.2) Assume we have 2 material boxes and they coincide only at x=0 (minimum overlap).

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.

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.253) 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?

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

### Re: Mesh lines, edges and material interfaces

Thank you for your quick response!

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....

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....

### Re: Mesh lines, edges and material interfaces

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.

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

regards

Thorsten

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

### Re: Mesh lines, edges and material interfaces

Ok, thank you.

### Re: Mesh lines, edges and material interfaces

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)?

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)?

### Re: Mesh lines, edges and material interfaces

The more the better But I guess 2 or 3 should work. But increase it and see how much it still changes ...- What is the recommended minimal number of mesh nodes in the gap between the metal surfaces (coplanar capacitor gap). 2? 3?

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..- 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)?

But again, only a test could tell...