@@ -32,8 +32,8 @@ public class EclipseFluidReadWrite {
32
32
* setComposition.
33
33
* </p>
34
34
*
35
- * @param fluid a {@link neqsim.thermo.system.SystemInterface} object
36
- * @param inputFile a {@link java.lang.String} object
35
+ * @param fluid a {@link neqsim.thermo.system.SystemInterface} object
36
+ * @param inputFile a {@link java.lang.String} object
37
37
* @param pseudoNameIn a {@link java.lang.String} object
38
38
*/
39
39
public static void setComposition (SystemInterface fluid , String inputFile , String pseudoNameIn ) {
@@ -46,7 +46,7 @@ public static void setComposition(SystemInterface fluid, String inputFile, Strin
46
46
* setComposition.
47
47
* </p>
48
48
*
49
- * @param fluid a {@link neqsim.thermo.system.SystemInterface} object
49
+ * @param fluid a {@link neqsim.thermo.system.SystemInterface} object
50
50
* @param inputFile a {@link java.lang.String} object
51
51
*/
52
52
public static void setComposition (SystemInterface fluid , String inputFile ) {
@@ -121,7 +121,7 @@ public static void setComposition(SystemInterface fluid, String inputFile) {
121
121
* read.
122
122
* </p>
123
123
*
124
- * @param inputFile a {@link java.lang.String} object
124
+ * @param inputFile a {@link java.lang.String} object
125
125
* @param pseudoNameIn a {@link java.lang.String} object
126
126
* @return a {@link neqsim.thermo.system.SystemInterface} object
127
127
*/
@@ -263,6 +263,9 @@ public static SystemInterface read(String inputFile) {
263
263
if (st .equals ("BIC" )) {
264
264
int addedComps = 0 ;
265
265
kij = new Double [names .size ()][names .size ()];
266
+ for (Double [] row : kij ) {
267
+ Arrays .fill (row , 0.0 );
268
+ }
266
269
int lengthLastLine = 0 ;
267
270
List <String > list = new ArrayList <String >();
268
271
while ((st = br .readLine ().replace ("/" , "" )) != null && addedComps < names .size () - 1 ) {
@@ -376,7 +379,7 @@ public static SystemInterface read(String inputFile) {
376
379
for (int j = i ; j < names .size (); j ++) {
377
380
for (int phaseNum = 0 ; phaseNum < fluid .getMaxNumberOfPhases (); phaseNum ++) {
378
381
((PhaseEosInterface ) fluid .getPhase (phaseNum )).getMixingRule ()
379
- .setBinaryInteractionParameter (i , j , kij [i ][j ]);
382
+ .setBinaryInteractionParameter (i , j , kij [i ][j ]. doubleValue () );
380
383
((PhaseEosInterface ) fluid .getPhase (phaseNum )).getMixingRule ()
381
384
.setBinaryInteractionParameter (j , i , kij [i ][j ]);
382
385
}
0 commit comments