Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pathview/data/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@
"blockClass": "Splitter",
"importPath": "pathsim.blocks",
"params": [
"fractions",
"carrier"
"fractions"
],
"inputs": [
"in"
Expand Down
3 changes: 1 addition & 2 deletions scripts/generated/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@
"blockClass": "Splitter",
"importPath": "pathsim.blocks",
"params": [
"fractions",
"carrier"
"fractions"
],
"inputs": [
"in"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants/dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Auto-generated by scripts/extract.py - DO NOT EDIT
// Source: scripts/config/requirements-pyodide.txt, scripts/config/pyodide.json

export const PATHVIEW_VERSION = '0.20.0';
export const PATHVIEW_VERSION = '0.21.0';

export const PYODIDE_VERSION = '0.29.4';
export const PYODIDE_CDN_URL = `https://cdn.jsdelivr.net/pyodide/v${PYODIDE_VERSION}/full/pyodide.mjs`;
Expand Down
7 changes: 1 addition & 6 deletions src/lib/nodes/generated/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1232,17 +1232,12 @@ export const extractedBlocks: Record<string, ExtractedBlock> =
"Splitter": {
"blockClass": "Splitter",
"description": "Splits the input into multiple outputs, weighted with fractions (SIMO).",
"docstringHtml": "<p>Splits the input into multiple outputs, weighted with fractions (SIMO).</p>\n<div class=\"math\">\n\\begin{equation*}\ny_i(t) = f_i \\cdot u(t)\n\\end{equation*}\n</div>\n<p>The fractions have to sum up to one, so the splitter conserves what flows\nthrough it, for example a mass or molar flow.</p>\n<p>With a carrier, the input is a stream of multiple channels, for example\nthe flows of multiple species. Every output is a stream with the same\nlayout and each channel is split with the same fractions.</p>\n<div class=\"section\" id=\"example\">\n<h3>Example</h3>\n<p>Split a flow into two outputs with 90 and 10 percent:</p>\n<pre class=\"code python literal-block\">\n<span class=\"name\">S</span> <span class=\"operator\">=</span> <span class=\"name\">Splitter</span><span class=\"punctuation\">([</span><span class=\"literal number float\">0.9</span><span class=\"punctuation\">,</span> <span class=\"literal number float\">0.1</span><span class=\"punctuation\">])</span>\n</pre>\n<p>Split a stream of species flows, the ports 'in', 'out_0' and 'out_1'\nhave the layout of the carrier:</p>\n<pre class=\"code python literal-block\">\n<span class=\"keyword\">class</span><span class=\"whitespace\"> </span><span class=\"name class\">Species</span><span class=\"punctuation\">(</span><span class=\"name\">Carrier</span><span class=\"punctuation\">):</span><span class=\"whitespace\">\n</span> <span class=\"name\">keys</span> <span class=\"operator\">=</span> <span class=\"punctuation\">(</span><span class=\"literal string double\">&quot;H&quot;</span><span class=\"punctuation\">,</span> <span class=\"literal string double\">&quot;D&quot;</span><span class=\"punctuation\">,</span> <span class=\"literal string double\">&quot;T&quot;</span><span class=\"punctuation\">)</span><span class=\"whitespace\">\n\n</span><span class=\"name\">S</span> <span class=\"operator\">=</span> <span class=\"name\">Splitter</span><span class=\"punctuation\">([</span><span class=\"literal number float\">0.9</span><span class=\"punctuation\">,</span> <span class=\"literal number float\">0.1</span><span class=\"punctuation\">],</span> <span class=\"name\">carrier</span><span class=\"operator\">=</span><span class=\"name\">Species</span><span class=\"punctuation\">())</span><span class=\"whitespace\">\n\n</span><span class=\"name\">C</span> <span class=\"operator\">=</span> <span class=\"name\">Connection</span><span class=\"punctuation\">(</span><span class=\"name\">S</span><span class=\"punctuation\">[</span><span class=\"literal string double\">&quot;out_1&quot;</span><span class=\"punctuation\">],</span> <span class=\"name\">B</span><span class=\"punctuation\">[</span><span class=\"literal string double\">&quot;in&quot;</span><span class=\"punctuation\">])</span>\n</pre>\n</div>\n<div class=\"section\" id=\"note\">\n<h3>Note</h3>\n<p>This block is purely algebraic and its operation (<cite>op_alg</cite>) will be called\nmultiple times per timestep, each time when <cite>Simulation._update(t)</cite> is\ncalled in the global simulation loop.</p>\n</div>\n<div class=\"section\" id=\"parameters\">\n<h3>Parameters</h3>\n<dl class=\"docutils\">\n<dt>fractions <span class=\"classifier-delimiter\">:</span> <span class=\"classifier\">array_like</span></dt>\n<dd>fractions of the input for each output, must sum up to one</dd>\n<dt>carrier <span class=\"classifier-delimiter\">:</span> <span class=\"classifier\">Carrier | None</span></dt>\n<dd>layout of the input and output streams, single channel if 'None'</dd>\n</dl>\n</div>\n<div class=\"section\" id=\"attributes\">\n<h3>Attributes</h3>\n<dl class=\"docutils\">\n<dt>op_alg <span class=\"classifier-delimiter\">:</span> <span class=\"classifier\">Operator</span></dt>\n<dd>internal algebraic operator</dd>\n</dl>\n</div>\n",
"docstringHtml": "<p>Splits the input into multiple outputs, weighted with fractions (SIMO).</p>\n<div class=\"math\">\n\\begin{equation*}\ny_i(t) = f_i \\cdot u(t)\n\\end{equation*}\n</div>\n<p>The fractions have to sum up to one, so the splitter conserves what flows\nthrough it, for example a mass or molar flow.</p>\n<div class=\"section\" id=\"example\">\n<h3>Example</h3>\n<p>Split a flow into two outputs with 90 and 10 percent:</p>\n<pre class=\"code python literal-block\">\n<span class=\"name\">S</span> <span class=\"operator\">=</span> <span class=\"name\">Splitter</span><span class=\"punctuation\">([</span><span class=\"literal number float\">0.9</span><span class=\"punctuation\">,</span> <span class=\"literal number float\">0.1</span><span class=\"punctuation\">])</span><span class=\"whitespace\">\n\n</span><span class=\"name\">C</span> <span class=\"operator\">=</span> <span class=\"name\">Connection</span><span class=\"punctuation\">(</span><span class=\"name\">S</span><span class=\"punctuation\">[</span><span class=\"literal string double\">&quot;out_1&quot;</span><span class=\"punctuation\">],</span> <span class=\"name\">B</span><span class=\"punctuation\">)</span>\n</pre>\n</div>\n<div class=\"section\" id=\"note\">\n<h3>Note</h3>\n<p>This block is purely algebraic and its operation (<cite>op_alg</cite>) will be called\nmultiple times per timestep, each time when <cite>Simulation._update(t)</cite> is\ncalled in the global simulation loop.</p>\n</div>\n<div class=\"section\" id=\"parameters\">\n<h3>Parameters</h3>\n<dl class=\"docutils\">\n<dt>fractions <span class=\"classifier-delimiter\">:</span> <span class=\"classifier\">array_like</span></dt>\n<dd>fractions of the input for each output, must sum up to one</dd>\n</dl>\n</div>\n<div class=\"section\" id=\"attributes\">\n<h3>Attributes</h3>\n<dl class=\"docutils\">\n<dt>op_alg <span class=\"classifier-delimiter\">:</span> <span class=\"classifier\">Operator</span></dt>\n<dd>internal algebraic operator</dd>\n</dl>\n</div>\n",
"params": {
"fractions": {
"type": "any",
"default": null,
"description": "fractions of the input for each output, must sum up to one"
},
"carrier": {
"type": "any",
"default": null,
"description": "layout of the input and output streams, single channel if 'None'"
}
},
"inputs": [
Expand Down
Loading
Loading