Skip to content

Commit

Permalink
refact: logger error -> warn
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Feb 27, 2024
1 parent 28079c6 commit a8904b1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ test_*.ser
html/
latex/
eclipse_dictionary.txt

src/main/**/*.png
src/main/**/*.gif
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void readReactions(SystemInterface system) {
}
} while (dataSet.next());
} catch (Exception ex) {
logger.error("could not add reacton: ", ex);
logger.error("could not add reaction: ", ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ public static void initmu(SystemInterface sys, int ncomp, double t, double[] rho
maxerr = Math.max(maxerr, Math.abs(mueq[i] / mueq2[i] - 1.0));
}
if (maxerr > reltol) {
logger.error("Flash is not properly solved. Maximum relative error in chemical potential: "
logger.warn("Flash is not properly solved. Maximum relative error in chemical potential: "
+ maxerr + " > " + reltol);
throw new RuntimeException("Flash not solved!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void setPhase(
/** {@inheritDoc} */
@Override
public void tuneModel(double val, double temperature, double pressure) {
logger.error("model tuning not implemented!");
throw new UnsupportedOperationException("Unimplemented method 'tuneModel'");
}
// should contain phase objects ++ get diffusivity methods .. more ?
}
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp
lngamma = lngammaResidual + lngammaCombinational;

if (Double.isNaN(lngamma)) {
logger.error("gamma NaN......");
logger.warn("gamma NaN......");
lngamma = 0.0;
gamma = 1.0;
dlngammadt = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/phase/PhaseEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int type, Ph
pt);
}
} catch (Exception ex) {
logger.error("Failed to solve for molarVolume within the iteration limit.");
logger.warn("Failed to solve for molarVolume within the iteration limit.");
throw new RuntimeException(ex);
// logger.error("too many iterations in volume calc!", ex);
// logger.info("moles " + numberOfMolesInPhase);
Expand Down

0 comments on commit a8904b1

Please sign in to comment.