{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "e01dc595", "metadata": {}, "outputs": [], "source": [ "import viennaps as ps" ] }, { "cell_type": "code", "execution_count": null, "id": "68a1a4cc", "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=10.0, maskTaperAngle=10).apply()\n", "\n", " return domain" ] }, { "cell_type": "markdown", "id": "37a9d57c", "metadata": {}, "source": [ "### Units\n", "\n", "The physical plasma etching models require units to be set" ] }, { "cell_type": "code", "execution_count": null, "id": "814265b9", "metadata": {}, "outputs": [], "source": [ "ps.Length.setUnit(\"um\") # Set length unit to micrometers\n", "ps.Time.setUnit(\"min\") # Set time unit to minutes" ] }, { "cell_type": "markdown", "id": "24923b9a", "metadata": {}, "source": [ "### Set up model parameters\n", "\n", "Available parameters can also be found in the [documentation](https://viennatools.github.io/ViennaPS/models/prebuilt/SF6O2Etching.html)" ] }, { "cell_type": "code", "execution_count": null, "id": "b2f4dc62", "metadata": {}, "outputs": [], "source": [ "params = ps.SF6O2Etching.defaultParameters()\n", "\n", "params.ionFlux = 10.0\n", "params.etchantFlux = 4500.0\n", "params.passivationFlux = 800.0\n", "\n", "params.Ions.meanEnergy = 100.0\n", "params.Ions.sigmaEnergy = 10.0\n", "params.Ions.exponent = 500 \n", "\n", "model = ps.SF6O2Etching(params)" ] }, { "cell_type": "markdown", "id": "c966c701", "metadata": {}, "source": [ "### Configure advection and ray tracing settings\n", "\n", "Additional settings concerning the surface advection scheme and the coverage. See [here](https://viennatools.github.io/ViennaPS/process/) for more information." ] }, { "cell_type": "code", "execution_count": null, "id": "c9db3d17", "metadata": {}, "outputs": [], "source": [ "processParams = ps.AdvectionParameters()\n", "processParams.spatialScheme = ps.SpatialScheme.LOCAL_LAX_FRIEDRICHS_1ST_ORDER\n", "\n", "rayTracingParams = ps.RayTracingParameters()\n", "rayTracingParams.raysPerPoint = 1000" ] }, { "cell_type": "code", "execution_count": null, "id": "a1d15c56", "metadata": {}, "outputs": [], "source": [ "domain = createTrenchMask()\n", "domain.saveVolumeMesh(\"SF6O2Etching_1\") # Save the volume mesh to a file\n", "\n", "process = ps.Process()\n", "process.setDomain(domain)\n", "process.setProcessModel(model)\n", "process.setProcessDuration(10) # Set process duration to 10 minutes\n", "process.setParameters(processParams)\n", "process.setParameters(rayTracingParams)" ] }, { "cell_type": "markdown", "id": "37c93a33", "metadata": {}, "source": [ "### Coverage Steady-State Configurations\n", "\n", "Before advancing the surface geometry, the surface coverages must reach a steady state. This ensures that the reaction rates derived from the local fluxes and coverages are physically meaningful and numerically stable. Convergence is determined using the coverageDeltaThreshold, which defines the minimum relative change in coverage between consecutive iterations. If the change falls below this threshold, the coverages are considered stationary. Alternatively, convergence is enforced after a fixed number of iterations defined by maxCoverageInitIterations, even if the threshold has not been met.\n" ] }, { "cell_type": "code", "execution_count": null, "id": "d5aa29bf", "metadata": {}, "outputs": [], "source": [ "covParams = ps.CoverageParameters()\n", "covParams.tolerance = 1e-4\n", "covParams.maxIterations = 10\n", "process.setParameters(covParams)" ] }, { "cell_type": "markdown", "id": "9c375242", "metadata": {}, "source": [ "#### Logging\n", "\n", "Configure additional intermediate output by setting the [log level](https://viennatools.github.io/ViennaPS/misc/logging.html)." ] }, { "cell_type": "code", "execution_count": null, "id": "ba7ce5c3", "metadata": {}, "outputs": [], "source": [ " # Set log level to intermediate for additional output\n", "ps.Logger.setLogLevel(ps.LogLevel.INTERMEDIATE)" ] }, { "cell_type": "code", "execution_count": null, "id": "d42b307b", "metadata": {}, "outputs": [], "source": [ "# Run the process\n", "process.apply()" ] }, { "cell_type": "code", "execution_count": null, "id": "ca3248e3", "metadata": {}, "outputs": [], "source": [ "domain.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "9c3c9c98", "metadata": {}, "outputs": [], "source": [ "# Save the volume mesh to a file\n", "domain.saveVolumeMesh(\"SF6O2Etching_2\")" ] }, { "cell_type": "code", "execution_count": null, "id": "0a25f2b1", "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 }