2.1. Slab and MaterialsΒΆ
Handling of slabs and materials is done in the slab.py module in section antprop.
#import mplrc.ieee.transaction
from pylayers.antprop.slab import *
from pylayers.util.project import *
import numpy as np
The module project.py handle the directory name of the Pylayers project structure.
Note
A slab is a sandwich (list) of one or several material with an associated thickness
The material database is stored in a simple ASCII .ini file as well as the slab database.
To instantiate a Slab object it is required to provide both the information of the material database and the slab database. Those 2 database need to be consistent.
The default name for those 2 databases are matDB.ini and slabDB.ini.
sl=SlabDB('matDB.ini','slabDB.ini')
The association between an integer and the name of the available slabs is available in sl.di dictionary. This association is required for compatibility with EM solver PulsRay which needs an associated numerical value for each slab.
sl.di
{-1: 'METALIC',
0: 'ABSORBENT',
1: 'AIR',
2: 'WALL',
3: 'PARTITION',
4: 'WINDOW',
5: 'DOOR',
6: 'CEIL',
7: 'FLOOR',
8: 'WINDOW_GLASS',
9: 'WOOD',
10: '3D_WINDOW_GLASS',
11: 'WALLS',
12: 'PILLAR',
13: 'METAL',
14: 'CONCRETE_15CM3D',
15: 'CONCRETE_20CM3D',
16: 'CONCRETE_6CM3D',
17: 'CONCRETE_7CM3D',
18: 'PLASTERBOARD_10CM',
19: 'PLASTERBOARD_14CM',
20: 'PLASTERBOARD_7CM'}
The materials database becomes a member of the slab database, and there is also an other dictionary for keeping the association between a material id and a material name.
mat = sl.mat
mat.di
{-1: 'METAL',
0: 'ABSORBENT',
1: 'AIR',
2: 'BRICK',
3: 'PLASTER',
4: 'GLASS',
5: 'CONCRETE',
6: 'REINFORCED_CONCRETE',
7: 'WOOD',
8: 'STONE',
9: 'SEA_WATER',
10: 'PLATRE-57GHz'}
It is possible to define individual materials
lmat = ['BRICK','AIR','BRICK']
lthick = [0.01,0.1,0.01]
sl.add('placo',lmat,lthick)
Once a slab is defined, it is possible to evaluate it over a range of angles and frequencies.
theta = np.arange(0,np.pi/2,0.01,dtype=np.float64)
fGHz = [2.4]
sl['placo'].ev(fGHz,theta)
In[37]:
figsize(8,8)
sl['placo'].plotwrta()

fGHz = np.arange(0.4,8.3,0.1)
sl['placo'].plotwrtf()

In[39]:
sl['placo'].pcolor()

This example is described in page 90 of the thesis “Simulation du canal de propagation indoor ” par Cyril Humbert
In[42]:
lmat = ['PLATRE-57GHz','AIR','PLATRE-57GHz']
lthick = [0.018,0.03,0.018]
sl.add('Humbert',lmat,lthick)
fGHz = np.array([57.5])
In[44]:
sl['Humbert'].ev(fGHz,theta)
sl['Humbert'].plotwrta()
