Class ExergyAnalysisReport
java.lang.Object
neqsim.process.util.exergy.ExergyAnalysisReport
- All Implemented Interfaces:
Serializable
Structured result of an exergy analysis over a
ProcessSystem or ProcessModel.
Contains one row per unit operation with its exergy change across material streams and its exergy
destruction rate, plus convenience aggregation / ranking / reporting helpers suitable for large
flowsheets.
All energies are stored internally in Joules (J). For steady-state process simulations in NeqSim,
stream enthalpy/entropy are per-second quantities so "J" is equivalent to "W" and may be reported
as such via toString(String).
- Version:
- 1.0
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOne row of an exergy analysis: the exergy balance for a single unit operation or process area. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ExergyAnalysisReport.Entry> private static final longprivate final double -
Constructor Summary
ConstructorsConstructorDescriptionExergyAnalysisReport(double surroundingTemperatureK) Create an empty report. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend an entry to the report.private static StringTruncatesto at mostmaxcharacters.private static doubleConvert Joules to the requested unit.private static StringEscape a string for inclusion in a JSON literal.getDestructionByArea(String unit) Groups the total exergy destruction by process area.getDestructionByType(String unit) Groups the total exergy destruction by unit type (simple class name).doublegetTopDestructionHotspots(int n) Returns the top-N entries with the largest exergy destruction.doublegetTotalExergyChange(String unit) doubleprivate static Stringrepeat(char c, int n) Java-8 compatible string repeat.intsize()toJson()Serialize the report to JSON.toString()Pretty-print the report as a plain-text table ranked by exergy destruction.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
surroundingTemperatureK
private final double surroundingTemperatureK -
entries
-
-
Constructor Details
-
ExergyAnalysisReport
public ExergyAnalysisReport(double surroundingTemperatureK) Create an empty report.- Parameters:
surroundingTemperatureK- surrounding ("dead-state") temperature in K used when computing exergy
-
-
Method Details
-
addEntry
Append an entry to the report.- Parameters:
entry- row to add
-
getSurroundingTemperatureK
public double getSurroundingTemperatureK()- Returns:
- surrounding temperature used for exergy calculations (K)
-
getEntries
- Returns:
- an unmodifiable view of all entries in insertion order
-
size
public int size()- Returns:
- number of rows in the report
-
getTopDestructionHotspots
Returns the top-N entries with the largest exergy destruction. Useful for hot-spot identification on large processes.- Parameters:
n- number of entries to return; values <= 0 return the full list sorted- Returns:
- a new list of entries sorted by descending destruction
-
getTotalExergyDestruction
- Parameters:
unit- energy unit ("J", "kJ", "MJ", "W", "kW", "MW")- Returns:
- total exergy destruction summed over all entries
-
getTotalExergyChange
- Parameters:
unit- energy unit- Returns:
- total exergy change summed over all entries
-
getDestructionByArea
-
getDestructionByType
-
toString
-
toString
-
toJson
Serialize the report to JSON. Output contains surrounding temperature, totals and an array of per-unit rows.- Returns:
- a JSON string
-
convert
Convert Joules to the requested unit.- Parameters:
valueJ- value in Joulesunit- target unit ("J", "kJ", "MJ", "W", "kW", "MW")- Returns:
- converted value
-
repeat
Java-8 compatible string repeat.- Parameters:
c- character to repeatn- number of repetitions- Returns:
- the resulting string
-
clip
-
escape
-