Class SoftSensorExporter
java.lang.Object
neqsim.process.mpc.SoftSensorExporter
- All Implemented Interfaces:
Serializable
Exports soft-sensor and estimator configurations for integration with external calculation
engines.
This class provides export capabilities for soft-sensors (calculated values derived from thermodynamic models) that can be used by external control and optimization systems. Common soft-sensors include:
- Composition estimators based on pressure, temperature, and flow measurements
- Phase fraction calculators for multiphase systems
- Energy balance estimators
- Property calculations (density, viscosity, heat capacity)
The exports include input/output mappings, calculation parameters, and model coefficients that can be loaded into external calculation engines for real-time estimation.
Example usage:
// Create soft-sensor exporter
SoftSensorExporter exporter = new SoftSensorExporter(processSystem);
// Add soft-sensors
exporter.addDensitySensor("feed_density", "feed", "kg/m3");
exporter.addCompositionEstimator("methane_fraction", "separator", "methane");
exporter.addPhaseFractionSensor("gas_fraction", "separator");
// Export configuration
exporter.exportConfiguration("soft_sensors.json");
- Since:
- 3.0
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSoft-sensor types.static classDefinition of a soft-sensor. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringApplication name for exports.private final ProcessSystemThe process system containing the equipment.private final List<SoftSensorExporter.SoftSensorDefinition> List of soft-sensor definitions.private static final longprivate StringTag prefix for OPC-style naming. -
Constructor Summary
ConstructorsConstructorDescriptionSoftSensorExporter(ProcessSystem processSystem) Construct an exporter for a process system. -
Method Summary
Modifier and TypeMethodDescriptionaddCompositionEstimator(String name, String equipmentName, String componentName) Add a composition estimator soft-sensor.addCompressibilitySensor(String name, String equipmentName) Add a compressibility factor (Z) soft-sensor.addCustomSensor(String name, String equipmentName, SoftSensorExporter.SensorType sensorType, String outputUnit) Add a custom soft-sensor with specified inputs and calculation type.addDensitySensor(String name, String equipmentName, String unit) Add a density soft-sensor.addHeatCapacitySensor(String name, String equipmentName, String unit) Add a heat capacity soft-sensor.addMolecularWeightSensor(String name, String equipmentName) Add a molecular weight estimator soft-sensor.addPhaseFractionSensor(String name, String equipmentName) Add a phase fraction soft-sensor.addViscositySensor(String name, String equipmentName, String unit) Add a viscosity soft-sensor.clear()Clear all defined soft-sensors.voidexportConfiguration(String filename) Export all soft-sensor configurations to JSON.voidexportCVTFormat(String filename) Export soft-sensor configurations as CVT (Calculated Value Table) format.Get the list of defined soft-sensors.setApplicationName(String name) Set the application name for exports.setTagPrefix(String prefix) Set the tag prefix for variable naming.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
processSystem
The process system containing the equipment. -
sensors
List of soft-sensor definitions. -
applicationName
Application name for exports. -
tagPrefix
Tag prefix for OPC-style naming.
-
-
Constructor Details
-
SoftSensorExporter
Construct an exporter for a process system.- Parameters:
processSystem- the process system
-
-
Method Details
-
setTagPrefix
Set the tag prefix for variable naming.- Parameters:
prefix- the tag prefix- Returns:
- this exporter for method chaining
-
setApplicationName
Set the application name for exports.- Parameters:
name- the application name- Returns:
- this exporter for method chaining
-
addDensitySensor
Add a density soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitorunit- output unit (kg/m3, lb/ft3, etc.)- Returns:
- this exporter for method chaining
-
addViscositySensor
Add a viscosity soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitorunit- output unit (cP, Pa.s, etc.)- Returns:
- this exporter for method chaining
-
addPhaseFractionSensor
Add a phase fraction soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitor- Returns:
- this exporter for method chaining
-
addCompositionEstimator
public SoftSensorExporter addCompositionEstimator(String name, String equipmentName, String componentName) Add a composition estimator soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitorcomponentName- component to estimate- Returns:
- this exporter for method chaining
-
addMolecularWeightSensor
Add a molecular weight estimator soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitor- Returns:
- this exporter for method chaining
-
addCompressibilitySensor
Add a compressibility factor (Z) soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitor- Returns:
- this exporter for method chaining
-
addHeatCapacitySensor
Add a heat capacity soft-sensor.- Parameters:
name- sensor nameequipmentName- equipment to monitorunit- output unit (J/mol.K, kJ/kg.K, etc.)- Returns:
- this exporter for method chaining
-
addCustomSensor
public SoftSensorExporter.SoftSensorDefinition addCustomSensor(String name, String equipmentName, SoftSensorExporter.SensorType sensorType, String outputUnit) Add a custom soft-sensor with specified inputs and calculation type.- Parameters:
name- sensor nameequipmentName- equipment to monitorsensorType- the type of sensoroutputUnit- the output unit- Returns:
- the created sensor definition for further configuration
-
exportConfiguration
Export all soft-sensor configurations to JSON.- Parameters:
filename- the output filename- Throws:
IOException- if writing fails
-
exportCVTFormat
Export soft-sensor configurations as CVT (Calculated Value Table) format.CVT format is a tabular format commonly used by industrial control systems for defining calculated values and their update schedules.
- Parameters:
filename- the output filename- Throws:
IOException- if writing fails
-
getSensors
Get the list of defined soft-sensors.- Returns:
- unmodifiable list of sensor definitions
-
clear
Clear all defined soft-sensors.- Returns:
- this exporter for method chaining
-