Skip to content

Commit

Permalink
chore: fix javadoc (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil authored Aug 2, 2024
1 parent 90ada70 commit abe75f5
Show file tree
Hide file tree
Showing 24 changed files with 91 additions and 64 deletions.
20 changes: 10 additions & 10 deletions src/main/java/neqsim/thermo/component/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
import neqsim.util.unit.PressureUnit;
import neqsim.util.unit.TemperatureUnit;

/**
* <p>
* Abstract Component class.
* </p>
*
* @author Even Solbraa
*/
public abstract class Component implements ComponentInterface {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(Component.class);
Expand Down Expand Up @@ -499,11 +506,10 @@ public Component clone() {
@Override
public void addMolesChemReac(double dn, double totdn) {
if (numberOfMoles + totdn < 0 || numberOfMolesInPhase + dn < 0) {
if (Math.abs(dn) < 1e-12){
if (Math.abs(dn) < 1e-12) {
dn = 0;
totdn = 0;
}
else{
} else {
String msg = "will lead to negative number of moles of component in phase for component "
+ getComponentName() + " who has " + numberOfMolesInPhase
+ " in phase and chage request was " + dn;
Expand Down Expand Up @@ -2285,13 +2291,7 @@ public double getVolumeCorrectionT() {
return volumeCorrectionT;
}

/**
* <p>
* getVolumeCorrection.
* </p>
*
* @return a double
*/
/** {@inheritDoc} */
@Override
public double getVolumeCorrection() {
return 0.0;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/neqsim/thermo/component/ComponentEos.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
import neqsim.thermo.phase.PhaseInterface;

/**
* <p>
* Abstract ComponentEos class.
* </p>
*
* @author Even Solbraa
*/
public abstract class ComponentEos extends Component implements ComponentEosInterface {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/neqsim/thermo/component/ComponentInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,8 @@ public double fugcoefDiffTempNumeric(PhaseInterface phase, int numberOfComponent
* <p>
* setMolarMass.
* </p>
*
*
* @param molarMass a double
*
* @param unit a String
*/
public void setMolarMass(double molarMass, String unit);
Expand Down Expand Up @@ -994,8 +993,9 @@ public void Finit(PhaseInterface phase, double temperature, double pressure,
* <p>
* getNormalLiquidDensity.
* </p>
*
*
* @param unit i String with unit of return return a double
* @return a double
*/
public double getNormalLiquidDensity(String unit);

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/neqsim/thermo/component/ComponentPRvolcor.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ public void init(double temp, double pres, double totMoles, double beta, int ini
c = calcc();
}

/** {@inheritDoc} */
/**
* <p>
* getc.
* </p>
*
* @return a double
*/
public double getc() {
return c;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@ public double calcAiT(int compNumb, PhaseInterface phase, double temperature, do
*/
public PhaseInterface getGEPhase();

/**
* <p>
* getBinaryInteractionParameters.
* </p>
*
* @return an array of type double
*/
public double[][] getBinaryInteractionParameters();
// double calcA2(PhaseInterface phase, double temperature, double pressure, int
// numbcomp);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/thermo/phase/Phase.java
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ public void initRefPhases(boolean onlyPure) {
* </p>
*
* @param onlyPure a boolean
* @param name a {@link String} object
* @param name a {@link java.lang.String} object
*/
public void initRefPhases(boolean onlyPure, String name) {
refPhase = new PhaseInterface[numberOfComponents];
Expand Down Expand Up @@ -2294,7 +2294,7 @@ public double getFlowRate(String flowunit) {
* Getter for the field <code>thermoPropertyModelName</code>.
* </p>
*
* @return a {@link String} object
* @return a {@link java.lang.String} object
*/
public String getThermoPropertyModelName() {
return thermoPropertyModelName;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/neqsim/thermo/phase/PhaseDesmukhMather.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public double getSolventMolarMass() {
return molesMass / moles;
}

/** {@inheritDoc} */
@Override
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt)
throws IsNaNException, TooManyIterationsException {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/neqsim/thermo/phase/PhaseDuanSun.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public double getGibbsEnergy() {
return R * temperature * numberOfMolesInPhase * (GE + Math.log(pressure));
}

/** {@inheritDoc} */
@Override
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt)
throws IsNaNException, TooManyIterationsException {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/thermo/phase/PhaseEosInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface PhaseEosInterface extends PhaseInterface {
* getMixingRuleName.
* </p>
*
* @return a {@link String} object
* @return a {@link java.lang.String} object
*/
public String getMixingRuleName();

Expand Down Expand Up @@ -80,7 +80,7 @@ public interface PhaseEosInterface extends PhaseInterface {
* displayInteractionCoefficients.
* </p>
*
* @param intType a {@link String} object
* @param intType a {@link java.lang.String} object
*/
public void displayInteractionCoefficients(String intType);
// public double getA();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/neqsim/thermo/phase/PhaseGENRTL.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public PhaseGENRTL() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGENRTL(PhaseInterface phase, double[][] alpha, double[][] Dij, String[][] mixRule,
Expand Down Expand Up @@ -133,6 +133,7 @@ public double getGibbsEnergy() {
return R * temperature * numberOfMolesInPhase * (GE + Math.log(pressure));
}

/** {@inheritDoc} */
@Override
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt)
throws IsNaNException, TooManyIterationsException {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/thermo/phase/PhaseGENRTLmodifiedHV.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public PhaseGENRTLmodifiedHV() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGENRTLmodifiedHV(PhaseInterface phase, double[][] alpha, double[][] Dij,
Expand All @@ -66,7 +66,7 @@ public PhaseGENRTLmodifiedHV(PhaseInterface phase, double[][] alpha, double[][]
* @param alpha an array of type double
* @param Dij an array of type double
* @param DijT an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGENRTLmodifiedHV(PhaseInterface phase, double[][] alpha, double[][] Dij,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/thermo/phase/PhaseGENRTLmodifiedWS.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public PhaseGENRTLmodifiedWS() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGENRTLmodifiedWS(PhaseInterface phase, double[][] alpha, double[][] Dij,
Expand All @@ -56,7 +56,7 @@ public PhaseGENRTLmodifiedWS(PhaseInterface phase, double[][] alpha, double[][]
* @param alpha an array of type double
* @param Dij an array of type double
* @param DijT an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGENRTLmodifiedWS(PhaseInterface phase, double[][] alpha, double[][] Dij,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/phase/PhaseGEUnifac.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public PhaseGEUnifac() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGEUnifac(PhaseInterface phase, double[][] alpha, double[][] Dij, String[][] mixRule,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/phase/PhaseGEUnifacPSRK.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public PhaseGEUnifacPSRK() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGEUnifacPSRK(PhaseInterface phase, double[][] alpha, double[][] Dij,
Expand Down
16 changes: 13 additions & 3 deletions src/main/java/neqsim/thermo/phase/PhaseGEUnifacUMRPRU.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public PhaseGEUnifacUMRPRU() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGEUnifacUMRPRU(PhaseInterface phase, double[][] alpha, double[][] Dij,
Expand Down Expand Up @@ -82,10 +82,20 @@ public void calcCommontemp(PhaseInterface phase, int numberOfComponents, double
}
}

/**
* <p>getVCommontemp.</p>
*
* @return a double
*/
public double getVCommontemp() {
return VCommontemp;
}

/**
* <p>getFCommontemp.</p>
*
* @return a double
*/
public double getFCommontemp() {
return FCommontemp;
}
Expand Down Expand Up @@ -163,7 +173,7 @@ public void initQmixdN() {
* getQmix.
* </p>
*
* @param name a {@link String} object
* @param name a {@link java.lang.String} object
* @return a double
*/
public double getQmix(String name) {
Expand All @@ -181,7 +191,7 @@ public double getQmix(String name) {
* getQmixdN.
* </p>
*
* @param name a {@link String} object
* @param name a {@link java.lang.String} object
* @return an array of type double
*/
public double[] getQmixdN(String name) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/neqsim/thermo/phase/PhaseGEUniquac.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public PhaseGEUniquac() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGEUniquac(PhaseInterface phase, double[][] alpha, double[][] Dij, String[][] mixRule,
Expand Down Expand Up @@ -120,6 +120,7 @@ public double getExcessGibbsEnergy(PhaseInterface phase, int numberOfComponents,
return R * temperature * numberOfMolesInPhase * GE;
}

/** {@inheritDoc} */
@Override
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt)
throws IsNaNException, TooManyIterationsException {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/neqsim/thermo/phase/PhaseGEWilson.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public PhaseGEWilson() {
* @param phase a {@link neqsim.thermo.phase.PhaseInterface} object
* @param alpha an array of type double
* @param Dij an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public PhaseGEWilson(PhaseInterface phase, double[][] alpha, double[][] Dij, String[][] mixRule,
Expand Down Expand Up @@ -110,6 +110,7 @@ public double getExcessGibbsEnergy(PhaseInterface phase, int numberOfComponents,
return R * temperature * numberOfMolesInPhase * GE;
}

/** {@inheritDoc} */
@Override
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt)
throws IsNaNException, TooManyIterationsException {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/phase/PhaseHydrate.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public PhaseHydrate() {
* Constructor for PhaseHydrate.
* </p>
*
* @param fluidModel a {@link String} object
* @param fluidModel a {@link java.lang.String} object
*/
public PhaseHydrate(String fluidModel) {
if (fluidModel.isEmpty()) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/neqsim/thermo/phase/PhaseInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType
* initPhysicalProperties.
* </p>
*
* @param type a {@link String} object
* @param type a {@link java.lang.String} object
*/
public void initPhysicalProperties(String type);

Expand Down Expand Up @@ -452,7 +452,7 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType
* getFugacity.
* </p>
*
* @param compName a {@link String} object
* @param compName a {@link java.lang.String} object
* @return a double
*/
public double getFugacity(String compName);
Expand Down Expand Up @@ -608,7 +608,7 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType
* getWtFrac.
* </p>
*
* @param componentName a {@link String} object
* @param componentName a {@link java.lang.String} object
* @return a double
*/
public double getWtFrac(String componentName);
Expand All @@ -618,7 +618,7 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType
* setMixingRuleGEModel.
* </p>
*
* @param name a {@link String} object
* @param name a {@link java.lang.String} object
*/
public void setMixingRuleGEModel(String name);

Expand Down Expand Up @@ -1846,7 +1846,7 @@ public default void addMolesChemReac(int component, double dn) {
* @param alpha an array of type double
* @param Dij an array of type double
* @param DijT an array of type double
* @param mixRule an array of {@link String} objects
* @param mixRule an array of {@link java.lang.String} objects
* @param intparam an array of type double
*/
public void setParams(PhaseInterface phase, double[][] alpha, double[][] Dij, double[][] DijT,
Expand All @@ -1871,7 +1871,7 @@ public void setParams(PhaseInterface phase, double[][] alpha, double[][] Dij, do
* Getter for property phaseTypeName.
* </p>
*
* @return a {@link String} object
* @return a {@link java.lang.String} object
*/
public default String getPhaseTypeName() {
return getType().getDesc();
Expand All @@ -1882,7 +1882,7 @@ public default String getPhaseTypeName() {
* Setter for property phaseTypeName.
* </p>
*
* @param phaseTypeName a {@link String} object
* @param phaseTypeName a {@link java.lang.String} object
*/
public default void setPhaseTypeName(String phaseTypeName) {
setType(PhaseType.byDesc(phaseTypeName));
Expand Down
Loading

0 comments on commit abe75f5

Please sign in to comment.