Class PackingSpecificationLibrary
java.lang.Object
neqsim.process.equipment.distillation.internals.PackingSpecificationLibrary
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 Summary
FieldsModifier and TypeFieldDescriptionRegistered display names in deterministic order.private static final org.apache.logging.log4j.LoggerLogger object for class.private static final Map<String, PackingSpecification> Registered specifications keyed by normalized aliases. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor for utility class. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck if a packing name is registered.private static doublecriticalSurfaceTension(String material) Estimate critical surface tension from packing material.private static StringdisplayName(String rawName, String category, double size) Build a display name from CSV fields.static PackingSpecificationGet a packing specification by name or alias.static PackingSpecificationgetOrDefault(String name) Get a packing specification, returning Pall-Ring-50 when no match exists.Get the display names of registered packings.private static voidLoad packing specifications from the classpath CSV resource.private static StringNormalize a packing name for forgiving lookup.private static PackingSpecificationparseCsvLine(String line) Parse one CSV line from the packing design-data table.private static doubleparseDouble(String text, double fallback) Parse a double with fallback.static voidregister(PackingSpecification specification) Register a packing specification.static voidregisterAlias(String alias, PackingSpecification specification) Register an extra alias for an existing packing specification.private static voidRegister built-in random and structured packing data.private static voidregisterRandom(String name, String material, double nominalSizeMm, double specificArea, double voidFraction, double packingFactor, double billetLiquidConstant, double billetGasConstant, String source) Register a random packing.private static voidregisterStructured(String name, String material, double specificArea, double voidFraction, double packingFactor, double billetLiquidConstant, double billetGasConstant, String source) Register a structured packing.Split a simple CSV line with quoted fields.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger object for class. -
PACKINGS
Registered specifications keyed by normalized aliases. -
DISPLAY_NAMES
-
-
Constructor Details
-
PackingSpecificationLibrary
private PackingSpecificationLibrary()Private constructor for utility class.
-
-
Method Details
-
register
Register a packing specification.- Parameters:
specification- specification to register- Throws:
IllegalArgumentException- if the specification is null
-
registerAlias
Register an extra alias for an existing packing specification.- Parameters:
alias- alias to registerspecification- specification to associate with the alias- Throws:
IllegalArgumentException- if alias or specification is invalid
-
get
Get a packing specification by name or alias.- Parameters:
name- packing name or alias- Returns:
- packing specification, or null if no match exists
-
getOrDefault
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
Check if a packing name is registered.- Parameters:
name- packing name or alias- Returns:
- true if the packing can be resolved
-
getPackingNames
-
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 namematerial- packing materialnominalSizeMm- nominal size in millimetresspecificArea- specific surface area in m2/m3voidFraction- void fractionpackingFactor- packing factor in 1/mbilletLiquidConstant- Billet-Schultes liquid constantbilletGasConstant- Billet-Schultes gas constantsource- 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 namematerial- packing materialspecificArea- specific surface area in m2/m3voidFraction- void fractionpackingFactor- packing factor in 1/mbilletLiquidConstant- Billet-Schultes liquid constantbilletGasConstant- Billet-Schultes gas constantsource- data source description
-
loadCsvPackings
private static void loadCsvPackings()Load packing specifications from the classpath CSV resource. -
parseCsvLine
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
-
parseDouble
Parse a double with fallback.- Parameters:
text- value text to parsefallback- fallback value when text is empty or invalid- Returns:
- parsed double or fallback
-
displayName
-
criticalSurfaceTension
Estimate critical surface tension from packing material.- Parameters:
material- material text- Returns:
- critical surface tension in N/m
-
normalize
-