Skip to content

Commit

Permalink
Material dependent sticking
Browse files Browse the repository at this point in the history
  • Loading branch information
tobre1 committed Feb 5, 2025
1 parent cb0f224 commit 403eb28
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 47 deletions.
11 changes: 7 additions & 4 deletions examples/holeEtching/testFluxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import numpy as np

# parse config file name and simulation dimension
parser = ArgumentParser(prog="holeEtching", description="Run a hole etching process.")
parser = ArgumentParser(
prog="testFluxes", description="Test different flux configurations."
)
parser.add_argument("-D", "-DIM", dest="dim", type=int, default=2)
args = parser.parse_args()

Expand All @@ -16,6 +18,7 @@

vps.setNumThreads(16)
vps.Logger.setLogLevel(vps.LogLevel.INFO)

vps.Length.setUnit("um")
vps.Time.setUnit("min")

Expand All @@ -29,9 +32,9 @@

# fluxes
ionFlux = [10.0, 10.0, 10.0, 10.0, 10.0]
etchantFlux = [4.8e3, 4.5e3, 4e3, 3.5e3, 2e3]
etchantFlux = [4.8e3, 4.5e3, 4e3, 3.5e3, 4e3]
oxygenFlux = [3e2, 8e2, 2e3, 2.5e3, 0.0]
A_O = [4, 3, 2, 1, 1]
A_O = [2, 2, 2, 1, 1]
yo2 = [0.44, 0.5, 0.56, 0.62, 0]

# etching model parameters
Expand Down Expand Up @@ -87,4 +90,4 @@
process.setProcessModel(model)
process.apply()

geometry.saveSurfaceMesh("hole_y{:.2f}_EO2.vtp".format(yo2[i]))
geometry.saveSurfaceMesh("hole_y{:.2f}_EO2.vtp".format(yo2[i]), True)
87 changes: 54 additions & 33 deletions include/viennaps/models/psSF6O2Etching.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,13 @@ class SF6O2Etchant
viennaray::TracingData<NumericType> &localData,
const viennaray::TracingData<NumericType> *globalData,
RNG &) override final {
// F surface coverage
const auto &phi_F = globalData->getVectorData(0)[primID];
// O surface coverage
const auto &phi_O = globalData->getVectorData(1)[primID];
// Obtain the sticking probability
NumericType beta = params.beta_F;
if (MaterialMap::isMaterial(materialId, Material::Mask))
beta = params.Mask.beta_F;
NumericType S_eff = beta * std::max(1. - phi_F - phi_O, 0.);
NumericType S_eff = 1.;
if (params.fluxIncludeSticking) {
const auto &phi_F = globalData->getVectorData(0)[primID];
const auto &phi_O = globalData->getVectorData(1)[primID];
NumericType beta = sticking(materialId);
S_eff = beta * std::max(1. - phi_F - phi_O, 0.);
}

localData.getVectorData(0)[primID] += rayWeight * S_eff;
}
Expand All @@ -377,9 +375,7 @@ class SF6O2Etchant
// O surface coverage
const auto &phi_O = globalData->getVectorData(1)[primID];
// Obtain the sticking probability
NumericType beta = params.beta_F;
if (MaterialMap::isMaterial(materialId, Material::Mask))
beta = params.Mask.beta_F;
NumericType beta = sticking(materialId);
NumericType S_eff = beta * std::max(1. - phi_F - phi_O, 0.);

auto direction =
Expand All @@ -390,6 +386,16 @@ class SF6O2Etchant
std::vector<std::string> getLocalDataLabels() const override final {
return {"etchantFlux"};
}

private:
NumericType sticking(const int matieralId) const {
auto beta = params.beta_F.find(MaterialMap::mapToMaterial(matieralId));
if (beta != params.beta_F.end())
return beta->second;

// default value
return 1.0;
}
};

template <typename NumericType, int D>
Expand All @@ -406,14 +412,12 @@ class SF6Etchant
viennaray::TracingData<NumericType> &localData,
const viennaray::TracingData<NumericType> *globalData,
RNG &) override final {

// F surface coverage
const auto &phi_F = globalData->getVectorData(0)[primID];
// Obtain the sticking probability
NumericType beta = params.beta_F;
if (MaterialMap::isMaterial(materialId, Material::Mask))
beta = params.Mask.beta_F;
NumericType S_eff = beta * std::max(1. - phi_F, 0.);
NumericType S_eff = 1.;
if (params.fluxIncludeSticking) {
const auto &phi_F = globalData->getVectorData(0)[primID];
NumericType beta = sticking(materialId);
S_eff = beta * std::max(1. - phi_F, 0.);
}

localData.getVectorData(0)[primID] += rayWeight * S_eff;
}
Expand All @@ -427,9 +431,7 @@ class SF6Etchant
// F surface coverage
const auto &phi_F = globalData->getVectorData(0)[primID];
// Obtain the sticking probability
NumericType beta = params.beta_F;
if (MaterialMap::isMaterial(materialId, Material::Mask))
beta = params.Mask.beta_F;
NumericType beta = sticking(materialId);
NumericType S_eff = beta * std::max(1. - phi_F, 0.);

auto direction =
Expand All @@ -440,6 +442,16 @@ class SF6Etchant
std::vector<std::string> getLocalDataLabels() const override final {
return {"etchantFlux"};
}

private:
NumericType sticking(const int matieralId) const {
auto beta = params.beta_F.find(MaterialMap::mapToMaterial(matieralId));
if (beta != params.beta_F.end())
return beta->second;

// default value
return 1.0;
}
};

template <typename NumericType, int D>
Expand All @@ -456,13 +468,14 @@ class SF6O2Oxygen
viennaray::TracingData<NumericType> &localData,
const viennaray::TracingData<NumericType> *globalData,
RNG &) override final {
NumericType S_eff;
const auto &phi_F = globalData->getVectorData(0)[primID];
const auto &phi_O = globalData->getVectorData(1)[primID];
NumericType beta = params.beta_O;
if (MaterialMap::isMaterial(materialId, Material::Mask))
beta = params.Mask.beta_O;
S_eff = beta * std::max(1. - phi_O - phi_F, 0.);
NumericType S_eff = 1.;
if (params.fluxIncludeSticking) {
const auto &phi_F = globalData->getVectorData(0)[primID];
const auto &phi_O = globalData->getVectorData(1)[primID];
NumericType beta = sticking(materialId);
S_eff = beta * std::max(1. - phi_O - phi_F, 0.);
}

localData.getVectorData(0)[primID] += rayWeight * S_eff;
}
std::pair<NumericType, Vec3D<NumericType>>
Expand All @@ -475,9 +488,7 @@ class SF6O2Oxygen
NumericType S_eff;
const auto &phi_F = globalData->getVectorData(0)[primID];
const auto &phi_O = globalData->getVectorData(1)[primID];
NumericType beta = params.beta_O;
if (MaterialMap::isMaterial(materialId, Material::Mask))
beta = params.Mask.beta_O;
NumericType beta = sticking(materialId);
S_eff = beta * std::max(1. - phi_O - phi_F, 0.);

auto direction =
Expand All @@ -488,6 +499,16 @@ class SF6O2Oxygen
std::vector<std::string> getLocalDataLabels() const override final {
return {"oxygenFlux"};
}

private:
NumericType sticking(const int matieralId) const {
auto beta = params.beta_O.find(MaterialMap::mapToMaterial(matieralId));
if (beta != params.beta_O.end())
return beta->second;

// default value
return 1.0;
}
};
} // namespace impl

Expand Down
10 changes: 6 additions & 4 deletions include/viennaps/models/psSF6O2Parameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ template <typename NumericType> struct SF6O2Parameters {
NumericType oxygenFlux = 1.0e2;

// sticking probabilities
NumericType beta_F = 0.7;
NumericType beta_O = 1.;
std::unordered_map<Material, NumericType> beta_F = {{Material::Si, 0.7},
{Material::Mask, 0.7}};
std::unordered_map<Material, NumericType> beta_O = {{Material::Si, 1.},
{Material::Mask, 1.}};

NumericType etchStopDepth = std::numeric_limits<NumericType>::lowest();
bool fluxIncludeSticking = false;

// Mask
struct MaskType {
// density
NumericType rho = 500.; // 1e22 atoms/cm³
NumericType beta_F = 0.7;
NumericType beta_O = 1.0;

NumericType Eth_sp = 20.; // eV
NumericType A_sp = 0.0139;
Expand Down
4 changes: 2 additions & 2 deletions python/pyWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,6 @@ PYBIND11_MODULE(VIENNAPS_MODULE_NAME, module) {
pybind11::class_<SF6O2Parameters<T>::MaskType>(module, "SF6O2ParametersMask")
.def(pybind11::init<>())
.def_readwrite("rho", &SF6O2Parameters<T>::MaskType::rho)
.def_readwrite("beta_F", &SF6O2Parameters<T>::MaskType::beta_F)
.def_readwrite("beta_O", &SF6O2Parameters<T>::MaskType::beta_O)
.def_readwrite("A_sp", &SF6O2Parameters<T>::MaskType::A_sp)
.def_readwrite("B_sp", &SF6O2Parameters<T>::MaskType::B_sp)
.def_readwrite("Eth_sp", &SF6O2Parameters<T>::MaskType::Eth_sp);
Expand Down Expand Up @@ -729,6 +727,8 @@ PYBIND11_MODULE(VIENNAPS_MODULE_NAME, module) {
.def_readwrite("etchantFlux", &SF6O2Parameters<T>::etchantFlux)
.def_readwrite("oxygenFlux", &SF6O2Parameters<T>::oxygenFlux)
.def_readwrite("etchStopDepth", &SF6O2Parameters<T>::etchStopDepth)
.def_readwrite("fluxIncludeSticking",
&SF6O2Parameters<T>::fluxIncludeSticking)
.def_readwrite("beta_F", &SF6O2Parameters<T>::beta_F)
.def_readwrite("beta_O", &SF6O2Parameters<T>::beta_O)
.def_readwrite("Mask", &SF6O2Parameters<T>::Mask)
Expand Down
5 changes: 3 additions & 2 deletions python/stubs/viennaps2d/viennaps2d.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,10 @@ class SF6O2Parameters:
Mask: SF6O2ParametersMask
Passivation: SF6O2ParametersPassivation
Si: SF6O2ParametersSi
beta_F: float
beta_O: float
beta_F: dict[Material, float]
beta_O: dict[Material, float]
etchStopDepth: float
fluxIncludeSticking: bool
etchantFlux: float
ionFlux: float
oxygenFlux: float
Expand Down
5 changes: 3 additions & 2 deletions python/stubs/viennaps3d/viennaps3d.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,10 @@ class SF6O2Parameters:
Mask: SF6O2ParametersMask
Passivation: SF6O2ParametersPassivation
Si: SF6O2ParametersSi
beta_F: float
beta_O: float
beta_F: float[Material, float]
beta_O: float[Material, float]
etchStopDepth: float
fluxIncludeSticking: bool
etchantFlux: float
ionFlux: float
oxygenFlux: float
Expand Down

0 comments on commit 403eb28

Please sign in to comment.