-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: get phase using phasetype, AQUEOUS
- Loading branch information
1 parent
a8904b1
commit 77b36e0
Showing
30 changed files
with
503 additions
and
470 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 53 additions & 46 deletions
99
src/main/java/neqsim/processSimulation/util/monitor/StreamResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,68 @@ | ||
package neqsim.processSimulation.util.monitor; | ||
|
||
import neqsim.processSimulation.processEquipment.stream.StreamInterface; | ||
import neqsim.thermo.phase.PhaseType; | ||
|
||
/** | ||
* <p>StreamResponse class.</p> | ||
* <p> | ||
* StreamResponse class. | ||
* </p> | ||
* | ||
* @author asmund | ||
* @version $Id: $Id | ||
*/ | ||
public class StreamResponse { | ||
public String name; | ||
public Fluid fluid; | ||
public Double temperature; | ||
public Double pressure; | ||
public Double volumeFlow; | ||
public Double molarMass; | ||
public Double massDensity; | ||
public Double massflow; | ||
public Double massflowGas; | ||
public Double massflowOil; | ||
public Double massflowAqueous; | ||
public String name; | ||
public Fluid fluid; | ||
public Double temperature; | ||
public Double pressure; | ||
public Double volumeFlow; | ||
public Double molarMass; | ||
public Double massDensity; | ||
public Double massflow; | ||
public Double massflowGas; | ||
public Double massflowOil; | ||
public Double massflowAqueous; | ||
|
||
/** | ||
* <p>Constructor for StreamResponse.</p> | ||
* | ||
* @param inputStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object | ||
*/ | ||
public StreamResponse(StreamInterface inputStream){ | ||
name = inputStream.getName(); | ||
fluid = new Fluid(inputStream.getFluid()); | ||
temperature = inputStream.getTemperature("C"); | ||
pressure = inputStream.getPressure("bara"); | ||
molarMass = inputStream.getFluid().getMolarMass(); | ||
massDensity = inputStream.getFluid().getDensity("kg/m3"); | ||
massflow = inputStream.getFluid().getFlowRate("kg/hr"); | ||
volumeFlow = inputStream.getFluid().getFlowRate("m3/hr"); | ||
/** | ||
* <p> | ||
* Constructor for StreamResponse. | ||
* </p> | ||
* | ||
* @param inputStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} | ||
* object | ||
*/ | ||
public StreamResponse(StreamInterface inputStream) { | ||
name = inputStream.getName(); | ||
fluid = new Fluid(inputStream.getFluid()); | ||
temperature = inputStream.getTemperature("C"); | ||
pressure = inputStream.getPressure("bara"); | ||
molarMass = inputStream.getFluid().getMolarMass(); | ||
massDensity = inputStream.getFluid().getDensity("kg/m3"); | ||
massflow = inputStream.getFluid().getFlowRate("kg/hr"); | ||
volumeFlow = inputStream.getFluid().getFlowRate("m3/hr"); | ||
|
||
if (inputStream.getFluid().hasPhaseType("gas")) { | ||
massflowGas = inputStream.getFluid().getPhase("gas").getFlowRate("kg/hr"); | ||
} else { | ||
massflowGas = 0.0; | ||
} | ||
if (inputStream.getFluid().hasPhaseType("aqueous")) { | ||
massflowAqueous = inputStream.getFluid().getPhase("aqueous").getFlowRate("kg/hr"); | ||
} else { | ||
massflowAqueous = 0.0; | ||
} | ||
if (inputStream.getFluid().hasPhaseType("oil")) { | ||
massflowOil = inputStream.getFluid().getPhase("oil").getFlowRate("kg/hr"); | ||
} else { | ||
massflowOil = 0.0; | ||
} | ||
if (inputStream.getFluid().hasPhaseType("gas")) { | ||
massflowGas = inputStream.getFluid().getPhase("gas").getFlowRate("kg/hr"); | ||
} else { | ||
massflowGas = 0.0; | ||
} | ||
|
||
/** | ||
* <p>print.</p> | ||
*/ | ||
public void print(){ | ||
if (inputStream.getFluid().hasPhaseType("aqueous")) { | ||
massflowAqueous = inputStream.getFluid().getPhase(PhaseType.AQUEOUS).getFlowRate("kg/hr"); | ||
} else { | ||
massflowAqueous = 0.0; | ||
} | ||
if (inputStream.getFluid().hasPhaseType("oil")) { | ||
massflowOil = inputStream.getFluid().getPhase("oil").getFlowRate("kg/hr"); | ||
} else { | ||
massflowOil = 0.0; | ||
} | ||
} | ||
|
||
/** | ||
* <p> | ||
* print. | ||
* </p> | ||
*/ | ||
public void print() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.