Skip to content

Commit

Permalink
bug fix json stream (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored Apr 30, 2024
1 parent 91eae29 commit c2e40f7
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,14 @@ public StreamResponse(StreamInterface inputStream) {
inputStream.getFluid().getFlowRate(neqsim.util.unit.Units.getSymbol("volume flow"))),
neqsim.util.unit.Units.getSymbol("volume flow")));
properties.put(inputStream.getName(), newdata);


properties.put(inputStream.getName(), newdata);

newdata = new HashMap<String, Value>();
for (

int i = 0; i < inputStream.getFluid().getNumberOfPhases(); i++) {
for (int i = 0; i < inputStream.getFluid().getNumberOfPhases(); i++) {
newdata = new HashMap<String, Value>();
String name = inputStream.getFluid().getPhase(i).getPhaseTypeName();
newdata.put("density",
new Value(
Double.toString(inputStream.getFluid().getPhase(name)
.getDensity(neqsim.util.unit.Units.getSymbol("density"))),
neqsim.util.unit.Units.getSymbol("density")));

newdata.put("molar mass",
new Value(
Double.toString(inputStream.getFluid().getPhase(name)
Expand All @@ -169,8 +162,6 @@ public StreamResponse(StreamInterface inputStream) {
Double.toString(inputStream.getFluid().getPhase(name)
.getFlowRate(neqsim.util.unit.Units.getSymbol("volume flow"))),
neqsim.util.unit.Units.getSymbol("volume flow")));
properties.put(inputStream.getName(), newdata);

properties.put(name, newdata);
}

Expand Down

0 comments on commit c2e40f7

Please sign in to comment.