Package comsolbuilder
Class ComsolBuilder
- java.lang.Object
- 
- comsolbuilder.ComsolBuilder
 
- 
 public class ComsolBuilder extends java.lang.ObjectAn instance of the ComsolBuilder class is an object which can build a COMSOL model. The purpose of This class is to abstract away the nasty COMSOL API calls.
- 
- 
Field SummaryFields Modifier and Type Field Description java.lang.DoublecurrentHeightHeight (in nm) along the z direction.com.comsol.model.ModelmodelCOMSOL model that will be saved as a .mph file.java.lang.StringxDimLength (in nm) along the x direction.java.lang.StringyDimLength (in nm) along the y direction.
 - 
Constructor SummaryConstructors Constructor Description ComsolBuilder(java.lang.Double xDimInput, java.lang.Double yDimInput)The constructor for the ComsolBuilder object.
 - 
Method SummaryModifier and Type Method Description voidaddElectrodesDXF(java.lang.String dxfFile, java.lang.String[] dxfLayers, java.lang.Double[] dxfLayerHeights)Imports and extrudes DXF File (without scale factor)voidaddElectrodesDXF(java.lang.String dxfFile, java.lang.String[] dxfLayers, java.lang.Double[] dxfLayerHeights, java.lang.Double scale)Imports and extrudes DXF FilevoidaddElectrodesSTL(java.lang.String stlFolder, java.lang.Double startHeight)Imports and extrudes STL File (without scale factor)voidaddElectrodesSTL(java.lang.String stlFolder, java.lang.Double startHeight, int scale)Imports stl files.voidaddHeterostructure(java.lang.String[] layerLabels, java.lang.String[] layerHeights)Adds layers to comsol model.voidaddMaterial(ComsolMaterial mat, java.lang.String domain)Associates a material with a domain within the modelvoidselectVoltages(java.lang.String totalDomain)Creates a potential node in COMSOL for each domain in the domain group.
 
- 
- 
- 
Field Detail- 
modelpublic com.comsol.model.Model model COMSOL model that will be saved as a .mph file.
 - 
xDimpublic java.lang.String xDim Length (in nm) along the x direction.
 - 
yDimpublic java.lang.String yDim Length (in nm) along the y direction.
 - 
currentHeightpublic java.lang.Double currentHeight Height (in nm) along the z direction.
 
- 
 - 
Method Detail- 
addHeterostructurepublic void addHeterostructure(java.lang.String[] layerLabels, java.lang.String[] layerHeights)Adds layers to comsol model.- Parameters:
- layerLabels- Labels of layers used.
- layerHeights- Height (in nm) of each layer.
 
 - 
addElectrodesDXFpublic void addElectrodesDXF(java.lang.String dxfFile, java.lang.String[] dxfLayers, java.lang.Double[] dxfLayerHeights, java.lang.Double scale)Imports and extrudes DXF File- Parameters:
- dxfFile- Path to dxf file (cannot be a relative path).
- dxfLayers- Names of layers in dxf file, in the order that they should be built.
- dxfLayerHeights- Height of each layer.
- scale- Factor to scale DXF file (e.g. 1000 to transfer from um to nm).
 
 - 
addElectrodesDXFpublic void addElectrodesDXF(java.lang.String dxfFile, java.lang.String[] dxfLayers, java.lang.Double[] dxfLayerHeights)Imports and extrudes DXF File (without scale factor)- Parameters:
- dxfFile- Path to dxf file (cannot be a relative path).
- dxfLayers- Names of layers in dxf file, in the order that they should be built.
- dxfLayerHeights- Height of each layer.
 
 - 
addElectrodesSTLpublic void addElectrodesSTL(java.lang.String stlFolder, java.lang.Double startHeight, int scale)Imports stl files.- Parameters:
- stlFolder- Path to folder containing stl files (cannot be a relative path).
- startHeight- Height (in nm) at which the electrodes start.
- scale- Factor to scale STL file (e.g. 1000 to transfer from um to nm).
 
 - 
addElectrodesSTLpublic void addElectrodesSTL(java.lang.String stlFolder, java.lang.Double startHeight)Imports and extrudes STL File (without scale factor)- Parameters:
- stlFolder- Path to folder containing stl files (cannot be a relative path).
- startHeight- Height (in nm) at which the electrodes start.
 
 - 
addMaterialpublic void addMaterial(ComsolMaterial mat, java.lang.String domain) Associates a material with a domain within the model- Parameters:
- mat- Material.
- domain- Domain.
 
 - 
selectVoltagespublic void selectVoltages(java.lang.String totalDomain) Creates a potential node in COMSOL for each domain in the domain group.- Parameters:
- totalDomain- Domain group of electrodes.
 
 
- 
 
-