-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Faraday cage etching model (#105)
* Start implement default FaradayCageEtching model * IBE Python bindings and stubs * Faraday cage etching Python bindings * Implement 2D mode for FC model * Add periodic boundary condition warning
- Loading branch information
Showing
13 changed files
with
755 additions
and
270 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
project(faradayCageEtching LANGUAGES CXX) | ||
|
||
add_executable(${PROJECT_NAME}.exe "${PROJECT_NAME}.cpp") | ||
target_link_libraries(${PROJECT_NAME}.exe PRIVATE ViennaPS) | ||
|
||
configure_file(faradayCageEtching.py ${CMAKE_CURRENT_BINARY_DIR}/faradayCageEtching.py COPYONLY) | ||
configure_file(config.txt ${CMAKE_CURRENT_BINARY_DIR}/config.txt COPYONLY) | ||
|
||
add_dependencies(ViennaPS_Examples ${PROJECT_NAME}.exe) | ||
viennacore_setup_bat(${PROJECT_NAME}.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) |
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,14 @@ | ||
# Geometry | ||
gridDelta = 0.1 | ||
xExtent = 10.0 | ||
yExtent = 10.0 | ||
|
||
finWidth = 2.0 | ||
maskHeight = 0.5 | ||
|
||
# Cage Setup | ||
tiltAngle = 60.0 | ||
cageAngle = 90.0 | ||
|
||
etchTime = 7.0 | ||
raysPerPoint = 1000 |
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,56 @@ | ||
#include <geometries/psMakeFin.hpp> | ||
#include <models/psFaradayCageEtching.hpp> | ||
|
||
#include <psProcess.hpp> | ||
#include <psUtils.hpp> | ||
|
||
namespace ps = viennaps; | ||
|
||
int main(int argc, char *argv[]) { | ||
using NumericType = double; | ||
constexpr int D = 2; | ||
|
||
ps::Logger::setLogLevel(ps::LogLevel::INTERMEDIATE); | ||
omp_set_num_threads(16); | ||
|
||
// Parse the parameters | ||
ps::utils::Parameters params; | ||
if (argc > 1) { | ||
params.readConfigFile(argv[1]); | ||
} else { | ||
std::cout << "Usage: " << argv[0] << " <config file>" << std::endl; | ||
return 1; | ||
} | ||
|
||
// geometry setup | ||
auto geometry = ps::SmartPointer<ps::Domain<NumericType, D>>::New(); | ||
ps::MakeFin<NumericType, D>(geometry, params.get("gridDelta"), | ||
params.get("xExtent"), params.get("yExtent"), | ||
params.get("finWidth"), params.get("maskHeight"), | ||
0.0, 0.0, true, true, ps::Material::Si) | ||
.apply(); | ||
|
||
std::vector<ps::Material> maskMaterials = {ps::Material::Mask}; | ||
ps::FaradayCageParameters<NumericType> cageParams; | ||
cageParams.ibeParams.tiltAngle = params.get("tiltAngle"); | ||
cageParams.cageAngle = params.get("cageAngle"); | ||
auto model = ps::SmartPointer<ps::FaradayCageEtching<NumericType, D>>::New( | ||
maskMaterials, cageParams); | ||
|
||
// process setup | ||
ps::Process<NumericType, D> process; | ||
process.setDomain(geometry); | ||
process.setProcessModel(model); | ||
process.setMaxCoverageInitIterations(10); | ||
process.setNumberOfRaysPerPoint(params.get("raysPerPoint")); | ||
process.setProcessDuration(params.get("etchTime")); | ||
|
||
// print initial surface | ||
geometry->saveSurfaceMesh("initial.vtp"); | ||
|
||
// run the process | ||
process.apply(); | ||
|
||
// print final surface | ||
geometry->saveSurfaceMesh("final.vtp"); | ||
} |
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,58 @@ | ||
from argparse import ArgumentParser | ||
|
||
# parse config file name and simulation dimension | ||
parser = ArgumentParser(prog="faradayCageEtching", description="Run a faraday cage etching process.") | ||
parser.add_argument("-D", "-DIM", dest="dim", type=int, default=2) | ||
parser.add_argument("filename") | ||
args = parser.parse_args() | ||
|
||
# switch between 2D and 3D mode | ||
if args.dim == 2: | ||
print("Running 2D simulation.") | ||
import viennaps2d as vps | ||
else: | ||
print("Running 3D simulation.") | ||
import viennaps3d as vps | ||
|
||
params = vps.ReadConfigFile(args.filename) | ||
|
||
# print intermediate output surfaces during the process | ||
vps.Logger.setLogLevel(vps.LogLevel.INTERMEDIATE) | ||
|
||
# geometry setup, all units in um | ||
geometry = vps.Domain() | ||
vps.MakeFin( | ||
domain=geometry, | ||
gridDelta=params["gridDelta"], | ||
xExtent=params["xExtent"], | ||
yExtent=params["yExtent"], | ||
finWidth=params["finWidth"], | ||
finHeight=params["maskHeight"], | ||
periodicBoundary=True, | ||
makeMask=True, | ||
material=vps.Material.Si, | ||
).apply() | ||
|
||
# use pre-defined model SF6O2 etching model | ||
parameters = vps.FaradayCageParameters() | ||
parameters.cageAngle = params["cageAngle"] | ||
parameters.ibeParams.tiltAngle = params["tiltAngle"] | ||
mask = [vps.Material.Mask] | ||
|
||
model = vps.FaradayCageEtching(mask, parameters) | ||
|
||
# process setup | ||
process = vps.Process() | ||
process.setDomain(geometry) | ||
process.setProcessModel(model) | ||
process.setNumberOfRaysPerPoint(int(params["raysPerPoint"])) | ||
process.setProcessDuration(params["etchTime"]) # seconds | ||
|
||
# print initial surface | ||
geometry.saveSurfaceMesh(filename="initial.vtp", addMaterialIds=True) | ||
|
||
# run the process | ||
process.apply() | ||
|
||
# print final surface | ||
geometry.saveSurfaceMesh(filename="final.vtp", addMaterialIds=True) |
Oops, something went wrong.