diff --git a/scripts/config/pathsim-chem/blocks.json b/scripts/config/pathsim-chem/blocks.json index f3f37531..288a291d 100644 --- a/scripts/config/pathsim-chem/blocks.json +++ b/scripts/config/pathsim-chem/blocks.json @@ -1,14 +1,23 @@ { "$schema": "../schemas/blocks.schema.json", "toolbox": "pathsim-chem", - "importPath": "pathsim_chem.tritium", + "importPath": "pathsim_chem", "categories": { "Chemical": [ "Process", - "Bubbler4", + "ResidenceTime", "Splitter", - "GLC" + "Bubbler4", + "GLC", + "CSTR", + "PFR", + "HeatExchanger", + "FlashDrum", + "Mixer", + "Valve", + "Heater", + "PointKinetics" ] } } diff --git a/src/lib/nodes/generated/blocks.ts b/src/lib/nodes/generated/blocks.ts index 52bdb59c..9123c5c0 100644 --- a/src/lib/nodes/generated/blocks.ts +++ b/src/lib/nodes/generated/blocks.ts @@ -1593,6 +1593,56 @@ export const extractedBlocks: Record = "x/tau" ] }, + "ResidenceTime": { + "blockClass": "ResidenceTime", + "description": "Chemical process block with residence time model.", + "docstringHtml": "

Chemical process block with residence time model.

\n

This block implements an internal 1st order linear ode with\nmultiple inputs, outputs, an internal constant source term\nand no direct passthrough.

\n

The internal ODE with inputs \\(u_i\\) :

\n
\n\\begin{equation*}\n\\dot{x} = - x / \\tau + \\mathrm{src} + \\sum_i \\beta_i u_i\n\\end{equation*}\n
\n

And the output equation for every output i :

\n
\n\\begin{equation*}\ny_i = \\gamma_i x\n\\end{equation*}\n
\n
\n

Parameters

\n
\n
tau : float
\n
residence time, inverse natural frequency (eigenvalue)
\n
betas: None | list[float] | np.ndarray[float]
\n
weights of inputs that are accumulated in state, optional
\n
gammas : None | list[float] | np.ndarray[float]
\n
weights of states (fractions) for output, optional
\n
initial_value : float
\n
initial value of state / initial quantity of process
\n
source_term : float
\n
constant source term / generation term of the process
\n
\n
\n", + "params": { + "tau": { + "type": "integer", + "default": "1", + "description": "residence time, inverse natural frequency (eigenvalue)" + }, + "betas": { + "type": "any", + "default": null, + "description": "weights of inputs that are accumulated in state, optional" + }, + "gammas": { + "type": "any", + "default": null, + "description": "weights of states (fractions) for output, optional" + }, + "initial_value": { + "type": "integer", + "default": "0", + "description": "initial value of state / initial quantity of process" + }, + "source_term": { + "type": "integer", + "default": "0", + "description": "constant source term / generation term of the process" + } + }, + "inputs": null, + "outputs": null + }, + "Splitter": { + "blockClass": "Splitter", + "description": "Splitter block that splits the input signal into multiple", + "docstringHtml": "

Splitter block that splits the input signal into multiple\noutputs weighted with the specified fractions.

\n
\n

Note

\n

The output fractions must sum to one.

\n
\n
\n

Parameters

\n
\n
fractions : np.ndarray | list
\n
fractions to split the input signal into,\nmust sum up to one
\n
\n
\n", + "params": { + "fractions": { + "type": "any", + "default": null, + "description": "fractions to split the input signal into, must sum up to one" + } + }, + "inputs": [ + "in" + ], + "outputs": null + }, "Bubbler4": { "blockClass": "Bubbler4", "description": "Tritium bubbling system with sequential vial collection stages.", @@ -1626,22 +1676,6 @@ export const extractedBlocks: Record = "sample_out" ] }, - "Splitter": { - "blockClass": "Splitter", - "description": "Splitter block that splits the input signal into multiple", - "docstringHtml": "

Splitter block that splits the input signal into multiple\noutputs weighted with the specified fractions.

\n
\n

Note

\n

The output fractions must sum to one.

\n
\n
\n

Parameters

\n
\n
fractions : np.ndarray | list
\n
fractions to split the input signal into,\nmust sum up to one
\n
\n
\n", - "params": { - "fractions": { - "type": "any", - "default": null, - "description": "fractions to split the input signal into, must sum up to one" - } - }, - "inputs": [ - "in" - ], - "outputs": null - }, "GLC": { "blockClass": "GLC", "description": "Counter-current bubble column gas-liquid contactor (GLC) for tritium extraction.", @@ -1699,6 +1733,363 @@ export const extractedBlocks: Record = "n_T_out_liquid", "n_T_out_gas" ] + }, + "CSTR": { + "blockClass": "CSTR", + "description": "Continuous stirred-tank reactor with Arrhenius kinetics and energy balance.", + "docstringHtml": "

Continuous stirred-tank reactor with Arrhenius kinetics and energy balance.

\n

Models a well-mixed tank where a single reaction A -> products occurs with\nnth-order kinetics. The reaction rate follows the Arrhenius temperature\ndependence. An external coolant jacket provides or removes heat.

\n
\n

Mathematical Formulation

\n

The state vector is \\([C_A, T]\\) where \\(C_A\\) is the concentration\nof species A and \\(T\\) is the reactor temperature.

\n
\n\\begin{equation*}\n\\frac{dC_A}{dt} = \\frac{C_{A,in} - C_A}{\\tau} - k(T) \\, C_A^n\n\\end{equation*}\n
\n
\n\\begin{equation*}\n\\frac{dT}{dt} = \\frac{T_{in} - T}{\\tau}\n + \\frac{(-\\Delta H_{rxn})}{\\rho \\, C_p} \\, k(T) \\, C_A^n\n + \\frac{UA}{\\rho \\, C_p \\, V} \\, (T_c - T)\n\\end{equation*}\n
\n

where the Arrhenius rate constant is:

\n
\n\\begin{equation*}\nk(T) = k_0 \\, \\exp\\!\\left(-\\frac{E_a}{R \\, T}\\right)\n\\end{equation*}\n
\n

and the residence time is \\(\\tau = V / F\\).

\n
\n
\n

Parameters

\n
\n
V : float
\n
Reactor volume [m³].
\n
F : float
\n
Volumetric flow rate [m³/s].
\n
k0 : float
\n
Pre-exponential Arrhenius factor [1/s for n=1, (m³/mol)^(n-1)/s].
\n
Ea : float
\n
Activation energy [J/mol].
\n
n : float
\n
Reaction order with respect to species A [-].
\n
dH_rxn : float
\n
Heat of reaction [J/mol]. Negative for exothermic reactions.
\n
rho : float
\n
Fluid density [kg/m³].
\n
Cp : float
\n
Fluid heat capacity [J/(kg·K)].
\n
UA : float
\n
Overall heat transfer coefficient times area [W/K].
\n
C_A0 : float
\n
Initial concentration of A [mol/m³].
\n
T0 : float
\n
Initial reactor temperature [K].
\n
\n
\n", + "params": { + "V": { + "type": "number", + "default": "1.0", + "description": "Reactor volume [m³]." + }, + "F": { + "type": "number", + "default": "0.1", + "description": "Volumetric flow rate [m³/s]." + }, + "k0": { + "type": "number", + "default": "1000000.0", + "description": "Pre-exponential Arrhenius factor [1/s for n=1, (m³/mol)^(n-1)/s]." + }, + "Ea": { + "type": "number", + "default": "50000.0", + "description": "Activation energy [J/mol]." + }, + "n": { + "type": "number", + "default": "1.0", + "description": "Reaction order with respect to species A [-]." + }, + "dH_rxn": { + "type": "number", + "default": "-50000.0", + "description": "Heat of reaction [J/mol]. Negative for exothermic reactions." + }, + "rho": { + "type": "number", + "default": "1000.0", + "description": "Fluid density [kg/m³]." + }, + "Cp": { + "type": "number", + "default": "4184.0", + "description": "Fluid heat capacity [J/(kg·K)]." + }, + "UA": { + "type": "number", + "default": "500.0", + "description": "Overall heat transfer coefficient times area [W/K]." + }, + "C_A0": { + "type": "number", + "default": "0.0", + "description": "Initial concentration of A [mol/m³]." + }, + "T0": { + "type": "number", + "default": "300.0", + "description": "Initial reactor temperature [K]." + } + }, + "inputs": [ + "C_in", + "T_in", + "T_c" + ], + "outputs": [ + "C_out", + "T_out" + ] + }, + "PFR": { + "blockClass": "PFR", + "description": "Plug flow reactor with Arrhenius kinetics and energy balance.", + "docstringHtml": "

Plug flow reactor with Arrhenius kinetics and energy balance.

\n

Discretized tubular reactor divided into N cells along its length.\nEach cell has concentration and temperature states with nth-order\nkinetics and an energy balance including heat of reaction.

\n
\n

Mathematical Formulation

\n

For each cell \\(i = 1, \\ldots, N\\):

\n
\n\\begin{equation*}\n\\frac{dC_i}{dt} = \\frac{F}{V_{cell}} (C_{i-1} - C_i) - k(T_i) \\, C_i^n\n\\end{equation*}\n
\n
\n\\begin{equation*}\n\\frac{dT_i}{dt} = \\frac{F}{V_{cell}} (T_{i-1} - T_i)\n + \\frac{(-\\Delta H_{rxn})}{\\rho \\, C_p} \\, k(T_i) \\, C_i^n\n\\end{equation*}\n
\n

where the Arrhenius rate constant is:

\n
\n\\begin{equation*}\nk(T) = k_0 \\, \\exp\\!\\left(-\\frac{E_a}{R \\, T}\\right)\n\\end{equation*}\n
\n

The state vector is ordered as\n\\([C_1, T_1, C_2, T_2, \\ldots, C_N, T_N]\\).

\n
\n
\n

Parameters

\n
\n
N_cells : int
\n
Number of discretization cells [-].
\n
V : float
\n
Total reactor volume [m³].
\n
F : float
\n
Volumetric flow rate [m³/s].
\n
k0 : float
\n
Pre-exponential Arrhenius factor [1/s for n=1].
\n
Ea : float
\n
Activation energy [J/mol].
\n
n : float
\n
Reaction order [-].
\n
dH_rxn : float
\n
Heat of reaction [J/mol]. Negative for exothermic.
\n
rho : float
\n
Fluid density [kg/m³].
\n
Cp : float
\n
Fluid heat capacity [J/(kg·K)].
\n
C0 : float
\n
Initial concentration [mol/m³].
\n
T0 : float
\n
Initial temperature [K].
\n
\n
\n", + "params": { + "N_cells": { + "type": "integer", + "default": "5", + "description": "Number of discretization cells [-]." + }, + "V": { + "type": "number", + "default": "1.0", + "description": "Total reactor volume [m³]." + }, + "F": { + "type": "number", + "default": "0.1", + "description": "Volumetric flow rate [m³/s]." + }, + "k0": { + "type": "number", + "default": "1000000.0", + "description": "Pre-exponential Arrhenius factor [1/s for n=1]." + }, + "Ea": { + "type": "number", + "default": "50000.0", + "description": "Activation energy [J/mol]." + }, + "n": { + "type": "number", + "default": "1.0", + "description": "Reaction order [-]." + }, + "dH_rxn": { + "type": "number", + "default": "-50000.0", + "description": "Heat of reaction [J/mol]. Negative for exothermic." + }, + "rho": { + "type": "number", + "default": "1000.0", + "description": "Fluid density [kg/m³]." + }, + "Cp": { + "type": "number", + "default": "4184.0", + "description": "Fluid heat capacity [J/(kg·K)]." + }, + "C0": { + "type": "number", + "default": "0.0", + "description": "Initial concentration [mol/m³]." + }, + "T0": { + "type": "number", + "default": "300.0", + "description": "Initial temperature [K]." + } + }, + "inputs": [ + "C_in", + "T_in" + ], + "outputs": [ + "C_out", + "T_out" + ] + }, + "HeatExchanger": { + "blockClass": "HeatExchanger", + "description": "Counter-current shell and tube heat exchanger with discretized cells.", + "docstringHtml": "

Counter-current shell and tube heat exchanger with discretized cells.

\n

The exchanger is divided into N cells along its length. The hot stream\nflows from cell 1 to N, the cold stream flows from cell N to 1\n(counter-current). Each cell exchanges heat proportional to the local\ntemperature difference.

\n
\n

Mathematical Formulation

\n

For each cell \\(i = 1, \\ldots, N\\):

\n
\n\\begin{equation*}\n\\frac{dT_{h,i}}{dt} = \\frac{F_h}{V_{cell,h}} (T_{h,i-1} - T_{h,i})\n - \\frac{UA_{cell}}{\\rho_h C_{p,h} V_{cell,h}} (T_{h,i} - T_{c,i})\n\\end{equation*}\n
\n
\n\\begin{equation*}\n\\frac{dT_{c,i}}{dt} = \\frac{F_c}{V_{cell,c}} (T_{c,i+1} - T_{c,i})\n + \\frac{UA_{cell}}{\\rho_c C_{p,c} V_{cell,c}} (T_{h,i} - T_{c,i})\n\\end{equation*}\n
\n

where \\(T_{h,0} = T_{h,in}\\) and \\(T_{c,N+1} = T_{c,in}\\).

\n

The state vector is ordered as\n\\([T_{h,1}, T_{c,1}, T_{h,2}, T_{c,2}, \\ldots, T_{h,N}, T_{c,N}]\\).

\n
\n
\n

Parameters

\n
\n
N_cells : int
\n
Number of discretization cells along the exchanger [-].
\n
F_h : float
\n
Hot stream volumetric flow rate [m³/s].
\n
F_c : float
\n
Cold stream volumetric flow rate [m³/s].
\n
V_h : float
\n
Total hot-side volume [m³].
\n
V_c : float
\n
Total cold-side volume [m³].
\n
UA : float
\n
Total overall heat transfer coefficient times area [W/K].
\n
rho_h : float
\n
Hot stream density [kg/m³].
\n
Cp_h : float
\n
Hot stream heat capacity [J/(kg·K)].
\n
rho_c : float
\n
Cold stream density [kg/m³].
\n
Cp_c : float
\n
Cold stream heat capacity [J/(kg·K)].
\n
T_h0 : float
\n
Initial hot-side temperature [K].
\n
T_c0 : float
\n
Initial cold-side temperature [K].
\n
\n
\n", + "params": { + "N_cells": { + "type": "integer", + "default": "5", + "description": "Number of discretization cells along the exchanger [-]." + }, + "F_h": { + "type": "number", + "default": "0.1", + "description": "Hot stream volumetric flow rate [m³/s]." + }, + "F_c": { + "type": "number", + "default": "0.1", + "description": "Cold stream volumetric flow rate [m³/s]." + }, + "V_h": { + "type": "number", + "default": "0.5", + "description": "Total hot-side volume [m³]." + }, + "V_c": { + "type": "number", + "default": "0.5", + "description": "Total cold-side volume [m³]." + }, + "UA": { + "type": "number", + "default": "500.0", + "description": "Total overall heat transfer coefficient times area [W/K]." + }, + "rho_h": { + "type": "number", + "default": "1000.0", + "description": "Hot stream density [kg/m³]." + }, + "Cp_h": { + "type": "number", + "default": "4184.0", + "description": "Hot stream heat capacity [J/(kg·K)]." + }, + "rho_c": { + "type": "number", + "default": "1000.0", + "description": "Cold stream density [kg/m³]." + }, + "Cp_c": { + "type": "number", + "default": "4184.0", + "description": "Cold stream heat capacity [J/(kg·K)]." + }, + "T_h0": { + "type": "number", + "default": "370.0", + "description": "Initial hot-side temperature [K]." + }, + "T_c0": { + "type": "number", + "default": "300.0", + "description": "Initial cold-side temperature [K]." + } + }, + "inputs": [ + "T_h_in", + "T_c_in" + ], + "outputs": [ + "T_h_out", + "T_c_out" + ] + }, + "FlashDrum": { + "blockClass": "FlashDrum", + "description": "Binary isothermal flash drum with Raoult's law vapor-liquid equilibrium.", + "docstringHtml": "

Binary isothermal flash drum with Raoult's law vapor-liquid equilibrium.

\n

Models a flash drum with liquid holdup for a binary mixture. Feed enters as\nliquid, vapor and liquid streams exit. Temperature and pressure are specified\nas inputs. VLE is computed algebraically using K-values from Raoult's law:

\n
\n\\begin{equation*}\nK_i = \\frac{P_{sat,i}(T)}{P}\n\\end{equation*}\n
\n

where the Antoine equation gives the saturation pressure:

\n
\n\\begin{equation*}\n\\ln P_{sat,i} = A_i - \\frac{B_i}{T + C_i}\n\\end{equation*}\n
\n

The Rachford-Rice equation determines the vapor fraction \\(\\beta\\):

\n
\n\\begin{equation*}\n\\sum_i \\frac{z_i (K_i - 1)}{1 + \\beta (K_i - 1)} = 0\n\\end{equation*}\n
\n

For a binary system this has the analytical solution:

\n
\n\\begin{equation*}\n\\beta = -\\frac{z_1(K_1 - 1) + z_2(K_2 - 1)}{(K_1 - 1)(K_2 - 1)}\n\\end{equation*}\n
\n
\n

Dynamic States

\n

The holdup moles of each component in the liquid phase:

\n
\n\\begin{equation*}\n\\frac{dN_i}{dt} = F z_i - V y_i - L x_i\n\\end{equation*}\n
\n
\n
\n

Parameters

\n
\n
holdup : float
\n
Total liquid holdup [mol]. Assumed approximately constant.
\n
antoine_A : array_like
\n
Antoine A parameters for each component [ln(Pa)].
\n
antoine_B : array_like
\n
Antoine B parameters for each component [K].
\n
antoine_C : array_like
\n
Antoine C parameters for each component [K].
\n
N0 : array_like or None
\n
Initial component holdup moles [mol]. If None, equal split assumed.
\n
\n
\n", + "params": { + "holdup": { + "type": "number", + "default": "100.0", + "description": "Total liquid holdup [mol]. Assumed approximately constant." + }, + "antoine_A": { + "type": "any", + "default": null, + "description": "Antoine A parameters for each component [ln(Pa)]." + }, + "antoine_B": { + "type": "any", + "default": null, + "description": "Antoine B parameters for each component [K]." + }, + "antoine_C": { + "type": "any", + "default": null, + "description": "Antoine C parameters for each component [K]." + }, + "N0": { + "type": "any", + "default": null, + "description": "Initial component holdup moles [mol]. If None, equal split assumed." + } + }, + "inputs": [ + "F", + "z_1", + "T", + "P" + ], + "outputs": [ + "V_rate", + "L_rate", + "y_1", + "x_1" + ] + }, + "Mixer": { + "blockClass": "Mixer", + "description": "Algebraic 2-stream mixer with mass and energy balance.", + "docstringHtml": "

Algebraic 2-stream mixer with mass and energy balance.

\n

Mixes two streams by mass balance (additive flows) and energy balance\n(flow-weighted temperature mixing). No phase change or reaction.

\n
\n

Mathematical Formulation

\n
\n\\begin{equation*}\nF_{out} = F_1 + F_2\n\\end{equation*}\n
\n
\n\\begin{equation*}\nT_{out} = \\frac{F_1 \\, T_1 + F_2 \\, T_2}{F_{out}}\n\\end{equation*}\n
\n
\n
\n

Parameters

\n

None — this is a purely algebraic block.

\n
\n", + "params": {}, + "inputs": [ + "F_1", + "T_1", + "F_2", + "T_2" + ], + "outputs": [ + "F_out", + "T_out" + ] + }, + "Valve": { + "blockClass": "Valve", + "description": "Algebraic pressure-drop valve with standard flow equation.", + "docstringHtml": "

Algebraic pressure-drop valve with standard flow equation.

\n

Models an isenthalpic valve (no temperature change for liquids)\nwith flow proportional to the square root of the pressure drop.

\n
\n

Mathematical Formulation

\n
\n\\begin{equation*}\nF = C_v \\sqrt{|P_{in} - P_{out}|} \\cdot \\mathrm{sign}(P_{in} - P_{out})\n\\end{equation*}\n
\n
\n\\begin{equation*}\nT_{out} = T_{in}\n\\end{equation*}\n
\n
\n
\n

Parameters

\n
\n
Cv : float
\n
Valve flow coefficient. Must be positive.
\n
\n
\n", + "params": { + "Cv": { + "type": "number", + "default": "1.0", + "description": "Valve flow coefficient. Must be positive." + } + }, + "inputs": [ + "P_in", + "P_out", + "T_in" + ], + "outputs": [ + "F", + "T_out" + ] + }, + "Heater": { + "blockClass": "Heater", + "description": "Algebraic duty-specified heater/cooler with no thermal mass.", + "docstringHtml": "

Algebraic duty-specified heater/cooler with no thermal mass.

\n

Raises or lowers the stream temperature by a specified heat duty.\nFlow passes through unchanged.

\n
\n

Mathematical Formulation

\n
\n\\begin{equation*}\nT_{out} = T_{in} + \\frac{Q}{F \\, \\rho \\, C_p}\n\\end{equation*}\n
\n
\n\\begin{equation*}\nF_{out} = F_{in}\n\\end{equation*}\n
\n
\n
\n

Parameters

\n
\n
rho : float
\n
Fluid density [kg/m³].
\n
Cp : float
\n
Fluid heat capacity [J/(kg·K)].
\n
\n
\n", + "params": { + "rho": { + "type": "number", + "default": "1000.0", + "description": "Fluid density [kg/m³]." + }, + "Cp": { + "type": "number", + "default": "4184.0", + "description": "Fluid heat capacity [J/(kg·K)]." + } + }, + "inputs": [ + "F", + "T_in", + "Q" + ], + "outputs": [ + "F_out", + "T_out" + ] + }, + "PointKinetics": { + "blockClass": "PointKinetics", + "description": "Reactor point kinetics equations with delayed neutron precursors.", + "docstringHtml": "

Reactor point kinetics equations with delayed neutron precursors.

\n

Models the time-dependent neutron population in a nuclear reactor using\nthe point kinetics equations (PKE). The neutron density responds to\nreactivity changes through prompt fission and delayed neutron emission\nfrom G precursor groups.

\n
\n

Mathematical Formulation

\n

The state vector is \\([n, C_1, C_2, \\ldots, C_G]\\) where \\(n\\)\nis the neutron density (or power) and \\(C_i\\) are the delayed neutron\nprecursor concentrations.

\n
\n\\begin{equation*}\n\\frac{dn}{dt} = \\frac{\\rho - \\beta}{\\Lambda} \\, n\n + \\sum_{i=1}^{G} \\lambda_i \\, C_i + S\n\\end{equation*}\n
\n
\n\\begin{equation*}\n\\frac{dC_i}{dt} = \\frac{\\beta_i}{\\Lambda} \\, n\n - \\lambda_i \\, C_i \\qquad i = 1, \\ldots, G\n\\end{equation*}\n
\n

where \\(\\beta = \\sum_i \\beta_i\\) is the total delayed neutron\nfraction and \\(\\Lambda\\) is the prompt neutron generation time.

\n
\n
\n

Parameters

\n
\n
n0 : float
\n
Initial neutron density [-]. Default 1.0 (normalized).
\n
Lambda : float
\n
Prompt neutron generation time [s].
\n
beta : array_like
\n
Delayed neutron fractions per group [-].
\n
lam : array_like
\n
Precursor decay constants per group [1/s].
\n
\n
\n", + "params": { + "n0": { + "type": "number", + "default": "1.0", + "description": "Initial neutron density [-]. Default 1.0 (normalized)." + }, + "Lambda": { + "type": "number", + "default": "1e-05", + "description": "Prompt neutron generation time [s]." + }, + "beta": { + "type": "any", + "default": null, + "description": "Delayed neutron fractions per group [-]." + }, + "lam": { + "type": "any", + "default": null, + "description": "Precursor decay constants per group [1/s]." + } + }, + "inputs": [ + "rho", + "S" + ], + "outputs": [ + "n" + ] } }; @@ -1709,7 +2100,7 @@ export const blockConfig: Record = { Logic: ["GreaterThan", "LessThan", "Equal", "LogicAnd", "LogicOr", "LogicNot"], Mixed: ["SampleHold", "FIR", "ADC", "DAC", "Counter", "CounterUp", "CounterDown", "Relay", "Wrapper"], Recording: ["Scope", "Spectrum"], - Chemical: ["Process", "Bubbler4", "Splitter", "GLC"], + Chemical: ["Process", "ResidenceTime", "Splitter", "Bubbler4", "GLC", "CSTR", "PFR", "HeatExchanger", "FlashDrum", "Mixer", "Valve", "Heater", "PointKinetics"], }; export const blockImportPaths: Record = { @@ -1721,11 +2112,12 @@ export const blockImportPaths: Record = { "AntiWindupPID": "pathsim.blocks", "Atan2": "pathsim.blocks", "Backlash": "pathsim.blocks", - "Bubbler4": "pathsim_chem.tritium", + "Bubbler4": "pathsim_chem", "ButterworthBandpassFilter": "pathsim.blocks", "ButterworthBandstopFilter": "pathsim.blocks", "ButterworthHighpassFilter": "pathsim.blocks", "ButterworthLowpassFilter": "pathsim.blocks", + "CSTR": "pathsim_chem", "ChirpPhaseNoiseSource": "pathsim.blocks", "Clip": "pathsim.blocks", "ClockSource": "pathsim.blocks", @@ -1743,10 +2135,13 @@ export const blockImportPaths: Record = { "Equal": "pathsim.blocks", "Exp": "pathsim.blocks", "FIR": "pathsim.blocks", + "FlashDrum": "pathsim_chem", "Function": "pathsim.blocks", - "GLC": "pathsim_chem.tritium", + "GLC": "pathsim_chem", "GaussianPulseSource": "pathsim.blocks", "GreaterThan": "pathsim.blocks", + "HeatExchanger": "pathsim_chem", + "Heater": "pathsim_chem", "Integrator": "pathsim.blocks", "LUT": "pathsim.blocks", "LUT1D": "pathsim.blocks", @@ -1757,27 +2152,31 @@ export const blockImportPaths: Record = { "LogicAnd": "pathsim.blocks", "LogicNot": "pathsim.blocks", "LogicOr": "pathsim.blocks", + "Mixer": "pathsim_chem", "Mod": "pathsim.blocks", "Multiplier": "pathsim.blocks", "ODE": "pathsim.blocks", + "PFR": "pathsim_chem", "PID": "pathsim.blocks", "PT1": "pathsim.blocks", "PT2": "pathsim.blocks", "PinkNoise": "pathsim.blocks", + "PointKinetics": "pathsim_chem", "Pow": "pathsim.blocks", - "Process": "pathsim_chem.tritium", + "Process": "pathsim_chem", "PulseSource": "pathsim.blocks", "RandomNumberGenerator": "pathsim.blocks", "RateLimiter": "pathsim.blocks", "Relay": "pathsim.blocks", "Rescale": "pathsim.blocks", + "ResidenceTime": "pathsim_chem", "SampleHold": "pathsim.blocks", "Scope": "pathsim.blocks", "Sin": "pathsim.blocks", "SinusoidalSource": "pathsim.blocks", "Source": "pathsim.blocks", "Spectrum": "pathsim.blocks", - "Splitter": "pathsim_chem.tritium", + "Splitter": "pathsim_chem", "Sqrt": "pathsim.blocks", "SquareWaveSource": "pathsim.blocks", "StateSpace": "pathsim.blocks", @@ -1788,6 +2187,7 @@ export const blockImportPaths: Record = { "TransferFunctionNumDen": "pathsim.blocks", "TransferFunctionZPG": "pathsim.blocks", "TriangleWaveSource": "pathsim.blocks", + "Valve": "pathsim_chem", "WhiteNoise": "pathsim.blocks", "Wrapper": "pathsim.blocks", }; diff --git a/src/lib/nodes/shapes/registry.ts b/src/lib/nodes/shapes/registry.ts index a46ded2e..b82b69e2 100644 --- a/src/lib/nodes/shapes/registry.ts +++ b/src/lib/nodes/shapes/registry.ts @@ -90,7 +90,8 @@ const categoryShapeMap: Record = { Logic: 'rect', Mixed: 'mixed', Recording: 'pill', - Subsystem: 'rect' + Subsystem: 'rect', + Chemical: 'rect' }; /** Get shape ID for a category */ diff --git a/src/lib/types/nodes.ts b/src/lib/types/nodes.ts index 0d247201..c20a05cb 100644 --- a/src/lib/types/nodes.ts +++ b/src/lib/types/nodes.ts @@ -47,7 +47,8 @@ export type NodeCategory = | 'Logic' | 'Mixed' | 'Recording' - | 'Subsystem'; + | 'Subsystem' + | 'Chemical'; /** Node shape override (defaults based on category if not specified) */ export type NodeShape = 'pill' | 'rect' | 'circle' | 'diamond';