-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented Python bindings and update models (#47)
* Start Python wrapping * Added function parameters * Planarize function * Surface model trampoline class * Python Wrapping for ViennaPS (#46) * Fixed psProcess merge * Update Python building setup * Python install working * Stack etching example using Python bindings * Added single TEOS deposition Python example * More example Python wrapping * Update README with Python install instructions * Wrap cell set and models+exmaples * Add default particles * Add signal handling and rayParticle update * Remove 'ps' prefix in Python bindings * Remove 'ps' prefix in examples * Change include guards and update application * Add wet etching example in Python * Fix small typos * Update version to 1.3.0 * Format project --------- Co-authored-by: serb1231 <serban.ionescu15@gmail.com>
- Loading branch information
Showing
92 changed files
with
3,293 additions
and
753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This example only works in 3D mode | ||
import viennaps3d as vps | ||
import viennals3d as vls | ||
|
||
maskFileName = "cantilever_mask.gds" | ||
|
||
minutes = int(120 / 5) # total etch time (2 hours) | ||
x_add = 50.0 # add space to domain boundary | ||
y_add = 50.0 | ||
gridDelta = 5.0 # um | ||
|
||
# read GDS mask file | ||
boundaryConditions = [ | ||
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY, | ||
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY, | ||
vls.lsBoundaryConditionEnum.INFINITE_BOUNDARY, | ||
] | ||
|
||
gds_mask = vps.GDSGeometry(gridDelta) | ||
gds_mask.setBoundaryConditions(boundaryConditions) | ||
gds_mask.setBoundaryPadding(x_add, y_add) | ||
vps.GDSReader(gds_mask, maskFileName).apply() | ||
|
||
# convert GDS geometry to level set | ||
mask = gds_mask.layerToLevelSet(1, 0.0, 4 * gridDelta, True) | ||
|
||
# create plane geometry as substrate | ||
bounds = gds_mask.getBounds() | ||
plane = vls.lsDomain(bounds, boundaryConditions, gridDelta) | ||
vls.lsMakeGeometry(plane, vls.lsPlane([0.0, 0.0, 0.0], [0.0, 0.0, 1.0])).apply() | ||
|
||
# combine geometries | ||
geometry = vps.Domain() | ||
geometry.insertNextLevelSet(mask) | ||
geometry.insertNextLevelSet(plane) | ||
geometry.printSurface("InitialGeometry.vtp", True) | ||
|
||
# wet etch process | ||
model = vps.WetEtching(0) | ||
|
||
process = vps.Process() | ||
process.setDomain(geometry) | ||
process.setProcessModel(model) | ||
process.setProcessDuration(5.0 * 60.0) # 5 minutes of etching | ||
process.setPrintTimeInterval(-1.0) | ||
process.setIntegrationScheme( | ||
vls.lsIntegrationSchemeEnum.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER | ||
) | ||
|
||
for n in range(minutes): | ||
process.apply() | ||
# run process | ||
geometry.printSurface("WetEtchingSurface_" + str(n) + ".vtp", True) | ||
|
||
geometry.printSurface("FinalGeometry.vtp", True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import viennaps3d as vps | ||
|
||
try: | ||
# ViennaLS Python bindings are needed for the extrusion tool | ||
import viennals3d as vls | ||
except ModuleNotFoundError: | ||
print("ViennaLS Python module not found. Can not parse GDS file.") | ||
exit(1) | ||
|
||
gridDelta = 0.01 | ||
boundaryConds = [ | ||
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY, | ||
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY, | ||
vls.lsBoundaryConditionEnum.INFINITE_BOUNDARY, | ||
] | ||
|
||
mask = vps.GDSGeometry(gridDelta) | ||
mask.setBoundaryConditions(boundaryConds) | ||
vps.GDSReader(mask, "mask.gds").apply() | ||
|
||
bounds = mask.getBounds() | ||
geometry = vps.Domain() | ||
|
||
# substrate plane | ||
origin = [0.0, 0.0, 0.0] | ||
normal = [0.0, 0.0, 1.0] | ||
plane = vls.lsDomain(bounds, boundaryConds, gridDelta) | ||
vls.lsMakeGeometry(plane, vls.lsPlane(origin, normal)).apply() | ||
|
||
geometry.insertNextLevelSet(plane) | ||
|
||
layer0 = mask.layerToLevelSet(0, 0.0, 0.1, False) | ||
geometry.insertNextLevelSet(layer0) | ||
|
||
layer1 = mask.layerToLevelSet(1, -0.15, 0.45, False) | ||
geometry.insertNextLevelSet(layer1) | ||
|
||
geometry.printSurface("Geometry.vtp", True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.