Class DesignSpecification

java.lang.Object
neqsim.process.design.DesignSpecification

public class DesignSpecification extends Object
Builder class for standardized equipment design specification.

This class provides a fluent API for configuring equipment design parameters in a consistent way across all equipment types. It integrates with company technical requirements (TR) documents and design standards.

Example usage:

DesignSpecification.forSeparator("20-VA-01").setKFactor(0.08).setDiameter(3.0, "m")
    .setLength(8.0, "m").setMaterial("316L").setStandard("ASME-VIII").applyTo(separator);
Version:
1.0
Author:
NeqSim Development Team
  • Field Details

    • equipmentName

      private String equipmentName
    • equipmentType

      private String equipmentType
    • designParameters

      private Map<String,Double> designParameters
    • designParameterUnits

      private Map<String,String> designParameterUnits
    • operatingLimits

      private Map<String,Double> operatingLimits
    • materialGrade

      private String materialGrade
    • designStandard

      private String designStandard
    • trDocument

      private String trDocument
    • companyStandard

      private String companyStandard
    • safetyFactor

      private double safetyFactor
  • Constructor Details

    • DesignSpecification

      private DesignSpecification(String equipmentName, String equipmentType)
      Private constructor - use factory methods.
      Parameters:
      equipmentName - name of the equipment
      equipmentType - type of equipment (Separator, Valve, etc.)
  • Method Details

    • forSeparator

      public static DesignSpecification forSeparator(String name)
      Create design specification for a separator.
      Parameters:
      name - equipment name/tag
      Returns:
      new DesignSpecification configured for separators
    • forThreePhaseSeparator

      public static DesignSpecification forThreePhaseSeparator(String name)
      Create design specification for a three-phase separator.
      Parameters:
      name - equipment name/tag
      Returns:
      new DesignSpecification configured for three-phase separators
    • forValve

      public static DesignSpecification forValve(String name)
      Create design specification for a valve.
      Parameters:
      name - equipment name/tag
      Returns:
      new DesignSpecification configured for valves
    • forPipeline

      public static DesignSpecification forPipeline(String name)
      Create design specification for a pipeline.
      Parameters:
      name - equipment name/tag
      Returns:
      new DesignSpecification configured for pipelines
    • forHeater

      public static DesignSpecification forHeater(String name)
      Create design specification for a heater or cooler.
      Parameters:
      name - equipment name/tag
      Returns:
      new DesignSpecification configured for heaters/coolers
    • forCompressor

      public static DesignSpecification forCompressor(String name)
      Create design specification for a compressor.
      Parameters:
      name - equipment name/tag
      Returns:
      new DesignSpecification configured for compressors
    • setMaterial

      public DesignSpecification setMaterial(String grade)
      Set the material grade for the equipment.
      Parameters:
      grade - material grade (e.g., "316L", "SA-516-70", "X65")
      Returns:
      this specification for chaining
    • setStandard

      public DesignSpecification setStandard(String standard)
      Set the design standard.
      Parameters:
      standard - design standard code (e.g., "ASME-VIII", "DNV-OS-F101", "API-5L")
      Returns:
      this specification for chaining
    • setTRDocument

      public DesignSpecification setTRDocument(String company, String trDoc)
      Set the company technical requirements document.
      Parameters:
      company - company name (e.g., "Equinor", "Shell")
      trDoc - TR document reference (e.g., "TR2000", "DEP-31.38.01.11")
      Returns:
      this specification for chaining
    • setSafetyFactor

      public DesignSpecification setSafetyFactor(double factor)
      Set the safety factor for sizing.
      Parameters:
      factor - safety factor (typically 1.1-1.3)
      Returns:
      this specification for chaining
    • setKFactor

      public DesignSpecification setKFactor(double kFactor)
      Set the gas load factor (K-factor) for a separator.
      Parameters:
      kFactor - Souders-Brown coefficient in m/s
      Returns:
      this specification for chaining
    • setDiameter

      public DesignSpecification setDiameter(double diameter, String unit)
      Set the separator internal diameter.
      Parameters:
      diameter - diameter value
      unit - unit (e.g., "m", "mm", "inch")
      Returns:
      this specification for chaining
    • setLength

      public DesignSpecification setLength(double length, String unit)
      Set the separator length.
      Parameters:
      length - length value
      unit - unit (e.g., "m", "mm", "ft")
      Returns:
      this specification for chaining
    • setCv

      public DesignSpecification setCv(double cv)
      Set the valve flow coefficient (Cv).
      Parameters:
      cv - flow coefficient in US gpm/sqrt(psi)
      Returns:
      this specification for chaining
    • setMaxValveOpening

      public DesignSpecification setMaxValveOpening(double maxOpening)
      Set the maximum valve opening percentage.
      Parameters:
      maxOpening - maximum opening (0-100%)
      Returns:
      this specification for chaining
    • setPipeDiameter

      public DesignSpecification setPipeDiameter(double diameter, String unit)
      Set the pipeline internal diameter.
      Parameters:
      diameter - diameter value
      unit - unit (e.g., "m", "mm", "inch")
      Returns:
      this specification for chaining
    • setPipeLength

      public DesignSpecification setPipeLength(double length, String unit)
      Set the pipeline length.
      Parameters:
      length - length value
      unit - unit (e.g., "m", "km", "ft")
      Returns:
      this specification for chaining
    • setMaxVelocity

      public DesignSpecification setMaxVelocity(double velocity)
      Set the maximum design velocity for the pipeline.
      Parameters:
      velocity - velocity in m/s
      Returns:
      this specification for chaining
    • setWallThickness

      public DesignSpecification setWallThickness(double thickness, String unit)
      Set the wall thickness for the pipeline.
      Parameters:
      thickness - thickness value
      unit - unit (e.g., "m", "mm", "inch")
      Returns:
      this specification for chaining
    • setMaxDuty

      public DesignSpecification setMaxDuty(double duty, String unit)
      Set the maximum design duty for a heater or cooler.
      Parameters:
      duty - duty value
      unit - unit (e.g., "kW", "MW", "BTU/hr")
      Returns:
      this specification for chaining
    • applyTo

      public void applyTo(ProcessEquipmentInterface equipment)
      Apply this specification to the given equipment.

      This method configures the equipment with all the design parameters and operating limits defined in this specification.

      Parameters:
      equipment - the equipment to configure
      Throws:
      IllegalArgumentException - if equipment type doesn't match specification
    • applyToSeparator

      private void applyToSeparator(Separator separator)
    • applyToThreePhaseSeparator

      private void applyToThreePhaseSeparator(ThreePhaseSeparator separator)
    • applyToValve

      private void applyToValve(ThrottlingValve valve)
    • applyToPipeline

      private void applyToPipeline(PipeBeggsAndBrills pipeline)
    • applyToHeater

      private void applyToHeater(Heater heater)
    • convertToMeters

      private double convertToMeters(double value, String unit)
    • getEquipmentName

      public String getEquipmentName()
      Get the equipment name.
      Returns:
      equipment name
    • getEquipmentType

      public String getEquipmentType()
      Get the equipment type.
      Returns:
      equipment type
    • getDesignParameters

      public Map<String,Double> getDesignParameters()
      Get all design parameters.
      Returns:
      map of parameter name to value
    • getOperatingLimits

      public Map<String,Double> getOperatingLimits()
      Get all operating limits.
      Returns:
      map of limit name to value
    • getSafetyFactor

      public double getSafetyFactor()
      Get the safety factor.
      Returns:
      safety factor
    • getMaterialGrade

      public String getMaterialGrade()
      Get the material grade.
      Returns:
      material grade or null if not set
    • getDesignStandard

      public String getDesignStandard()
      Get the design standard.
      Returns:
      design standard or null if not set