Skip to content

Commit

Permalink
updated eclipse read and new test (#831)
Browse files Browse the repository at this point in the history
* updated eclipse read and new test

* removed write output
  • Loading branch information
EvenSol authored Oct 19, 2023
1 parent c9a2f74 commit 34dac74
Show file tree
Hide file tree
Showing 3 changed files with 467 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public class EclipseFluidReadWrite {
public static String pseudoName = "";

/**
* <p>setComposition.</p>
* <p>
* setComposition.
* </p>
*
* @param fluid a {@link neqsim.thermo.system.SystemInterface} object
* @param inputFile a {@link java.lang.String} object
Expand All @@ -36,7 +38,9 @@ public static void setComposition(SystemInterface fluid, String inputFile, Strin
}

/**
* <p>setComposition.</p>
* <p>
* setComposition.
* </p>
*
* @param fluid a {@link neqsim.thermo.system.SystemInterface} object
* @param inputFile a {@link java.lang.String} object
Expand Down Expand Up @@ -107,7 +111,9 @@ public static void setComposition(SystemInterface fluid, String inputFile) {
}

/**
* <p>read.</p>
* <p>
* read.
* </p>
*
* @param inputFile a {@link java.lang.String} object
* @param pseudoNameIn a {@link java.lang.String} object
Expand Down Expand Up @@ -161,79 +167,79 @@ public static SystemInterface read(String inputFile) {
}
if (st.equals("CNAMES")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
names.add(st);
}
}
if (st.equals("TCRIT")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
TC.add(Double.parseDouble(st));
}
}
if (st.equals("PCRIT")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
PC.add(Double.parseDouble(st));
}
}
if (st.equals("ACF")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
ACF.add(Double.parseDouble(st));
}
}
if (st.equals("MW")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
MW.add(Double.parseDouble(st));
}
}
if (st.equals("TBOIL")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
TBOIL.add(Double.parseDouble(st));
}
}
if (st.equals("VCRIT")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
VCRIT.add(Double.parseDouble(st));
}
}
if (st.equals("SSHIFT")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
SSHIFT.add(Double.parseDouble(st));
}
}
if (st.equals("PARACHOR")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
PARACHOR.add(Double.parseDouble(st));
}
}
if (st.equals("ZI")) {
while ((st = br.readLine().replace("/", "")) != null) {
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}
ZI.add(Double.parseDouble(st));
Expand All @@ -245,7 +251,7 @@ public static SystemInterface read(String inputFile) {
kij = new double[names.size()][names.size()];
while ((st = br.readLine().replace("/", "")) != null) {
numb++;
if (st.startsWith("--")) {
if (st.startsWith("--") || st.isEmpty()) {
break;
}

Expand Down
Loading

0 comments on commit 34dac74

Please sign in to comment.