Class LNGAgeingScenario

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

public class LNGAgeingScenario extends ProcessEquipmentBaseClass
Top-level orchestrator for LNG ageing simulations.

Coordinates all sub-models (layered tank, vapor space, BOG handling, rollover detection, heel management, voyage profile) to produce a time-resolved simulation of LNG composition and quality changes during transport.

Usage pattern:


SystemInterface lng = new SystemSrkEos(111.0, 1.013);
lng.addComponent("methane", 0.92);
lng.addComponent("ethane", 0.05);
lng.addComponent("propane", 0.02);
lng.addComponent("nitrogen", 0.01);
lng.setMixingRule("classic");

Stream feed = new Stream("LNG feed", lng);
feed.setFlowRate(140000.0, "m3/hr");
feed.run();

LNGAgeingScenario scenario = new LNGAgeingScenario("Laden Voyage", feed);
scenario.setTankVolume(140000.0);
scenario.setInitialFillingRatio(0.98);
scenario.setSimulationTime(480.0);
scenario.setTimeStepHours(1.0);
scenario.setOverallHeatTransferCoeff(0.045);
scenario.setAmbientTemperature(308.15);
scenario.run();

List<LNGAgeingResult> results = scenario.getResults();

Version:
1.0
Author:
NeqSim
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.
    • tankVolume

      private double tankVolume
      Tank volume (m3).
    • initialFillingRatio

      private double initialFillingRatio
      Initial filling ratio (0-1).
    • simulationTime

      private double simulationTime
      Total simulation time (hours).
    • timeStepHours

      private double timeStepHours
      Time step (hours).
    • overallHeatTransferCoeff

      private double overallHeatTransferCoeff
      Overall heat transfer coefficient (W/m2/K).
    • ambientTemperature

      private double ambientTemperature
      Ambient temperature (K).
    • tankSurfaceArea

      private double tankSurfaceArea
      Tank surface area (m2). Estimated from volume if not set.
    • tankPressure

      private double tankPressure
      Initial tank pressure (bara).
    • numberOfLayers

      private int numberOfLayers
      Number of initial layers.
    • tankModel

      private transient LNGTankLayeredModel tankModel
      Layered tank model.
    • vaporSpaceModel

      private LNGVaporSpaceModel vaporSpaceModel
      Vapor space model.
    • rolloverDetector

      private LNGRolloverDetector rolloverDetector
      Rollover detector.
    • bogNetwork

      private LNGBOGHandlingNetwork bogNetwork
      BOG handling network.
    • heelManager

      private LNGHeelManager heelManager
      Heel manager.
    • voyageProfile

      private LNGVoyageProfile voyageProfile
      Voyage profile (optional).
    • operationalEvents

      private List<LNGAgeingScenario.OperationalEvent> operationalEvents
      Operational events (loading, unloading, cooldown, etc.).
    • tankGeometry

      private TankGeometry tankGeometry
      Tank geometry model (optional).
    • methaneNumberCalculator

      private MethaneNumberCalculator methaneNumberCalculator
      Methane number calculator (optional).
    • useGERG2008

      private boolean useGERG2008
      Whether to use GERG-2008 for density calculations.
    • results

      private List<LNGAgeingResult> results
      Time-series results.
    • inletStream

      private StreamInterface inletStream
      Inlet stream (LNG cargo).
    • bogOutletStream

      private StreamInterface bogOutletStream
      BOG outlet stream.
    • lngOutletStream

      private StreamInterface lngOutletStream
      Aged LNG outlet stream.
  • Constructor Details

    • LNGAgeingScenario

      public LNGAgeingScenario(String name)
      Constructor with name.
      Parameters:
      name - equipment name
    • LNGAgeingScenario

      public LNGAgeingScenario(String name, StreamInterface inletStream)
      Constructor with name and inlet stream.
      Parameters:
      name - equipment name
      inletStream - LNG cargo stream
  • Method Details

    • 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
    • createOutletStreams

      private void createOutletStreams(SystemInterface baseFluid)
      Create outlet streams from final simulation state.
      Parameters:
      baseFluid - the base fluid to clone for stream creation
    • getAmbientTemperatureAt

      private double getAmbientTemperatureAt(double timeHours)
      Get ambient temperature at a given time, using voyage profile if available.
      Parameters:
      timeHours - simulation time (hours)
      Returns:
      ambient temperature (K)
    • estimateSurfaceArea

      private double estimateSurfaceArea(double volume)
      Estimate tank surface area from volume assuming cylindrical shape.
      Parameters:
      volume - tank volume (m3)
      Returns:
      estimated surface area (m2)
    • getResults

      public List<LNGAgeingResult> getResults()
      Get the time-series results.
      Returns:
      list of ageing results at each time step
    • getTankModel

      public LNGTankLayeredModel getTankModel()
      Get the layered tank model for advanced configuration.
      Returns:
      layered tank model
    • getVaporSpaceModel

      public LNGVaporSpaceModel getVaporSpaceModel()
      Get the vapor space model.
      Returns:
      vapor space model
    • getRolloverDetector

      public LNGRolloverDetector getRolloverDetector()
      Get the rollover detector.
      Returns:
      rollover detector
    • getBogNetwork

      public LNGBOGHandlingNetwork getBogNetwork()
      Get the BOG handling network.
      Returns:
      BOG network
    • getHeelManager

      public LNGHeelManager getHeelManager()
      Get the heel manager.
      Returns:
      heel manager
    • setVoyageProfile

      public void setVoyageProfile(LNGVoyageProfile profile)
      Set the voyage profile.
      Parameters:
      profile - voyage profile
    • getVoyageProfile

      public LNGVoyageProfile getVoyageProfile()
      Get the voyage profile.
      Returns:
      voyage profile or null
    • setTankGeometry

      public void setTankGeometry(TankGeometry geometry)
      Set tank geometry model.
      Parameters:
      geometry - tank geometry
    • getTankGeometry

      public TankGeometry getTankGeometry()
      Get tank geometry model.
      Returns:
      tank geometry or null
    • setMethaneNumberCalculator

      public void setMethaneNumberCalculator(MethaneNumberCalculator calculator)
      Set methane number calculator.
      Parameters:
      calculator - methane number calculator
    • getMethaneNumberCalculator

      public MethaneNumberCalculator getMethaneNumberCalculator()
      Get methane number calculator.
      Returns:
      calculator or null
    • setUseGERG2008

      public void setUseGERG2008(boolean use)
      Enable GERG-2008 for density calculations.
      Parameters:
      use - true to use GERG-2008
    • isUseGERG2008

      public boolean isUseGERG2008()
      Check if GERG-2008 is enabled.
      Returns:
      true if using GERG-2008
    • addOperationalEvent

      public void addOperationalEvent(LNGAgeingScenario.OperationalEvent event)
      Add an operational event (loading, unloading, cooldown, etc.).
      Parameters:
      event - operational event
    • getOperationalEvents

      public List<LNGAgeingScenario.OperationalEvent> getOperationalEvents()
      Get all operational events.
      Returns:
      list of events
    • setTankVolume

      public void setTankVolume(double volume)
      Set tank volume.
      Parameters:
      volume - tank volume (m3)
    • getTankVolume

      public double getTankVolume()
      Get tank volume.
      Returns:
      tank volume (m3)
    • setInitialFillingRatio

      public void setInitialFillingRatio(double ratio)
      Set initial filling ratio.
      Parameters:
      ratio - filling ratio (0-1)
    • getInitialFillingRatio

      public double getInitialFillingRatio()
      Get initial filling ratio.
      Returns:
      filling ratio (0-1)
    • setSimulationTime

      public void setSimulationTime(double hours)
      Set total simulation time.
      Parameters:
      hours - simulation time (hours)
    • getSimulationTime

      public double getSimulationTime()
      Get total simulation time.
      Returns:
      simulation time (hours)
    • setTimeStepHours

      public void setTimeStepHours(double hours)
      Set time step.
      Parameters:
      hours - time step (hours)
    • getTimeStepHours

      public double getTimeStepHours()
      Get time step.
      Returns:
      time step (hours)
    • setOverallHeatTransferCoeff

      public void setOverallHeatTransferCoeff(double u)
      Set overall heat transfer coefficient.
      Parameters:
      u - heat transfer coefficient (W/m2/K)
    • getOverallHeatTransferCoeff

      public double getOverallHeatTransferCoeff()
      Get overall heat transfer coefficient.
      Returns:
      heat transfer coefficient (W/m2/K)
    • setAmbientTemperature

      public void setAmbientTemperature(double temperature)
      Set ambient temperature.
      Parameters:
      temperature - ambient temperature (K)
    • getAmbientTemperature

      public double getAmbientTemperature()
      Get ambient temperature.
      Returns:
      ambient temperature (K)
    • setTankSurfaceArea

      public void setTankSurfaceArea(double area)
      Set tank surface area.
      Parameters:
      area - surface area (m2)
    • getTankSurfaceArea

      public double getTankSurfaceArea()
      Get tank surface area.
      Returns:
      surface area (m2), or -1 if auto-estimated
    • setTankPressure

      public void setTankPressure(double pressure)
      Set initial tank pressure.
      Parameters:
      pressure - pressure (bara)
    • getTankPressure

      public double getTankPressure()
      Get tank pressure.
      Returns:
      pressure (bara)
    • setNumberOfLayers

      public void setNumberOfLayers(int layers)
      Set number of initial layers.
      Parameters:
      layers - number of layers
    • getNumberOfLayers

      public int getNumberOfLayers()
      Get number of initial layers.
      Returns:
      number of layers
    • getBogOutletStream

      public StreamInterface getBogOutletStream()
      Get the BOG outlet stream.
      Returns:
      BOG stream or null if not yet run
    • getLngOutletStream

      public StreamInterface getLngOutletStream()
      Get the aged LNG outlet stream.
      Returns:
      aged LNG stream or null if not yet run
    • 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)
    • getResultsSummary

      public String getResultsSummary()
      Get a summary of the final results.
      Returns:
      formatted summary string