Skip to content

Commit

Permalink
refact: remove default constructors not to be used (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil authored Jun 19, 2023
1 parent 0253ad2 commit c9974cb
Show file tree
Hide file tree
Showing 69 changed files with 26 additions and 462 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ public class ChemicalEquilibrium extends BaseOperation {

SystemInterface system;

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

/**
* <p>
* Constructor for ChemicalEquilibrium.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ abstract class Flash extends BaseOperation {
protected boolean stabilityCheck = false;
protected boolean findLowestGibbsPhaseIsChecked = false;

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

/**
* <p>
* findLowestGibbsEnergyPhase.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ public class PHflash extends Flash {
Flash tpFlash;
int type = 0;

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

/**
* <p>
* Constructor for PHflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public class PHflashGERG2008 extends Flash {
double enthalpy_GERG2008 = 0.0;
double cP_GERG2008 = 0.0;

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

/**
* <p>
* Constructor for PHflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ public class PHflashSingleComp extends Flash {

double Hspec = 0;

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

/**
* <p>
* Constructor for PHflashSingleComp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ public class PHsolidFlash extends Flash {
int refluxPhase = 0;
double enthalpyspec = 0.5;

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

/**
* <p>
* Constructor for PHsolidFlash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public class PSFlash extends QfuncFlash {
Flash tpFlash;
int type = 0;

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

/**
* <p>
* Constructor for PSFlash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ public class PSFlashGERG2008 extends QfuncFlash {
double entropy_GERG2008 = 0.0;
double cP_GERG2008 = 0.0;

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

/**
* <p>
* Constructor for PSFlashGERG2008.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ public class PSflashSingleComp extends Flash {

double Sspec = 0;

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

/**
* <p>
* Constructor for PSflashSingleComp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public class PVrefluxflash extends Flash {
int refluxPhase = 0;
double refluxSpec = 0.5;

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

/**
* <p>
* Constructor for PVrefluxflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import neqsim.thermo.system.SystemInterface;

/**
Expand All @@ -25,16 +26,17 @@ public class QfuncFlash extends Flash {
* Constructor for QfuncFlash.
* </p>
*/
public QfuncFlash() {}
public QfuncFlash() {
}

/**
* <p>
* Constructor for QfuncFlash.
* </p>
*
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param Hspec a double
* @param type a int
* @param Hspec a double
* @param type a int
*/
public QfuncFlash(SystemInterface system, double Hspec, int type) {
this.system = system;
Expand Down Expand Up @@ -93,8 +95,8 @@ public double solveQ() {
public void run() {
tpFlash.run();
logger.info("entropy: " + system.getEntropy());
sysNewtonRhapsonPHflash secondOrderSolver =
new sysNewtonRhapsonPHflash(system, 2, system.getPhases()[0].getNumberOfComponents(), type);
sysNewtonRhapsonPHflash secondOrderSolver = new sysNewtonRhapsonPHflash(system, 2,
system.getPhases()[0].getNumberOfComponents(), type);
secondOrderSolver.setSpec(Hspec);
secondOrderSolver.solve(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ public class SaturateWithWater extends QfuncFlash {

Flash tpFlash;

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

/**
* <p>
* Constructor for SaturateWithWater.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ public class SolidFlash extends TPflash {
boolean hasRemovedPhase = false;
boolean secondTime = false;

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

/**
* <p>
* Constructor for SolidFlash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public class SolidFlash1 extends TPflash {
double totalSolidFrac = 0.0;
int[] FluidPhaseActiveDescriptors; // 1 = active; 0 = inactive

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

/**
* <p>
* Constructor for SolidFlash1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ public class SolidFlash12 extends TPflash {
int solidsNumber = 0;
int solidIndex = 0;

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

/**
* <p>
* Constructor for SolidFlash12.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import neqsim.thermo.phase.PhaseType;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
Expand All @@ -27,7 +28,8 @@ public class TPflash extends Flash {
* Constructor for TPflash.
* </p>
*/
public TPflash() {}
public TPflash() {
}

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ public class TPmultiflash extends TPflash {
double[] multTerm;
double[] multTerm2;

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

/**
* <p>
* Constructor for TPmultiflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ public class TPmultiflashWAX extends TPflash {
double Q = 0;
boolean doStabilityAnalysis = true;

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

/**
* <p>
* Constructor for TPmultiflashWAX.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ public class TPmultiflash_1 extends TPflash {
double[] E;
double Q = 0;

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

/**
* <p>
* Constructor for TPmultiflash_1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public class TSFlash extends QfuncFlash {
double Sspec = 0;
Flash tpFlash;

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

/**
* <p>
* Constructor for TSFlash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ public class TVflash extends Flash {
double Vspec = 0;
Flash tpFlash;

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

/**
* <p>
* Constructor for TVflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public class VHflash extends Flash {
double Vspec = 0;
Flash pHFlash;

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

/**
* <p>
* Constructor for VHflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ public class VHflashQfunc extends Flash {
double Hspec = 0.0;
Flash tpFlash;

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

/**
* <p>
* Constructor for VHflashQfunc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ public class VSflash extends Flash {
double Vspec = 0;
Flash tpFlash;

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

/**
* <p>
* Constructor for VSflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ public class VUflash extends Flash {
double Vspec = 0;
Flash pHFlash;

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

/**
* <p>
* Constructor for VUflash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ public class VUflashQfunc extends Flash {
double Uspec = 0.0;
Flash tpFlash;

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

/**
* <p>
* Constructor for VUflashQfunc.
Expand Down
Loading

0 comments on commit c9974cb

Please sign in to comment.