Skip to content

Commit

Permalink
Added simple 2-particle TEOS PE-CVD model
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 14, 2024
1 parent 487b39d commit 9e7c77c
Show file tree
Hide file tree
Showing 10 changed files with 471 additions and 13 deletions.
8 changes: 8 additions & 0 deletions examples/TEOSPECVDTrenchDeposition/CMakeLists (copy).txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
project(TEOSTrenchDeposition LANGUAGES CXX)

add_executable(TEOSPECVD "TEOSPECVD.cpp")
target_link_libraries(TEOSPECVD PRIVATE ViennaPS)
configure_file(TEOSPECVD_config.txt ${CMAKE_CURRENT_BINARY_DIR}/TEOSPECVD_config.txt COPYONLY)

add_dependencies(ViennaPS_Examples TEOSPECVD)
setup_windows_bat(TEOSPECVD ${VIENNAPS_EXAMPLES_LIB})
24 changes: 24 additions & 0 deletions examples/TEOSPECVDTrenchDeposition/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.12)
project("TEOS_PE-CVD")

# set default build type
SET(DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

set (CMAKE_CXX_STANDARD 17)

list(APPEND CMAKE_PREFIX_PATH "/home/filipov/Software/ViennaTools/VPS")

find_package(ViennaPS)

# CMake target
add_executable(TEOSPECVD TEOSPECVD.cpp)
target_link_libraries(TEOSPECVD PUBLIC ViennaTools::ViennaPS)
configure_file(TEOSPECVD_config.txt ${CMAKE_CURRENT_BINARY_DIR}/TEOSPECVD_config.txt COPYONLY)
64 changes: 64 additions & 0 deletions examples/TEOSPECVDTrenchDeposition/TEOSPECVD.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#include <geometries/psMakeTrench.hpp>
#include <models/psTEOSPECVD.hpp>

#include <psDomain.hpp>
#include <psProcess.hpp>

#include "parameters.hpp"

int main(int argc, char **argv) {
psLogger::setLogLevel(psLogLevel::DEBUG);

using NumericType = double;
constexpr int D = 2;

// Parse the parameters
Parameters<NumericType> params;
if (argc > 1) {
auto config = psUtils::readConfigFile(argv[1]);
if (config.empty()) {
std::cerr << "Empty config provided" << std::endl;
return -1;
}
params.fromMap(config);
}

auto geometry = psSmartPointer<psDomain<NumericType, D>>::New();
psMakeTrench<NumericType, D>(
geometry, params.gridDelta /* grid delta */, params.xExtent /*x extent*/,
params.yExtent /*y extent*/, params.trenchWidth /*trench width*/,
params.trenchHeight /*trench height*/,
params.taperAngle /* tapering angle */, 0 /*base height*/,
false /*periodic boundary*/, false /*create mask*/,
psMaterial::Si /*material*/)
.apply();

// copy top layer to capture deposition
geometry->duplicateTopLevelSet(psMaterial::SiO2);

// process model encompasses surface model and particle types
auto model = psSmartPointer<psTEOSPECVD<NumericType, D>>::New(
params.stickingProbabilityRadical /*radical sticking probability*/,
params.depositionRateRadical /*neutral radical deposition rate*/,
params.depositionRateIon /*charged ion deposition rate*/,
params.exponentIon /*cosine power exponent*/,
params.stickingProbabilityIon /*ion sticking probability*/,
params.reactionOrderRadical /*radical reaction order*/,
params.reactionOrderIon /*ion reaction order*/,
params.minAngleIon /*minimum reflected angle ion*/);

psProcess<NumericType, D> process;
process.setDomain(geometry);
process.setProcessModel(model);
process.setNumberOfRaysPerPoint(params.numRaysPerPoint);
process.setProcessDuration(params.processTime);

geometry->saveSurfaceMesh("TEOS_PECVD_initial.vtp");

process.apply();

geometry->saveSurfaceMesh("TEOS_PECVD_final.vtp");

if constexpr (D == 2)
geometry->saveVolumeMesh("TEOS_PECVD_final");
}
25 changes: 25 additions & 0 deletions examples/TEOSPECVDTrenchDeposition/TEOSPECVD_config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Domain
gridDelta=2.5 # um
xExtent=110. # um
yExtent=110. # um (3D mode only)

# Geometry
trenchWidth=70 # um
trenchHeight=70 # um
taperAngle=0. # degrees

# Process
processTime=350 # min
numRaysPerPoint=1000

# radical
depositionRateRadical=0.05 # um / min
stickingProbabilityRadical=1e-4
reactionOrderRadical=1.0

# ion
depositionRateIon=0.05 # um / min
stickingProbabilityIon=1.
reactionOrderIon=1.0
exponentIon=100.
minAngleIon=1.34
63 changes: 63 additions & 0 deletions examples/TEOSPECVDTrenchDeposition/multiTEOS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
from argparse import ArgumentParser

# parse config file name and simulation dimension
parser = ArgumentParser(
prog="multiTEOS",
description="Run a multi TEOS deposition 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)

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

# copy top layer to capture deposition
geometry.duplicateTopLevelSet(vps.Material.SiO2)

# process model encompasses surface model and particle types
model = vps.TEOSDeposition(
stickingProbabilityP1=params["stickingProbabilityP1"],
rateP1=params["depositionRateP1"],
orderP1=params["reactionOrderP1"],
stickingProbabilityP2=params["stickingProbabilityP2"],
rateP2=params["depositionRateP2"],
orderP2=params["reactionOrderP2"],
)

process = vps.Process()
process.setDomain(geometry)
process.setProcessModel(model)
process.setNumberOfRaysPerPoint(int(params["numRaysPerPoint"]))
process.setProcessDuration(params["processTime"])

geometry.saveSurfaceMesh("MultiTEOS_initial.vtp")

process.apply()

geometry.saveSurfaceMesh("MultiTEOS_final.vtp")

if args.dim == 2:
geometry.saveVolumeMesh("MultiTEOS_final")
58 changes: 58 additions & 0 deletions examples/TEOSPECVDTrenchDeposition/parameters.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#pragma once

#include <string>
#include <unordered_map>

#include <psUtils.hpp>

template <class NumericType> struct Parameters {
// Domain
NumericType gridDelta = 5.; // um
NumericType xExtent = 100.; // um
NumericType yExtent = 100.; // um (3D mode only)

// Geometry
NumericType trenchWidth = 70; // um
NumericType trenchHeight = 70; // um
NumericType taperAngle = 0.; // degrees

// Process
NumericType processTime = 350.; // min
int numRaysPerPoint = 2000;

// Radical particle
NumericType depositionRateRadical = 0.1;
NumericType stickingProbabilityRadical = 0.1;
NumericType reactionOrderRadical = 1.;

// Ion particle
NumericType depositionRateIon = 0.1;
NumericType stickingProbabilityIon = 1e-4;
NumericType reactionOrderIon = 1.;
NumericType exponentIon = 100.;
NumericType minAngleIon = 1.3962634;

Parameters() {}

void fromMap(std::unordered_map<std::string, std::string> &m) {
psUtils::AssignItems( //
m, //
psUtils::Item{"gridDelta", gridDelta}, //
psUtils::Item{"xExtent", xExtent}, //
psUtils::Item{"yExtent", yExtent}, //
psUtils::Item{"trenchWidth", trenchWidth}, //
psUtils::Item{"trenchHeight", trenchHeight}, //
psUtils::Item{"taperAngle", taperAngle}, //
psUtils::Item{"processTime", processTime}, //
psUtils::Item{"numRaysPerPoint", numRaysPerPoint}, //
psUtils::Item{"depositionRateRadical", depositionRateRadical}, //
psUtils::Item{"stickingProbabilityRadical", stickingProbabilityRadical}, //
psUtils::Item{"reactionOrderRadical", reactionOrderRadical}, //
psUtils::Item{"depositionRateIon", depositionRateIon}, //
psUtils::Item{"stickingProbabilityIon", stickingProbabilityIon}, //
psUtils::Item{"reactionOrderIon", reactionOrderIon}, //
psUtils::Item{"exponentIon", exponentIon}, //
psUtils::Item{"minAngleIon", minAngleIon} //
);
}
};
19 changes: 19 additions & 0 deletions examples/TEOSTrenchDeposition/CMakeLists (copy).txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
project(TEOSTrenchDeposition LANGUAGES CXX)

add_executable(singleTEOS "singleTEOS.cpp")
target_link_libraries(singleTEOS PRIVATE ViennaPS)

configure_file(singleTEOS.py ${CMAKE_CURRENT_BINARY_DIR}/singleTEOS.py COPYONLY)
configure_file(singleTEOS_config.txt ${CMAKE_CURRENT_BINARY_DIR}/singleTEOS_config.txt COPYONLY)

add_dependencies(ViennaPS_Examples singleTEOS)
setup_windows_bat(singleTEOS ${VIENNAPS_EXAMPLES_LIB})

add_executable(multiTEOS "multiTEOS.cpp")
target_link_libraries(multiTEOS PRIVATE ViennaPS)

configure_file(multiTEOS.py ${CMAKE_CURRENT_BINARY_DIR}/multiTEOS.py COPYONLY)
configure_file(multiTEOS_config.txt ${CMAKE_CURRENT_BINARY_DIR}/multiTEOS_config.txt COPYONLY)

add_dependencies(ViennaPS_Examples multiTEOS)
setup_windows_bat(multiTEOS ${VIENNAPS_EXAMPLES_LIB})
31 changes: 18 additions & 13 deletions examples/TEOSTrenchDeposition/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
project(TEOSTrenchDeposition LANGUAGES CXX)
cmake_minimum_required(VERSION 3.12)
project("TEOSDeposition")

add_executable(singleTEOS "singleTEOS.cpp")
target_link_libraries(singleTEOS PRIVATE ViennaPS)
# set default build type
SET(DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

configure_file(singleTEOS.py ${CMAKE_CURRENT_BINARY_DIR}/singleTEOS.py COPYONLY)
configure_file(singleTEOS_config.txt ${CMAKE_CURRENT_BINARY_DIR}/singleTEOS_config.txt COPYONLY)
set (CMAKE_CXX_STANDARD 17)

add_dependencies(ViennaPS_Examples singleTEOS)
setup_windows_bat(singleTEOS ${VIENNAPS_EXAMPLES_LIB})
list(APPEND CMAKE_PREFIX_PATH "/home/filipov/Software/ViennaTools/VPS")

add_executable(multiTEOS "multiTEOS.cpp")
target_link_libraries(multiTEOS PRIVATE ViennaPS)
find_package(ViennaPS)

configure_file(multiTEOS.py ${CMAKE_CURRENT_BINARY_DIR}/multiTEOS.py COPYONLY)
# CMake target
add_executable(TEOSDeposition multiTEOS.cpp)
target_link_libraries(TEOSDeposition PUBLIC ViennaTools::ViennaPS)
configure_file(multiTEOS_config.txt ${CMAKE_CURRENT_BINARY_DIR}/multiTEOS_config.txt COPYONLY)

add_dependencies(ViennaPS_Examples multiTEOS)
setup_windows_bat(multiTEOS ${VIENNAPS_EXAMPLES_LIB})
Loading

0 comments on commit 9e7c77c

Please sign in to comment.