{ "cells": [ { "cell_type": "markdown", "id": "b4102fe5", "metadata": {}, "source": [ "# Example of Mass Connector" ] }, { "cell_type": "code", "execution_count": 8, "id": "677f19be", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Fluid: INCOMP::DowQ\n", "Mass flow rate: 0.5[kg/s]\n", "Volume flow rate: 2.2247889882864467[m^3/h]\n", "Temperature: 226.85000000000002[°C]\n", "Pressure: 1.01325[bar]\n", "Spec. enthalpy: 408385.32146991[J/kg]\n", "Spec. entropy: 1039.0927361604681[J/kg/K]\n", "Mass density: 809.0654931667821[kg/m^3]\n", "Quality: None[-]\n", "------------------------------------------------------------------------------------\n", "Fluid: INCOMP::DowQ\n", "Mass flow rate: 0.5[kg/s]\n", "Volume flow rate: 2.2247889882864467[m^3/h]\n", "Temperature: 226.85000000000002[°C]\n", "Pressure: 2.0[bar]\n", "Spec. enthalpy: 408450.51750404155[J/kg]\n", "Spec. entropy: 1038.9792048360432[J/kg/K]\n", "Mass density: 809.0654931667821[kg/m^3]\n", "Quality: None[-]\n" ] } ], "source": [ "from connector.mass_connector import MassConnector\n", "\n", "#------------------Example of a mass connector------------------#\n", "\"What you can do with a mass connector:\"\n", "# Create an instance of the MassConnector class\n", "point = MassConnector()\n", "point.set_properties(T=500, m_dot=0.5, fluid = 'INCOMP::DowQ', P=101325)\n", "\n", "# Print the state of the connector\n", "point.print_resume(unit_T='C', unit_p='bar')\n", "print(\"------------------------------------------------------------------------------------\")\n", "# Reset the pressure to 200000 Pa\n", "point.set_p(200000)\n", "point.print_resume(unit_T='C', unit_p='bar')" ] }, { "cell_type": "code", "execution_count": 10, "id": "ef00e4f9", "metadata": {}, "outputs": [], "source": [ "\"What you cannot do with a mass connector:\"\n", "# Put three properties at the same time\n", "point = MassConnector()\n", "point.set_properties(T=500, m_dot=0.5, fluid = 'INCOMP::DowQ', P=101325, H=100000)" ] } ], "metadata": { "kernelspec": { "display_name": "myenv", "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.12.10" } }, "nbformat": 4, "nbformat_minor": 5 }