-
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.
- Loading branch information
Showing
5 changed files
with
105 additions
and
9 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
24 changes: 24 additions & 0 deletions
24
src/test/java/neqsim/standards/oilQuality/Standard_ASTM_D6377Test.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,24 @@ | ||
package neqsim.standards.oilQuality; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import neqsim.thermo.system.SystemInterface; | ||
import neqsim.thermo.system.SystemSrkEos; | ||
|
||
public class Standard_ASTM_D6377Test { | ||
@Test | ||
void testCalculate() { | ||
SystemInterface testSystem = new SystemSrkEos(273.15 + 2.0, 1.0); | ||
testSystem.addComponent("methane", 0.0006538); | ||
testSystem.addComponent("ethane", 0.006538); | ||
testSystem.addComponent("propane", 0.006538); | ||
testSystem.addComponent("n-pentane", 0.545); | ||
testSystem.setMixingRule(2); | ||
testSystem.init(0); | ||
Standard_ASTM_D6377 standard = new Standard_ASTM_D6377(testSystem); | ||
standard.setReferenceTemperature(37.8, "C"); | ||
standard.calculate(); | ||
Assertions.assertEquals(0.7298246193, standard.getValue("RVP", "bara"), 1e-3); | ||
Assertions.assertEquals(1.8710732396722, standard.getValue("TVP", "bara"), 1e-3); | ||
} | ||
} |