Surface with a function(x,y)

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

Post Reply
pedro
Posts: 7
Joined: Tue 15 Mar 2016, 15:42

Surface with a function(x,y)

Post by pedro » Wed 16 Mar 2016, 12:48

Hi Thorsten,

First, thank you for sharing and releasing this great software under GPL3.

I want to model surface plasmons on metallic films.
I have searched and wanted to ask you if it is possible to add a geometry that is a 2D function such as h(x,y) = sin[(2π/Λ)x] + sin[(2π/Λ)y] (defining a surface corrugation profile).
From this then I could construct a 3D film defined as the volume between two surfaces like h(x,y), given a thickness.

I believe it is not possible right now. But what would be the best way to add this feature? Or, faster, how to build it using the current primitives and transforms?

Thank you,

Pedro

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

Re: Surface with a function(x,y)

Post by thorsten » Wed 16 Mar 2016, 21:45

Hi,

wouldn't a polygon (LinPoly) do the trick? Just use enough edge sample points?

regards
Thorsten

lolicon945
Posts: 21
Joined: Sat 18 May 2013, 08:13

Re: Surface with a function(x,y)

Post by lolicon945 » Tue 29 Mar 2016, 10:47

thorsten wrote:Hi,

wouldn't a polygon (LinPoly) do the trick? Just use enough edge sample points?

regards
Thorsten
Yeah, this AddLinPoly() is fantastic.
I was struggling with the AddPolyhedron() to build a hexagonal prism (with 24 triangle faces :oops: ), and definitely the AddLinPoly() is better.
However, I still have a question on AddPolyhedron(): what is the standard of the order of the vertices in a face?

regards
lolicon

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

Re: Surface with a function(x,y)

Post by thorsten » Tue 29 Mar 2016, 20:42

Some information about the polyhedrons can be found here: http://openems.de/index.php/Polyhedron

Please add any missing information or let me know of anything is unclear.
You might add your example...

regards
Thorsten

pedro
Posts: 7
Joined: Tue 15 Mar 2016, 15:42

Re: Surface with a function(x,y)

Post by pedro » Tue 26 Apr 2016, 17:29

thorsten wrote:Hi,

wouldn't a polygon (LinPoly) do the trick? Just use enough edge sample points?

regards
Thorsten

Thanks for the reply Thorsten.
Looking at the AddLinPloy wikipage I see what you mean. But generating a sine corrugated surface would be too inefficient and would be hard to modulate it through some parameters as it would through a continuous function. Could this continuous function be implemented in openEMS code? If so, could you point me out where could I start looking at? Or maybe there is a way to put octave generate sufficient polyheadron or linpoly points for sufficiently describe the sine corrugated surface that I need. I should look better at the later.

Anyway I proceeded with importSTL. I generated the STL on SolidWorks where you can modulate any parameters.

If I find a better way to illustrate what I want I will post here and if agreed I will post on the wiki.

Thank you.

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

Re: Surface with a function(x,y)

Post by thorsten » Tue 26 Apr 2016, 20:33

There might be one other type of primitive, that is described by a formula.
E.g. "r<10" would be a sphere with radius 10. But I think there is no Matlab/Octave interface for this primitive (yet).

As far as I see it, the best way is to use FreeCad or SolidWorks to model STL objects as you did.

Maybe you can attach a picture of your antenna?

regards
Thorsten

pedro
Posts: 7
Joined: Tue 15 Mar 2016, 15:42

Re: Surface with a function(x,y)

Post by pedro » Tue 03 May 2016, 12:57

Hi,

Attached is the continuous metal layer I am interested. I am trying to simulate surface plasmons.

Regards,
Pedro
Attachments
SineGrating.png
Metal grating
SineGrating.png (72.91 KiB) Viewed 9190 times

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

Re: Surface with a function(x,y)

Post by thorsten » Tue 03 May 2016, 20:24

Hi,

sounds like a challenge.
I would recommend to start doing only a 2D simulation first? According to your picture doing only yz-plane?
Modelling this metal layer I would define a linear extruded polygone (AddLinPoly). Flat on the bottom and the sinusoidal shape on the top.

But this is going to be not so easy. Excitation, meshing and so on will be a challenge.
You could experience instability too, if you do, reduce the time step manually.

Edit: Have a look at this paper (page 11) maybe

regards
Thorsten

Post Reply