Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Dec 30, 2024
1 parent 6625384 commit a5bfd6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* @author ESOL
* @version $Id: $Id
*/
public class SimpleTray extends neqsim.process.equipment.mixer.Mixer
implements TrayInterface {
public class SimpleTray extends neqsim.process.equipment.mixer.Mixer implements TrayInterface {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(SimpleTray.class);

Expand Down Expand Up @@ -120,11 +119,17 @@ public void run(UUID id) {
// double flowRate = ((Stream)
// streams.get(0)).getThermoSystem().getFlowRate("kg/hr");
// ((Stream) streams.get(0)).getThermoSystem().display();
boolean changeTo2Phase = false;
SystemInterface thermoSystem2 = streams.get(0).getThermoSystem().clone();

if (thermoSystem2.doMultiPhaseCheck()) {
changeTo2Phase = true;
thermoSystem2.setMultiPhaseCheck(false);
}
// System.out.println("total number of moles " +
// thermoSystem2.getTotalNumberOfMoles());
if (trayPressure > 0) {
if (trayPressure > 0)

{
thermoSystem2.setPressure(trayPressure);
}
mixedStream.setThermoSystem(thermoSystem2);
Expand Down Expand Up @@ -173,6 +178,10 @@ public void run(UUID id) {
.println("error...." + mixedStream.getFluid().getNumberOfPhases() + " phases on tray");
logger.warn("error...." + mixedStream.getFluid().getNumberOfPhases() + " phases on tray");
}

if (changeTo2Phase) {
thermoSystem2.setMultiPhaseCheck(true);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public void run() {
if (system.checkStability() && stabilityCheck()) {
if (system.doMultiPhaseCheck()) {
// logger.info("one phase flash is stable - checking multiphase flash....");
TPmultiflash operation = new TPmultiflash(system, true);
TPmultiflash operation = new TPmultiflash(system, system.doSolidPhaseCheck());
operation.run();
}
if (solidCheck) {
Expand Down

0 comments on commit a5bfd6c

Please sign in to comment.