-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update component property doc (#614)
* added possibility to update table * addd ammonia * update * Update AmmoniaTest.java * Update NewComponentTest.java
- Loading branch information
Showing
4 changed files
with
49 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
26 changes: 26 additions & 0 deletions
26
src/test/java/neqsim/thermo/component/NewComponentTest.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,26 @@ | ||
package neqsim.thermo.component; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
import neqsim.thermo.system.SystemInterface; | ||
import neqsim.thermo.system.SystemSrkEos; | ||
|
||
public class NewComponentTest extends neqsim.NeqSimTest { | ||
static SystemInterface thermoSystem = null; | ||
|
||
/** | ||
* @throws java.lang.Exception | ||
*/ | ||
@BeforeAll | ||
static void setUpBeforeClass() throws Exception {} | ||
|
||
@Test | ||
public void newComponentTest() { | ||
thermoSystem = new SystemSrkEos(298.0, 1.01325); | ||
thermoSystem.addComponent("ammonia", 1.0); | ||
thermoSystem.init(0); | ||
assertEquals(0.01703052, thermoSystem.getMolarMass("kg/mol"), 0.01); | ||
assertEquals(405.4, thermoSystem.getComponent(0).getTC(), 0.01); | ||
} | ||
} |