Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Feb 27, 2024
1 parent 78ea0c4 commit fd62f84
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -1826,18 +1826,23 @@ public void init(int type, int phase) {
public void initAnalytic(int type) {
if (type == 0) {
reInitPhaseInformation();
}

for (int i = 0; i < getMaxNumberOfPhases(); i++) {
if (isPhase(i)) {
getPhase(i).init(getTotalNumberOfMoles(), numberOfComponents, type,
phaseType[phaseIndex[i]], beta[phaseIndex[i]]);
for (int i = 0; i < getMaxNumberOfPhases(); i++) {
if (isPhase(i)) {
getPhase(i).init(getTotalNumberOfMoles(), numberOfComponents, type,
phaseType[phaseIndex[i]], beta[phaseIndex[i]]);
}
}
}
if (type == 0) {
setNumberOfPhases(2);
}

if (type > 0) {
for (int i = 0; i < numberOfPhases; i++) {
if (isPhase(i)) {
getPhase(i).init(getTotalNumberOfMoles(), numberOfComponents, type,
phaseType[phaseIndex[i]], beta[phaseIndex[i]]);
}
}

for (int i = 0; i < numberOfPhases; i++) {
if (isPhase(i)) {
for (int j = 0; j < numberOfComponents; j++) {
Expand Down

0 comments on commit fd62f84

Please sign in to comment.