Class SeparatorContract

java.lang.Object
neqsim.util.validation.contracts.SeparatorContract
All Implemented Interfaces:
ModuleContract<Separator>

public class SeparatorContract extends Object implements ModuleContract<Separator>
Contract for separator equipment.

Defines requirements and guarantees for Separator implementations. AI agents can use this contract to validate separator setup before running.

Preconditions (what the separator needs):

  • At least one inlet stream connected
  • Inlet stream(s) have been run
  • Multi-phase fluid (gas + liquid) for meaningful separation

Postconditions (what run() provides):

  • Gas outlet stream with vapor phase
  • Liquid outlet stream with liquid phase(s)
  • Mass/energy balance maintained
Version:
1.0
Author:
NeqSim
  • Field Details

  • Constructor Details

    • SeparatorContract

      private SeparatorContract()
  • Method Details

    • getInstance

      public static SeparatorContract getInstance()
      Get the singleton instance.
      Returns:
      contract instance
    • getContractName

      public String getContractName()
      Description copied from interface: ModuleContract
      Get the name of this contract.
      Specified by:
      getContractName in interface ModuleContract<Separator>
      Returns:
      contract name for logging/debugging
    • checkPreconditions

      public ValidationResult checkPreconditions(Separator separator)
      Description copied from interface: ModuleContract
      Check preconditions before execution.

      Validates that all requirements are met before running the module.

      Specified by:
      checkPreconditions in interface ModuleContract<Separator>
      Parameters:
      separator - object to validate
      Returns:
      validation result with any precondition failures
    • checkPostconditions

      public ValidationResult checkPostconditions(Separator separator)
      Description copied from interface: ModuleContract
      Check postconditions after execution.

      Validates that the module produced valid output.

      Specified by:
      checkPostconditions in interface ModuleContract<Separator>
      Parameters:
      separator - object to validate
      Returns:
      validation result with any postcondition failures
    • getRequirementsDescription

      public String getRequirementsDescription()
      Description copied from interface: ModuleContract
      Get a description of what this module requires.

      AI agents can use this to understand setup requirements.

      Specified by:
      getRequirementsDescription in interface ModuleContract<Separator>
      Returns:
      human-readable requirements description
    • getProvidesDescription

      public String getProvidesDescription()
      Description copied from interface: ModuleContract
      Get a description of what this module provides.

      AI agents can use this to understand available outputs.

      Specified by:
      getProvidesDescription in interface ModuleContract<Separator>
      Returns:
      human-readable outputs description