Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert main function to test #539

Merged
merged 5 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ void testRun() {
processOps.run();

assertEquals(0.0012319218375683974,
streamSaturator.getOutletStream().getFluid().getPhase(0).getComponent("water").getx());
streamSaturator.getOutletStream().getFluid().getPhase(0).getComponent("water").getx(),
1e-16);

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package neqsim.processSimulation.util.example;

import org.junit.jupiter.api.Test;
import neqsim.processSimulation.processEquipment.compressor.Compressor;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.thermo.system.SystemInterface;

/**
* <p>compressorTest12 class.</p>
* <p>
* compressorTest12 class.
* </p>
*
* @author asmund
* @version $Id: $Id
* @since 2.2.3
*/
public class compressorTest12 {
/**
* This method is just meant to test the thermo package.
*
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String args[]) {
public static SystemInterface getSystem() {
neqsim.thermo.system.SystemInterface testSystem =
new neqsim.thermo.system.SystemSrkEos(265, 49.6);
testSystem.addComponent("methane", 92);
Expand All @@ -42,6 +41,12 @@ public static void main(String args[]) {
testSystem.addComponent("m-Xylene", 1e-12);
testSystem.addComponent("nC10", 1e-12);
testSystem.createDatabase(true);
return testSystem;
}

@Test
public void testRun() {
SystemInterface testSystem = getSystem();
// testSystem.setMixingRule(2);
// ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
// testOps.TPflash();
Expand Down