Skip to content

Pipe Network

DWSIM Plus

Available with a DWSIM Plus (Patreon) subscription.

Pipe Network unit operation: a flowsheet block that contains a network of sources, sinks, nodes, pipe segments and equipment (valves, pumps, compressors, separators, wells, relief devices and others) drawn on its own diagram, and solves the pressures and flows of the whole network against the material streams connected to its boundary ports.

DWSIM.UnitOperations.PipeNetworkUnitOperation
Assembly DWSIM.UnitOperations.PipeNetwork.dll · Object ← BaseClass ← UnitOpBaseClass ← PipeNetworkUnitOperation

At a glance

Pipe Network in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Supply
Inlet, material 1
Inlet, material 2
Inlet, material 3
Inlet, material 4
Inlet, material 5
Inlet, material 6
Inlet, material 7
Inlet, material 8
Inlet, material 9
Inlet, material 10
Inlet, material 11
Inlet, material 12
Inlet, material 13
Inlet, material 14
Inlet, material 15
Inlet, material 16
Inlet, material 17
Inlet, material 18
Inlet, material 19
Inlet, material 20
Inlet, material 21
Inlet, material 22
Inlet, material 23
Inlet, material 24
Inlet, material 25
Inlet, material 26
Inlet, material 27
Inlet, material 28
Inlet, material 29
Outlet, material 0 Demand-1
Outlet, material 1 Demand-2
Outlet, material 2
Outlet, material 3
Outlet, material 4
Outlet, material 5
Outlet, material 6
Outlet, material 7
Outlet, material 8
Outlet, material 9
Outlet, material 10
Outlet, material 11
Outlet, material 12
Outlet, material 13
Outlet, material 14
Outlet, material 15
Outlet, material 16
Outlet, material 17
Outlet, material 18
Outlet, material 19
Outlet, material 20
Outlet, material 21
Outlet, material 22
Outlet, material 23
Outlet, material 24
Outlet, material 25
Outlet, material 26
Outlet, material 27
Outlet, material 28
Outlet, material 29

Example

This code runs on every build of this site, and the output below is what it printed.

fs = (Flowsheet.Create("PipeNetworkExample")
      .WithCompound("Water")
      .WithPropertyPackage(PropertyPackages.SteamTables))

net = fs.AddPipeNetwork("NET-1")   # nodal Newton solver, incompressible model for water

# Each Add* places a block inside the network and returns its node; As[T]() gives the block.
res = net.AddReservoir("RES")
n1, n2, n3, n4 = (net.AddNode(t) for t in ("N1", "N2", "N3", "N4"))
main, br1, br2 = (net.AddWaterPipe(t) for t in ("MAIN", "BR1", "BR2"))
d1, d2 = net.AddSink("D1"), net.AddSink("D2")

reservoir = res.As[Reservoir]()
reservoir.ElevationM = 50.0          # reservoir base 50 m above the network
reservoir.LevelM = 5.0               # 5 m of water above the base
for node, length, diameter in ((main, 800.0, 0.25), (br1, 400.0, 0.15), (br2, 600.0, 0.15)):
    pipe = node.As[WaterPipe]()
    pipe.LengthM = length
    pipe.DiameterM = diameter
    pipe.RoughnessM = 4.6e-5         # commercial steel
for node, demand in ((d1, 20.0), (d2, 15.0)):
    sink = node.As[Sink]()
    sink.BoundarySpec = BoundarySpecification.MassFlow
    sink.MassFlowSpec = demand       # kg/s

# Pipes join nodes; boundaries attach to nodes, never straight to a pipe.
net.ConnectChain(res, n1, main, n2, br1, n3, d1)
net.ConnectChain(n2, br2, n4, d2)

# Every boundary needs a flowsheet stream: a feed for the reservoir, a product for each sink.
for node, tag in ((res, "Supply"), (d1, "Demand-1"), (d2, "Demand-2")):
    stream = (net.AttachStream(node, tag)
              .SetCompoundMassFlow("Water", 10.0)
              .At(Q.Celsius(20.0), Q.Bar(5.0)))
    stream.Object.Calculate()        # initial state; the network overwrites it

net.AutoLayout()
fs.Solve()

for node in (n1, n2, n3, n4):
    print(f"{node.Tag} pressure = {node.As[Node]().Pressure / 1e5:.3f} bar")
for node in (main, br1, br2):
    pipe = node.As[WaterPipe]()
    print(f"{node.Tag:4s} flow = {pipe.MassFlow:5.1f} kg/s, pressure drop = {pipe.PressureDropResult / 1000:5.1f} kPa")

Output

N1 pressure = 6.407 bar
N2 pressure = 6.266 bar
N3 pressure = 5.955 bar
N4 pressure = 5.994 bar
MAIN flow =  35.0 kg/s, pressure drop =  14.1 kPa
BR1  flow =  20.0 kg/s, pressure drop =  31.1 kPa
BR2  flow =  15.0 kg/s, pressure drop =  27.2 kPa

DWSIM 10.2.11.0, generated 2026-10-08.

Properties

IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.

All 141 properties
ID Name Unit (SI) Input
Initialize Streams yes
Solver yes
Nodal Flow Model yes
Compressible Gas Energy Model yes
Nodal Max Outer Iterations yes
Nodal Stall Iterations yes
Nodal Stall Improvement yes
Nodal Outer Tolerance yes
Nodal Outer Temperature Tolerance K (difference) yes
Nodal Flow Tolerance yes
Nodal Composition Tolerance yes
Refine With Direct Evaluation yes
Richardson Extrapolation yes
Direct Evaluation Time Limit (s) yes
Use PVT Table yes
PVT Table Nodes yes
Direct Evaluation Too Slow yes
Solver Progress After (s) yes
Diagram Refresh Rate yes
Nodal Outer Relaxation yes
Solver Relative Error Tolerance yes
Solver Max Iterations yes
Default Pressure Drop Correlation yes
Default Pressure Tolerance Pa yes
Default Temperature Tolerance K (difference) yes
Default Max Pressure Iterations yes
Default Max Temperature Iterations yes
Accelerate Pipe Energy Balance yes
Pipe Flash Pressure Trigger yes
Pipe Flash Temperature Trigger K (difference) yes
Reset Warm Start yes
Status result
Warm Start result
Active Relief Scenario yes
Relief Scenarios result
Governing Relief Scenario result
Relief Scenarios Pass result
Number of Network Objects result
Mass Balance Residual result
Pressure Balance Residual result
Energy Balance Residual result
RES: Base Elevation m yes
RES: Liquid Level m yes
RES: Surface Pressure Pa yes
RES: Fluid Density kg/m3 yes
RES: Datum Pressure Pa result
RES: Pressure Pa result
RES: Temperature K result
RES: Mass Flow kg/s result
RES: Molar Flow mol/s result
RES: Volumetric Flow m3/s result
RES: Residual Error result
N1: Pressure Estimate Pa yes
N1: Rigorous Heat Balance yes
N1: Pressure Pa result
N1: Temperature K result
N1: Mass Flow kg/s result
N1: Molar Flow mol/s result
N1: Volumetric Flow m3/s result
N1: Mass Balance Residual result
N1: Pressure Balance Residual result
N1: Energy Balance Residual result
N2: Pressure Estimate Pa yes
N2: Rigorous Heat Balance yes
N2: Pressure Pa result
N2: Temperature K result
N2: Mass Flow kg/s result
N2: Molar Flow mol/s result
N2: Volumetric Flow m3/s result
N2: Mass Balance Residual result
N2: Pressure Balance Residual result
N2: Energy Balance Residual result
N3: Pressure Estimate Pa yes
N3: Rigorous Heat Balance yes
N3: Pressure Pa result
N3: Temperature K result
N3: Mass Flow kg/s result
N3: Molar Flow mol/s result
N3: Volumetric Flow m3/s result
N3: Mass Balance Residual result
N3: Pressure Balance Residual result
N3: Energy Balance Residual result
N4: Pressure Estimate Pa yes
N4: Rigorous Heat Balance yes
N4: Pressure Pa result
N4: Temperature K result
N4: Mass Flow kg/s result
N4: Molar Flow mol/s result
N4: Volumetric Flow m3/s result
N4: Mass Balance Residual result
N4: Pressure Balance Residual result
N4: Energy Balance Residual result
MAIN: Length m yes
MAIN: Diameter mm yes
MAIN: Roughness m yes
MAIN: Elevation Change m yes
MAIN: Hazen-Williams C yes
MAIN: Use Hazen-Williams yes
MAIN: Mass Flow kg/s result
MAIN: Volumetric Flow m3/s result
MAIN: Pressure Drop Pa result
BR1: Length m yes
BR1: Diameter mm yes
BR1: Roughness m yes
BR1: Elevation Change m yes
BR1: Hazen-Williams C yes
BR1: Use Hazen-Williams yes
BR1: Mass Flow kg/s result
BR1: Volumetric Flow m3/s result
BR1: Pressure Drop Pa result
BR2: Length m yes
BR2: Diameter mm yes
BR2: Roughness m yes
BR2: Elevation Change m yes
BR2: Hazen-Williams C yes
BR2: Use Hazen-Williams yes
BR2: Mass Flow kg/s result
BR2: Volumetric Flow m3/s result
BR2: Pressure Drop Pa result
D1: Boundary Specification yes
D1: Pressure Setpoint Pa yes
D1: Mass Flow Setpoint kg/s yes
D1: Molar Flow Setpoint mol/s yes
D1: Volumetric Flow Setpoint m3/s yes
D1: Pressure Pa result
D1: Temperature K result
D1: Mass Flow kg/s result
D1: Molar Flow mol/s result
D1: Volumetric Flow m3/s result
D1: Residual Error result
D2: Boundary Specification yes
D2: Pressure Setpoint Pa yes
D2: Mass Flow Setpoint kg/s yes
D2: Molar Flow Setpoint mol/s yes
D2: Volumetric Flow Setpoint m3/s yes
D2: Pressure Pa result
D2: Temperature K result
D2: Mass Flow kg/s result
D2: Molar Flow mol/s result
D2: Volumetric Flow m3/s result
D2: Residual Error result

Learn more

API members

Public members declared by this class. Inherited members are documented on the base classes.

Constructors

PipeNetworkUnitOperation(): Initializes a new default instance of the PipeNetworkUnitOperation class with an empty network, the diagram surface...

Initializes a new default instance of the PipeNetworkUnitOperation class with an empty network, the diagram surface and the prototypes of every available block type.

public PipeNetworkUnitOperation()
Public Sub New()

Properties

ActiveReliefScenario: The relief scenario imposed on the relief devices before every solve; empty leaves each device's own relieving rate...

The relief scenario imposed on the relief devices before every solve; empty leaves each device's own relieving rate in force.

public string ActiveReliefScenario { get; set; }
Public Property ActiveReliefScenario As String

ComponentDescription: Gets or sets the CAPE-OPEN component description for this unit operation.

Gets or sets the CAPE-OPEN component description for this unit operation.

public override string ComponentDescription { get; set; }
Public Overrides Property ComponentDescription As String

CompressibleGasEnergyModel: Energy treatment of the compressible-gas branches: adiabatic (Fanno) or isothermal.

Energy treatment of the compressible-gas branches: adiabatic (Fanno) or isothermal.

public CompressibleGasModel CompressibleGasEnergyModel { get; set; }
Public Property CompressibleGasEnergyModel As CompressibleGasModel

Description: Gets the description of this unit operation type ('Pipe Network Unit Operation').

Gets the description of this unit operation type ("Pipe Network Unit Operation").

public string Description { get; }
Public ReadOnly Property Description As String

DirectEvaluationTimeLimit: Cost ceiling, in seconds, for evaluating the pipes directly instead of through the fitted surrogate.

Cost ceiling, in seconds, for evaluating the pipes directly instead of through the fitted surrogate. Direct evaluation costs a full hydraulic profile per dP and per derivative: cheap on a surface network, ruinous on a well whose tubing is discretized into many increments (4.6 s against 700+ s on the samples). A previous solve's wall time is the only measure of which kind of network this is, so it governs BOTH the refinement pass and whether a warm-started solve drops the surrogate.

public double DirectEvaluationTimeLimit { get; set; }
Public Property DirectEvaluationTimeLimit As Double

DirectEvaluationTooSlow: Set the first time a direct-evaluation run on THIS network had to be abandoned on the clock, and saved with the...

Set the first time a direct-evaluation run on THIS network had to be abandoned on the clock, and saved with the flowsheet. The cost of evaluating the pipes directly cannot be predicted (a network whose surrogate pass takes seconds can need minutes without the fit), so it is measured once and remembered; keeping it in memory only would make every reopening of the file pay the discovery again. Clear it after changing the network's geometry.

public bool DirectEvaluationTooSlow { get; set; }
Public Property DirectEvaluationTooSlow As Boolean

DynamicDiagramRefreshRate: Refresh the open network editor every N steps of a dynamic run.

Refresh the open network editor every N steps of a dynamic run. Rebuilding it is not free: it clears both connection grids, lists every material stream in the flowsheet and builds a fresh thermal profile editor, all of which a fast integration would otherwise do at every step. 0 leaves the editor alone until the run ends; 1, the default, is what it always did.

public int DynamicDiagramRefreshRate { get; set; }
Public Property DynamicDiagramRefreshRate As Integer

GlobalPipeThermalProperties: Gets or sets the thermal profile (heat exchange with the surroundings) applied to every pipe segment that uses the...

Gets or sets the thermal profile (heat exchange with the surroundings) applied to every pipe segment that uses the network's global settings.

public ThermalEditorDefinitions GlobalPipeThermalProperties { get; set; }
Public Property GlobalPipeThermalProperties As ThermalEditorDefinitions

InitializeStreams: Gets or sets whether the next solve rebuilds the internal streams and initial estimates from the boundary...

Gets or sets whether the next solve rebuilds the internal streams and initial estimates from the boundary specifications instead of starting from the previous solution. Set automatically when the network topology changes and cleared after a successful solve. Default true.

public bool InitializeStreams { get; set; }
Public Property InitializeStreams As Boolean

IsPremium: Gets a value indicating whether this unit operation requires a premium (Patreon) subscription.

Gets a value indicating whether this unit operation requires a premium (Patreon) subscription. Always true.

public bool IsPremium { get; }
Public ReadOnly Property IsPremium As Boolean

MobileCompatible: Gets a value indicating whether this unit operation is compatible with mobile interfaces.

Gets a value indicating whether this unit operation is compatible with mobile interfaces. Always false.

public override bool MobileCompatible { get; }
Public Overrides ReadOnly Property MobileCompatible As Boolean

NetworkGraphicObjects: Gets or sets the graphic objects of the network diagram, keyed by the name of the block each one represents.

Gets or sets the graphic objects of the network diagram, keyed by the name of the block each one represents.

public Dictionary<string, IGraphicObject> NetworkGraphicObjects { get; set; }
Public Property NetworkGraphicObjects As Dictionary(Of String, IGraphicObject)

NetworkObjects: Gets or sets the blocks of the network (sources, sinks, nodes, pipes, equipment), keyed by their internal name.

Gets or sets the blocks of the network (sources, sinks, nodes, pipes, equipment), keyed by their internal name.

public Dictionary<string, ISimulationObject> NetworkObjects { get; set; }
Public Property NetworkObjects As Dictionary(Of String, ISimulationObject)

NodalCompositionTolerance: Mole-fraction change tolerance of the compositional outer loop.

Mole-fraction change tolerance of the compositional outer loop. The composition sweep is the slowest of the four coupled variables and was the one the stopping rule never checked: on a gas-lifted or commingled network the loop would stop with the pressures settled to 1e-7 Pa while the mixture at the injection node was still moving by ~1e-4 per iteration, and that mixture sets the holdup, hence the branch ΔP, hence the rate.

public double NodalCompositionTolerance { get; set; }
Public Property NodalCompositionTolerance As Double

NodalFlowModel: Modelo de escoamento do ramo para o solver NodalNewton (incompressivel ou composicional).

Modelo de escoamento do ramo para o solver NodalNewton (incompressivel ou composicional).

public NodalFlowModel NodalFlowModel { get; set; }
Public Property NodalFlowModel As NodalFlowModel

NodalFlowTolerance: Relative flow-change tolerance of the compositional outer loop, scaled by the largest branch flow.

Relative flow-change tolerance of the compositional outer loop, scaled by the largest branch flow. Pressure and temperature alone do not pin the operating point down: on a flat IPR x VLP crossing the pressures settle while the rate is still moving, and the loop would stop with ~1e-3 of flow error, different for every starting guess.

public double NodalFlowTolerance { get; set; }
Public Property NodalFlowTolerance As Double

NodalMaxOuterIterations: Iteration budget of the compositional outer loop.

Iteration budget of the compositional outer loop. 50 was too tight for a stiff well: the Production Well sample contracts by a factor of ~0.88 per iteration, so it walks steadily toward the tolerance and simply runs out of iterations short of it. The late iterations are cheap (~0.2 s against the ~18 s the first one costs), so the extra headroom buys convergence for little.

public int NodalMaxOuterIterations { get; set; }
Public Property NodalMaxOuterIterations As Integer

NodalOuterRelaxation: Under-relaxation factor of the compositional outer loop of the nodal solver, between 0 and 1.

Under-relaxation factor of the compositional outer loop of the nodal solver, between 0 and 1. 1.0 (default) applies no relaxation; values < 1 stabilize large or stiff networks.

public double NodalOuterRelaxation { get; set; }
Public Property NodalOuterRelaxation As Double

NodalOuterTemperatureTolerance: Temperature tolerance of the compositional outer loop, in K.

Temperature tolerance of the compositional outer loop, in K. This used to be NodalOuterTolerance as well, one number standing for both a pressure in pascal and a temperature in kelvin. The pressure side carries a relative floor, so on a 32 MPa well it is really asking for 1e-5 relative; the temperature side got the bare 1 K, which on a 350 K stream is 3e-3 relative, three hundred times looser. A gas condensate stopped once with the outer loop still wanting to move node temperatures by 0.023 K and once by 0.35 K, both inside the old tolerance and both reported converged, and the two answers were 1.5e-3 apart. The default is ten times the pipe's own temperature tolerance. Below that the outer loop would be asking for node temperatures resolved more finely than the pipes that produce them.

public double NodalOuterTemperatureTolerance { get; set; }
Public Property NodalOuterTemperatureTolerance As Double

NodalOuterTolerance: Pressure tolerance of the compositional outer loop, in Pa, floored relative to the largest node potential in...

Pressure tolerance of the compositional outer loop, in Pa, floored relative to the largest node potential in Calculate.

public double NodalOuterTolerance { get; set; }
Public Property NodalOuterTolerance As Double

ObjectClass: Gets or sets the simulation object class category (pressure changers).

Gets or sets the simulation object class category (pressure changers). The setter always assigns PressureChangers.

public override SimulationObjectClass ObjectClass { get; set; }
Public Overrides Property ObjectClass As SimulationObjectClass

OptimizeEquilibriumCalcs: Gets or sets whether the nodes skip recalculating (flashing) their inlet streams before mixing them, which saves...

Gets or sets whether the nodes skip recalculating (flashing) their inlet streams before mixing them, which saves equilibrium calculations at the cost of using the inlet states as they are. Default false.

public bool OptimizeEquilibriumCalcs { get; set; }
Public Property OptimizeEquilibriumCalcs As Boolean

PipeAccelerateEnergyBalance: Whether each pipe relaxes its energy balance by Wegstein's method rather than the fixed half step.

Whether each pipe relaxes its energy balance by Wegstein's method rather than the fixed half step. Off by default.

public bool PipeAccelerateEnergyBalance { get; set; }
Public Property PipeAccelerateEnergyBalance As Boolean

PipeCalculateEquilibrium: Gets or sets whether the pipe segments that use the global settings run phase-equilibrium flashes along each segment.

Gets or sets whether the pipe segments that use the global settings run phase-equilibrium flashes along each segment. Default true.

public bool PipeCalculateEquilibrium { get; set; }
Public Property PipeCalculateEquilibrium As Boolean

PipeCalculateEquilibriumIntervalInSteps: Gets or sets the interval, in pipe calculation increments, between phase-equilibrium flashes for the pipe segments...

Gets or sets the interval, in pipe calculation increments, between phase-equilibrium flashes for the pipe segments that use the global settings. Default 1 (flash at every increment).

public int PipeCalculateEquilibriumIntervalInSteps { get; set; }
Public Property PipeCalculateEquilibriumIntervalInSteps As Integer

PipeCalculateEquilibriumPressureTrigger: Relative pressure change along a pipe that forces a flash even when the interval above would have skipped one, so...

Relative pressure change along a pipe that forces a flash even when the interval above would have skipped one, so raising that interval stays safe on a fluid whose phase behaviour changes quickly. Zero disables it.

public double PipeCalculateEquilibriumPressureTrigger { get; set; }
Public Property PipeCalculateEquilibriumPressureTrigger As Double

PipeCalculateEquilibriumTemperatureTrigger: The same in temperature, in K.

The same in temperature, in K.

public double PipeCalculateEquilibriumTemperatureTrigger { get; set; }
Public Property PipeCalculateEquilibriumTemperatureTrigger As Double

PipeDefaultIncludeEmulsionEffect: Gets or sets whether the pipe segments that use the global settings include the oil-water emulsion viscosity effect...

Gets or sets whether the pipe segments that use the global settings include the oil-water emulsion viscosity effect in the pressure drop. Default false.

public bool PipeDefaultIncludeEmulsionEffect { get; set; }
Public Property PipeDefaultIncludeEmulsionEffect As Boolean

PipeDefaultMaxPressureIterations: Gets or sets the maximum number of pressure iterations of the pipe segments that use the global settings.

Gets or sets the maximum number of pressure iterations of the pipe segments that use the global settings. Default 100.

public int PipeDefaultMaxPressureIterations { get; set; }
Public Property PipeDefaultMaxPressureIterations As Integer

PipeDefaultMaxTemperatureIterations: Gets or sets the maximum number of temperature iterations of the pipe segments that use the global settings.

Gets or sets the maximum number of temperature iterations of the pipe segments that use the global settings. Default 100.

public int PipeDefaultMaxTemperatureIterations { get; set; }
Public Property PipeDefaultMaxTemperatureIterations As Integer

PipeDefaultPressureTolerance: Gets or sets the pressure convergence tolerance of the pipe segments that use the global settings, in Pa.

Gets or sets the pressure convergence tolerance of the pipe segments that use the global settings, in Pa. Default 10 Pa.

public double PipeDefaultPressureTolerance { get; set; }
Public Property PipeDefaultPressureTolerance As Double

PipeDefaultTemperatureTolerance: Gets or sets the temperature convergence tolerance of the pipe segments that use the global settings, in K.

Gets or sets the temperature convergence tolerance of the pipe segments that use the global settings, in K. Default 0.01 K.

public double PipeDefaultTemperatureTolerance { get; set; }
Public Property PipeDefaultTemperatureTolerance As Double

PipeSlurryViscosityMode: Gets or sets the slurry viscosity model of the pipe segments that use the global settings: 0 = disabled, 1 = Yoshida...

Gets or sets the slurry viscosity model of the pipe segments that use the global settings: 0 = disabled, 1 = Yoshida et al.

public int PipeSlurryViscosityMode { get; set; }
Public Property PipeSlurryViscosityMode As Integer

Prefix: Gets the default name prefix for this unit operation ('PNET-').

Gets the default name prefix for this unit operation ("PNET-").

public string Prefix { get; }
Public ReadOnly Property Prefix As String

PvtTableNodes: Nodes per axis of that grid.

Nodes per axis of that grid. The interpolation error falls as the square of the spacing, so a modest grid goes a long way; 20 by 20 is 400 flashes to build.

public int PvtTableNodes { get; set; }
Public Property PvtTableNodes As Integer

RefineWithDirectEvaluation: After a cold compositional solve, solve once more from its result with the branches evaluating the pipe directly...

After a cold compositional solve, solve once more from its result with the branches evaluating the pipe directly instead of through the ΔP(w) surrogate. Costs roughly one extra (much cheaper, warm-started) solve and removes the surrogate's ~2e-3 bias on the flow.

public bool RefineWithDirectEvaluation { get; set; }
Public Property RefineWithDirectEvaluation As Boolean

RichardsonExtrapolation: Evaluate every pipe on two grids and extrapolate away the leading discretisation error.

Evaluate every pipe on two grids and extrapolate away the leading discretisation error. The increment walk is first order, so the shipped discretisations carry more error than anything else in the model: on the Multi-Well Pad sample the export rate moves 3% between 6 increments per pipe and a converged grid, against 0.02% of surrogate bias. Refining the grid pays for that at eight times the cost for six times less error; extrapolating from two grids costs three pipe calculations instead of one and removes the first-order term outright. Off by default: it triples the cost of every pipe evaluation, and it changes the answer of every existing network, which is the user's call to make rather than a silent upgrade.

public bool RichardsonExtrapolation { get; set; }
Public Property RichardsonExtrapolation As Boolean

ShowDiagramGrid: Whether the designer draws the background grid.

Whether the designer draws the background grid. Lives on the surface, which is not serialized, so it is exposed here to travel with the network instead of resetting to the default every time the file is reopened.

public bool ShowDiagramGrid { get; set; }
Public Property ShowDiagramGrid As Boolean

SnapToDiagramGrid: Whether dragging a block snaps it to the grid.

Whether dragging a block snaps it to the grid. Persisted for the same reason as ShowDiagramGrid.

public bool SnapToDiagramGrid { get; set; }
Public Property SnapToDiagramGrid As Boolean

Solver: Gets or sets the network solver: Simplex (0, minimizes the balance residual, refined with projected BFGS when...

Gets or sets the network solver: Simplex (0, minimizes the balance residual, refined with projected BFGS when needed), IPOPT (1), NewtonFull (2) and NewtonSimplified (3) (both solved by projected BFGS), or NodalNewton (4, nodal Newton/GGA solver, the default). Below the required subscription level the nodal solver falls back to Simplex at solve time without changing this value.

public NetworkSolver Solver { get; set; }
Public Property Solver As NetworkSolver

SolverMaxIterations: Gets or sets the maximum number of iterations (function evaluations for Simplex) of the Simplex, IPOPT and Newton...

Gets or sets the maximum number of iterations (function evaluations for Simplex) of the Simplex, IPOPT and Newton solvers. Default 1000.

public int SolverMaxIterations { get; set; }
Public Property SolverMaxIterations As Integer

SolverProgressAfterSeconds: Once a compositional solve has run this long, it starts reporting one line per outer iteration even without the...

Once a compositional solve has run this long, it starts reporting one line per outer iteration even without the designer's solver console open: on the heavy field cases a solve can take minutes, and the residual trail is the only way to tell converging from stuck.

public double SolverProgressAfterSeconds { get; set; }
Public Property SolverProgressAfterSeconds As Double

SolverRelativeErrorTolerance: Gets or sets the convergence tolerance on the total relative balance residual used by the Simplex, IPOPT and Newton...

Gets or sets the convergence tolerance on the total relative balance residual used by the Simplex, IPOPT and Newton solvers. Default 1e-4.

public double SolverRelativeErrorTolerance { get; set; }
Public Property SolverRelativeErrorTolerance As Double

StallImprovement: How much the residual has to fall to count as an improvement, as a fraction.

How much the residual has to fall to count as an improvement, as a fraction. Without a margin, an iterate that is better in the tenth digit resets the stall counter forever.

public double StallImprovement { get; set; }
Public Property StallImprovement As Double

StallIterations: How many outer iterations without a real improvement in the pressure residual before the loop gives up and delivers...

How many outer iterations without a real improvement in the pressure residual before the loop gives up and delivers its best iterate. 25 leaves room for the Production Well, which walks down at ~0.88 per iteration and does improve, while cutting the ESP well short: that one cycles between two pressure fields and finds nothing new after about twenty iterations, yet used to ride the cap of 150 on every solve. Zero disables the check.

public int StallIterations { get; set; }
Public Property StallIterations As Integer

SupportsDynamicMode: The network is quasi-steady in dynamic mode: at every pressure-flow step it is re-solved in steady state against...

The network is quasi-steady in dynamic mode: at every pressure-flow step it is re-solved in steady state against that instant's boundary conditions. It holds no inventory, so it carries no state between steps beyond the warm start, and it does not vote on the adaptive integrator's error estimate (see GetDynamicContents). Valid while the dynamics of interest are slower than the line's transit time, which covers everything driven by control. It is NOT a transient hydraulic model: no surge, no line pack.

public override bool SupportsDynamicMode { get; }
Public Overrides ReadOnly Property SupportsDynamicMode As Boolean

UsePvtTable: Tabulate each branch's fluid over pressure and temperature once and read the pipe's per-increment properties off...

Tabulate each branch's fluid over pressure and temperature once and read the pipe's per-increment properties off that grid instead of flashing at every increment. Off by default, and off it changes nothing: the branch keeps the flowsheet's own package and its own flash. On, a flash is still run wherever the table cannot answer honestly, which is outside the grid and across the phase envelope.

public bool UsePvtTable { get; set; }
Public Property UsePvtTable As Boolean

Methods

ActuatorsMoving(): True while any block has an actuator that has not reached its command.

True while any block has an actuator that has not reached its command. The integrator has no other way to know the network is still moving with its boundaries frozen.

public bool ActuatorsMoving()
Public Function ActuatorsMoving() As Boolean

Calculate(object): Calculates the object.

Calculates the object.

Parameter Type Description
args Object
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

ClearPvtCache(): Drops every tabulated fluid.

Drops every tabulated fluid. Called wherever the warm start is dropped, because the same events (a different feed, different compounds) invalidate both.

public void ClearPvtCache()
Public Sub ClearPvtCache()

CloneXML(): Creates a deep copy of this object by round-tripping through XML serialization.

Creates a deep copy of this object by round-tripping through XML serialization.

public override object CloneXML()
Public Overrides Function CloneXML() As Object

CloseEditForm(): Closes the editor of this object, if it is open.

Closes the editor of this object, if it is open.

public override void CloseEditForm()
Public Overrides Sub CloseEditForm()

CommandActuator(IActuatedBlock, double): Takes a command for an actuated block.

Takes a command for an actuated block. Returns true when the command was queued, which means the caller must NOT write the value: the actuator will get there over the next steps. Outside dynamic mode, and for a block whose time constant and dead time are both zero, it returns false and the write happens as it always did. That is what keeps a steady-state solve, and every network built before actuators existed, behaving exactly the same.

Parameter Type Description
block IActuatedBlock
value Double
public bool CommandActuator(IActuatedBlock block, double value)
Public Function CommandActuator(block As IActuatedBlock, value As Double) As Boolean

CreateConnectors(): Creates the graphic connector definitions on the flowsheet: PortCount inlet ports down the left side...

Creates the graphic connector definitions on the flowsheet: PortCount inlet ports down the left side and as many outlet ports down the right side, keeping existing connections on the first ports. The energy connector is disabled.

public void CreateConnectors()
Public Sub CreateConnectors()

CreateDynamicProperties(): Registers the dynamic properties for dynamic simulation mode: 'Pressure-Flow Calculation Rate' (re-solve every N...

Registers the dynamic properties for dynamic simulation mode: "Pressure-Flow Calculation Rate" (re-solve every N pressure-flow steps), "Fail Mode" (0 = hold the last solution and warn, 1 = abort the integration) and "Max Solve Time (s)" (wall-clock limit per step, 0 = none).

public override void CreateDynamicProperties()
Public Overrides Sub CreateDynamicProperties()

DisplayEditForm(): Opens the editor of this object.

Opens the editor of this object. A host that has no editor for it does nothing.

public override void DisplayEditForm()
Public Overrides Sub DisplayEditForm()

Draw(object): Draws the unit operation icon on the given SkiaSharp canvas.

Draws the unit operation icon on the given SkiaSharp canvas.

Parameter Type Description
g Object The SkiaSharp canvas.
public void Draw(object g)
Public Sub Draw(g As Object)

EnsureTablesOnSurface(): Re-establishes the tables' link back to this network and makes sure each one is on the drawing surface.

Re-establishes the tables' link back to this network and makes sure each one is on the drawing surface. The link is not something the XML can carry, and a designer may open on a surface that was rebuilt (layout import, clone) since the tables were loaded.

public void EnsureTablesOnSurface()
Public Sub EnsureTablesOnSurface()

eval_f(int, double[], bool, out double): IPOPT callback: evaluates the objective function (FunctionValue).

IPOPT callback: evaluates the objective function (FunctionValue). Not referenced by the current solver path, which calls the IPOPT wrapper with FunctionValue directly.

Parameter Type Description
n Int32 Number of variables.
x Double[] The variable values.
new_x Boolean Whether x changed since the last callback. Not used.
obj_value Double Receives the objective function value.
public bool eval_f(int n, double[] x, bool new_x, out double obj_value)
Public Function eval_f(n As Integer, x As Double(), new_x As Boolean, obj_value As Double) As Boolean

eval_g(int, double[], bool, int, out double[]): IPOPT callback: evaluates the constraint functions.

IPOPT callback: evaluates the constraint functions. The problem has no constraints, so an empty array is returned.

Parameter Type Description
n Int32 Number of variables.
x Double[] The variable values.
new_x Boolean Whether x changed since the last callback. Not used.
m Int32 Number of constraints.
g Double[] Receives the constraint values (empty).
public bool eval_g(int n, double[] x, bool new_x, int m, out double[] g)
Public Function eval_g(n As Integer, x As Double(), new_x As Boolean, m As Integer, g As Double()) As Boolean

eval_grad_f(int, double[], bool, out double[]): IPOPT callback: evaluates the objective gradient (FunctionGradient).

IPOPT callback: evaluates the objective gradient (FunctionGradient).

Parameter Type Description
n Int32 Number of variables.
x Double[] The variable values.
new_x Boolean Whether x changed since the last callback. Not used.
grad_f Double[] Receives the gradient vector.
public bool eval_grad_f(int n, double[] x, bool new_x, out double[] grad_f)
Public Function eval_grad_f(n As Integer, x As Double(), new_x As Boolean, grad_f As Double()) As Boolean

eval_h(int, double[], bool, double, int, double[], bool, int, out int[], out int[], out double[]): IPOPT callback: returns the Hessian of the objective, computed by finite differences.

IPOPT callback: returns the Hessian of the objective, computed by finite differences. The row and column index arrays are returned zero-filled.

Parameter Type Description
n Int32 Number of variables.
x Double[] The variable values.
new_x Boolean Whether x changed since the last callback. Not used.
obj_factor Double Scaling factor of the objective. Not used.
m Int32 Number of constraints. Not used.
lambda Double[] Constraint multipliers. Not used.
new_lambda Boolean Whether lambda changed since the last callback. Not used.
nele_hess Int32 Number of nonzero elements in the Hessian.
iRow Int32[] Receives the row indices of the nonzero elements.
jCol Int32[] Receives the column indices of the nonzero elements.
values Double[] Receives the Hessian values.
public bool eval_h(int n, double[] x, bool new_x, double obj_factor, int m, double[] lambda, bool new_lambda, int nele_hess, out int[] iRow, out int[] jCol, out double[] values)
Public Function eval_h(n As Integer, x As Double(), new_x As Boolean, obj_factor As Double, m As Integer, lambda As Double(), new_lambda As Boolean, nele_hess As Integer, iRow As Integer(), jCol As Integer(), values As Double()) As Boolean

eval_jac_g(int, double[], bool, int, int, out int[], out int[], out double[]): IPOPT callback: returns the sparsity structure and values of the constraint Jacobian (a fixed pattern with all...

IPOPT callback: returns the sparsity structure and values of the constraint Jacobian (a fixed pattern with all values set to -1).

Parameter Type Description
n Int32 Number of variables.
x Double[] The variable values.
new_x Boolean Whether x changed since the last callback. Not used.
m Int32 Number of constraints.
nele_jac Int32 Number of nonzero elements in the Jacobian.
iRow Int32[] Receives the row indices of the nonzero elements.
jCol Int32[] Receives the column indices of the nonzero elements.
values Double[] Receives the values of the nonzero elements.
public bool eval_jac_g(int n, double[] x, bool new_x, int m, int nele_jac, out int[] iRow, out int[] jCol, out double[] values)
Public Function eval_jac_g(n As Integer, x As Double(), new_x As Boolean, m As Integer, nele_jac As Integer, iRow As Integer(), jCol As Integer(), values As Double()) As Boolean

FindReliefLoadCase(string): Finds a relief load case by its identifier or, failing that, by its name (case-insensitive).

Finds a relief load case by its identifier or, failing that, by its name (case-insensitive).

Parameter Type Description
idOrName String The load case identifier or name.
public ReliefLoadCase FindReliefLoadCase(string idOrName)
Public Function FindReliefLoadCase(idOrName As String) As ReliefLoadCase

FindReliefScenario(string): The scenario of that name, or null.

The scenario of that name, or null.

Parameter Type Description
name String
public ReliefScenario FindReliefScenario(string name)
Public Function FindReliefScenario(name As String) As ReliefScenario

FunctionGradient(double[]): Computes the gradient of FunctionValue by central finite differences (1 % relative step, or 0.01 absolute for zero...

Computes the gradient of FunctionValue by central finite differences (1 % relative step, or 0.01 absolute for zero variables).

Parameter Type Description
x Double[] The scaled unknowns at which the gradient is evaluated.
public double[] FunctionGradient(double[] x)
Public Function FunctionGradient(x As Double()) As Double()

FunctionValue(double[]): Objective function of the Simplex, IPOPT and Newton solvers: writes the unknowns into the boundary and node streams...

Objective function of the Simplex, IPOPT and Newton solvers: writes the unknowns into the boundary and node streams, calculates every network block in order and returns the sum of the squared relative mass, pressure and energy balance residuals.

Parameter Type Description
vars Double[] The scaled unknowns: boundary flows (divided by the maximum flow), boundary pressures (divided by the maximum pressure) and node split fractions.
public double FunctionValue(double[] vars)
Public Function FunctionValue(vars As Double()) As Double

GetChartModel(string): Builds an OxyPlot model of a pipe's profile: pressure on the left axis, temperature on the right, distance on the x...

Builds an OxyPlot model of a pipe's profile: pressure on the left axis, temperature on the right, distance on the x axis, in the flowsheet's units.

Parameter Type Description
name String
public override object GetChartModel(string name)
Public Overrides Function GetChartModel(name As String) As Object

GetChartModelNames(): Chart names the PFD chart object can embed: the pressure and temperature profile of every solved pipe segment.

Chart names the PFD chart object can embed: the pressure and temperature profile of every solved pipe segment.

public override List<string> GetChartModelNames()
Public Overrides Function GetChartModelNames() As List(Of String)

GetDefaultProperties(): Returns the properties shown by default in the flowsheet property table for this unit operation.

Returns the properties shown by default in the flowsheet property table for this unit operation.

public override string[] GetDefaultProperties()
Public Overrides Function GetDefaultProperties() As String()

GetDisplayDescription(): Returns the description string for this unit operation type.

Returns the description string for this unit operation type.

public override string GetDisplayDescription()
Public Overrides Function GetDisplayDescription() As String

GetDisplayName(): Returns the display name for this unit operation type.

Returns the display name for this unit operation type.

public override string GetDisplayName()
Public Overrides Function GetDisplayName() As String

GetDynamicContents(): NaN, and it has to stay NaN: the adaptive integrator builds its error estimate from the change in each object's...

NaN, and it has to stay NaN: the adaptive integrator builds its error estimate from the change in each object's contents, and a network with no inventory has no opinion to offer there.

public override double GetDynamicContents()
Public Overrides Function GetDynamicContents() As Double

GetIconBitmapBytes(): Returns the raw bytes of the icon image for this unit operation.

Returns the raw bytes of the icon image for this unit operation.

public override byte[] GetIconBitmapBytes()
Public Overrides Function GetIconBitmapBytes() As Byte()

GetPreferredGraphicObjectHeight(): Returns the preferred height of the flowsheet graphic object, in pixels.

Returns the preferred height of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectHeight()
Public Overrides Function GetPreferredGraphicObjectHeight() As Double

GetPreferredGraphicObjectWidth(): Default size of the block on the flowsheet, large enough for its ports.

Default size of the block on the flowsheet, large enough for its ports.

public override double GetPreferredGraphicObjectWidth()
Public Overrides Function GetPreferredGraphicObjectWidth() As Double

GetProperties(PropertyType): Get a list of all properties of the object.

Get a list of all properties of the object.

Parameter Type Description
proptype PropertyType Type of the property.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyUnit(string, IUnitsOfMeasure): Gets the units of a property.

Gets the units of a property.

Parameter Type Description
prop String Property identifier.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override string GetPropertyUnit(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyUnit(prop As String, su As IUnitsOfMeasure = Nothing) As String

GetPropertyValue(string, IUnitsOfMeasure): Returns the value of a named property, converting from SI to the current unit system.

Returns the value of a named property, converting from SI to the current unit system. Falls back to extra properties if the property is not found in the base implementation.

Parameter Type Description
prop String The property identifier string.
su IUnitsOfMeasure Optional units-of-measure system used for conversion; uses the shared SI system when Nothing.
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

GetPvtEntry(string, MaterialStream, double, double, double, double): The tabulated package for one branch, building the table the first time it is asked for and whenever the fluid or...

The tabulated package for one branch, building the table the first time it is asked for and whenever the fluid or the operating range has moved out from under the stored one.

Parameter Type Description
key String
template MaterialStream
pLo Double
pHi Double
tLo Double
tHi Double
public PvtEntry GetPvtEntry(string key, MaterialStream template, double pLo, double pHi, double tLo, double tHi)
Public Function GetPvtEntry(key As String, template As MaterialStream, pLo As Double, pHi As Double, tLo As Double, tHi As Double) As PvtEntry

HasHigherTierAccess(): True when the subscription covers the blocks and analysis tools added after the original pipe network.

True when the subscription covers the blocks and analysis tools added after the original pipe network. The designer asks before opening one of those tools or dropping one of those blocks, so the user is told up front instead of at solve time.

public static bool HasHigherTierAccess()
Public Shared Function HasHigherTierAccess() As Boolean

HigherTierMessage(string): Message shown when a higher-tier feature is used without the subscription for it.

Message shown when a higher-tier feature is used without the subscription for it.

Parameter Type Description
feature String
public static string HigherTierMessage(string feature)
Public Shared Function HigherTierMessage(feature As String) As String

intermediate(IpoptAlgorithmMode, int, double, double, double, double, double, double, double, double, int): IPOPT intermediate callback, called once per iteration: tells IPOPT whether to continue.

IPOPT intermediate callback, called once per iteration: tells IPOPT whether to continue.

Parameter Type Description
alg_mod IpoptAlgorithmMode The current algorithm phase. Not used.
iter_count Int32 The current iteration count.
obj_value Double The current objective function value.
inf_pr Double Primal infeasibility. Not used.
inf_du Double Dual infeasibility. Not used.
mu Double Barrier parameter. Not used.
d_norm Double Norm of the primal step. Not used.
regularization_size Double Hessian regularization. Not used.
alpha_du Double Dual step size. Not used.
alpha_pr Double Primal step size. Not used.
ls_trials Int32 Number of line search trials. Not used.
public bool intermediate(IpoptAlgorithmMode alg_mod, int iter_count, double obj_value, double inf_pr, double inf_du, double mu, double d_norm, double regularization_size, double alpha_du, double alpha_pr, int ls_trials)
Public Function intermediate(alg_mod As IpoptAlgorithmMode, iter_count As Integer, obj_value As Double, inf_pr As Double, inf_du As Double, mu As Double, d_norm As Double, regularization_size As Double, alpha_du As Double, alpha_pr As Double, ls_trials As Integer) As Boolean

IsHigherTierBlock(ISimulationObject): Blocks that came after the original pipe network and therefore sit on the higher subscription tier: the well and...

Blocks that came after the original pipe network and therefore sit on the higher subscription tier: the well and flow-control equipment (IPR, choke, ESP, gas lift, pressure control valve), the reservoir boundary, the dedicated water pipe, and a pipe driven by a deviation survey. Tested by concrete type, not by NetworkObjType: GasLift and Reservoir are Sources and report themselves as such.

Parameter Type Description
o ISimulationObject
public static bool IsHigherTierBlock(ISimulationObject o)
Public Shared Function IsHigherTierBlock(o As ISimulationObject) As Boolean

LoadData(List<XElement>): Restores the unit operation state from a list of XML elements previously produced by SaveData.

Restores the unit operation state from a list of XML elements previously produced by SaveData.

Parameter Type Description
data List<XElement> The list of XElement objects containing serialized state.
public override bool LoadData(List<XElement> data)
Public Overrides Function LoadData(data As List(Of XElement)) As Boolean

OrderObjectsForCalculation(): Orders the network blocks for calculation by walking downstream from the sources through the outlet connections.

Orders the network blocks for calculation by walking downstream from the sources through the outlet connections. Sources and sinks are excluded; a block reached by several paths appears once per path.

public List<ISimulationObject> OrderObjectsForCalculation()
Public Function OrderObjectsForCalculation() As List(Of ISimulationObject)

OrderObjectsForCalculation0(): Orders the network blocks for calculation by walking upstream from the sinks through the inlet connections and then...

Orders the network blocks for calculation by walking upstream from the sinks through the inlet connections and then reversing the levels, so the blocks farthest from the sinks come first. Each block appears once; sources and sinks are excluded. This is the ordering used by the Simplex, IPOPT and Newton solvers.

public List<ISimulationObject> OrderObjectsForCalculation0()
Public Function OrderObjectsForCalculation0() As List(Of ISimulationObject)

PerformPostCalcValidation(): Post-calculation validation of the outlet streams.

Post-calculation validation of the outlet streams. Does nothing for this unit operation.

public override void PerformPostCalcValidation()
Public Overrides Sub PerformPostCalcValidation()

PopulateEditorPanel(object): Populates the cross-platform editor panel with controls.

Populates the cross-platform editor panel with controls. Only the Avalonia editor panel is supported; other containers are left unchanged.

Parameter Type Description
container Object The editor panel (layout container) to populate.
public void PopulateEditorPanel(object container)
Public Sub PopulateEditorPanel(container As Object)

RequiredAccessLevel(): Subscription level this network needs: 3 once it uses anything beyond the original feature set, 2 otherwise.

Subscription level this network needs: 3 once it uses anything beyond the original feature set, 2 otherwise.

public int RequiredAccessLevel()
Public Function RequiredAccessLevel() As Integer

RestoreDynamicState(object): Restores the state saved by SaveDynamicState: the solver warm start, the actuator commands and...

Restores the state saved by SaveDynamicState: the solver warm start, the actuator commands and clock, and the actuated values of the blocks. A missing or older state clears the actuator commands.

Parameter Type Description
state Object The state object returned by a previous SaveDynamicState call.
public override void RestoreDynamicState(object state)
Public Overrides Sub RestoreDynamicState(state As Object)

ReturnInstance(string): Creates and returns a new instance for deserialization.

Creates and returns a new instance for deserialization.

Parameter Type Description
typename String The type name to instantiate.
public object ReturnInstance(string typename)
Public Function ReturnInstance(typename As String) As Object

RunDynamicModel(): Runs one dynamic-mode integration step: on the pressure-flow half of the step (every N steps, as set by...

Runs one dynamic-mode integration step: on the pressure-flow half of the step (every N steps, as set by "Pressure-Flow Calculation Rate") it moves the actuators and re-solves the network in steady state against the current boundary conditions. Requires the higher subscription tier.

public override void RunDynamicModel()
Public Overrides Sub RunDynamicModel()

RunReliefScenarios(string, Action<string>): Runs every relief scenario and leaves the network solved under the governing one (or under leaveOn).

Runs every relief scenario and leaves the network solved under the governing one (or under leaveOn). Returns the report, also kept in LastReliefReport.

Parameter Type Description
leaveOn String
progress Action<String>
public ReliefScenarioReport RunReliefScenarios(string leaveOn = null, Action<string> progress = null)
Public Function RunReliefScenarios(leaveOn As String = Nothing, progress As Action(Of String) = Nothing) As ReliefScenarioReport

SaveData(): Serializes the unit operation state to a list of XML elements for persistence.

Serializes the unit operation state to a list of XML elements for persistence.

public override List<XElement> SaveData()
Public Overrides Function SaveData() As List(Of XElement)

SaveDynamicState(): The warm start is the only thing that has to survive between the integrator's attempts at a step.

The warm start is the only thing that has to survive between the integrator's attempts at a step. Without this override the base class would answer for the accumulation stream this unit does not have, the state would never be restored, and the two half-steps of step doubling would start from a different guess than the full step, turning the error estimate into noise. Deliberately NOT routed through SaveData(): that path is licence-gated and throws when the gate dips, which would abort an entire integration over a transient.

public override object SaveDynamicState()
Public Overrides Function SaveDynamicState() As Object

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of a property.

Sets the value of a property.

Parameter Type Description
prop String Property identifier.
propval Object Property value to set at the specified units.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override bool SetPropertyValue(string prop, object propval, IUnitsOfMeasure su = null)
Public Overrides Function SetPropertyValue(prop As String, propval As Object, su As IUnitsOfMeasure = Nothing) As Boolean

SetupStreamForCalc(MaterialStream): Prepares an internal network stream for calculation: assigns this unit operation's property package and flowsheet to...

Prepares an internal network stream for calculation: assigns this unit operation's property package and flowsheet to it and makes it the package's current stream.

Parameter Type Description
stream MaterialStream The material stream to prepare.
public void SetupStreamForCalc(MaterialStream stream)
Public Sub SetupStreamForCalc(stream As MaterialStream)

UpdateEditForm(): Redraws the editor of this object with the current values, if it is open.

Redraws the editor of this object with the current values, if it is open.

public override void UpdateEditForm()
Public Overrides Sub UpdateEditForm()

Fields

DiagramEditorControl: The classic (WinForms) network diagram editor control hosted by the editor window, if open.

The classic (WinForms) network diagram editor control hosted by the editor window, if open. Not saved with the flowsheet.

public DiagramControl DiagramEditorControl
Public DiagramEditorControl As DiagramControl

DiagramSurface: The SkiaSharp drawing surface that holds the network diagram shown in the network designer.

The SkiaSharp drawing surface that holds the network diagram shown in the network designer.

public GraphicsSurface DiagramSurface
Public DiagramSurface As GraphicsSurface

f: The classic (WinForms) editor window open for this unit operation, if any.

The classic (WinForms) editor window open for this unit operation, if any. Not saved with the flowsheet.

public FormEditorPNUO f
Public f As FormEditorPNUO

ObjectList: Prototype instances of every block type available in the network designer, keyed by display name (e.g.

Prototype instances of every block type available in the network designer, keyed by display name (e.g. "Pipe Segment", "Valve"). Used to build the designer palette and to create new blocks.

public Dictionary<string, ISimulationObject> ObjectList
Public ObjectList As Dictionary(Of String, ISimulationObject)

PipeDefaultPressureDropCorrelation: Pressure drop correlation applied to every pipe segment that uses the network's global settings.

Pressure drop correlation applied to every pipe segment that uses the network's global settings. Default Beggs and Brill.

public FlowPackage PipeDefaultPressureDropCorrelation
Public PipeDefaultPressureDropCorrelation As FlowPackage

PortCount: Number of inlet and of outlet ports of the block on the flowsheet.

Number of inlet and of outlet ports of the block on the flowsheet.

public const int PortCount = 30
Public Const PortCount As Integer = 30

StreamSolverProgress: When true, the nodal solver writes one progress line per iteration to the flowsheet message log.

When true, the nodal solver writes one progress line per iteration to the flowsheet message log. Set by the network designer while its solver console is open. Not saved with the flowsheet.

public bool StreamSolverProgress
Public StreamSolverProgress As Boolean