-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
172 additions
and
18 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
49 changes: 49 additions & 0 deletions
49
src/test/java/neqsim/thermodynamicOperations/flashOps/VUFlashTest.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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package neqsim.thermodynamicOperations.flashOps; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import neqsim.thermodynamicOperations.ThermodynamicOperations; | ||
|
||
/** | ||
* Test VUFlash. | ||
*/ | ||
class VUFlashTest { | ||
static Logger logger = LogManager.getLogger(VUFlashTest.class); | ||
|
||
static neqsim.thermo.system.SystemInterface testSystem = null; | ||
static neqsim.thermo.system.SystemInterface testSystem2 = null; | ||
static ThermodynamicOperations testOps = null; | ||
|
||
/** | ||
* Sets up test system. | ||
* | ||
* @throws java.lang.Exception | ||
*/ | ||
@BeforeEach | ||
void setUp() throws Exception { | ||
|
||
} | ||
|
||
@Test | ||
void testVUflash() { | ||
testSystem = new neqsim.thermo.system.SystemUMRPRUMCEos(293.15, 23.5); | ||
testSystem.addComponent("methane", 1.0); | ||
testSystem.addComponent("ethane", 0.01); | ||
testSystem.addComponent("n-pentane", 0.01); | ||
testSystem.setMixingRule("classic"); | ||
testOps = new ThermodynamicOperations(testSystem); | ||
testOps.TPflash(); | ||
testSystem.initProperties(); | ||
|
||
double volume = testSystem.getVolume("m3"); | ||
double internalenergy = testSystem.getInternalEnergy("J"); | ||
|
||
testOps.VUflash(volume * 1.1, internalenergy, "m3", "J"); | ||
|
||
assertEquals(21.387, testSystem.getPressure(), 0.01); | ||
} | ||
|
||
} |