Skip to content

Commit

Permalink
refact: cleaned up doc and name of checkForSolids (#666)
Browse files Browse the repository at this point in the history
* refact: cleaned up doc and name of checkForSolids
  • Loading branch information
asmfstatoil authored and EvenSol committed May 22, 2023
1 parent d0f88bf commit 295e42f
Show file tree
Hide file tree
Showing 52 changed files with 341 additions and 295 deletions.
5 changes: 3 additions & 2 deletions src/main/java/neqsim/thermo/component/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ abstract class Component implements ComponentInterface {
protected double qPure = 0;
protected double voli = 1.0;
protected int calcActivity = 1;
/** Check for solid phase and do solid phase calculations if there are. */
protected boolean solidCheck = false;
protected double dqPuredT = 0;
protected double dqPuredTdT = 0;
Expand Down Expand Up @@ -1781,8 +1782,8 @@ public final boolean doSolidCheck() {

/** {@inheritDoc} */
@Override
public void setSolidCheck(boolean solidCheck) {
this.solidCheck = solidCheck;
public void setSolidCheck(boolean checkForSolids) {
this.solidCheck = checkForSolids;
}

/** {@inheritDoc} */
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/neqsim/thermo/component/ComponentInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@ public double fugcoefDiffTempNumeric(PhaseInterface phase, int numberOfComponent

/**
* <p>
* doSolidCheck.
* Getter for field <code>solidCheck</code>.
* </p>
*
* @return a boolean
Expand All @@ -1833,12 +1833,12 @@ public double fugcoefDiffTempNumeric(PhaseInterface phase, int numberOfComponent

/**
* <p>
* setSolidCheck.
* Setter for field <code>solidCheck</code>.
* </p>
*
* @param solidCheck a boolean
* @param checkForSolids Set true to check for solid phase and do solid phase calculations.
*/
public void setSolidCheck(boolean solidCheck);
public void setSolidCheck(boolean checkForSolids);

/**
* <p>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/component/ComponentSolid.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public double fugcoef(PhaseInterface phase1) {
// phase.getPressure());
// return fugcoef(phase, phase.getNumberOfComponents(), phase.getTemperature(),
// phase.getPressure());
if (!solidCheck) {
if (!doSolidCheck()) {
// return 1.0e20;
}
if (componentName.equals("methane")) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/neqsim/thermo/system/SystemBWRSEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public SystemBWRSEos() {
* Constructor for SystemBWRSEos.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemBWRSEos(double T, double P) {
super(T, P);
Expand All @@ -55,16 +55,16 @@ public SystemBWRSEos(double T, double P) {
* Constructor for SystemBWRSEos.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemBWRSEos(double T, double P, boolean solidCheck) {
public SystemBWRSEos(double T, double P, boolean checkForSolids) {
this(T, P);
modelName = "BWRS-EOS";
attractiveTermNumber = 0;
setNumberOfPhases(5);
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseBWRSEos();
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/neqsim/thermo/system/SystemCSPsrkEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public SystemCSPsrkEos() {
* Constructor for SystemCSPsrkEos.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemCSPsrkEos(double T, double P) {
super(T, P);
Expand All @@ -53,16 +53,16 @@ public SystemCSPsrkEos(double T, double P) {
* Constructor for SystemCSPsrkEos.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemCSPsrkEos(double T, double P, boolean solidCheck) {
public SystemCSPsrkEos(double T, double P, boolean checkForSolids) {
this(T, P);
modelName = "CSPsrk-EOS";
attractiveTermNumber = 0;
setNumberOfPhases(5);
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseCSPsrkEos();
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/neqsim/thermo/system/SystemDesmukhMather.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public class SystemDesmukhMather extends SystemEos {
private static final long serialVersionUID = 1000;

/**
* <p>Constructor for SystemDesmukhMather.</p>
* <p>
* Constructor for SystemDesmukhMather.
* </p>
*/
public SystemDesmukhMather() {
super();
Expand All @@ -31,8 +33,8 @@ public SystemDesmukhMather() {
* Constructor for SystemDesmukhMather.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemDesmukhMather(double T, double P) {
super(T, P);
Expand All @@ -53,16 +55,16 @@ public SystemDesmukhMather(double T, double P) {
* Constructor for SystemDesmukhMather.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemDesmukhMather(double T, double P, boolean solidCheck) {
public SystemDesmukhMather(double T, double P, boolean checkForSolids) {
this(T, P);
attractiveTermNumber = 0;
setNumberOfPhases(4);
modelName = "Desmukh-Mather-model";
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/neqsim/thermo/system/SystemDuanSun.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public SystemDuanSun() {
* Constructor for SystemDuanSun.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemDuanSun(double T, double P) {
super(T, P);
Expand All @@ -59,16 +59,16 @@ public SystemDuanSun(double T, double P) {
* Constructor for SystemDuanSun.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemDuanSun(double T, double P, boolean solidCheck) {
public SystemDuanSun(double T, double P, boolean checkForSolids) {
this(T, P);
attractiveTermNumber = 0;
setNumberOfPhases(4);
modelName = "Duan-Sun-model";
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/thermo/system/SystemElectrolyteCPA.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public SystemElectrolyteCPA() {
* Constructor for SystemElectrolyteCPA.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemElectrolyteCPA(double T, double P) {
super(T, P);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public SystemElectrolyteCPAstatoil() {
* Constructor for SystemElectrolyteCPAstatoil.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemElectrolyteCPAstatoil(double T, double P) {
super(T, P);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/thermo/system/SystemEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public SystemEos() {
* Constructor for SystemEos.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemEos(double T, double P) {
super(T, P);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public SystemFurstElectrolyteEos() {
* Constructor for SystemFurstElectrolyteEos.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemFurstElectrolyteEos(double T, double P) {
super(T, P);
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/neqsim/thermo/system/SystemGERG2004Eos.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public SystemGERG2004Eos() {
* Constructor for SystemGERG2004Eos.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemGERG2004Eos(double T, double P) {
super(T, P);
Expand All @@ -55,16 +55,16 @@ public SystemGERG2004Eos(double T, double P) {
* Constructor for SystemGERG2004Eos.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemGERG2004Eos(double T, double P, boolean solidCheck) {
public SystemGERG2004Eos(double T, double P, boolean checkForSolids) {
this(T, P);
modelName = "GERG2004-EOS";

setNumberOfPhases(5);
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;
for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhaseGERG2004Eos();
phaseArray[i].setTemperature(T);
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/neqsim/thermo/system/SystemGERGwaterEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public SystemGERGwaterEos() {
* Constructor for SystemGERGwaterEos.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemGERGwaterEos(double T, double P) {
super(T, P);
Expand All @@ -53,16 +53,16 @@ public SystemGERGwaterEos(double T, double P) {
* Constructor for SystemGERGwaterEos.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemGERGwaterEos(double T, double P, boolean solidCheck) {
public SystemGERGwaterEos(double T, double P, boolean checkForSolids) {
this(T, P);
modelName = "GERG-water-EOS";
attractiveTermNumber = 10;
setNumberOfPhases(5);
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

for (int i = 0; i < numberOfPhases; i++) {
phaseArray[i] = new PhasePrEos();
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/neqsim/thermo/system/SystemGEWilson.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public class SystemGEWilson extends SystemEos {
private static final long serialVersionUID = 1000;

/**
* <p>Constructor for SystemGEWilson.</p>
* <p>
* Constructor for SystemGEWilson.
* </p>
*/
public SystemGEWilson() {
super();
Expand All @@ -31,8 +33,8 @@ public SystemGEWilson() {
* Constructor for SystemGEWilson.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemGEWilson(double T, double P) {
super(T, P);
Expand All @@ -53,16 +55,16 @@ public SystemGEWilson(double T, double P) {
* Constructor for SystemGEWilson.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemGEWilson(double T, double P, boolean solidCheck) {
public SystemGEWilson(double T, double P, boolean checkForSolids) {
this(T, P);
attractiveTermNumber = 0;
setNumberOfPhases(4);
modelName = "UNIFAC-GE-model";
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/neqsim/thermo/system/SystemKentEisenberg.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public class SystemKentEisenberg extends SystemEos {
private static final long serialVersionUID = 1000;

/**
* <p>Constructor for SystemKentEisenberg.</p>
* <p>
* Constructor for SystemKentEisenberg.
* </p>
*/
public SystemKentEisenberg() {
super();
Expand All @@ -31,8 +33,8 @@ public SystemKentEisenberg() {
* Constructor for SystemKentEisenberg.
* </p>
*
* @param T a double
* @param P a double
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
*/
public SystemKentEisenberg(double T, double P) {
super(T, P);
Expand All @@ -53,16 +55,16 @@ public SystemKentEisenberg(double T, double P) {
* Constructor for SystemKentEisenberg.
* </p>
*
* @param T a double
* @param P a double
* @param solidCheck a boolean
* @param T The temperature in unit Kelvin
* @param P The pressure in unit bara (absolute pressure)
* @param checkForSolids Set true to do solid phase check and calculations
*/
public SystemKentEisenberg(double T, double P, boolean solidCheck) {
public SystemKentEisenberg(double T, double P, boolean checkForSolids) {
this(T, P);
attractiveTermNumber = 0;
setNumberOfPhases(4);
modelName = "Kent Eisenberg-model";
solidPhaseCheck = solidCheck;
solidPhaseCheck = checkForSolids;

phaseArray[0] = new PhaseSrkEos();
phaseArray[0].setTemperature(T);
Expand Down
Loading

0 comments on commit 295e42f

Please sign in to comment.