Excitations
AddExcitation
- AddExcitation(CSX, name, type, excite, varargin)
Full definition:
function CSX = AddExcitation(CSX, name, type, excite, varargin)
Creates an E-field or H-field excitation.
CSX: CSX-struct created by InitCSX
name: property name for the excitation
type: 0=E-field soft excitation 1=E-field hard excitation 2=H-field soft excitation 3=H-field hard excitation 10=plane wave excitation
excite: e.g. [2 0 0] for excitation of 2 V/m in x-direction
additional options for openEMS:
‘Delay’ : setup an excitation time delay in seconds
‘PropDir’: direction of plane wave propagation (plane wave excite only)
example:
CSX = AddExcitation( CSX, 'infDipole', 1, [1 0 0] );
start = [-dipole_length/2, 0, 0];
stop = [+dipole_length/2, 0, 0];
CSX = AddBox( CSX, 'infDipole', 1, start, stop );
author: Thorsten Liebig
See also SetExcitationWeight, AddMetal, AddExcitation, AddProbe, AddDump, AddBox
AddPlaneWaveExcite
- AddPlaneWaveExcite(CSX, name, k_dir, E_dir, <f0, varargin>)
Full definition:
function CSX = AddPlaneWaveExcite(CSX, name, k_dir, E_dir, <f0, varargin>)
Creates a plane wave excitation in the sense of a total-field/scattered field approach.
Note: A plane wave excitation must not intersect with any kind of material. This exctiation type can only be applies in air/vacuum and completely surrounding a structure!!!
Note: Only a single Box can be applied to this property!!
Arguments
CSX: CSX-struct created by InitCSX
name: property name for the excitation
k_dir: unit vector of wave progation direction
E_dir: electric field polarisation vector (must be orthogonal to k_dir)
f0: frequency for numerical phase velocity compensation (optional)
example:
inc_angle = 0 /180*pi; %incident angle on the x-axis
k_dir = [cos(inc_angle) sin(inc_angle) 0]; % plane wave direction
E_dir = [0 0 1]; % plane wave polarization --> E_z
f0 = 500e6; % frequency for numerical phase velocity compensation
CSX = AddPlaneWaveExcite(CSX, 'plane_wave', k_dir, E_dir, f0);
author: Thorsten Liebig
See also AddExcitation, AddBox
SetExcitationWeight
- SetExcitationWeight(CSX, name, weight)
Full definition:
function CSX = SetExcitationWeight(CSX, name, weight)
function CSX = SetExcitationWeight(CSX, name, weight, origin)
Define weighting functions for x-, y- and z-direction of excitation
The functions can use the variables:
x,y,z
rho for the distance to z-axis
r for the distance to origin
a for alpha (as in cylindircal and spherical coord systems)
t for theta (as in the spherical coord system
all these variables are not weighted with the drawing unit defined by the grid
optional: origin - [x,y,z] coordinate origin for weight function evaluation (in drawing units). If given, coordinates are shifted by this offset before being passed to the weight functions.
example:
start=[0 0 0];
stop=[width height 0];
CSX = AddExcitation(CSX,'excite',0,[1 1 0]);
weight{1} = '2*cos(0.0031416*x)*sin(0.0062832*y)';
weight{2} = '1*sin(0.0031416*x)*cos(0.0062832*y)';
weight{3} = 0;
CSX = SetExcitationWeight(CSX,'excite',weight);
CSX = AddBox(CSX,'excite',0 ,start,stop);
See also AddExcitation, SetExcitationWeightFile, InitCSX, DefineRectGrid
author: Thorsten Liebig
SetExcitationWeightFile
- SetExcitationWeightFile(CSX, name, fileName, propDir)
Full definition:
function CSX = SetExcitationWeightFile(CSX, name, fileName, propDir)
function CSX = SetExcitationWeightFile(CSX, name, fileName, propDir, origin)
Set the HDF5 weight file and propagation direction for an excitation.
Required arguments: CSX - CSX structure name - name of the excitation property fileName - path to the HDF5 weight file propDir - propagation direction vector, e.g. [0 0 1] for z-propagation
Optional: origin - [x,y,z] coordinate origin for weight file evaluation (in drawing units). If given, coordinates are shifted by this offset before interpolation into the mode file.
See also AddExcitation, SetExcitationWeight, InitCSX, DefineRectGrid
Author: (2023-2025) Gadi Lahav - gadi@rfwithcare.com