Class Crystallizer

All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface

public class Crystallizer extends ProcessEquipmentBaseClass
Crystallizer for producing solid crystals from solution.

Models a crystallization process where dissolved solutes are brought out of solution as solid crystals. Supports cooling crystallization (reducing temperature), evaporative crystallization (removing solvent), and anti-solvent crystallization.

The crystallizer operates by flashing the feed at reduced temperature and/or pressure to concentrate the solution beyond the saturation point, causing crystallization. NeqSim's solid phase equilibrium capabilities (TPSolidflash) are leveraged when available.

Usage example:

Crystallizer cryst = new Crystallizer("Sugar Crystallizer", feedStream);
cryst.setCrystallizationType("cooling");
cryst.setOutletTemperature(273.15 + 30.0); // cool to 30 C
cryst.setSolidRecovery(0.85); // 85% of solute crystallizes
cryst.run();

StreamInterface crystals = cryst.getCrystalStream();
StreamInterface motherLiquor = cryst.getMotherLiquorStream();
Version:
1.0
Author:
NeqSim team
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • logger

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

      private StreamInterface inletStream
      Inlet feed stream.
    • crystalStream

      private StreamInterface crystalStream
      Crystal (solid) outlet stream.
    • motherLiquorStream

      private StreamInterface motherLiquorStream
      Mother liquor (liquid) outlet stream.
    • crystallizationType

      private String crystallizationType
      Type of crystallization: "cooling", "evaporative", "antisolvent".
    • outletTemperature

      private double outletTemperature
      Outlet temperature in Kelvin. Used for cooling crystallization.
    • outletPressure

      private double outletPressure
      Outlet pressure in bara. Used for evaporative crystallization.
    • solidRecovery

      private double solidRecovery
      Solid recovery fraction of the target solute (0-1).
    • targetSolute

      private String targetSolute
      Name of the target solute to crystallize.
    • crystalPurity

      private double crystalPurity
      Crystal purity (mass fraction of target in crystals).
    • residenceTime

      private double residenceTime
      Residence time in hours.
    • vesselVolume

      private double vesselVolume
      Vessel volume in m3.
    • heatDuty

      private double heatDuty
      Heat duty for cooling/heating in Watts.
  • Constructor Details

    • Crystallizer

      public Crystallizer(String name)
      Constructor for Crystallizer.
      Parameters:
      name - name of the crystallizer
    • Crystallizer

      public Crystallizer(String name, StreamInterface inletStream)
      Constructor for Crystallizer with inlet stream.
      Parameters:
      name - name of the crystallizer
      inletStream - the feed stream
  • Method Details

    • setInletStream

      public void setInletStream(StreamInterface inletStream)
      Set the inlet stream.
      Parameters:
      inletStream - the feed stream
    • getInletStream

      public StreamInterface getInletStream()
      Get the inlet stream.
      Returns:
      inlet stream
    • getCrystalStream

      public StreamInterface getCrystalStream()
      Get the crystal (solid) outlet stream.
      Returns:
      crystal stream
    • getMotherLiquorStream

      public StreamInterface getMotherLiquorStream()
      Get the mother liquor outlet stream.
      Returns:
      mother liquor stream
    • getInletStreams

      public List<StreamInterface> getInletStreams()
      Returns all inlet streams connected to this equipment. Subclasses override to report their specific inlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology without instanceof checks.
      Returns:
      unmodifiable list of inlet streams (empty by default)
    • getOutletStreams

      public List<StreamInterface> getOutletStreams()
      Returns all outlet streams produced by this equipment. Subclasses override to report their specific outlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology without instanceof checks.
      Returns:
      unmodifiable list of outlet streams (empty by default)
    • setCrystallizationType

      public void setCrystallizationType(String type)
      Set the crystallization type.
      Parameters:
      type - "cooling", "evaporative", or "antisolvent"
    • getCrystallizationType

      public String getCrystallizationType()
      Get the crystallization type.
      Returns:
      crystallization type
    • setOutletTemperature

      public void setOutletTemperature(double temperatureK)
      Set the outlet temperature.
      Parameters:
      temperatureK - temperature in Kelvin
    • setOutletTemperature

      public void setOutletTemperature(double temperature, String unit)
      Set the outlet temperature with unit.
      Parameters:
      temperature - temperature value
      unit - temperature unit ("K", "C", "F")
    • getOutletTemperature

      public double getOutletTemperature()
      Get the outlet temperature in Kelvin.
      Returns:
      outlet temperature
    • setOutletPressure

      public void setOutletPressure(double pressureBara)
      Set the outlet pressure (for evaporative crystallization).
      Parameters:
      pressureBara - pressure in bara
    • getOutletPressure

      public double getOutletPressure()
      Get the outlet pressure.
      Returns:
      pressure in bara
    • setSolidRecovery

      public void setSolidRecovery(double recovery)
      Set the solid recovery fraction.
      Parameters:
      recovery - fraction of solute that crystallizes (0-1)
    • getSolidRecovery

      public double getSolidRecovery()
      Get the solid recovery fraction.
      Returns:
      solid recovery
    • setTargetSolute

      public void setTargetSolute(String componentName)
      Set the target solute to crystallize.
      Parameters:
      componentName - name of the component to crystallize
    • getTargetSolute

      public String getTargetSolute()
      Get the target solute name.
      Returns:
      target solute component name
    • setCrystalPurity

      public void setCrystalPurity(double purity)
      Set the crystal purity.
      Parameters:
      purity - mass fraction of target in crystals (0-1)
    • getCrystalPurity

      public double getCrystalPurity()
      Get the crystal purity.
      Returns:
      crystal purity
    • setResidenceTime

      public void setResidenceTime(double hours)
      Set the residence time.
      Parameters:
      hours - residence time in hours
    • getResidenceTime

      public double getResidenceTime()
      Get the residence time.
      Returns:
      residence time in hours
    • setVesselVolume

      public void setVesselVolume(double volumeM3)
      Set the vessel volume.
      Parameters:
      volumeM3 - vessel volume in m3
    • getVesselVolume

      public double getVesselVolume()
      Get the vessel volume.
      Returns:
      vessel volume in m3
    • getHeatDuty

      public double getHeatDuty()
      Get the heat duty.
      Returns:
      heat duty in Watts
    • run

      public void run(UUID id)

      In this method all thermodynamic and unit operations will be calculated in a steady state calculation.

      Parameters:
      id - UUID
    • toJson

      public String toJson()

      Serializes the Process Equipment along with its state to a JSON string.

      Specified by:
      toJson in interface ProcessEquipmentInterface
      Overrides:
      toJson in class ProcessEquipmentBaseClass
      Returns:
      json string.
    • toMap

      private Map<String,Object> toMap()
      Get a map representation of the crystallizer.
      Returns:
      map of properties