Class StreamValidator
java.lang.Object
neqsim.integration.StreamValidator
Validators for process streams (StreamInterface).
Checks:
- Fluid present and initialized
- Temperature and pressure set and valid
- Flowrate positive
- Composition normalized
- Stream has been executed (run())
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasStreamBeenRun(StreamInterface stream) Helper: Check if stream has been executed.static booleanisStreamReady(StreamInterface stream) Helper: Check if stream appears ready.private static voidvalidateComposition(ValidationFramework.ValidationBuilder builder, Object phase) Validate stream composition (helper for validateStream).validateStream(StreamInterface stream) Validate a process stream before use in equipment.validateStreamConnection(StreamInterface outlet, StreamInterface inlet) Validate state consistency between two streams (e.g., outlet of equipment A matches inlet of equipment B).validateStreamHasRun(StreamInterface stream) Validate that a stream has been executed (properties calculated).
-
Constructor Details
-
StreamValidator
public StreamValidator()
-
-
Method Details
-
validateStream
Validate a process stream before use in equipment.- Parameters:
stream- The stream to validate- Returns:
- ValidationResult with errors and warnings
-
validateComposition
private static void validateComposition(ValidationFramework.ValidationBuilder builder, Object phase) Validate stream composition (helper for validateStream).- Parameters:
builder- the validation builder to add results tophase- the phase object to validate composition for
-
validateStreamHasRun
Validate that a stream has been executed (properties calculated).- Parameters:
stream- The stream to check- Returns:
- ValidationResult indicating if stream has been run
-
validateStreamConnection
public static ValidationFramework.ValidationResult validateStreamConnection(StreamInterface outlet, StreamInterface inlet) Validate state consistency between two streams (e.g., outlet of equipment A matches inlet of equipment B).- Parameters:
outlet- the outlet streaminlet- the inlet stream- Returns:
- validation result with any errors or warnings
-
isStreamReady
Helper: Check if stream appears ready.- Parameters:
stream- the stream to check- Returns:
- true if stream is ready
-
hasStreamBeenRun
Helper: Check if stream has been executed.- Parameters:
stream- the stream to check- Returns:
- true if stream has been run
-