Skip to content

Commit

Permalink
refact: reorder variable init to match order
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Jan 5, 2025
1 parent 9189d0b commit 1883291
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public SystemDesmukhMather(double T, double P) {
*/
public SystemDesmukhMather(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "Desmukh-Mather-model";
attractiveTermNumber = 0;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemDuanSun.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public SystemDuanSun(double T, double P) {
*/
public SystemDuanSun(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "Duan-Sun-model";
attractiveTermNumber = 0;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/neqsim/thermo/system/SystemElectrolyteCPA.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public SystemElectrolyteCPA() {
*/
public SystemElectrolyteCPA(double T, double P) {
super(T, P);
attractiveTermNumber = 0;
modelName = "Electrolyte-CPA-EOS";
attractiveTermNumber = 0;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseElectrolyteCPA();
phaseArray[i].setTemperature(T);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public SystemElectrolyteCPAstatoil() {
*/
public SystemElectrolyteCPAstatoil(double T, double P) {
super(T, P);
attractiveTermNumber = 15;
modelName = "Electrolyte-CPA-EOS-statoil";
attractiveTermNumber = 15;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseElectrolyteCPAstatoil();
phaseArray[i].setTemperature(T);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public SystemFurstElectrolyteEos() {
*/
public SystemFurstElectrolyteEos(double T, double P) {
super(T, P);
attractiveTermNumber = 2;
modelName = "Electrolyte-ScRK-EOS";
attractiveTermNumber = 2;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseModifiedFurstElectrolyteEos();
phaseArray[i].setTemperature(T);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public SystemFurstElectrolyteEosMod2004() {
*/
public SystemFurstElectrolyteEosMod2004(double T, double P) {
super(T, P);
attractiveTermNumber = 2;
modelName = "Electrolyte-ScRK-EOS";
attractiveTermNumber = 2;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseModifiedFurstElectrolyteEosMod2004();
phaseArray[i].setTemperature(T);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemGEWilson.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public SystemGEWilson(double T, double P) {
*/
public SystemGEWilson(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "UNIFAC-GE-model";
attractiveTermNumber = 0;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public SystemKentEisenberg(double T, double P) {
*/
public SystemKentEisenberg(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "Kent Eisenberg-model";
attractiveTermNumber = 0;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemNRTL.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public SystemNRTL(double T, double P) {
*/
public SystemNRTL(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "NRTL-GE-model";
attractiveTermNumber = 0;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemPrEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public SystemPrEos(double T, double P) {
*/
public SystemPrEos(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 1;
modelName = "PR-EOS";
getCharacterization().setTBPModel("PedersenPR");
attractiveTermNumber = 1;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhasePrEos();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemPrEos1978.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public SystemPrEos1978(double T, double P) {
*/
public SystemPrEos1978(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 6;
modelName = "PR78-EoS";
attractiveTermNumber = 6;
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public SystemPrMathiasCopeman(double T, double P) {
*/
public SystemPrMathiasCopeman(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 13;
modelName = "Mathias-Copeman-PR-EOS";
attractiveTermNumber = 13;
}

/** {@inheritDoc} */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemPsrkEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public SystemPsrkEos(double T, double P) {
*/
public SystemPsrkEos(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 4;
modelName = "Predictive-SRK-EOS";
attractiveTermNumber = 4;
}

/** {@inheritDoc} */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemRKEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public SystemRKEos(double T, double P) {
*/
public SystemRKEos(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 5;
modelName = "RK-EOS";
attractiveTermNumber = 5;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseRK();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public SystemSrkMathiasCopeman(double T, double P) {
*/
public SystemSrkMathiasCopeman(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 4;
modelName = "Mathias-Copeman-SRK-EOS";
attractiveTermNumber = 4;
}

/** {@inheritDoc} */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemTSTEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public SystemTSTEos(double T, double P) {
*/
public SystemTSTEos(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 14;
modelName = "TST-EOS";
attractiveTermNumber = 14;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseTSTEos();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/neqsim/thermo/system/SystemUMRCPAEoS.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public SystemUMRCPAEoS(double T, double P) {
super(T, P);
modelName = "UMR-CPA";
attractiveTermNumber = 19;

useVolumeCorrection(false);
for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseUMRCPA();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/neqsim/thermo/system/SystemUMRPRUEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public SystemUMRPRUEos(double T, double P, boolean checkForSolids) {
setBmixType(1);
modelName = "UMR-PRU-EoS";
attractiveTermNumber = 1;

CapeOpenProperties11 = new String[] {"speedOfSound", "jouleThomsonCoefficient",
"internalEnergy", "internalEnergy.Dtemperature", "gibbsEnergy", "helmholtzEnergy",
"fugacityCoefficient", "logFugacityCoefficient", "logFugacityCoefficient.Dtemperature",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public SystemUMRPRUMCEosNew(double T, double P) {
super(T, P);
modelName = "UMR-PRU-MC-EoS-New";
attractiveTermNumber = 19;

useVolumeCorrection(false);
for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhasePrEosvolcor();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/neqsim/thermo/system/SystemUNIFAC.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ public SystemUNIFAC(double T, double P) {
*/
public SystemUNIFAC(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "UNIFAC-GE-model";
attractiveTermNumber = 0;

solidPhaseCheck = checkForSolids;

phaseArray[0] = new PhaseSrkEos();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/neqsim/thermo/system/SystemUNIFACpsrk.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public SystemUNIFACpsrk(double T, double P) {
*/
public SystemUNIFACpsrk(double T, double P, boolean checkForSolids) {
super(T, P, checkForSolids);
attractiveTermNumber = 0;
modelName = "UNIFAC-GE-model";
attractiveTermNumber = 0;

solidPhaseCheck = checkForSolids;

phaseArray[0] = new PhaseSrkEos();
Expand Down

0 comments on commit 1883291

Please sign in to comment.