{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "eddae865", "metadata": {}, "outputs": [], "source": [ "import viennaps as ps # ViennaPS 2D " ] }, { "cell_type": "markdown", "id": "0d20fc7d", "metadata": {}, "source": [ "### [MultiParticleProcess](https://viennatools.github.io/ViennaPS/models/prebuilt/multiParticle.html) – Modeling Multiple Particle Species" ] }, { "cell_type": "code", "execution_count": null, "id": "9bcde386", "metadata": {}, "outputs": [], "source": [ "# -------------------------------\n", "# Helper function: Create domain with a simple masked trench\n", "# -------------------------------\n", "def createTrenchMask():\n", " extent = 30\n", " gridDelta = 0.3\n", "\n", " # Create a 2D simulation domain with specified extent and resolution\n", " domain = ps.Domain(xExtent=extent, gridDelta=gridDelta)\n", "\n", " # Add a rectangular trench with a flat bottom (depth=0) and mask layer on top\n", " ps.MakeTrench(domain, trenchWidth=10.0, trenchDepth=0.0, maskHeight=2.0).apply()\n", "\n", " return domain" ] }, { "cell_type": "markdown", "id": "ff52078d", "metadata": {}, "source": [ "### Step 1: Etching with a Single Neutral Particle" ] }, { "cell_type": "code", "execution_count": null, "id": "9250298f", "metadata": {}, "outputs": [], "source": [ "# Initialize domain\n", "domain = createTrenchMask()\n", "domain.saveVolumeMesh(\"multiParticleEtching_1\")" ] }, { "cell_type": "code", "execution_count": null, "id": "d7d47555", "metadata": {}, "outputs": [], "source": [ "# Create multi-particle process model\n", "model = ps.MultiParticleProcess()\n", "\n", "# Add a neutral particle source (isotropic direction, 20% sticking probability)\n", "model.addNeutralParticle(stickingProbability=0.2)\n", "\n", "# --- Parameter: control how strongly the neutral particle etches\n", "neutralRate = 1.0\n", "\n", "# Rate function using just the neutral particle\n", "def rateFunction(fluxes, material):\n", " if material == ps.Material.Mask:\n", " return 0 # No etching of mask\n", "\n", " return -neutralRate * fluxes[0]\n", "\n", "model.setRateFunction(rateFunction)" ] }, { "cell_type": "code", "execution_count": null, "id": "412a1e1d", "metadata": {}, "outputs": [], "source": [ "processDuration = 5.0 # arbitrary time units\n", "ps.Process(domain, model, processDuration).apply()\n", "domain.saveVolumeMesh(\"multiParticleEtching_2\")" ] }, { "cell_type": "markdown", "id": "0178b92c", "metadata": {}, "source": [ "### Step 2: Etching with Neutral + Ion Particles" ] }, { "cell_type": "code", "execution_count": null, "id": "fc21f4ee", "metadata": {}, "outputs": [], "source": [ "# Reset domain\n", "domain = createTrenchMask()" ] }, { "cell_type": "code", "execution_count": null, "id": "34a08236", "metadata": {}, "outputs": [], "source": [ "# Create new model with both particle types\n", "model = ps.MultiParticleProcess()\n", "model.addNeutralParticle(stickingProbability=0.2)\n", "model.addIonParticle(sourcePower=500.0, thetaRMin=60.0, thetaRMax=90.0)\n", "\n", "# --- Parameters: user-adjustable weights for particle contributions\n", "neutralWeight = 1.0 # influence of neutral particle\n", "ionWeight = 1.0 # influence of ion particle\n", "maskEtchFactor = 0.1 # how strongly ions etch the mask (0 = none, 1 = full)\n", "\n", "# Updated rate function combining both particle fluxes\n", "def rateFunction(fluxes, material):\n", " neutralFlux = fluxes[0]\n", " ionFlux = fluxes[1]\n", "\n", " if material == ps.Material.Mask:\n", " return -maskEtchFactor * ionWeight * ionFlux\n", "\n", " return -(neutralWeight * neutralFlux + ionWeight * ionFlux)\n", "\n", "model.setRateFunction(rateFunction)" ] }, { "cell_type": "code", "execution_count": null, "id": "4f843d99", "metadata": {}, "outputs": [], "source": [ "processDuration = 5.0 # arbitrary time units\n", "ps.Process(domain, model, processDuration).apply()\n", "domain.saveVolumeMesh(\"multiParticleEtching_3\")" ] }, { "cell_type": "code", "execution_count": null, "id": "7606e3d7", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.7" } }, "nbformat": 4, "nbformat_minor": 5 }