Skip to content

Commit

Permalink
refact: remove deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Feb 23, 2024
1 parent dcf8d1b commit 2689d9a
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 307 deletions.
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
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
15 changes: 3 additions & 12 deletions src/main/java/neqsim/thermo/characterization/PlusCharacterize.java
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
62 changes: 0 additions & 62 deletions src/main/java/neqsim/thermo/phase/PhaseInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,6 @@ public interface PhaseInterface extends ThermodynamicConstantsInterface, Cloneab
*/
public void addComponent(String name, double moles, double molesInPhase, int compNumber);

/**
* <p>
* addcomponent.
* </p>
*
* @param name Name of component.
* @param moles a double
* @param molesInPhase a double
* @param compNumber a int
* @deprecated Replaced by {@link addComponent}
*/
@Deprecated
public default void addcomponent(String name, double moles, double molesInPhase, int compNumber) {
this.addComponent(name, moles, molesInPhase, compNumber);
}

/**
* <p>
* setMoleFractions.
Expand Down Expand Up @@ -535,33 +519,6 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int
*/
public double getMixGibbsEnergy();

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

/**
* <p>
* getExessGibbsEnergySymetric.
* </p>
*
*
* @return a double
* @deprecated Replace by {@link getExcessGibbsEnergySymetric}.
*/
@Deprecated
public default double getExessGibbsEnergySymetric() {
return getExcessGibbsEnergySymetric();
}

/**
* <p>
* getExcessGibbsEnergy.
Expand Down Expand Up @@ -1124,25 +1081,6 @@ public default void addMolesChemReac(int component, double dn) {
*/
public double getViscosity(String unit);

/**
* method to return conductivity of a phase.
*
* @return conductivity in unit W/m*K
* @deprecated use {@link #getThermalConductivity()} instead.
*/
@Deprecated
public double getConductivity();

/**
* method to return conductivity in a specified unit.
*
* @param unit Supported units are W/mK, W/cmK
* @return conductivity in specified unit
* @deprecated use {@link #getThermalConductivity(String unit)} instead.
*/
@Deprecated
public double getConductivity(String unit);

/**
* method to return conductivity of a phase.
*
Expand Down
Loading

0 comments on commit 2689d9a

Please sign in to comment.