summaryrefslogtreecommitdiff
path: root/hyp2mat/matlab/AddHyperLynxDielectric.m
blob: c4553b0303cb4693fc4271fe3dcbf260aa66d6b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function CSX = AddHyperLynxDielectric(CSX, name, epsilon, loss_tangent)
% function CSX = AddHyperLynxDielectric(CSX, name, epsilon, loss_tangent)
%
% Add a dielectric to a CSX model imported from HyperLynx.
% 
% arguments:
%   name:         material name.
%   epsilon:      relative electric permittivity
%   loss_tangent: loss tangent
% 
% See also AddMaterial, AddDebyeMaterial, AddLorentzMaterial
%

% Copyright 2014 Koen De Vleeschauwer.
%
% This file is part of hyp2mat.
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <http://www.gnu.org/licenses/>.

% Copy this script to your project directory to customize. 
% For a discussion of the parameters, see http://openems.de/index.php/Dispersive_Material_Property 

% Default substrate is a lossless dielectric.
CSX = AddMaterial( CSX, name);
CSX = SetMaterialProperty( CSX, name, 'Epsilon', epsilon, 'Mue', 1 );
%CSX = SetMaterialProperty( CSX, name, 'Kappa', kappa); % optional conductivity

% Drude material
%CSX = AddLorentzMaterial(CSX, name);
%CSX = SetMaterialProperty(CSX, name, 'Epsilon', epsilon, 'Kappa', kappa);
%CSX = SetMaterialProperty(CSX, name, 'EpsilonPlasmaFrequency', 5e9, 'EpsilonRelaxTime', 5e-9);

% not truncated