Valve Class

Represents a valve unit operation that models a pressure letdown device. The valve reduces stream pressure via an isenthalpic (adiabatic) or isentropic flash, optionally using flow coefficient (Kv/Cv) equations for liquid, gas, steam, or two-phase service.

Definition

Namespace: DWSIM.UnitOperations.UnitOperations
Assembly: DWSIM.UnitOperations (in DWSIM.UnitOperations.dll) Version: 10.0.0.0
[SerializableAttribute]
public class Valve : UnitOpBaseClass
Inheritance
Object    BaseClass    UnitOpBaseClass    Valve

Constructors

Valve Initializes a new default instance of the Valve class.
Valve(String, String) Initializes a new instance of the Valve class with the specified name and description.

Properties

ActualKv Gets or sets the actual (effective) flow coefficient calculated during the last simulation step, accounting for the current opening percentage.
AdjustVarType If an Adjust object is attached to this object, returns a variable describing how this object is used by it (manipulated, controlled or reference).
(Inherited from BaseClass)
Annotation
(Inherited from BaseClass)
AttachedAdjustId If an Adjust object is attached to this object, returns its ID.
(Inherited from BaseClass)
AttachedInfoCarrierId
(Inherited from BaseClass)
AttachedSpecId If an Specification object is attached to this object, returns its ID.
(Inherited from BaseClass)
AttachedUtilities
(Inherited from BaseClass)
Bottom
(Inherited from BaseClass)
CalcMode Gets or sets the active calculation mode that determines how the valve outlet condition is computed.
Calculated
(Inherited from BaseClass)
CanUsePreviousResults
(Inherited from BaseClass)
CharacteristicParameter Gets or sets the rangeability (characteristic) parameter used in the equal-percentage flow characteristic calculation. Default is 50.
ComponentDescription Gets or sets the CAPE-OPEN component description for this unit operation.
(Inherited from UnitOpBaseClass)
ComponentName Gets or sets the CAPE-OPEN component name for this unit operation.
(Inherited from UnitOpBaseClass)
CreateChartAction
(Inherited from BaseClass)
DebugMode
(Inherited from BaseClass)
DebugText
(Inherited from BaseClass)
DefinedOpeningKvRelationShipType Gets or sets the type of opening/Kv characteristic curve to apply when EnableOpeningKvRelationship is True.
DeltaP Gets or sets the pressure drop (Pa) across the valve (P_inlet − P_outlet).
DeltaQ Gets or sets the heat duty (kJ/s) of the valve. Always zero for an adiabatic valve.
DeltaT Gets or sets the temperature change (K) across the valve (T_outlet − T_inlet).
DetailedDebugReport
(Inherited from BaseClass)
Dimensions Gets or sets the list of physical dimensions (e.g. vessel diameter, length) associated with this unit operation.
(Inherited from UnitOpBaseClass)
DynamicsOnly
(Inherited from BaseClass)
DynamicsSpec
(Inherited from BaseClass)
EnableOpeningKvRelationship Gets or sets a value indicating whether the opening/Kv relationship feature is active. When True, the effective Kv is calculated from the stem opening using the selected characteristic curve.
EnergyFlow Energy Flow property. Only implemented for Energy Streams.
(Inherited from BaseClass)
EquipmentTypes Gets the list of equipment sub-types supported by this valve object.
(Overrides UnitOpBaseClassEquipmentTypes)
ErrorMessage Gets or sets the error message regarding the last calculation attempt.
(Inherited from BaseClass)
EstimatedDiameter Gets or sets the estimated valve body diameter in metres, calculated from flow and Kv.
ExternalSolverConfigData Gets or sets serialized configuration data for the external solver associated with this unit operation.
(Inherited from UnitOpBaseClass)
ExternalSolverID Gets or sets the unique identifier of an external solver to be used for this unit operation.
(Inherited from UnitOpBaseClass)
ExtraProperties
(Inherited from BaseClass)
ExtraPropertiesDescriptions
(Inherited from BaseClass)
ExtraPropertiesTypes
(Inherited from BaseClass)
ExtraPropertiesUnitTypes
(Inherited from BaseClass)
Fi Gets or sets the incipient cavitation factor (Fi). Default is 0.9.
FL Gets or sets the liquid pressure recovery factor (FL) of the valve. Default is 0.9.
FlowCoefficient Gets or sets whether the flow coefficient is expressed as Kv (metric, m³/h at 1 bar drop) or Cv (imperial).
FlowSheet Gets the current flowsheet where this object is located.
(Inherited from BaseClass)
FP Gets or sets the piping geometry factor (FP) accounting for inlet/outlet fittings. Default is 1.0.
Fs Gets or sets the valve style modifier (Fs). Default is 1.0.
GHGEmissionData
(Inherited from BaseClass)
GraphicObject Gets or sets the graphic object representation of this object in the flowsheet.
(Inherited from BaseClass)
HasPropertiesForDynamicMode Gets a value indicating whether this valve exposes properties specific to dynamic mode.
(Overrides BaseClassHasPropertiesForDynamicMode)
HeatDuty Gets or sets the heat duty (kJ/s) associated with the valve. For an adiabatic valve this is always zero. Proxies DeltaQ.
Height
(Inherited from BaseClass)
Hinlet Gets or sets the specific enthalpy of the inlet stream in kJ/kg.
Houtlet Gets or sets the specific enthalpy of the outlet stream in kJ/kg.
InfoCarrierVarType
(Inherited from BaseClass)
IsAdjustAttached Checks if an Adjust operation is attached to this object.
(Inherited from BaseClass)
IsDirty
(Inherited from BaseClass)
IsFunctional
(Inherited from BaseClass)
IsInfoCarrierAttached
(Inherited from BaseClass)
IsSink
(Inherited from BaseClass)
IsSource
(Inherited from BaseClass)
IsSpecAttached Checks if an Specification operation is attached to this object.
(Inherited from BaseClass)
Kv Gets or sets the maximum flow coefficient (Kv or Cv depending on FlowCoefficient) for the valve at fully open position.
LastSolutionInputSnapshot
(Inherited from BaseClass)
LastUpdated
(Inherited from BaseClass)
Left
(Inherited from BaseClass)
MobileCompatible Gets a value indicating that this valve is compatible with the DWSIM mobile platform.
(Overrides BaseClassMobileCompatible)
N6 Gets or sets the numerical constant N6 used in the gas Kv sizing equation (SI units). Default is 31.6.
Name Object's Unique ID (Name)
(Inherited from BaseClass)
ObjectClass Gets the simulation object class category for this valve (PressureChangers).
(Overrides BaseClassObjectClass)
OpeningKvRelDataTableX Gets or sets the X-axis data points (opening percentage values) for the tabulated opening/Kv relationship.
OpeningKvRelDataTableY Gets or sets the Y-axis data points (Kv percentage values) for the tabulated opening/Kv relationship.
OpeningPct Gets or sets the valve stem opening as a percentage (0–100). In dynamic mode with actuator delay configured, setting this value enqueues the new opening for deferred application rather than applying it immediately.
OutletPressure Gets or sets the specified or calculated outlet pressure (Pa).
OutletTemperature Gets or sets the calculated outlet stream temperature (K).
OverrideCalculationRoutine
(Inherited from BaseClass)
ParticleSizeDistributions Gets or sets the dictionary of particle size distribution data, keyed by compound or stream name.
(Inherited from UnitOpBaseClass)
PercentOpeningVersusPercentKvExpression Gets or sets the mathematical expression that relates valve stem opening percentage (variable OP) to the effective Kv as a percentage of the maximum Kv. Used when EnableOpeningKvRelationship is True and DefinedOpeningKvRelationShipType is UserDefined.
Phases Phase collection, only implemented for Material Streams.
(Inherited from BaseClass)
PreferredFlashAlgorithmTag
(Inherited from BaseClass)
PressureDrop Gets or sets the pressure drop (Pa) across the valve. Proxies DeltaP.
ProductAssembly
(Inherited from BaseClass)
ProductAuthor
(Inherited from BaseClass)
ProductContactInfo
(Inherited from BaseClass)
ProductDescription
(Inherited from BaseClass)
ProductName
(Inherited from BaseClass)
ProductPage
(Inherited from BaseClass)
ProductVersion
(Inherited from BaseClass)
PropertyPackage Gets or sets the property package associated with this object.
(Inherited from UnitOpBaseClass)
Right
(Inherited from BaseClass)
SelectedEquipmentType Gets or sets the name of the equipment type currently selected for this unit operation.
(Inherited from UnitOpBaseClass)
SpecVarType If an Specification object is attached to this object, returns a variable describing how this object is used by it (target or source).
(Inherited from BaseClass)
StoreDetailedDebugReport
(Inherited from BaseClass)
SupportsDynamicMode Gets a value indicating whether this valve supports dynamic simulation mode.
(Overrides BaseClassSupportsDynamicMode)
SupportsParticleSizeDistributions Gets a value indicating whether this unit operation supports particle size distribution calculations.
(Inherited from UnitOpBaseClass)
SupportsRestoreStateAfterError Gets a value indicating whether this unit operation supports restoring its state after a solver error.
(Inherited from UnitOpBaseClass)
TemperatureChange Gets or sets the temperature change (K) across the valve as a result of the pressure letdown. Proxies DeltaT.
Top
(Inherited from BaseClass)
UserDefinedChartNames
(Inherited from BaseClass)
Visible
(Inherited from BaseClass)
Width
(Inherited from BaseClass)
xT Gets or sets the pressure differential ratio factor (xT) used in gas/two-phase Kv calculations. Default is 0.75.

Methods

AddDynamicProperty
(Inherited from BaseClass)
AddExtraProperty
(Inherited from BaseClass)
AppendDebugLine
(Inherited from BaseClass)
Calculate Performs the steady-state valve calculation. Determines the outlet pressure from the selected CalcMode (DeltaP, OutletPressure, or Kv-based), then performs an isenthalpic (PH) flash to find the outlet temperature and phase state.
(Overrides BaseClassCalculate(Object))
CalculateKv Calculates and updates the valve's maximum flow coefficient (Kv or Cv) from the current inlet and outlet stream conditions. The appropriate sizing equation is selected based on the current CalcMode and the phase state of the inlet stream. Also back-calculates the full-open Kv from the opening/Kv relationship when enabled.
CheckDirtyStatus Checks whether the unit operation's input data has changed since the last successful solve, and updates the dirty flag accordingly.
(Inherited from UnitOpBaseClass)
CheckSpec Checks if a value is valid.
(Inherited from BaseClass)
ClearExtraProperties
(Inherited from BaseClass)
ClearPropertyPackageInstance Removes the externally set property package instance from this unit operation, reverting to the flowsheet-level property package lookup.
(Inherited from UnitOpBaseClass)
Clone Clones the current object, returning a new one with identical properties.
(Inherited from BaseClass)
CloneJSON Creates a deep copy of this valve by serialising and deserialising via JSON.
(Overrides BaseClassCloneJSON)
CloneXML Creates a deep copy of this valve by serialising and deserialising via the custom XML mechanism.
(Overrides BaseClassCloneXML)
CloseDynamicsEditForm
(Inherited from BaseClass)
CloseEditForm Closes and disposes the editing form for this valve if it is currently open.
(Overrides BaseClassCloseEditForm)
ConnectEnergyStream
(Inherited from BaseClass)
ConnectFeedEnergyStream
(Inherited from BaseClass)
ConnectFeedMaterialStream
(Inherited from BaseClass)
ConnectProductEnergyStream
(Inherited from BaseClass)
ConnectProductMaterialStream
(Inherited from BaseClass)
CopyDataToClipboard Copies the object properties to the Clipboard.
(Inherited from BaseClass)
CreateDimensionsList Creates the list of physical dimensions associated with this valve (diameter).
(Overrides UnitOpBaseClassCreateDimensionsList)
CreateDynamicProperties Registers dynamic simulation properties for this valve, specifically the actuator delay.
(Overrides BaseClassCreateDynamicProperties)
CreateNew
(Inherited from BaseClass)
DeCalculate Clears the results on the outlet stream, resetting temperatures, pressures, enthalpies, and compositions to indeterminate values. Called when the calculation is invalidated.
(Overrides UnitOpBaseClassDeCalculate)
DeCalculate(Object)
(Inherited from BaseClass)
DisplayDynamicsEditForm
(Inherited from BaseClass)
DisplayEditForm Opens (or activates) the editing form for this valve in the flowsheet UI.
(Overrides BaseClassDisplayEditForm)
DisplayExtraPropertiesEditForm
(Inherited from BaseClass)
Dispose
(Inherited from BaseClass)
Dispose(Boolean)
(Inherited from BaseClass)
F_F Calculates the liquid critical pressure ratio factor F_F = 0.96 − 0.28 × √(Pv/Pc), used to determine the effective pressure at which choked liquid flow begins.
F_k Calculates the ratio of specific heats factor F_k = k / 1.4, used in gas Kv sizing equations.
FT Formats a property string, adding its units in parenthesis.
(Inherited from BaseClass)
GetAsObject
(Inherited from BaseClass)
GetBytesFromResource
(Inherited from BaseClass)
GetCalculationModes Returns an array of strings describing all available calculation modes for this valve.
(Overrides UnitOpBaseClassGetCalculationModes)
GetChartModel
(Inherited from BaseClass)
GetChartModelNames
(Inherited from BaseClass)
GetConnectionPortsInfo
(Inherited from BaseClass)
GetConnectionPortsList
(Inherited from BaseClass)
GetDebugReport Runs the unit operation in debug mode and returns a formatted text report containing intermediate calculation steps and any error information.
(Inherited from UnitOpBaseClass)
GetDebugWriter
(Inherited from BaseClass)
GetDefaultProperties
(Inherited from BaseClass)
GetDisplayDescription Returns the localised description string for this valve, shown in the object palette and tooltips.
(Overrides BaseClassGetDisplayDescription)
GetDisplayName Returns the localised display name for this valve, shown in the flowsheet and property grid.
(Overrides BaseClassGetDisplayName)
GetDynamicContents Returns the current mass held in the accumulation stream of this unit operation.
(Inherited from UnitOpBaseClass)
GetDynamicProperty
(Inherited from BaseClass)
GetDynamicPropertyUnitType
(Inherited from BaseClass)
GetDynamicResidenceTime Returns the dynamic residence time of this unit operation, computed as volume divided by the total volumetric inlet flow rate.
(Inherited from UnitOpBaseClass)
GetDynamicVolume Returns the dynamic volume of this unit operation from its dynamic property store.
(Inherited from UnitOpBaseClass)
GetEditingForm
(Inherited from BaseClass)
GetEnergyBalanceResidual
(Inherited from BaseClass)
GetEnergyConsumption Returns the total energy consumed by this unit operation by summing the energy flows from all connected energy streams and the energy connector.
(Inherited from UnitOpBaseClass)
GetExtraPropertyValue
(Inherited from BaseClass)
GetFlowsheet
(Inherited from BaseClass)
GetIconBitmap Returns the bitmap icon associated with this valve for display in the flowsheet.
(Overrides BaseClassGetIconBitmap)
GetIconBitmapBytes Returns the raw bytes of the valve icon PNG resource, used for cross-platform icon loading.
(Overrides BaseClassGetIconBitmapBytes)
GetKeyPropertyNames Returns the names of the key output properties reported by this unit operation.
(Inherited from UnitOpBaseClass)
GetKeyPropertyUnits Returns the display unit string for a named key property.
(Inherited from UnitOpBaseClass)
GetKeyPropertyValue Returns the current numeric value of a named key property in SI units.
(Inherited from UnitOpBaseClass)
GetMassBalanceResidual
(Inherited from BaseClass)
GetPowerGeneratedOrConsumed
(Inherited from BaseClass)
GetPreferredGraphicObjectHeight
(Inherited from BaseClass)
GetPreferredGraphicObjectWidth
(Inherited from BaseClass)
GetProperties Returns an array of property identifier strings for the valve, filtered by the requested property access type.
(Overrides BaseClassGetProperties(PropertyType))
GetProperties2
(Inherited from BaseClass)
GetPropertyDescription Returns a user-facing description for the specified property name, displayed in the property grid tooltip.
(Overrides BaseClassGetPropertyDescription(String))
GetPropertyUnit Returns the display unit string for the specified property in the given unit system.
(Overrides BaseClassGetPropertyUnit(String, IUnitsOfMeasure))
GetPropertyUnits2
(Inherited from BaseClass)
GetPropertyValue Returns the value of the specified property, converted to the requested unit system.
(Overrides UnitOpBaseClassGetPropertyValue(String, IUnitsOfMeasure))
GetPropertyValue2
(Inherited from BaseClass)
GetReport Generates a plain-text results report for this valve, listing inlet conditions, calculation parameters, and results.
(Overrides BaseClassGetReport(IUnitsOfMeasure, CultureInfo, String))
GetStructuredReport Generates a structured results report as a list of typed tuples, used by the UI report viewer. Each tuple contains a ReportItemType tag and an array of display strings.
(Overrides BaseClassGetStructuredReport)
GetVersion
(Inherited from BaseClass)
IsDynamicProperty
(Inherited from BaseClass)
KvGas Calculates the valve flow coefficient (Kv) for single-phase gas service per ANSI/ISA-75.01.01, applying the choked-flow correction via Y and x_choked.
KvLiquid Calculates the valve flow coefficient (Kv) for single-phase liquid service per ANSI/ISA-75.01.01, applying the choked-flow limit based on F_L and F_F.
KvTwoPhase Calculates the combined Kv for two-phase (gas/liquid) flow using the Masoneilan blending method.
LoadData Restores the unit operation state from a list of XML elements previously produced by SaveData.
(Inherited from UnitOpBaseClass)
ObjectCopy
(Inherited from BaseClass)
P1TwoPhase Iteratively calculates the inlet pressure P1 for two-phase service given a known mass flow rate, outlet pressure and flow coefficient, using Newton's method.
P2_Gas Calculates the outlet pressure P2 for single-phase gas service given a known mass flow rate and flow coefficient, using bisection search within the non-choked pressure range.
P2Liquid Calculates the outlet pressure P2 for single-phase liquid service given a known mass flow rate and flow coefficient, applying the choked-flow limit.
P2TwoPhase Calculates the outlet pressure P2 for two-phase service given a known mass flow rate, inlet conditions and flow coefficient using bisection search.
PerformPostCalcValidation
(Inherited from BaseClass)
RemoveDynamicProperty
(Inherited from BaseClass)
RemoveExtraProperty
(Inherited from BaseClass)
RunDynamicModel Executes the valve model for one dynamic simulation time step, updating mass flow rates and pressures on connected streams based on the current opening and flow coefficient. Handles actuator delay by deferring opening changes when configured.
(Overrides BaseClassRunDynamicModel)
SaveData Serializes the unit operation state to a list of XML elements for persistence.
(Inherited from UnitOpBaseClass)
SetCalculationMode Sets the valve calculation mode by its integer identifier and returns the name of the new mode.
(Overrides UnitOpBaseClassSetCalculationMode(Int32))
SetCanUsePreviousResults
(Inherited from BaseClass)
SetDirtyStatus
(Inherited from BaseClass)
SetDynamicProperty
(Inherited from BaseClass)
SetExtraPropertyValue
(Inherited from BaseClass)
SetFlowsheet Sets the Flowsheet to which this object belongs to.
(Inherited from BaseClass)
SetKeyPropertyValue Sets the value of a named key property, converting from the supplied units to SI internally.
(Inherited from UnitOpBaseClass)
SetPropertyPackageInstance Assigns an externally supplied property package instance to this unit operation, bypassing the flowsheet-level property package lookup.
(Inherited from UnitOpBaseClass)
SetPropertyValue Sets the value of the specified property, converting from the supplied unit system to SI.
(Overrides BaseClassSetPropertyValue(String, Object, IUnitsOfMeasure))
SetPropertyValue2
(Inherited from BaseClass)
SimpleKvGas Calculates the valve flow coefficient (Kv) for single-phase gas service using the simplified ISA equation. Applies the choked-flow correction when the downstream pressure falls below half the upstream pressure.
SimpleKvLiquid Calculates the valve flow coefficient (Kv) for single-phase liquid service using the simplified ISA equation.
SimpleWTwoPhase Calculates the total mass flow rate through the valve for two-phase service using simplified (non-ISA) liquid and gas equations, suitable for iterative pressure calculations.
Solve Solves the unit operation, optionally saving and restoring state on error when the flowsheet option RestoreUnitOperationStateAfterError is enabled.
(Inherited from UnitOpBaseClass)
StoreDebugReport
(Inherited from BaseClass)
ToString
(Inherited from BaseClass)
TransferAdditionalSolidData
(Inherited from BaseClass)
Unsolve Decalculates the object.
(Inherited from UnitOpBaseClass)
UpdateDimensionsList Updates the valve's estimated diameter dimension based on the current volumetric flow rate and Kv coefficient.
(Overrides UnitOpBaseClassUpdateDimensionsList)
UpdateDynamicsEditForm
(Inherited from BaseClass)
UpdateEditForm Refreshes the content of the editing form with the latest calculated values, if the form is currently open.
(Overrides BaseClassUpdateEditForm)
UpdateExtraPropertiesEditForm
(Inherited from BaseClass)
Validate Validates the object, checking its connections and other parameters.
(Inherited from BaseClass)
WGas Calculates the gas mass flow rate through the valve given a known Kv per ANSI/ISA-75.01.01, applying the choked-flow correction via Y and x_choked.
WLiquid Calculates the mass flow rate through the valve for single-phase liquid service given a known Kv, applying the choked-flow limit based on F_L and F_F.
WTwoPhase Calculates the total mass flow rate through the valve for two-phase service given a known Kv. Uses the Masoneilan blending method to combine liquid and gas contributions.
x_choked Calculates the choked-flow pressure differential ratio x_choked = F_k × xT. Flow is choked when the actual ratio x exceeds this value.
x_ratio Calculates the pressure differential ratio x = (P1 − P2) / P1.
Y_factor Calculates the expansion factor Y, which accounts for the change in gas density as it flows through the valve restriction (per ANSI/ISA-75.01.01).

Fields

Extension Methods

See Also