OpenMaXwell Reference Manual

Home  General  Menues  Dialogs  Movie Directives  Formula Interpreter  File Structures

Available directives

ADApt ADD BLOw CLEar CONvert COPy DELete DRAw END EXChange EXIt GENerate GET GOTo IF> IF< IF= INCrease ITEterate LABel LOOp MMP MOVe MULtiply PROcess REAd REFlect REName ROTate RUN SET SORt SUBtract WRIte

ADD one of the following objects

3DO    ARC    BOUndary    CIRcle     EXPansion    FIEld    FUNction     INHibit    LINe     OBJect    P2D    P3D     PFD    WINdow

 

3DO

Arguments: OBJ (...)

Meaning: Create a 3D object, specified by the character string OBJ. The additional arguments depend on the type of object. The following objects are available:

CONe z0 dz iB (dMP Ox Oy Oz a): Create a cone based on the 2D boundary iB along the z axis, starting a z=z0, length dz. Set the multipole distance, the cone origin (x, y, z coordinates), and the matching point aspect ratio equal to dMP Ox Oy Oz a respectively (default values are 0.3 0.0 0.0 1.0 1.0). The new object is added to the end of the list of existing 3D objects. Note: use SET OBJect LOCation to position the new object in 3D space!

CYLinder z0 dz iB (a): Create a cylinder based on the 2D boundary iB along the z axis, starting a z=z0, length dz. Set the matching point aspect ratio equal to a (default is 1.0). The new object is added to the end of the list of existing 3D objects. Note: use SET OBJect LOCation to position the new object in 3D space!

RECtangle a b dM dens dist iB MP nOrd:  Create a rectangle in the xy plane with side lengths a, b. The corners of the rectangle will have the coordinates (0,0), (a,0), (a,b), (0,b). Use data of the 2D boundary iB. The matching points obtain the side lengths dM. Up to MP multipoles with maximum order and degree nOrd may be created at the distance dist on both sides of the rectangle with a density factor dens. The new object is added to the end of the list of existing 3D objects. Note: use SET OBJect LOCation to position the new object in 3D space!

SPIral dr dphi dz iB (a): Create a spiral based on the 2D boundary iB along the z axis, starting a z=0, phi=0, r=0 with length dz (displacement along z), dphi (rotation around y axis, phi direction), dr (stretch in r direction). Set the matching point aspect ratio equal to a (default is 1.0). The new object is added to the end of the list of existing 3D objects. Note: use SET OBJect LOCation to position the new object in 3D space!

TORus phi0 dphi iB (a): Create a torus based on the 2D boundary iB by rotation around the y axis, starting a phi=phi0, rotation angle dphi. Set the matching point aspect ratio equal to a (default is 1.0). The new object is added to the end of the list of existing 3D objects. Note: use SET OBJect LOCation to position the new object in 3D space!

TRIangle Ax Ay Az Bx By Bz Cx Cy Cz dM dens dist iB MP nOrd: Create a triangle in 3D space with corners (Ax,Ay,Az), (Bx,By,Bz), (Cx,Cy,Cz). Use data of the 2D boundary iB. The matching points obtain the side lengths dM. Up to MP multipoles with maximum order and degree nOrd may be created at the distance dist on both sides of the triangle with a density factor dens. The new object is added to the end of the list of existing 3D objects. Note: use SET OBJect LOCation modify the position of the new object in 3D space!

 

ARC

Arguments: (xO yO xS yS angle iDL iDR iCol iCon nMP w1 w2)

Meaning: Create a 2D boundary that has the shape of an arc around the center point (xO,yO), starting at the point (xS,yS). The arc has an angle and is oriented counter-clockwise. The domain numbers to the left and right of the resulting boundary are iDL and iDR. The color of the boundary is iCol, its connection flag iCon. nMP matching points will be distributed along the boundary. If nMP is zero, the matching points are generated according to the parameters specified in the MMP dialog. The boundary weights are w1 and w2. The boundary is added as last boundary to the list of defined boundaries. The default values of the arguments are: 0.0 0.0 1.0 0.0 90.0 0 1 1 0 0 1.0 1.0.

 

BOUndary

Argument: Filename

Special arguments:

Meaning: Read the boundaries from the file given as the argument and append them to the current boundaries.

 

CIRcle

Arguments: (xO yO radius iDL iDR iCol iCon nMP w1 w2)

Meaning: Create a 2D boundary that has the shape of a circle around the center point (xO,yO) with radius, oriented counter-clockwise. The domain numbers to the left and right of the resulting boundary are iDL and iDR. The color of the boundary is iCol, its connection flag iCon. nMP matching points will be distributed along the boundary. If nMP is zero, the matching points are generated according to the parameters specified in the MMP dialog. The boundary weights are w1 and w2. The boundary is added as last boundary to the list of defined boundaries. The default values of the arguments are: 0.0 0.0 1.0 0 1 1 0 0 1.0 1.0.

 

EXPansion

Argument: Filename

Special arguments:

Meaning: Read the MMP expansions from the file given as the argument and append it to the current expansions.

 

FIEld

Arguments: x (y)

Meaning: Add the complex value x+iy to all field components of the current original field. When y is missing, it is set equal to 0.

 

FUNction

Arguments: i x

Meaning: Add the value x to all of the current function values with argument number i.

 

INHibit

Argument: String

Meaning: When you compose 3D objects, it is sometimes necessary to generate an objects that is a combination of parts of two or more 3D objects. For example, when an object is defined by the outer boundaries of two intersecting spheres, you may generate a complicated 2D boundary and generate a torus. Instead of this, you might start with a simple 2D circle, and generate two spheres. You then also obtain a boundary of the sphere 1 inside the sphere 2 and vice versa. These two boundaries should be removed. The directive ADD INHibit D1L2 will inhibit all 3D matching points of the 3D object number 1 on the left side of object number 2, i.e., these matching points will be generated but not used for the MMP computation and for the determination of the domain numbers of field points. The String that determines what shall be inhibited has the following, simple syntax: The first character is either D (for Delete) or A (for Add). It is followed without any space by the number of the object that contains the 3D matching points to be inhibited (when the first character is D or "un-inhibited" when the first character is A. After the object number, there is a second character that may be either L (for Left) or R (for Right), followed by a second object number. Note that the Left and Right hand sides of the 3D objects is obtained from their generation from 2D boundaries. However, D1L2 means "Delete all 3D matching points of object 1 that are on the Left hand side of object 2".

Note that you can add as many "inhibit strings" as you want. OpenMaXwell will maintain a list of "inhibit strings" and execute the desired operations before it uses 3D matching points. For example, when you add the directive ADD INHibit D2L1 after the directive mentioned above, the matching points of object 2 that are inside object 1 are also deleted.

Warning: Be careful when you add inhibit directives, especially in a loop. Repeating the same directive makes the list long and slows down the performance! Use DELete INHibit for deleting inhibit directives that are no longer needed.

 

LINe

Arguments: (x1 y1 x2 y2 iDL iDR iCol iCon nMP w1 w2)

Meaning: Create a 2D boundary that has the shape of a line from point (x1,y1) to point (x2,y2). The domain numbers to the left and right of the resulting boundary are iDL and iDR. The color of the boundary is iCol, its connection flag iCon. nMP matching points will be distributed along the boundary. If nMP is zero, the matching points are generated according to the parameters specified in the MMP dialog. The boundary weights are w1 and w2. The boundary is added as last boundary to the list of defined boundaries. The default values of the arguments are: 0.0 0.0 1.0 0.0 0 1 1 0 0 1.0 1.0.

 

OBJect

Argument: Filename

Special arguments:

Meaning: Read the 3D objects from the file given as the argument and append them to the current 3D objects.

 

P2D

Arguments: iBnd iColMirror iColSurface Mass Friction1 Friction2 Vx Vy RandomForce

Meaning: Add a 2D particle that may be moved by optical forces. The particle must be specified by a single boundary (usually a circle - because the current implementation does not compute rotations of particles) iBnd. The particle may bounce elastically at the surface of a plane mirror, which is typically a substrate and must coincide with the x axis (y=0). In order to model the particle-mirror interaction, you must also specify some "mirror multipoles" inside the mirrors. When the particle moves, these mirror multipoles must be also moved. For example, when the particle moves with the vector (dx,dy), the mirror multipoles must move with the vector (dx,-dy). To ensure this, the mirror multipoles must have a unique color number iColMirror. It may be convenient to move a part of the boundary of the mirror along with the particle. The corresponding vector of the movement must then be (dx,0). All boundaries (and expansions) with the color number iColSurface will be moved in this direction when the particle moves in (dx,dy) direction. The particle has a Mass and experiences a certain friction that may be specified with two constants, Friction1 and  Friction2. In order to approximate Brownian motion, some RandomForce may be added. The initial velocity of the particle is given by the vector (Vx,Vy).

Computing particle movements is an iterative procedure that may be very time-consuming because the electromagnetic field must be computed for each time step in order to obtain the optical force. Selecting a reasonable time step and appropriate friction parameters requires much experience and knowledge.

 

P3D

Arguments: iObj iColMirror iColSurface Mass Friction1 Friction2 Vx Vy Vz RandomForce

Meaning: Add a 3D particle that may be moved by optical forces. The particle must be specified by a single boundary (usually a sphere - because the current implementation does not compute rotations of particles) iObj. Besides this and the  z component of the initial velocity vector, the definition of the 3D particle is the same as for the 2D particle, described above.

 

PFD

Arguments: WHAt (...)

Meaning: Add a component of the PFD (Predefined Finite Difference) solver.

All of the added szl zh t d

SOUrce il ih jl jh kl kh string string

 

WINdow

No argument

Meaning: Add and initialize a new graphic window.

Responsible for this web page:  Ch. Hafner, Computational Optics Group, IEF, ETH, 8092 Zurich, Switzerland

Last update 27.10.2015