Coax.m example with dielectric

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

Coax.m example with dielectric

Postby UweFDTD » Wed 15 Feb 2017, 14:39

Hi,
this question belongs to my first steps into openEMS. BTW, it's a great program!
I ran the waveguide/Coax.m example from the 0.0.35 distribution which worked as expected.
To verify my basic understanding I modified Coax.m to cope with a polyethylen (PE) dielectric, i.e.
- set epsR=2.26
- add PE as material: CSX = AddMaterial(CSX,'PE','Epsilon',epsR);
- let both the excitation and passive port know about the new dielectric:
[CSX,port{1}] = AddCoaxialPort( CSX, 10, 1, 'copper', 'PE'...
[CSX,port{2}] = AddCoaxialPort( CSX, 10, 2, 'copper', 'PE'...

And this completes all my changes.
The analytic impedance decreased to about 33 Ohms, which sounds reasonable (at least to me), but the FDTD impedance result just didn't change and still shows 50 Ohms.

Seems that adapting Coax.m to a dielectric other than air isn't as easy as I thought, but I don't know what detail I've been missing.
For your convenience, I attatched the modified code.

Regards
Uwe
Attachments
CoaxPE.m
(3.53 KiB) Downloaded 27 times
UweFDTD
 
Posts: 2
Joined: Wed 15 Feb 2017, 13:53

Re: Coax.m example with dielectric

Postby thorsten » Wed 15 Feb 2017, 19:13

Hi Uwe,

well the answer is easy, change from:
Code: Select all
CSX = AddMaterial(CSX,'PE', 'Epsilon', epsR);

to
Code: Select all
CSX = AddMaterial(CSX,'PE');
CSX = SetMaterialProperty( CSX, 'PE', 'Epsilon', epsR);


This is an easy mistake to make because it is a bad inconsistency in the interface which other have already complained about.
But unfortunately it has historic reasons and would not be easy to change.

And your mesh is a bit dense and your diameter a bit wide for PE ;)

regards
Thorsten
thorsten
 
Posts: 1115
Joined: Mon 27 Jun 2011, 12:26

Re: Coax.m example with dielectric

Postby UweFDTD » Wed 15 Feb 2017, 20:47

Hi Thorsten,
thanks so much for that quick answer which really pushes me forward! My beginner's eyes didn't spot the examples's subleties in the help file of AddMaterial(..) which clearly states the two-step procedure you mentioned!
Also, thank you for commenting on dimensioning the mesh. I'll elaborate on that.

Regards
Uwe
UweFDTD
 
Posts: 2
Joined: Wed 15 Feb 2017, 13:53


Return to Usage

Who is online

Users browsing this forum: Google [Bot] and 2 guests

MediaWiki Appliance - Powered by TurnKey Linux