Geometry

AddBox

AddBox(CSX, propName, prio, start, stop, varargin)

Full definition:

function CSX = AddBox(CSX, propName, prio, start, stop, varargin)

Add a box to CSX and assign to a property with name .

  • start: box start coordinates

  • stop : box stop coordinates

  • prio : primitive priority

optional:

  • Transformation: perform a transformation on a primitive by adding e.g.: ‘Transform’, {‘Scale’,’1,1,2’,’Rotate_X’,pi/4,’Translate’,’0,0,100’} Note: This will only affect the 3D material/metal discretisation

example:

CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddBox(CSX,'metal',10,[0 0 0],[100 100 200]); %assign box

with transformation:

CSX = AddBox(CSX,'metal',10,[0 0 0],[100 100 200], ...
                 'Transform', {Rotate_Z, pi/4});

See also AddCylinder, AddCylindricalShell, AddSphere, AddSphericalShell, AddCurve, AddWire, AddMetal


author: Thorsten Liebig

AddCurve

AddCurve(CSX, propName, prio, points, varargin)

Full definition:

function CSX = AddCurve(CSX, propName, prio, points, varargin)

Add a curve to CSX and assign to a property with name .

Warning: This is a 1D object, not all properties may be compatible with a 1D object, e.g. a material property.

  • points: curve coordinates array

  • prio : primitive priority

example:

%first point
points(1,1) = 0;
points(2,1) = 5;
points(3,1) = 10;
%second point
points(1,2) = 0;
points(2,2) = 10;
points(3,2) = 10;
%third point ...
% create a thin metal wire...
CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddCurve(CSX,'metal',10, points);

See also AddBox, AddCylindricalShell, AddCylinder, AddSphere, AddSphericalShell, AddWire, AddMetal


author: Thorsten Liebig

AddCylinder

AddCylinder(CSX, propName, prio, start, stop, rad, varargin)

Full definition:

function CSX = AddCylinder(CSX, propName, prio, start, stop, rad, varargin)

Add a cylinder to CSX and assign to a property with name .

  • start: cylinder axis start coordinates

  • stop : cylinder axis box stop coordinates

  • rad : cylinder radius

  • prio : primitive priority

example:

CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddCylinder(CSX,'metal',10,[0 0 0],[0 0 200],50);

See also AddBox, AddCylindricalShell, AddSphere, AddSphericalShell, AddCurve, AddWire, AddMetal


author: Thorsten Liebig

AddCylindricalShell

AddCylindricalShell(CSX, propName, prio, start, stop, rad, shell_width, varargin)

Full definition:

function CSX = AddCylindricalShell(CSX, propName, prio, start, stop, rad, shell_width, varargin)

Add a cylinder shell to CSX and assign to a property with name .

  • start: cylinder axis start coordinates

  • stop : cylinder axis box stop coordinates

  • rad : cylinder radius

  • shell_width: cylinder shell width

  • prio : primitive priority

Note:

  • the inner radius of this shell is rad-shell_width/2

  • the outer radius of this shell is rad+shell_width/2

example:

CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddCylindricalShell(CSX,'metal',10,[0 0 0],[0 0 200],50,10);

See also AddBox, AddCylinder, AddSphere, AddSphericalShell, AddCurve, AddWire, AddMetal


author: Thorsten Liebig

AddLinPoly

AddLinPoly(CSX, materialname, prio, normDir, elevation, points, Length, varargin)

Full definition:

CSX = AddLinPoly( CSX, materialname, prio, normDir, elevation, points, Length, varargin)
  • CSX: CSX-object created by InitCSX()

  • materialname: created by AddMetal() or AddMaterial()

  • prio: priority

  • normDir: normal direction of the polygon, e.g. ‘x’, ‘y’ or ‘z’, or numeric 0..2

  • elevation: position of the polygon plane

  • points: two-dimensional coordinates

  • length: linear extrution in normal direction, starting at elevation

Warning: Polygon has to be defined using Cartesian Coords for use with cylindrical mesh, set ‘CoordSystem’,0

example:

p(1,1) = 0;  % x-coord point 1
p(2,1) = 0;  % y-coord point 1
p(1,2) = 10; % x-coord point 2
p(2,2) = 20; % y-coord point 2
% normal direction: z (2)
CSX = AddLinPoly( CSX, 'PEC', 1, 2, 254, p , 10, 'CoordSystem',0)

2011, Thorsten Liebig thorsten.liebig@gmx.de

See also InitCSX AddMetal AddMaterial AddPolygon AddRotPoly

AddPoint

AddPoint(CSX, propName, prio, pos, varargin)

Full definition:

CSX = AddPoint(CSX, propName, prio, pos, varargin)

AddPolygon

AddPolygon(CSX, materialname, prio, normDir, elevation, points, varargin)

Full definition:

CSX = AddPolygon( CSX, materialname, prio, normDir, elevation, points, varargin)
  • CSX: CSX-object created by InitCSX()

  • materialname: created by AddMetal() or AddMaterial()

  • prio: priority

  • normDir: normal direction of the polygon, e.g. ‘x’, ‘y’ or ‘z’, or numeric 0..2

  • elevation: position of the polygon plane

  • points: two-dimensional coordinates

Warning: Polygon has to be defined using Cartesian Coords for use with cylindrical mesh, set ‘CoordSystem’,0

example:

p(1,1) = 0;  % x-coord point 1
p(2,1) = 0;  % y-coord point 1
p(1,2) = 10; % x-coord point 2
p(2,2) = 20; % y-coord point 2
% normal direction: z (2)
CSX = AddPolygon( CSX, 'PEC', 1, 'z', 254, p, 'CoordSystem',0)

(c) 2011 Thorsten Liebig thorsten.liebig@gmx.de (c) 2010 Sebastian Held sebastian.held@gmx.de

See also InitCSX AddMetal AddMaterial AddLinPoly AddRotPoly

AddPolyhedron

AddPolyhedron(CSX, propName, prio, vertices, faces, varargin)

Full definition:

CSX = AddPolyhedron(CSX, propName, prio, vertices, faces, varargin)

Add a polyhedron to CSX and assign to a property with name .

  • prio: primitive priority

  • vertices: cell array of all vertices

  • faces: cell array of all faces

Note:

  • The polyhedron must be a closed surface for 3D discretisation

  • All faces must contain the vertices in a right-handed order with the normal direction for each face pointing out of the solid

optional:

  • Transformation: perform a transformation on a primitive by adding e.g.: ‘Transform’, {‘Scale’,’1,1,2’,’Rotate_X’,pi/4,’Translate’,’0,0,100’} Note: This will only affect the 3D material/metal discretisation

example:

% example tetrahedron
vertices{1}=[0 0 0];
vertices{2}=[1 0 0];
vertices{3}=[0 1 0];
vertices{4}=[0 0 1];
faces{1}=[0 2 1];
faces{2}=[0 1 3];
faces{3}=[0 3 2];
faces{4}=[1 2 3];
CSX = AddMetal( CSX, 'metal' );
CSX = AddPolyhedron(CSX, 'metal', 0, vertices, faces);

See also AddBox, AddCylinder, AddCylindricalShell, AddSphere, AddSphericalShell, AddCurve, AddWire, AddMetal


author: Thorsten Liebig

AddRotPoly

AddRotPoly(CSX, materialname, prio, normDir, points, RotAxisDir, angle, varargin)

Full definition:

function CSX = AddRotPoly( CSX, materialname, prio, normDir, points, RotAxisDir, angle, varargin)
  • CSX: CSX-object created by InitCSX()

  • materialname: created by AddMetal() or AddMaterial()

  • prio: priority

  • normDir: normal direction of the polygon, e.g. ‘x’, ‘y’ or ‘z’, or numeric 0..2

  • points: two-dimensional coordinates

  • RotAxisDir: direction of the rotational axis e.g. ‘x’, ‘y’ or ‘z’, or numeric 0..2

  • angle (optional): rotational start/stop angle, default is [0 2pi]

Warning: Polygon has to be defined using Cartesian Coords for use with cylindrical mesh, set ‘CoordSystem’,0

example:

p(1,1) = 0;  % x-coord point 1
p(2,1) = 0;  % y-coord point 1
p(1,2) = 10; % x-coord point 2
p(2,2) = 20; % y-coord point 2
% normal direction: z
CSX = AddRotPoly( CSX, 'PEC', 1, 'z', p , 'y');

2011, Thorsten Liebig thorsten.liebig@gmx.de

See also InitCSX AddMetal AddMaterial AddPolygon

AddSphere

AddSphere(CSX, propName, prio, center, rad, varargin)

Full definition:

function CSX = AddSphere(CSX, propName, prio, center, rad, varargin)

Add a sphere to CSX and assign to a property with name .

  • center: sphere center coordinates

  • rad : sphere radius

  • prio : primitive priority

example:

CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddSphere(CSX,'metal',10,[0 0 0],50);

See also AddBox, AddCylindricalShell, AddCylinder, AddSphericalShell, AddCurve, AddWire, AddMetal


author: Thorsten Liebig

AddSphericalShell

AddSphericalShell(CSX, propName, prio, center, rad, shell_width, varargin)

Full definition:

function CSX = AddSphericalShell(CSX, propName, prio, center, rad, shell_width, varargin)

Add a sphere shell to CSX and assign to a property with name .

  • center: sphere center coordinates

  • rad : sphere radius

  • shell_width: sphere shell width

  • prio : primitive priority

Note:

  • the inner radius of this shell is rad-shell_width/2

  • the outer radius of this shell is rad+shell_width/2

example:

CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddSphericalShell(CSX,'metal',10,[0 0 0],50,10);

See also AddBox, AddCylindricalShell, AddCylinder, AddSphere, AddCurve, AddWire, AddMetal


author: Thorsten Liebig

AddWire

AddWire(CSX, propName, prio, points, wire_rad, varargin)

Full definition:

function CSX = AddWire(CSX, propName, prio, points, wire_rad, varargin)

Add a wire to CSX and assign to a property with name .

Warning: This is a 1D object, not all properties may be compatible with a 1D object, e.g. a material property.

  • points: curve coordinates array

  • prio : primitive priority

  • wire_rad: wire radius

example:

%first point
points(1,1) = 0;
points(2,1) = 5;
points(3,1) = 10;
%second point
points(1,2) = 0;
points(2,2) = 10;
points(3,2) = 10;
%third point ...
% create a metal wire with finite radius...
CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
CSX = AddCurve(CSX,'metal',10, points, 2);

See also AddBox, AddCylindricalShell, AddCylinder, AddSphere, AddSphericalShell, AddCurve, AddMetal


author: Thorsten Liebig