Class LNGTankLayer

java.lang.Object
neqsim.process.equipment.lng.LNGTankLayer
All Implemented Interfaces:
Serializable

public class LNGTankLayer extends Object implements Serializable
Represents a single horizontal layer in a stratified LNG tank.

Each layer has its own composition, temperature, density, and volume. Layers interact through interfacial heat and mass transfer and can merge when their density difference drops below a threshold.

The layer model supports the two key physical mechanisms that drive stratification and rollover:

  • Weathering from top: preferential evaporation of nitrogen and methane from the top layer makes it denser (heavier)
  • Heat ingress from bottom/sides: warming of the bottom layer makes it lighter, potentially unstable when topped by a denser layer
Version:
1.0
Author:
NeqSim
See Also:
  • Field Details

    • serialVersionUID

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

      private int layerIndex
      Layer identifier (0 = bottom, increasing upward).
    • totalMoles

      private double totalMoles
      Total moles in this layer (mol).
    • volume

      private double volume
      Layer volume (m3).
    • temperature

      private double temperature
      Layer temperature (K).
    • pressure

      private double pressure
      Layer pressure (bara).
    • density

      private double density
      Layer density (kg/m3).
    • molarMass

      private double molarMass
      Layer molar mass (kg/mol).
    • composition

      private Map<String,Double> composition
      Mole fractions keyed by component name.
    • thermoSystem

      private transient SystemInterface thermoSystem
      Reference to the thermodynamic system representing this layer's liquid.
  • Constructor Details

    • LNGTankLayer

      public LNGTankLayer(int layerIndex)
      Constructor for LNGTankLayer.
      Parameters:
      layerIndex - layer index (0 = bottom)
    • LNGTankLayer

      public LNGTankLayer(int layerIndex, double totalMoles, double temperature, double pressure)
      Constructor with full initialisation.
      Parameters:
      layerIndex - layer index (0 = bottom)
      totalMoles - total moles in layer (mol)
      temperature - layer temperature (K)
      pressure - layer pressure (bara)
  • Method Details

    • initFromThermoSystem

      public void initFromThermoSystem(SystemInterface system)
      Initialize the layer from a NeqSim thermodynamic system.

      Extracts composition, density, molar mass, and volume from the thermo system's liquid phase after a flash calculation has been performed.

      Parameters:
      system - thermodynamic system with liquid phase (post-flash)
    • getMass

      public double getMass()
      Get the mass of this layer.
      Returns:
      mass (kg)
    • isDenserThan

      public boolean isDenserThan(LNGTankLayer other)
      Check if this layer is denser than another.
      Parameters:
      other - the other layer to compare against
      Returns:
      true if this layer is denser
    • getDensityDifference

      public double getDensityDifference(LNGTankLayer other)
      Get the density difference with another layer.
      Parameters:
      other - the other layer
      Returns:
      absolute density difference (kg/m3)
    • removeVapor

      public void removeVapor(double molesToRemove, Map<String,Double> vaporComposition)
      Remove moles from this layer (boil-off from top layer).

      The composition of the removed vapor is determined by the vapor-liquid equilibrium at the layer's temperature and pressure.

      Parameters:
      molesToRemove - moles of vapor to remove (mol)
      vaporComposition - composition of the vapor being removed (mole fractions by component)
    • addHeat

      public void addHeat(double heatJoules, double cpJPerMolK)
      Add heat to this layer (e.g., from wall heat ingress).
      Parameters:
      heatJoules - heat added (J)
      cpJPerMolK - molar heat capacity of the liquid (J/(mol*K))
    • getLayerIndex

      public int getLayerIndex()
      Get layer index.
      Returns:
      layer index (0 = bottom)
    • setLayerIndex

      public void setLayerIndex(int layerIndex)
      Set layer index.
      Parameters:
      layerIndex - layer index
    • getTotalMoles

      public double getTotalMoles()
      Get total moles.
      Returns:
      total moles (mol)
    • setTotalMoles

      public void setTotalMoles(double totalMoles)
      Set total moles.
      Parameters:
      totalMoles - total moles (mol)
    • getVolume

      public double getVolume()
      Get layer volume.
      Returns:
      volume (m3)
    • setVolume

      public void setVolume(double volume)
      Set layer volume.
      Parameters:
      volume - volume (m3)
    • getTemperature

      public double getTemperature()
      Get layer temperature.
      Returns:
      temperature (K)
    • setTemperature

      public void setTemperature(double temperature)
      Set layer temperature.
      Parameters:
      temperature - temperature (K)
    • getPressure

      public double getPressure()
      Get layer pressure.
      Returns:
      pressure (bara)
    • setPressure

      public void setPressure(double pressure)
      Set layer pressure.
      Parameters:
      pressure - pressure (bara)
    • getDensity

      public double getDensity()
      Get layer density.
      Returns:
      density (kg/m3)
    • setDensity

      public void setDensity(double density)
      Set layer density.
      Parameters:
      density - density (kg/m3)
    • getMolarMass

      public double getMolarMass()
      Get layer molar mass.
      Returns:
      molar mass (kg/mol)
    • setMolarMass

      public void setMolarMass(double molarMass)
      Set layer molar mass.
      Parameters:
      molarMass - molar mass (kg/mol)
    • getComposition

      public Map<String,Double> getComposition()
      Get layer composition.
      Returns:
      map of component name to mole fraction
    • setComposition

      public void setComposition(Map<String,Double> composition)
      Set layer composition.
      Parameters:
      composition - map of component name to mole fraction
    • getThermoSystem

      public SystemInterface getThermoSystem()
      Get the thermo system for this layer.
      Returns:
      thermodynamic system or null if not set
    • setThermoSystem

      public void setThermoSystem(SystemInterface thermoSystem)
      Set the thermo system for this layer.
      Parameters:
      thermoSystem - thermodynamic system