Skip to content

Pipe Segment

Represents a pipe segment unit operation that models single- or multi-phase fluid flow through one or more pipe sections with specified geometry, elevation, and thermal boundary conditions. Pressure drop, temperature, and phase-equilibrium profiles are calculated using a selectable two-phase flow correlation.

DWSIM.UnitOperations.UnitOperations.Pipe
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Pipe

At a glance

Pipe Segment in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Water-in
Outlet, material 0 Water-out
Outlet, energy energy PIPE-1 heat

Example

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

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

water_in = (fs.AddMaterialStream("Water-in")
            .At(Q.Celsius(25.0), Q.Bar(5.0))
            .WithMassFlow(Q.KgPerSecond(20.0)))
water_out = fs.AddMaterialStream("Water-out")
heat = fs.AddEnergyStream("PIPE-1 heat")

pipe = (fs.AddPipe("PIPE-1")
        .ConnectFeed(water_in)
        .ConnectProduct(water_out)
        .ConnectEnergyProduct(heat))

# one straight section: index, type, count, increments, material,
# length (m), elevation change (m), outer and inner diameter (inches)
profile = pipe.Object.Profile
profile.Sections.Clear()
profile.Sections.Add(1, PipeSection(1, "Straight Tube", 1, 5, "Carbon Steel", 200.0, 10.0, 4.5, 4.026))
profile.Status = PipeEditorStatus.OK

fs.AutoLayout()
fs.Solve()

p1 = pipe.Object
last = pipe.AllSectionResults[pipe.ProfilePointCount - 1]
print(f"Pressure drop   = {(water_in.PressurePa - water_out.PressurePa) / 1e5:.4f} bar")
print(f"  friction      = {p1.PressureDrop_Friction / 1e5:.4f} bar")
print(f"  static head   = {p1.PressureDrop_Static / 1e5:.4f} bar")
print(f"Liquid velocity = {last.LiqVel:.3f} m/s")
print(f"Reynolds number = {last.LiqRe:.3g}")
print(f"Outlet T        = {water_out.TemperatureK - 273.15:.3f} C")

Output

Pressure drop   = 2.0255 bar
  friction      = 1.0482 bar
  static head   = 0.9772 bar
Liquid velocity = 2.442 m/s
Reynolds number = 2.8e+05
Outlet T        = 25.036 C

DWSIM 10.2.11.0, generated 2026-10-08.

Calculation modes

Set with Specification (Specmode). The mode decides which properties are inputs; every other one is a result and is overwritten by the calculation.

Mode Value What it does Inputs
Length 0 Pipe length is specified; pressure and temperature are calculated. PROP_PS_5, PROP_PS_6, PROP_PS_7, HydraulicSegment,1,Length, HydraulicSegment,1,Elevation, HydraulicSegment,1,InternalDiameter, HydraulicSegment,1,ExternalDiameter, HydraulicSegment,1,Sections, ThermalProfile,CalculationType, ThermalProfile,OverallHTC, ThermalProfile,ExternalTemperatureDefinedHTC, ThermalProfile,ExternalTemperatureGradientDefinedHTC
OutletPressure 1 Outlet pressure is specified; an equivalent pipe length is back-calculated. PROP_PS_3, PROP_PS_5, PROP_PS_6, PROP_PS_7, HydraulicSegment,1,Elevation, HydraulicSegment,1,InternalDiameter, HydraulicSegment,1,ExternalDiameter, HydraulicSegment,1,Sections, ThermalProfile,CalculationType, ThermalProfile,OverallHTC, ThermalProfile,ExternalTemperatureDefinedHTC, ThermalProfile,ExternalTemperatureGradientDefinedHTC
OutletTemperature 2 Outlet temperature is specified; an equivalent pipe length is back-calculated. PROP_PS_4, HydraulicSegment,1,Length, HydraulicSegment,1,Elevation, HydraulicSegment,1,InternalDiameter, HydraulicSegment,1,ExternalDiameter, HydraulicSegment,1,Sections

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.

ID Name Unit (SI) Input in
PROP_PS_0 Pressure Drop Pa result
PROP_PS_1 Temperature Drop K (difference) result
PROP_PS_2 Heat Exchanged kW result
PROP_PS_3 Outlet Pressure (Spec) Pa OutletPressure
PROP_PS_4 Outlet Temperature (Spec) K OutletTemperature
PROP_PS_5 Overall HTC (Spec) W/[m2.K] Length, OutletPressure
PROP_PS_6 External Temperature (Spec) K Length, OutletPressure
PROP_PS_7 Ambient Temperature Gradient K./m Length, OutletPressure
PROP_PS_8 Total Length (Straight Tubes) m result
PROP_PS_9 Total Elevation (Straight Tubes) m result
PressureDropStatic Pressure Drop (Hydrostatic) Pa result
PressureDropFriction Pressure Drop (Friction) Pa result

The object also exposes 215 indexed results under HydraulicSegment, one per segment or step, for example HydraulicSegment,1,Length.

The object also exposes 15 indexed results under ThermalProfile, one per segment or step, for example ThermalProfile,CalculationType.

Dynamic mode

Extra properties used when the flowsheet runs in dynamic mode.

Name Unit
Time step discretization

Learn more

API members

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

Constructors

Pipe(): Initializes a new default instance of the Pipe class.

Initializes a new default instance of the Pipe class.

public Pipe()
Public Sub New()

Pipe(string, string): Initializes a new instance of the Pipe class with a name and description.

Initializes a new instance of the Pipe class with a name and description.

Parameter Type Description
name String The display name of the pipe.
description String A brief description of the pipe.
public Pipe(string name, string description)
Public Sub New(name As String, description As String)

Properties

AccelerateEnergyBalance: Relaxes the energy balance at each increment by Wegstein's method instead of the fixed half step.

Relaxes the energy balance at each increment by Wegstein's method instead of the fixed half step. Off by default. The balance is a fixed point: a guessed outlet temperature fixes the heat transfer coefficient and the duty, those fix the outlet enthalpy, and the flash turns that back into a temperature. The loop has always taken the average of the guess and the answer. That is a relaxation of one half applied regardless of how strongly the answer actually responds to the guess, and for a pipe it responds barely at all: the duty changes only through the wall temperature difference, so the map is nearly constant and plain substitution would land on the answer at once. Halving instead walks in from the initial error geometrically, and every one of those passes costs a flash. Wegstein measures the response from the last two passes and relaxes by what it warrants, reaching the same fixed point. The inner pressure loop has used secant acceleration all along; this is the same idea for the outer one.

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

AccumulationStreams: Gets or sets the list of accumulation streams used in dynamic mode (one per section).

Gets or sets the list of accumulation streams used in dynamic mode (one per section).

public List<MaterialStream> AccumulationStreams { get; set; }
Public Property AccumulationStreams As List(Of MaterialStream)

CalculateEquilibrium: Gets or sets whether phase-equilibrium flashes are performed at each pipe section.

Gets or sets whether phase-equilibrium flashes are performed at each pipe section.

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

CalculateEquilibriumIntervalInSteps: Gets or sets the interval (in calculation steps) between equilibrium flash evaluations.

Gets or sets the interval (in calculation steps) between equilibrium flash evaluations.

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

CalculateEquilibriumPressureTrigger: Relative pressure change since the last flash that forces another one, whatever...

Relative pressure change since the last flash that forces another one, whatever CalculateEquilibriumIntervalInSteps says. Zero disables it. Skipping flashes by counting increments asks the wrong question. What matters is not how many steps have passed but how far the fluid has moved, and the two part company exactly where it is least affordable: on a well-behaved fluid, flashing every fourth increment costs 0.13% and saves nearly half the time, while on a retrograde gas condensate the same setting moved the answer by 27%, because that is where the phase behaviour changes fastest along the pipe. A displacement trigger gives the saving on the first and protects the second, since there the threshold is crossed at almost every increment and the flash happens anyway. It can only ADD flashes, never remove one the interval asked for, so the default interval of 1 still flashes every increment and nothing changes until the interval is raised. The default of 2% is the safe end of the trade: measured against flashing every increment, it reproduces the answer exactly on all three fluids tried. Loosening it buys time on a fluid whose properties vary slowly - the multi-well pad runs 1.35x at 10% with the answer still exact, and 1.54x at 20% for 0.11% - while the gas condensate has no usable setting at all: below 5% it saves nothing and above it the answer wanders by whole percent. That is the correct behaviour rather than a shortcoming, since it is the fluid that genuinely needs the flashes.

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

CalculateEquilibriumTemperatureTrigger: Temperature change in K since the last flash that forces another one.

Temperature change in K since the last flash that forces another one. Zero disables it. See CalculateEquilibriumPressureTrigger.

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

CalculateHeatBalance: Gets or sets whether a rigorous wall heat-balance is calculated for each section.

Gets or sets whether a rigorous wall heat-balance is calculated for each section.

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

DeltaP: Gets or sets the total calculated pressure drop across all pipe sections (Pa).

Gets or sets the total calculated pressure drop across all pipe sections (Pa).

public double? DeltaP { get; set; }
Public Property DeltaP As Double?

DeltaQ: Gets or sets the total calculated heat duty exchanged across all pipe sections (kW).

Gets or sets the total calculated heat duty exchanged across all pipe sections (kW).

public double? DeltaQ { get; set; }
Public Property DeltaQ As Double?

DeltaT: Gets or sets the total calculated temperature change across all pipe sections (K).

Gets or sets the total calculated temperature change across all pipe sections (K).

public double? DeltaT { get; set; }
Public Property DeltaT As Double?

HasPropertiesForDynamicMode: Gets a value indicating whether this unit operation exposes dedicated dynamic-mode properties.

Gets a value indicating whether this unit operation exposes dedicated dynamic-mode properties.

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

IncludeEmulsion: Gets or sets whether oil-water emulsion viscosity is included in the pressure-drop calculation.

Gets or sets whether oil-water emulsion viscosity is included in the pressure-drop calculation.

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

MaxPressureIterations: Gets or sets the maximum number of pressure iteration loops per section.

Gets or sets the maximum number of pressure iteration loops per section.

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

MaxTemperatureIterations: Gets or sets the maximum number of temperature iteration loops per section.

Gets or sets the maximum number of temperature iteration loops per section.

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

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.

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

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

Gets or sets the simulation object class category (PressureChangers).

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

OutletPressure: Gets or sets the target outlet pressure (Pa) when Specification is OutletPressure.

Gets or sets the target outlet pressure (Pa) when Specification is OutletPressure.

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

OutletTemperature: Gets or sets the target outlet temperature (K) when Specification is OutletTemperature.

Gets or sets the target outlet temperature (K) when Specification is OutletTemperature.

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

PipelineEfficiency: Pipeline efficiency factor E used by the single-phase gas pipeline equations (Weymouth, Panhandle A/B).

Pipeline efficiency factor E used by the single-phase gas pipeline equations (Weymouth, Panhandle A/B). 1.0 = perfectly clean/new pipe; 0.92-0.98 is typical.

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

PressureDrop_Friction: Gets or sets the calculated friction component of total pressure drop (Pa).

Gets or sets the calculated friction component of total pressure drop (Pa).

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

PressureDrop_Static: Gets or sets the calculated static (elevation) component of total pressure drop (Pa).

Gets or sets the calculated static (elevation) component of total pressure drop (Pa).

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

Profile: Gets or sets the geometric profile (sections, diameters, lengths, elevations) of this pipe.

Gets or sets the geometric profile (sections, diameters, lengths, elevations) of this pipe.

public PipeProfile Profile { get; set; }
Public Property Profile As PipeProfile

SelectedFlowPackage: Gets or sets the flow correlation used for pressure-drop calculations.

Gets or sets the flow correlation used for pressure-drop calculations.

public FlowPackage SelectedFlowPackage { get; set; }
Public Property SelectedFlowPackage As FlowPackage

SlurryViscosityMode: Gets or sets the slurry viscosity model index (0 = default).

Gets or sets the slurry viscosity model index (0 = default).

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

Specification: Gets or sets the active specification mode for this pipe.

Gets or sets the active specification mode for this pipe.

public Pipe.Specmode Specification { get; set; }
Public Property Specification As Pipe.Specmode

SupportsDynamicMode: Gets a value indicating whether this unit operation supports dynamic simulation mode.

Gets a value indicating whether this unit operation supports dynamic simulation mode.

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

ThermalProfile: Gets or sets the thermal boundary-condition definitions for this pipe.

Gets or sets the thermal boundary-condition definitions for this pipe.

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

TolP: Gets or sets the pressure convergence tolerance (Pa).

Gets or sets the pressure convergence tolerance (Pa).

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

TolT: Gets or sets the temperature convergence tolerance (K).

Gets or sets the temperature convergence tolerance (K).

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

UseGlobalWeather: Gets or sets whether the pipe uses the flowsheet-level weather (ambient temperature) settings.

Gets or sets whether the pipe uses the flowsheet-level weather (ambient temperature) settings.

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

Methods

CalcOverallHeatTransferCoefficient(PipeSection, string, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, bool, bool, bool, bool): Calculates the overall heat transfer coefficient between the fluid and the surroundings as a series of resistances...

Calculates the overall heat transfer coefficient between the fluid and the surroundings as a series of resistances: internal film (Petukhov correlation with holdup-weighted mixture properties), pipe wall conduction, insulation layer and the external medium from the thermal profile (air with forced, natural and radiative contributions; water by forced convection; or buried in soil).

Parameter Type Description
section PipeSection The pipe section being calculated.
materialparede String The pipe wall material name.
EL Double Liquid holdup (volume fraction of liquid), used to weight the phase properties.
L Double Segment length, in m. Only reported in the inspector.
Dint Double Internal diameter, in m.
Dext Double External diameter, in m.
rugosidade Double Wall roughness, in m. Only reported in the inspector; the roughness of materialparede is used instead.
T Double Fluid temperature, in K.
Text Double Ambient (external medium) temperature, in K.
vel_g Double Vapor velocity, in m/s.
vel_l Double Liquid velocity, in m/s.
Cpl Double Liquid heat capacity, in kJ/(kg.K).
Cpv Double Vapor heat capacity, in kJ/(kg.K).
kl Double Liquid thermal conductivity, in W/(m.K).
kv Double Vapor thermal conductivity, in W/(m.K).
mu_l Double Liquid viscosity, in Pa.s.
mu_v Double Vapor viscosity, in Pa.s.
rho_l Double Liquid density, in kg/m3.
rho_v Double Vapor density, in kg/m3.
hinterno Boolean True to include the internal film coefficient.
isolamento Boolean True to include the insulation layer.
parede Boolean True to include the pipe wall conduction resistance.
hexterno Boolean True to include the external medium coefficient.
public double[] CalcOverallHeatTransferCoefficient(PipeSection section, string materialparede, double EL, double L, double Dint, double Dext, double rugosidade, double T, double Text, double vel_g, double vel_l, double Cpl, double Cpv, double kl, double kv, double mu_l, double mu_v, double rho_l, double rho_v, bool hinterno, bool isolamento, bool parede, bool hexterno)
Public Function CalcOverallHeatTransferCoefficient(section As PipeSection, materialparede As String, EL As Double, L As Double, Dint As Double, Dext As Double, rugosidade As Double, T As Double, Text As Double, vel_g As Double, vel_l As Double, Cpl As Double, Cpv As Double, kl As Double, kv As Double, mu_l As Double, mu_v As Double, rho_l As Double, rho_v As Double, hinterno As Boolean, isolamento As Boolean, parede As Boolean, hexterno As Boolean) As Double()

Calculate(object): Calculates pressure drop, heat transfer, and phase behaviour along the pipe.

Calculates pressure drop, heat transfer, and phase behaviour along the pipe.

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

CloneXML(): Creates a deep copy of this pipe via XML serialization.

Creates a deep copy of this pipe via XML serialization.

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

CloseEditForm(): Closes and disposes the editing form.

Closes and disposes the editing form.

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

cond_isol(int): Returns a tabulated thermal conductivity for an insulation material.

Returns a tabulated thermal conductivity for an insulation material. Not called by the current pipe calculation, which reads the insulation conductivity from the thermal profile.

Parameter Type Description
meio Int32 Insulation material index: 0 = asphalt, 1 = concrete, 2 = polyurethane foam, 3 = PVC foam, 4 = fiberglass, 5 = plastic, 6 = glass, 7 = user defined (returns 0).
public double cond_isol(int meio)
Public Function cond_isol(meio As Integer) As Double

CreateDynamicProperties(): Creates the additional properties required for dynamic simulation mode.

Creates the additional properties required for dynamic simulation mode.

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

DeCalculate(): Clears all calculated results.

Clears all calculated results.

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

DisplayDynamicsEditForm(): Opens the dynamics-specific editing form.

Opens the dynamics-specific editing form.

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

DisplayEditForm(): Opens or activates the editing form.

Opens or activates the editing form.

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

EmulsionViscosity(MaterialStream): Calculates the effective oil-water emulsion viscosity (Pa·s) for the given material stream based on the oil volume...

Calculates the effective oil-water emulsion viscosity (Pa·s) for the given material stream based on the oil volume fraction and the Brinkman equation.

Parameter Type Description
ms MaterialStream The material stream containing the two liquid phases.
public double EmulsionViscosity(MaterialStream ms)
Public Function EmulsionViscosity(ms As MaterialStream) As Double

FT2(double, double, double, double, double): Residual of the heat balance with a constant ambient temperature: U times the log-mean temperature difference...

Residual of the heat balance with a constant ambient temperature: U times the log-mean temperature difference between the fluid and the ambient, minus the heat duty. Not called by the current pipe calculation.

Parameter Type Description
T1 Double Inlet fluid temperature, in K.
T2 Double Outlet fluid temperature, in K.
Tamb Double Ambient temperature, in K.
U Double Heat transfer conductance (coefficient times area), in units consistent with DQ.
DQ Double Heat duty to match.
public double FT2(double T1, double T2, double Tamb, double U, double DQ)
Public Function FT2(T1 As Double, T2 As Double, Tamb As Double, U As Double, DQ As Double) As Double

GasPipelineFrictionalDeltaP(FlowPackage, double, double, double, double, double, double, double, double): Frictional pressure drop (Pa) over a pipe length from a single-phase gas pipeline equation (Weymouth / Panhandle...

Frictional pressure drop (Pa) over a pipe length from a single-phase gas pipeline equation (Weymouth / Panhandle A/B), in the SI form of Menon, "Gas Pipeline Hydraulics". The pipe is treated as horizontal - any hydrostatic term is added by the caller. Returns 0 for a non-gas method or invalid input. Exposed as Shared so the correlation can be unit-tested.

Parameter Type Description
method FlowPackage Weymouth, Panhandle_A or Panhandle_B
D_m Double internal diameter (m)
L_m Double length (m)
Qstd_m3day Double standard volumetric gas flow (m3/day at 15 C, 101.325 kPa)
G Double gas gravity (air = 1)
T Double flowing temperature (K)
Zf Double gas compressibility factor
P1_Pa Double inlet pressure (Pa, absolute)
E Double pipeline efficiency factor
public static double GasPipelineFrictionalDeltaP(FlowPackage method, double D_m, double L_m, double Qstd_m3day, double G, double T, double Zf, double P1_Pa, double E)
Public Shared Function GasPipelineFrictionalDeltaP(method As FlowPackage, D_m As Double, L_m As Double, Qstd_m3day As Double, G As Double, T As Double, Zf As Double, P1_Pa As Double, E As Double) As Double

GetChartModel(string): Returns the chart model object for the specified chart name.

Returns the chart model object for the specified chart name.

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

GetChartModelNames(): Returns the names of available chart models for this unit operation.

Returns the names of available chart models for this unit operation.

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

GetDefaultProperties(): Returns the default set of properties shown in the flowsheet inspector.

Returns the default set of properties shown in the flowsheet inspector.

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

GetDisplayDescription(): Returns the localised display description.

Returns the localised display description.

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

GetDisplayName(): Returns the localised display name.

Returns the localised display name.

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

GetIconBitmapBytes(): Returns the icon bitmap as a byte array.

Returns the icon bitmap as a byte array.

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

GetProperties(PropertyType): Returns an array of property identifiers for the specified property type.

Returns an array of property identifiers for the specified property type.

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

GetPropertyDescription(string): Returns a human-readable description of the specified property.

Returns a human-readable description of the specified property.

Parameter Type Description
p String
public override string GetPropertyDescription(string p)
Public Overrides Function GetPropertyDescription(p As String) As String

GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.

Returns the unit string for the specified property.

Parameter Type Description
prop String
su IUnitsOfMeasure
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 the specified property.

Returns the value of the specified property.

Parameter Type Description
prop String
su IUnitsOfMeasure
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a plain-text report of the pipe segment results.

Generates a plain-text report of the pipe segment results.

Parameter Type Description
su IUnitsOfMeasure
ci CultureInfo
numberformat String
public override string GetReport(IUnitsOfMeasure su, CultureInfo ci, string numberformat)
Public Overrides Function GetReport(su As IUnitsOfMeasure, ci As CultureInfo, numberformat As String) As String

GetRugosity(string, PipeSection): Returns the pipe-wall rugosity (m) for the given material name and section.

Returns the pipe-wall rugosity (m) for the given material name and section.

Parameter Type Description
material String
section PipeSection
public double GetRugosity(string material, PipeSection section)
Public Function GetRugosity(material As String, section As PipeSection) As Double

GetStandardPipeSizes(): Loads standard commercial pipe sizes from the embedded resource file and returns them grouped by nominal diameter.

Loads standard commercial pipe sizes from the embedded resource file and returns them grouped by nominal diameter.

public static Dictionary<string, List<StandardPipeDiameter>> GetStandardPipeSizes()
Public Shared Function GetStandardPipeSizes() As Dictionary(Of String, List(Of StandardPipeDiameter))

hext_holman(double, double, double, double): Calculates the external convection coefficient of a cylinder in cross flow with the Holman correlation, Nu = 0.25...

Calculates the external convection coefficient of a cylinder in cross flow with the Holman correlation, Nu = 0.25 Re^0.6 Pr^0.38.

Parameter Type Description
k Double Thermal conductivity of the external fluid, in W/(m.K).
Dext Double Outer diameter, in m.
NRe Double Reynolds number based on Dext.
NPr Double Prandtl number of the external fluid.
public static double hext_holman(double k, double Dext, double NRe, double NPr)
Public Shared Function hext_holman(k As Double, Dext As Double, NRe As Double, NPr As Double) As Double

hint_petukhov(object, object, object, object, object): Calculates the internal convection coefficient for turbulent pipe flow with the Petukhov-Gnielinski correlation, Nu...

Calculates the internal convection coefficient for turbulent pipe flow with the Petukhov-Gnielinski correlation, Nu = (f/8)(Re - 1000)Pr / (1 + 12.7 (f/8)^0.5 (Pr^(2/3) - 1)).

Parameter Type Description
k Object Fluid thermal conductivity, in W/(m.K).
D Object Internal diameter, in m.
f Object Darcy friction factor.
NRe Object Reynolds number.
NPr Object Prandtl number.
public static object hint_petukhov(object k, object D, object f, object NRe, object NPr)
Public Shared Function hint_petukhov(k As Object, D As Object, f As Object, NRe As Object, NPr As Object) As Object

k_parede(string, double, PipeSection): Returns the thermal conductivity of the pipe wall material at the given temperature.

Returns the thermal conductivity of the pipe wall material at the given temperature. Built-in materials use temperature correlations; any other material evaluates the section's user expression (PipeWallThermalConductivityExpression, in the flowsheet's unit system, with T in K).

Parameter Type Description
material String The wall material name (translated or invariant).
T Double Wall temperature, in K.
section PipeSection The pipe section, used for the user-defined conductivity expression.
public double k_parede(string material, double T, PipeSection section)
Public Function k_parede(material As String, T As Double, section As PipeSection) As Double

k_terreno(int): Returns the thermal conductivity of the soil around a buried pipe.

Returns the thermal conductivity of the soil around a buried pipe.

Parameter Type Description
terreno Int32 External medium index from the thermal profile: 2 = gravel (1.1), 3 = stones (1.95), 4 = dry soil (0.5), 5 = moist soil (2.2); other values return 0.
public double k_terreno(int terreno)
Public Function k_terreno(terreno As Integer) As Double

Kfit(string): Returns the pressure loss data of a pipe fitting.

Returns the pressure loss data of a pipe fitting. The fitting is identified by the index written between square brackets at the end of its name (e.g. "... [7]" for a globe valve).

Parameter Type Description
name2 String The fitting name, ending with its index in square brackets.
public double[] Kfit(string name2)
Public Function Kfit(name2 As String) As Double()

LoadData(List<XElement>): Restores the pipe state, including dynamic accumulation streams, from a list of XML elements.

Restores the pipe state, including dynamic accumulation streams, from a list of XML elements.

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

NPr(double, double, double): Calculates the Prandtl number, Cp mu / k.

Calculates the Prandtl number, Cp mu / k.

Parameter Type Description
Cp Double Heat capacity, in J/(kg.K).
mu Double Dynamic viscosity, in Pa.s.
k Double Thermal conductivity, in W/(m.K).
public static double NPr(double Cp, double mu, double k)
Public Shared Function NPr(Cp As Double, mu As Double, k As Double) As Double

NRe(double, double, double, double): Calculates the Reynolds number, rho v D / mu.

Calculates the Reynolds number, rho v D / mu.

Parameter Type Description
rho Double Density, in kg/m3.
v Double Velocity, in m/s.
D Double Characteristic diameter, in m.
mu Double Dynamic viscosity, in Pa.s.
public static double NRe(double rho, double v, double D, double mu)
Public Shared Function NRe(rho As Double, v As Double, D As Double, mu As Double) As Double

PropsAGUA(double, double): Calculates the properties of water at the given temperature and pressure with the IAPWS-IF97 steam tables.

Calculates the properties of water at the given temperature and pressure with the IAPWS-IF97 steam tables.

Parameter Type Description
Tamb Double Water temperature, in K.
Pamb Double Water pressure, in Pa.
public object PropsAGUA(double Tamb, double Pamb)
Public Function PropsAGUA(Tamb As Double, Pamb As Double) As Object

PropsAR(double, double): Estimates the properties of air at the given temperature from simple temperature correlations.

Estimates the properties of air at the given temperature from simple temperature correlations.

Parameter Type Description
Tamb Double Air temperature, in K.
Pamb Double Air pressure, in Pa. Not used by the correlations.
public static object PropsAR(double Tamb, double Pamb)
Public Shared Function PropsAR(Tamb As Double, Pamb As Double) As Object

RunDynamicModel(): Performs the dynamic-mode calculation for the pipe segment.

Performs the dynamic-mode calculation for the pipe segment.

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

SaveData(): Serializes the pipe state, including dynamic accumulation streams, into a list of XML elements.

Serializes the pipe state, including dynamic accumulation streams, into a list of XML elements.

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

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

Sets the value of the specified property.

Parameter Type Description
prop String
propval Object
su IUnitsOfMeasure
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

UpdateEditForm(): Refreshes the editing form with updated data.

Refreshes the editing form with updated data.

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

Fields

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

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

public object f
Public f As Object