Skip to content

Commit

Permalink
comment out method
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Nov 16, 2023
1 parent 0dde17d commit eb25d39
Showing 1 changed file with 25 additions and 39 deletions.
64 changes: 25 additions & 39 deletions src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
package neqsim.thermodynamicOperations.flashOps;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.security.AnyTypePermission;
import neqsim.thermo.phase.PhaseEosInterface;
import neqsim.thermodynamicOperations.ThermodynamicOperations;

Expand Down Expand Up @@ -190,39 +184,31 @@ private int findComponentIndex(String[] componentNames, String componentName) {
* Test method for
*/
void testRun2() {
XStream xstream = new XStream();
xstream.addPermission(AnyTypePermission.ANY);
// Specify the file path to read
Path filePath = Paths.get(
"/workspaces/neqsim/src/test/java/neqsim/thermodynamicOperations/flashOps/my_process.xml");
String xmlContents = "";
try {
xmlContents = Files.readString(filePath);
} catch (IOException e) {
e.printStackTrace();
}

// Deserialize from xml
neqsim.processSimulation.processSystem.ProcessSystem operationsCopy =
(neqsim.processSimulation.processSystem.ProcessSystem) xstream.fromXML(xmlContents);
operationsCopy.run();
neqsim.processSimulation.processEquipment.separator.Separator VD02Separator =
(neqsim.processSimulation.processEquipment.separator.Separator) operationsCopy
.getUnit("Separator after CFU gas");
neqsim.processSimulation.processEquipment.separator.Separator VD01Separator =
(neqsim.processSimulation.processEquipment.separator.Separator) operationsCopy
.getUnit("Separator after degasser gas");
neqsim.processSimulation.processEquipment.separator.Separator Degasser =
(neqsim.processSimulation.processEquipment.separator.Separator) operationsCopy
.getUnit("Degasser");
System.out.println("The gas flow rate should be < 200 kg/hr, the actual value is "
+ Degasser.getGasOutStream().getFlowRate("kg/hr"));
System.out.println("The gas flow rate should be < 200 kg/hr, the actual value is "
+ VD01Separator.getGasOutStream().getFlowRate("kg/hr"));
VD02Separator.getGasOutStream().run();
System.out.println("The gas flow rate should be < 200 kg/hr, the actual value is "
+ VD02Separator.getGasOutStream().getFlowRate("kg/hr"));

/*
* XStream xstream = new XStream(); xstream.addPermission(AnyTypePermission.ANY); // Specify the
* file path to read Path filePath = Paths.get(
* "/workspaces/neqsim/src/test/java/neqsim/thermodynamicOperations/flashOps/my_process.xml");
* String xmlContents = ""; try { //xmlContents = Files.readString(filePath); } catch
* (IOException e) { e.printStackTrace(); }
*
* // Deserialize from xml neqsim.processSimulation.processSystem.ProcessSystem operationsCopy =
* (neqsim.processSimulation.processSystem.ProcessSystem) xstream.fromXML(xmlContents);
* operationsCopy.run(); neqsim.processSimulation.processEquipment.separator.Separator
* VD02Separator = (neqsim.processSimulation.processEquipment.separator.Separator)
* operationsCopy .getUnit("Separator after CFU gas");
* neqsim.processSimulation.processEquipment.separator.Separator VD01Separator =
* (neqsim.processSimulation.processEquipment.separator.Separator) operationsCopy
* .getUnit("Separator after degasser gas");
* neqsim.processSimulation.processEquipment.separator.Separator Degasser =
* (neqsim.processSimulation.processEquipment.separator.Separator) operationsCopy
* .getUnit("Degasser");
* System.out.println("The gas flow rate should be < 200 kg/hr, the actual value is " +
* Degasser.getGasOutStream().getFlowRate("kg/hr"));
* System.out.println("The gas flow rate should be < 200 kg/hr, the actual value is " +
* VD01Separator.getGasOutStream().getFlowRate("kg/hr")); VD02Separator.getGasOutStream().run();
* System.out.println("The gas flow rate should be < 200 kg/hr, the actual value is " +
* VD02Separator.getGasOutStream().getFlowRate("kg/hr"));
*/

}
}

0 comments on commit eb25d39

Please sign in to comment.