{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Describing GMAW processes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import weldx\n", "from weldx import Q_\n", "from weldx.core import TimeSeries as TS\n", "from weldx.welding.processes import GmawProcess" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## spray arc processes" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Note: For some reasons, using integers in Q_ fails upon ASDF reading !\n", "params_spray = dict(\n", " wire_feedrate=Q_(10.0, \"m/min\"),\n", " voltage=TS(data=Q_([40.0, 20.0], \"V\"), time=Q_([0.0, 10.0], \"s\")),\n", " impedance=Q_(10.0, \"percent\"),\n", " characteristic=Q_(5, \"V/A\"),\n", ")\n", "process_spray = GmawProcess(\n", " \"spray\", \"CLOOS\", \"Quinto\", params_spray, tag=\"CLOOS/spray_arc\"\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## pulsed arc processes\n", "### UI modulation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "params_pulse = dict(\n", " wire_feedrate=Q_(10.0, \"m/min\"),\n", " pulse_voltage=Q_(40.0, \"V\"),\n", " pulse_duration=Q_(5.0, \"ms\"),\n", " pulse_frequency=Q_(100.0, \"Hz\"),\n", " base_current=Q_(60.0, \"A\"),\n", ")\n", "process_pulse = GmawProcess(\n", " \"pulse\",\n", " \"CLOOS\",\n", " \"Quinto\",\n", " params_pulse,\n", " tag=\"CLOOS/pulse\",\n", " meta={\"modulation\": \"UI\"},\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### II modulation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "params_pulse_II = dict(\n", " wire_feedrate=Q_(10.0, \"m/min\"),\n", " pulse_current=Q_(0.3, \"kA\"),\n", " pulse_duration=Q_(5.0, \"ms\"),\n", " pulse_frequency=Q_(100.0, \"Hz\"),\n", " base_current=Q_(60.0, \"A\"),\n", ")\n", "process_pulse_II = GmawProcess(\n", " \"pulse\",\n", " \"CLOOS\",\n", " \"Quinto\",\n", " params_pulse_II,\n", " tag=\"CLOOS/pulse\",\n", " meta={\"modulation\": \"II\"},\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## using ASDF\n", "We write the dictionary containing our structured data to an ASDF file using the WeldxFile\n", "class. We pass the tree as a named keyword argument.\n", "The tree will be serialized to ASDF in memory, and we can have a look at the ASDF header." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "tree = {\"spray\": process_spray, \"pulse_UI\": process_pulse, \"pulse_II\": process_pulse_II}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "file = weldx.WeldxFile(tree=tree, mode=\"rw\")\n", "file.header()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "", "language": "python", "name": "" }, "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.9.2" } }, "nbformat": 4, "nbformat_minor": 4 }