Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact: remove deprecated functions #926

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -278,19 +278,6 @@ public String[] getAllElements() {
return elementList;
}

/**
* <p>
* hasRections.
* </p>
*
* @return a boolean
* @deprecated Replaced by hasReactions()
*/
@Deprecated
public boolean hasRections() {
return this.hasReactions();
}

/**
* <p>
* hasRections.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,6 @@ public class ChemicalReaction extends NamedBaseClass
double lnK = 0;
int numberOfReactants = 0;

/**
* <p>
* Constructor for ChemicalReaction.
* </p>
*
* @deprecated use
* {@link #ChemicalReaction(String, String[], double[], double[], double, double, double)}
* instead
*/
@Deprecated
public ChemicalReaction() {
super("ChemicalReaction");
}

/**
* <p>
* Constructor for ChemicalReaction.
Expand Down Expand Up @@ -145,24 +131,6 @@ public double getRateFactor(PhaseInterface phase) {
return 2.576e9 * Math.exp(-6024.0 / phase.getTemperature()) / 1000.0;
}

/**
* <p>
* getK.
* </p>
*
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @return a double
*/
public double getK(PhaseInterface phase) {
double temperature = phase.getTemperature();
lnK = K[0] + K[1] / (temperature) + K[2] * Math.log(temperature) + K[3] * temperature;
if (shiftSignK) {
lnK = -lnK;
}
// System.out.println("K " + Math.exp(lnK));
return Math.exp(lnK);
}

/**
* <p>
* Getter for the field <code>stocCoefs</code>.
Expand Down Expand Up @@ -482,6 +450,24 @@ public double[] getK() {
return this.K;
}

/**
* <p>
* getK.
* </p>
*
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @return a double
*/
public double getK(PhaseInterface phase) {
double temperature = phase.getTemperature();
lnK = K[0] + K[1] / (temperature) + K[2] * Math.log(temperature) + K[3] * temperature;
if (shiftSignK) {
lnK = -lnK;
}
// System.out.println("K " + Math.exp(lnK));
return Math.exp(lnK);
}

/**
* Setter for property k.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,6 @@ public interface AdsorptionInterface extends neqsim.thermo.ThermodynamicConstant
*/
public void calcAdsorption(int phase);

/**
* <p>
* calcAdsorption.
* </p>
*
* @param phase a int
* @deprecated Replaced by {@link calcAdsorption}
*/
@Deprecated
public default void calcAdorption(int phase) {
calcAdsorption(phase);
}

/**
* <p>
* getSurfaceExcess.
Expand All @@ -41,20 +28,6 @@ public default void calcAdorption(int phase) {
*/
public double getSurfaceExcess(int component);

/**
* <p>
* getSurfaceExess.
* </p>
*
* @param component a int
* @return a double
* @deprecated Replaced by {@link getSurfaceExcess}
*/
@Deprecated
public default double getSurfaceExess(int component) {
return getSurfaceExcess(component);
}

/**
* <p>
* setSolidMaterial.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,6 @@ public double getAlkalinity() {
return alkalinity;
}

/**
* <p>
* Getter for the field <code>alkalinity</code>.
* </p>
*
* @return the alkalinity
* @deprecated Replaced by {@link getAlkalinity}
*/
@Deprecated
public double getAlkanility() {
return getAlkalinity();
}

/**
* <p>
* Setter for the field <code>alkalinity</code>.
Expand All @@ -137,17 +124,4 @@ public double getAlkanility() {
public void setAlkalinity(double alkalinity) {
this.alkalinity = alkalinity;
}

/**
* <p>
* Setter for the field <code>alkalinity</code>.
* </p>
*
* @param alkalinity the alkalinity to set
* @deprecated Replaced by {@link setAlkalinity}
*/
@Deprecated
public void setAlkanility(double alkalinity) {
setAlkalinity(alkalinity);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ public class ContractSpecification extends NamedBaseClass {
private String terminal = "";
private double minValue = 0;
private double maxValue = 0;
private double referenceTemperatureMeasurement = 0, referenceTemperatureCombustion = 0;
private double referenceTemperatureMeasurement = 0;
private double referenceTemperatureCombustion = 0;
private double referencePressure = 0;
private String unit = "", comments = "";
private String unit = "";
private String comments = "";

@Deprecated
/**
* <p>
* Constructor for ContractSpecification.
* </p>
*/
@Deprecated
public ContractSpecification() {
super("ContractSpecification");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public class PlusCharacterize implements java.io.Serializable, CharacteriseInter
SystemInterface system = null;

/**
* <p>Constructor for PlusCharacterize.</p>
* <p>
* Constructor for PlusCharacterize.
* </p>
*/
public PlusCharacterize() {}

Expand Down Expand Up @@ -334,17 +336,6 @@ public int getStartPlus() {
return firstPlusFractionNumber;
}

/**
* Setter for property firstPlusFractionNumber.
*
* @param startPlus New value of property firstPlusFractionNumber.
* @deprecated use {@link #setFirstPlusFractionNumber(int firstPlusFractionNumber)} instead.
*/
@Deprecated
public void setStartPlus(int startPlus) {
setFirstPlusFractionNumber(startPlus);
}

/** {@inheritDoc} */
@Override
public double getMPlus() {
Expand Down
28 changes: 1 addition & 27 deletions src/main/java/neqsim/thermo/component/ComponentInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -605,19 +605,6 @@ public double fugcoefDiffTempNumeric(PhaseInterface phase, int numberOfComponent
*/
public double getTriplePointDensity();

/**
* <p>
* getTripplePointDensity.
* </p>
*
* @return a double
* @deprecated Replaced by {@link getTriplePointDensity}
*/
@Deprecated
public default double getTripplePointDensity() {
return getTriplePointDensity();
}

/**
* <p>
* getCriticalCompressibilityFactor.
Expand Down Expand Up @@ -766,20 +753,7 @@ public default void addMolesChemReac(double dn) {

/**
* <p>
* getIdealGasGibsEnergyOfFormation.
* </p>
*
* @return a double
* @deprecated Replaced by {@link getIdealGasGibbsEnergyOfFormation}
*/
@Deprecated
public default double getIdealGasGibsEnergyOfFormation() {
return getIdealGasGibbsEnergyOfFormation();
}

/**
* <p>
* getIdealGasGibsEnergyOfFormation.
* getIdealGasGibbsEnergyOfFormation.
* </p>
*
* @return a double
Expand Down
26 changes: 0 additions & 26 deletions src/main/java/neqsim/thermo/phase/Phase.java
Original file line number Diff line number Diff line change
Expand Up @@ -1207,32 +1207,6 @@ public double getThermalConductivity(String unit) {
return refConductivity * conversionFactor;
}

/** {@inheritDoc} */
@Override
@Deprecated
public double getConductivity() {
return getPhysicalProperties().getConductivity();
}

/** {@inheritDoc} */
@Override
@Deprecated
public double getConductivity(String unit) {
double refConductivity = getConductivity(); // conductivity in W/m*K
double conversionFactor = 1.0;
switch (unit) {
case "W/mK":
conversionFactor = 1.0;
break;
case "W/cmK":
conversionFactor = 0.01;
break;
default:
throw new RuntimeException("unit not supported " + unit);
}
return refConductivity * conversionFactor;
}

/** {@inheritDoc} */
@Override
public void initRefPhases(boolean onlyPure) {
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/neqsim/thermo/phase/PhaseGEInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@
* @version $Id: $Id
*/
public interface PhaseGEInterface {
/**
* <p>
* getExessGibbsEnergy.
* </p>
*
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param numberOfComponents a int
* @param temperature a double
* @param pressure a double
* @param phasetype a int
* @return a double
* @deprecated Replaced by {@link getExcessGibbsEnergy}.
*/
@Deprecated
public default double getExessGibbsEnergy(PhaseInterface phase, int numberOfComponents,
double temperature, double pressure, int phasetype) {
return getExcessGibbsEnergy(phase, numberOfComponents, temperature, pressure, phasetype);
}

/**
* <p>
* getExcessGibbsEnergy.
Expand Down
Loading
Loading