Geometries
The Geometries element contains information about any geometries that are in the simulation. You can import a file, or create your own with CSG using the primitive shapes described below.
Be sure to assign a Material to a geometry object before it will appear elsewhere in the simulation (i.e. as an option for a boundary condition, particle emitter, particle absorber, etc.).
A video tutorial on manipulaton of geometries including CAD within VSim is linked here https://www.youtube.com/watch?v=tz10juYXtP0&list=PLottQ0Bg2M-1v1QKIG0KixkGdZMATEj_s&index=12
CSG
Constructive Solid Geometry can be used to build your own complex geometry. To construct a CSG, left click on the “+” sign next to Geometries and right click on the now revealed CSG tab. Choose “Add Primitive” and select your shape.
Constructive Solid Geometry operations are demonstrated in the linked video: https://www.youtube.com/watch?v=8va94Emc8Qg&list=PLottQ0Bg2M-3ATV5O9IP-3TEC4toVYPAK&index=2
- kind (not editable)
Construction Group
- tessellation
The size of triangles used to construct the shape. This is a unitless number that is the maximum deviation of a facet from the curved surface divided by the diameter of the facet.
Sphere
- kind (not editable)
Sphere
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- radius
The radius of the sphere.
- angle
Angle of the sphere, if below 360 will be only a section of the sphere corresponding to that angle.
- x position
The location of the center of the sphere in the x direction.
- y position
The location of the center of the sphere in the y direction.
- z position
The location of the center of the sphere in the z direction.
- color
The color of the sphere if set explicitly instead of by material.
Box
- kind (not editable)
Box
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- length
The length of the box.
- height
The height of the box.
- width
The width of the box.
- x position
The location of the center of the box base in the x direction.
- y position
The location of the center of the box base in the y direction.
- z position
The location of the center of the box base in the z direction.
- width direction x
Set to 1 to make the width parameter of the box correspond to the x direction.
- width direction y
Set to 1 to make the width parameter of the box correspond to the y direction.
- width direction z
Set to 1 to make the width parameter of the box correspond to the z direction.
- angle
The angle of the box.
- color
The color of the geometry if set explicitly instead of by material.
Cylinder
- kind (not editable)
Cylinder
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- length
The length of the cylinder.
- radius
The radius of the cylinder.
- angle
Angle of the cylinder, if below 360 will be only a section of the cylinder corresponding to that angle.
- x position
The location of the base of the cylinder in the x direction.
- y position
The location of the base of the cylinder in the y direction.
- z position
The location of the base of the cylinder in the z direction.
- axis direction x
Set to 1 to make the axial direction of the cylinder x; if set to -1, the length parameter will extend in the negative direction.
- axis direction y
Set to 1 to make the axial direction of the cylinder y; if set to -1, the length parameter will extend in the negative direction.
- axis direction z
Set to 1 to make the axial direction of the cylinder z; if set to -1, the length parameter will extend in the negative direction.
- color
The color of the geometry if set explicitly instead of by material.
Cone
- kind (not editable)
Cone
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- height
The height of the cone.
- radius
The radius of the base of the cone.
- angle
Angle of the cone, if below 360 will be only a section of the cone corresponding to that angle.
- x position
The location of the center of the cone base in the x direction.
- y position
The location of the center of the cone base in the y direction.
- z position
The location of the center of the cone base in the z direction.
- axis direction x
Set to 1 to make the axial direction of the cone x.
- axis direction y
Set to 1 to make the axial direction of the cone y.
- axis direction z
Set to 1 to make the axial direction of the cone z.
- color
The color of the geometry if set explicitly instead of by material.
Torus
- kind (not editable)
Torus
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- major radius
The radius to the center of the torus.
- minor radius
The radius from the center of the torus to the outside of the torus.
- angle
Angle of the torus, if below 360 will be only a section of the torus corresponding to that angle.
- x position
The location of the center of the torus in the x direction.
- y position
The location of the center of the torus in the y direction.
- z position
The location of the center of the torus in the z direction.
- axis direction x
Set to 1 to make the axial direction of the torus x.
- axis direction y
Set to 1 to make the axial direction of the torus y.
- axis direction z
Set to 1 to make the axial direction of the torus z.
- color
The color of the geometry if set explicitly instead of by material.
Pipe
- kind (not editable)
Pipe
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- length
The length of the pipe.
- inner radius
The inner radius of the pipe.
- outer radius
The outer radius of the pipe.
- angle
Angle of the pipe, if below 360 will be only a section of the pipe corresponding to that angle.
- x position
The location of the base of the pipe in the x direction.
- y position
The location of the base of the pipe in the y direction.
- z position
The location of the base of the pipe in the z direction.
- axis direction x
Set to 1 to make the axial direction of the pipe x; if set to -1, the length parameter will extend in the negative direction.
- axis direction y
Set to 1 to make the axial direction of the pipe y; if set to -1, the length parameter will extend in the negative direction.
- axis direction z
Set to 1 to make the axial direction of the pipe z; if set to -1, the length parameter will extend in the negative direction.
- color
The color of the geometry if set explicitly instead of by material.
TruncCone
- kind (not editable)
TruncCone (Truncated Cone)
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- height
The height of the cone.
- radius1
The radius of the base of the cone.
- radius2
The radius of the top of the cone.
- angle
Angle of the cone, if below 360 will be only a section of the cone corresponding to that angle.
- x position
The location of the center of the cone base in the x direction.
- y position
The location of the center of the cone base in the y direction.
- z position
The location of the center of the cone base in the z direction.
- axis direction x
Set to 1 to make the axial direction of the cone x.
- axis direction y
Set to 1 to make the axial direction of the cone y.
- axis direction z
Set to 1 to make the axial direction of the cone z.
- color
The color of the geometry if set explicitly instead of by material.
Wedge
- kind (not editable)
Wedge
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- length1
One length of the wedge.
- length2
The second length of the wedge.
- height
The height of the wedge.
- width
The width of the wedge. Extrudes the wedge from a two dimensional to three dimensional object.
- x position
The location of the base of the wedge in the x direction.
- y position
The location of the base of the wedge in the y direction.
- z position
The location of the base of the wedge in the z direction.
- width direction x
Set to 1 to apply the width parameter in the x direction.
- width direction y
Set to 1 to apply the width parameter in the y direction.
- width direction z
Set to 1 to apply the width parameter in the z direction.
- color
The color of the geometry if set explicitly instead of by material.
Ellipsoid
- kind (not editable)
Ellipsoid
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- radius 1
Radius of the ellipsoid in the X direction.
- radius 2
Radius of the ellipsoid in the Y direction.
- radius 3
Radius of the ellipsoid in the Z direction.
- x position
The location of the center of the ellipsoid in the x direction.
- y position
The location of the center of the ellipsoid in the y direction.
- z position
The location of the center of the ellipsoid in the z direction.
- Longest Principal Axis Direction X
Set to 1 to set the radius1 parameter to be the X direction.
- Longest Principal Axis Direction Y
Set to 1 to make the radius1 parameter to be the Y direction.
- Longest Principal Axis Direction Z
Set to 1 to make the radius1 parameter to be the Z direction.
- color
The color of the geometry if set explicitly instead of by material.
Pyramid
- kind (not editable)
Pyramid
- material
The material to use for the shape. Chosen from a list of imported materials in your simulation.
- baseLength
Length of the base in the X direction.
- height
Distance between the base of the pyramid and the top, typically in the Y direction.
- baseWidth
Width of the pyramid base in the Z direction.
- startTopLength
If equal to the end top length, the pyramid will end in a point in the length direction. Otherwise the top of the pyramid will have a length equal to (endTopLength - startTopLength).
- endTopLength
If equal to the start top length, the pyramid will end in a point in the length direction.
- startTopWidth
If equal to the end top width, the pyramid will end in a point in the width direction. Otherwise the top of the pyramid will have a width equal to (endTopWidth - startTopWidth).
- endTopWidth
If equal to the start top width, the pyramid will end in a point in the width direction.
- x position
The location of the upper left corner of the sphere in the x direction.
- y position
The location of the upper left corner of the sphere in the y direction.
- z position
The location of the upper left corner of the sphere in the z direction.
- X component of the width direction
Set to 1 to apply the width parameter in the x direction.
- Y component of the width direction
Set to 1 to apply the width parameter in the y direction.
- Z component of the width direction
Set to 1 to apply the width parameter in the z direction.
- angle
Rotates the pyramid around the x axis.
- color
The color of the geometry if set explicitly instead of by material.
Arrays
It is possible to generate an array of any CSG or imported CAD object in VSim. This is done by right clicking the object in question and selecting Create Array. You will then be prompted to select a number of elements in the X/Y/Z direction, and spacing between the centers of each object. It is also possible to have all objects in the array automatically into a union.
Boolean Operations
CSG Primitives may be combined in three different ways:
- Subtract
This will subtract the second selected primitive from the first selected primitive. Denoted by \(-\).
- Union
This will combine the two primitives into a single object. For use if the combined object is set to be a particle sink. Denoted by \(\cup\).
- Intersect
This will leave only the volume of the two primitives that intersect as an object. Denoted by \(\cap\).
Boolean operations may be nested, for example two primitives may be combined in a union, and then with a third primitive in a second union. To combine primitive shapes, you must first add two or more shapes to your simulation. Once your primitive shapes are added, highlight the two shapes you wish to combine (using the Ctrl key) and right-click and select Boolean Operation then the operation you wish to perform. It is possible to perform a boolean combination between CSG and Imported CAD Objects.
Importing files
You can import a geometry of type .stl, .ply, .vtk, .stp, .step, or .p12 by right-clicking the Geometries element and selecting Import Geometries.
kind (not editable)
TriangSolid
OceStepFromFile
- filename
The name and location of the imported file.
- scale
A factor to scale the imported geometry by. (Not available in 8.0.)
- tessellation
The size of triangles used to construct the shape. This is a unitless number that is the maximum deviation of a facet from the curved surface divided by the diameter of the facet.
An imported .step (or .stp) file will always be converted to metric units (which is the unit system used by VSim). However, an imported .stl file will not be converted to metric, since .stl files contain only the coordinate values.
Surface Roughness
Surface roughness can be added to imported GDS geometries. To add surface roughness, first fully expand the GDS object under Geometries in the Setup tab. Select the gds2Boundary and switch the roughness type option from roughnessDisabled to stochasticODE. A subtree will appear with the below options. These parameters are used in solving a stochastic ODE that generates the roughness.
- RMS Amplitude
The RMS amplitude of the roughness to be generated.
- normal tolerance
The allowed angular difference between the normals of two adjacent triangles on a curved surface. Two triangles are considered to be on the same surface if the angle between their normal vectors is less than this amount. If your waveguide geometry is all flat faces and 90-degree angles, then this value is effectively unused.
- ramp up distance
The distance along the geometry wall over which the roughness increases from 0 to its RMS amplitude.
- ramp down distance
The distance along the geometry wall over which the roughness decreases from its RMS amplitude down to 0.
- ODE correlation
The correlation distance of the roughness to be generated.
- ODE step size
The distance between points along the geometry at which the roughness is created.
- random seed
The random seed to be used in the roughness ODE solver.
- export to CSV
A switch that will either export the roughness data to a CSV (if set to 1), or it won’t (if set to 0).
In order for the roughness to be applied correctly it is important to make sure that the Max Edge of the GDS geometry is set to 1. To ensure that this value is correct, right click on the GDS geometry and select Edit Gds2 Layers. A pop-up window will appear that contains the information of the GDS layer. In this window, ensure that Max Edge is set to 1.