Skip to content

Commit

Permalink
Add MultiParticle process, other fixes (#98)
Browse files Browse the repository at this point in the history
* Add option to set ray tracing disk radii

* Add domain member functions to remove level sets and materials

* Start on multi particle process model

* Generalize ion particle

* Multi particle model Python wrapper

* Finish test for MultiParticleProcess

* Add info for zero velocities instead of printing max time

* Clean up TEOSPECVD

* Bump version

* Fix ctors in TEOSPECVD

* Rework bosch process example

* Use ViennaRay default particles in models

* Rework MP surface model

* Add numeric header

* Bump dep verions

* Remove smart pointer holders for geometry builders

* Small fixes in Python wrapper

* Remove KD tree benchmark example
  • Loading branch information
tobre1 authored Nov 11, 2024
1 parent 7061b64 commit 7456a20
Show file tree
Hide file tree
Showing 16 changed files with 663 additions and 319 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(
ViennaPS
LANGUAGES CXX C
VERSION 3.1.0)
VERSION 3.2.0)

# --------------------------------------------------------------------------------------------------------
# Library switches
Expand Down Expand Up @@ -108,7 +108,7 @@ CPMAddPackage(

CPMFindPackage(
NAME ViennaRay
VERSION 3.0.1
VERSION 3.1.0
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaRay"
EXCLUDE_FROM_ALL ${VIENNAPS_BUILD_PYTHON})

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ Releases are tagged on the master branch and available in the [releases section]

### Dependencies (installed automatically)

* [ViennaCore](https://github.com/ViennaTools/viennacore) >= 1.0.0
* [ViennaCore](https://github.com/ViennaTools/viennacore) >= 1.1.0

* [ViennaLS](https://github.com/ViennaTools/viennals) >= 4.0.0
* [ViennaLS](https://github.com/ViennaTools/viennals) >= 4.0.1
* [ViennaHRLE](https://github.com/ViennaTools/viennahrle) >= 0.4.0
* [VTK](https://vtk.org/) >= 9.0.0

* [ViennaRay](https://github.com/ViennaTools/viennaray) >= 3.0.1
* [ViennaRay](https://github.com/ViennaTools/viennaray) >= 3.1.0
* [Embree](https://www.embree.org/) >= 4.0.0

* [ViennaCS](https://github.com/ViennaTools/viennacs) >= 1.0.0
Expand Down Expand Up @@ -98,7 +98,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum

* Installation with CPM
```cmake
CPMAddPackage("gh:viennatools/viennaps@3.1.0")
CPMAddPackage("gh:viennatools/viennaps@3.2.0")
```

* With a local installation
Expand Down
7 changes: 0 additions & 7 deletions examples/KDTreeBenchmark/CMakeLists.txt

This file was deleted.

107 changes: 0 additions & 107 deletions examples/KDTreeBenchmark/KDTreeBenchmark.cpp

This file was deleted.

49 changes: 32 additions & 17 deletions examples/boschProcess/boschProcess.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <geometries/psMakeHole.hpp>
#include <geometries/psMakeTrench.hpp>
#include <models/psIsotropicProcess.hpp>
#include <models/psSF6O2Etching.hpp>
#include <models/psMultiParticleProcess.hpp>
#include <psProcess.hpp>
#include <psUtils.hpp>

Expand All @@ -9,20 +9,36 @@ namespace ps = viennaps;
template <class NumericType, int D>
void etch(ps::SmartPointer<ps::Domain<NumericType, D>> domain,
ps::utils::Parameters &params) {
auto model = ps::SmartPointer<ps::SF6Etching<NumericType, D>>::New(
params.get("ionFlux"), params.get("etchantFlux"),
params.get("meanEnergy"), params.get("sigmaEnergy"),
params.get("ionExponent"));
ps::Process<NumericType, D>(domain, model, params.get("etchTime")).apply();
auto etchModel =
ps::SmartPointer<ps::MultiParticleProcess<NumericType, D>>::New();
etchModel->addNeutralParticle(params.get("neutralStickingProbability"));
etchModel->addIonParticle(params.get("ionSourceExponent"));
const NumericType neutralRate = params.get("neutralRate");
const NumericType ionRate = params.get("ionRate");
etchModel->setRateFunction(
[neutralRate, ionRate](const std::vector<NumericType> &fluxes,
const ps::Material &material) {
if (material == ps::Material::Mask)
return 0.;
NumericType rate = fluxes[1] * ionRate;
if (material == ps::Material::Si)
rate += fluxes[0] * neutralRate;
return -rate;
});
ps::Process<NumericType, D> process(domain, etchModel,
params.get("etchTime"));
process.disableRandomSeeds();
process.apply();
// .apply();
}

template <class NumericType, int D>
void deposit(ps::SmartPointer<ps::Domain<NumericType, D>> domain,
NumericType time, NumericType rate) {
NumericType depositionThickness) {
domain->duplicateTopLevelSet(ps::Material::Polymer);
auto model =
ps::SmartPointer<ps::IsotropicProcess<NumericType, D>>::New(rate);
ps::Process<NumericType, D>(domain, model, time).apply();
auto model = ps::SmartPointer<ps::IsotropicProcess<NumericType, D>>::New(
depositionThickness);
ps::Process<NumericType, D>(domain, model, 1.).apply();
}

template <class NumericType, int D>
Expand All @@ -31,7 +47,7 @@ void ash(ps::SmartPointer<ps::Domain<NumericType, D>> domain) {
}

int main(int argc, char **argv) {
constexpr int D = 3;
constexpr int D = 2;
using NumericType = double;

ps::Logger::setLogLevel(ps::LogLevel::INFO);
Expand All @@ -48,23 +64,22 @@ int main(int argc, char **argv) {

// geometry setup
auto geometry = ps::SmartPointer<ps::Domain<NumericType, D>>::New();
ps::MakeHole<NumericType, D>(
ps::MakeTrench<NumericType, D>(
geometry, params.get("gridDelta") /* grid delta */,
params.get("xExtent") /*x extent*/, params.get("yExtent") /*y extent*/,
params.get("holeRadius") /*hole radius*/,
params.get("trenchWidth") /*hole radius*/,
params.get("maskHeight") /* mask height*/, 0., 0 /* base height */,
false /* periodic boundary */, true /*create mask*/, ps::Material::Si)
.apply();

const NumericType depositionRate = params.get("depositionRate");
const NumericType depositionTime = params.get("depositionTime");
const NumericType depositionThickness = params.get("depositionThickness");
const int numCycles = params.get<int>("numCycles");

int n = 0;
etch(geometry, params);
for (int i = 0; i < numCycles; ++i) {
geometry->saveSurfaceMesh("boschProcess_" + std::to_string(n++) + ".vtp");
deposit(geometry, depositionTime, depositionRate);
deposit(geometry, depositionThickness);
geometry->saveSurfaceMesh("boschProcess_" + std::to_string(n++) + ".vtp");
etch(geometry, params);
geometry->saveSurfaceMesh("boschProcess_" + std::to_string(n++) + ".vtp");
Expand Down
74 changes: 74 additions & 0 deletions examples/boschProcess/boschProcess.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
from argparse import ArgumentParser

# parse config file name and simulation dimension
parser = ArgumentParser(
prog="boschProcess",
description="Run a Bosch process on a trench geometry.",
)
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)
vps.Logger.setLogLevel(vps.LogLevel.INFO)

geometry = vps.Domain()
vps.MakeTrench(
domain=geometry,
gridDelta=params["gridDelta"],
xExtent=params["xExtent"],
yExtent=params["yExtent"],
trenchWidth=params["trenchWidth"],
trenchDepth=params["maskHeight"],
taperingAngle=0.0,
baseHeight=0.0,
periodicBoundary=False,
makeMask=True,
material=vps.Material.Si,
).apply()


depoModel = vps.IsotropicProcess(params["depositionThickness"])

etchModel = vps.MultiParticleProcess()
etchModel.addNeutralParticle(params["neutralStickingProbability"])
etchModel.addIonParticle(params["ionSourceExponent"])


# Custom rate function for the etch model
def rateFunction(fluxes, material):
if material == vps.Material.Mask:
return 0.0
rate = fluxes[1] * params["ionRate"]
if material == vps.Material.Si:
rate += fluxes[0] * params["neutralRate"]
return -rate


etchModel.setRateFunction(rateFunction)

geometry.saveSurfaceMesh("initial.vtp")

proc = vps.Process(geometry, etchModel, params["etchTime"])
proc.disableRandomSeeds()
proc.apply()

numCycles = int(params["numCycles"])
for i in range(numCycles):
geometry.duplicateTopLevelSet(vps.Material.Polymer)
vps.Process(geometry, depoModel, 1).apply()
vps.Process(geometry, etchModel, params["etchTime"]).apply()
geometry.removeTopLevelSet()

geometry.saveSurfaceMesh("final.vtp")

if args.dim == 2:
geometry.saveVolumeMesh("final")
21 changes: 9 additions & 12 deletions examples/boschProcess/config.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Geometry
gridDelta = 1.0
xExtent = 50.0
xExtent = 150.0
yExtent = 50.0
holeRadius = 10.0
maskHeight = 10.0
trenchWidth = 40.0
maskHeight = 20.0

# all flux values are units 1e16 / cm²
ionFlux=10.
etchantFlux=50.

ionExponent=200
meanEnergy=100 # eV
sigmaEnergy=10 # eV
neutralStickingProbability = 0.1
neutralRate = 0.5
ionSourceExponent = 200
ionRate = 1.0

etchTime = 10.0

depositionRate = 0.2
depositionTime = 10.0
depositionThickness = 2.0

numCycles = 5
numCycles = 4
Loading

0 comments on commit 7456a20

Please sign in to comment.