Skip to content

Commit

Permalink
refact: remove unused constructors (#815)
Browse files Browse the repository at this point in the history
* refact: removed unused ctors
* hasRections -> hasReactions
  • Loading branch information
asmfstatoil authored Aug 23, 2023
1 parent 6b5e4bf commit 4cf08e4
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ public class ChemicalReactionOperations
Kinetics kineticsSolver;
LinearProgrammingChemicalEquilibrium initCalc;

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

/**
* <p>
* Constructor for ChemicalReactionOperations.
Expand All @@ -67,7 +60,6 @@ public ChemicalReactionOperations() {}
* @param system a {@link neqsim.thermo.system.SystemInterface} object
*/
public ChemicalReactionOperations(SystemInterface system) {
initCalc = new LinearProgrammingChemicalEquilibrium();
boolean newcomps = true;
int old = system.getPhase(0).getNumberOfComponents();
this.system = system;
Expand Down Expand Up @@ -292,8 +284,21 @@ public String[] getAllElements() {
* </p>
*
* @return a boolean
* @deprecated Replaced by hasReactions()
*/
@Deprecated
public boolean hasRections() {
return this.hasReactions();
}

/**
* <p>
* hasRections.
* </p>
*
* @return a boolean
*/
public boolean hasReactions() {
return components.length > 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ public class LinearProgrammingChemicalEquilibrium

ChemicalReactionOperations operations;

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

/**
* <p>
* Constructor for LinearProgrammingChemicalEquilibrium.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ public class ChemicalReactionList implements ThermodynamicConstantsInterface {
double[][] tempReacMatrix;
double[][] tempStocMatrix;

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

/**
* <p>
* readReactions.
Expand Down
12 changes: 4 additions & 8 deletions src/main/java/neqsim/chemicalReactions/kinetics/Kinetics.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ public class Kinetics implements java.io.Serializable {
double phiInfinite = 0.0;
boolean isIrreversible;

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

/**
* <p>
* Constructor for Kinetics.
Expand Down Expand Up @@ -62,7 +55,10 @@ public void calcKinetics() {}
*/
public double calcReacMatrix(PhaseInterface phase, PhaseInterface interPhase, int comp) {
ChemicalReaction reaction;
double reacCoef = 0.0, irr = 0.0, ktemp = 0.0, exponent = 0.0;
double reacCoef = 0.0;
double irr = 0.0;
double ktemp = 0.0;
double exponent = 0.0;
Iterator<ChemicalReaction> e =
operations.getReactionList().getChemicalReactionList().iterator();
phase.getPhysicalProperties().calcEffectiveDiffusionCoefficients();
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/neqsim/dataPresentation/SampleXYDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ public class SampleXYDataSource {
int[] items = new int[10];
String[] seriesName;

/**
* Default constructor.
*/
public SampleXYDataSource() {
// items=0;
}

/**
* <p>
* Constructor for SampleXYDataSource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ public abstract class FluidBoundary implements FluidBoundaryInterface, java.io.S
protected double[] prandtlNumber;
protected int solverType = 0;

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

/**
* <p>
* Constructor for FluidBoundary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ public class EquilibriumFluidBoundary
extends neqsim.fluidMechanics.flowNode.fluidBoundary.heatMassTransferCalc.FluidBoundary {
private static final long serialVersionUID = 1000;

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

/**
* <p>
* Constructor for EquilibriumFluidBoundary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ public abstract class NonEquilibriumFluidBoundary

public double[][] molFractionDifference;

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

/**
* <p>
* Constructor for NonEquilibriumFluidBoundary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ public class KrishnaStandartFilmModel extends
Matrix redCorrectionMatrix;
Matrix betaMatrix;

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

/**
* <p>
* Constructor for KrishnaStandartFilmModel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ public abstract class ReactiveFluidBoundary extends KrishnaStandartFilmModel {

public double[][] molFractionDifference;

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

/**
* <p>
* Constructor for ReactiveFluidBoundary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ public class ReactiveKrishnaStandartFilmModel extends KrishnaStandartFilmModel {

int enhancementType = 1;

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

/**
* <p>
* Constructor for ReactiveKrishnaStandartFilmModel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ public WaxDepositionFlowNode(SystemInterface system, GeometryDefinitionInterface
*/
public WaxDepositionFlowNode(SystemInterface system, SystemInterface interphaseSystem,
GeometryDefinitionInterface pipe) {
super(system, pipe);
this.flowNodeType = "wax deposition node";
this.interphaseTransportCoefficient = new InterphaseStratifiedFlow(this);
this.fluidBoundary =
new neqsim.fluidMechanics.flowNode.fluidBoundary.heatMassTransferCalc.nonEquilibriumFluidBoundary.filmModelBoundary.KrishnaStandartFilmModel(
this);
this(system, pipe);
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public class HeaterResponse {
public Double dischargeTemperature;
public Double duty;

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

/**
* <p>
* Constructor for HeaterResponse.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public class PumpResponse {
public Double massflow;
public Integer speed;

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

/**
* <p>
* Constructor for PumpResponse.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public class SeparatorResponse {
public Double massflow;
public Fluid gasFluid, liquidFluid, oilFluid, waterFluid;

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

/**
* <p>
* Constructor for SeparatorResponse.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ public class StreamResponse {
public Double massflowOil;
public Double massflowAqueous;

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

/**
* <p>Constructor for StreamResponse.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public class ThreePhaseSeparatorResponse {
public Double massflow;
public Fluid gasFluid, oilFluid;

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

/**
* <p>
* Constructor for ThreePhaseSeparatorResponse.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,7 @@ public void setPhysicalPropertyModel(int type) {
@Override
public void chemicalReactionInit() {
chemicalReactionOperations = new ChemicalReactionOperations(this);
chemicalSystem = chemicalReactionOperations.hasRections();
chemicalSystem = chemicalReactionOperations.hasReactions();
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author esol
* @version $Id: $Id
*/
public class FurstElectrolyteConstants implements java.io.Serializable {
public final class FurstElectrolyteConstants implements java.io.Serializable {
private static final long serialVersionUID = 1000;

// public static double[] furstParams = {0.0982e-6, 7.003e-6, 77.22e-6,
Expand Down Expand Up @@ -50,12 +50,11 @@ public class FurstElectrolyteConstants implements java.io.Serializable {

// 0.0000001880, 0.0000014139, 0.0000284666, 0.0000389043, -0.0000000451,
// 0.0000088136

/**
* <p>
* Constructor for FurstElectrolyteConstants.
* </p>
* Dummy constructor, not for use. Class is to be considered static.
*/
public FurstElectrolyteConstants() {}
private FurstElectrolyteConstants() {}

/**
* <p>
Expand Down

0 comments on commit 4cf08e4

Please sign in to comment.