Class Fittings.Fitting
java.lang.Object
neqsim.process.equipment.pipeline.Fittings.Fitting
- All Implemented Interfaces:
Serializable
- Enclosing class:
Fittings
Inner class representing a single pipe fitting.
Each fitting has a name and an L/D ratio that defines its equivalent length contribution to pressure drop calculations.
- Version:
- 2.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDescriptive name of the fitting.private doubleOptional K-factor (resistance coefficient).private doubleEquivalent length ratio (L/D).private static final longSerialization version UID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetEquivalentLength(double diameter) Calculate equivalent length for a given pipe diameter.Get the fitting name.doubleGet the K-factor (resistance coefficient).doublegetLtoD()Get the equivalent length ratio (L/D).voidsetFittingName(String fittingName) Set the fitting name.voidsetKFactor(double kFactor) Set the K-factor (resistance coefficient).voidsetLtoD(double LtoD) Set the equivalent length ratio (L/D).toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
fittingName
Descriptive name of the fitting. -
LtoD
private double LtoDEquivalent length ratio (L/D). -
kFactor
private double kFactorOptional K-factor (resistance coefficient).
-
-
Constructor Details
-
Fitting
Constructor with explicit L/D ratio.- Parameters:
name- fitting nameLdivD- equivalent length ratio (L/D)
-
Fitting
Constructor that loads L/D from database.Attempts to load the fitting data from the 'fittings' database table. If not found, attempts to match against standard fitting types.
- Parameters:
name- fitting name as stored in database
-
-
Method Details
-
getFittingName
-
setFittingName
Set the fitting name.- Parameters:
fittingName- new fitting name
-
getLtoD
public double getLtoD()Get the equivalent length ratio (L/D).- Returns:
- L/D ratio (dimensionless)
-
setLtoD
public void setLtoD(double LtoD) Set the equivalent length ratio (L/D).- Parameters:
LtoD- new L/D ratio
-
getKFactor
public double getKFactor()Get the K-factor (resistance coefficient).The K-factor relates to L/D by: K = f × (L/D) where f is the friction factor.
- Returns:
- K-factor (dimensionless)
-
setKFactor
public void setKFactor(double kFactor) Set the K-factor (resistance coefficient).- Parameters:
kFactor- new K-factor
-
getEquivalentLength
public double getEquivalentLength(double diameter) Calculate equivalent length for a given pipe diameter.- Parameters:
diameter- pipe internal diameter in meters- Returns:
- equivalent length in meters
-
toString
-