Class PackingSpecificationLibrary

java.lang.Object
neqsim.process.equipment.distillation.internals.PackingSpecificationLibrary

public final class PackingSpecificationLibrary extends Object
Registry for packed-column packing specifications.

The registry combines built-in vendor-style presets with entries loaded from src/main/resources/designdata/Packing.csv. Names are matched with a forgiving normalized key, so values such as Pall-Ring-50, pallring 50, and CSV names all map to the same specification where possible.

Version:
1.0
Author:
NeqSim
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
      Logger object for class.
    • PACKINGS

      private static final Map<String, PackingSpecification> PACKINGS
      Registered specifications keyed by normalized aliases.
    • DISPLAY_NAMES

      private static final Set<String> DISPLAY_NAMES
      Registered display names in deterministic order.
  • Constructor Details

    • PackingSpecificationLibrary

      private PackingSpecificationLibrary()
      Private constructor for utility class.
  • Method Details

    • register

      public static void register(PackingSpecification specification)
      Register a packing specification.
      Parameters:
      specification - specification to register
      Throws:
      IllegalArgumentException - if the specification is null
    • registerAlias

      public static void registerAlias(String alias, PackingSpecification specification)
      Register an extra alias for an existing packing specification.
      Parameters:
      alias - alias to register
      specification - specification to associate with the alias
      Throws:
      IllegalArgumentException - if alias or specification is invalid
    • get

      public static PackingSpecification get(String name)
      Get a packing specification by name or alias.
      Parameters:
      name - packing name or alias
      Returns:
      packing specification, or null if no match exists
    • getOrDefault

      public static PackingSpecification getOrDefault(String name)
      Get a packing specification, returning Pall-Ring-50 when no match exists.
      Parameters:
      name - packing name or alias
      Returns:
      matched specification or default Pall-Ring-50 specification
    • contains

      public static boolean contains(String name)
      Check if a packing name is registered.
      Parameters:
      name - packing name or alias
      Returns:
      true if the packing can be resolved
    • getPackingNames

      public static List<String> getPackingNames()
      Get the display names of registered packings.
      Returns:
      unmodifiable list of packing display names
    • registerBuiltIns

      private static void registerBuiltIns()
      Register built-in random and structured packing data.
    • registerRandom

      private static void registerRandom(String name, String material, double nominalSizeMm, double specificArea, double voidFraction, double packingFactor, double billetLiquidConstant, double billetGasConstant, String source)
      Register a random packing.
      Parameters:
      name - packing name
      material - packing material
      nominalSizeMm - nominal size in millimetres
      specificArea - specific surface area in m2/m3
      voidFraction - void fraction
      packingFactor - packing factor in 1/m
      billetLiquidConstant - Billet-Schultes liquid constant
      billetGasConstant - Billet-Schultes gas constant
      source - data source description
    • registerStructured

      private static void registerStructured(String name, String material, double specificArea, double voidFraction, double packingFactor, double billetLiquidConstant, double billetGasConstant, String source)
      Register a structured packing.
      Parameters:
      name - packing name
      material - packing material
      specificArea - specific surface area in m2/m3
      voidFraction - void fraction
      packingFactor - packing factor in 1/m
      billetLiquidConstant - Billet-Schultes liquid constant
      billetGasConstant - Billet-Schultes gas constant
      source - data source description
    • loadCsvPackings

      private static void loadCsvPackings()
      Load packing specifications from the classpath CSV resource.
    • parseCsvLine

      private static PackingSpecification parseCsvLine(String line)
      Parse one CSV line from the packing design-data table.
      Parameters:
      line - CSV line to parse
      Returns:
      packing specification, or null if the line cannot be parsed
    • splitCsv

      private static List<String> splitCsv(String line)
      Split a simple CSV line with quoted fields.
      Parameters:
      line - CSV line to split
      Returns:
      list of unquoted fields
    • parseDouble

      private static double parseDouble(String text, double fallback)
      Parse a double with fallback.
      Parameters:
      text - value text to parse
      fallback - fallback value when text is empty or invalid
      Returns:
      parsed double or fallback
    • displayName

      private static String displayName(String rawName, String category, double size)
      Build a display name from CSV fields.
      Parameters:
      rawName - raw packing name from CSV
      category - packing category
      size - nominal size in millimetres
      Returns:
      display name used by the registry
    • criticalSurfaceTension

      private static double criticalSurfaceTension(String material)
      Estimate critical surface tension from packing material.
      Parameters:
      material - material text
      Returns:
      critical surface tension in N/m
    • normalize

      private static String normalize(String name)
      Normalize a packing name for forgiving lookup.
      Parameters:
      name - packing name or alias
      Returns:
      normalized lookup key