Skip to content

Commit 9f2edf2

Browse files
authored
javadoc warning fix, docfix and formatting style (#1355)
1 parent 89de148 commit 9f2edf2

File tree

51 files changed

+400
-509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+400
-509
lines changed

src/main/java/neqsim/physicalproperties/interfaceproperties/surfacetension/SurfaceTensionInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public interface SurfaceTensionInterface {
1818
/**
1919
* <p>
20-
* calcSurfaceTension. Calculates the surfacetension.
20+
* Calculates the surface tension between two phases.
2121
* </p>
2222
*
2323
* @param interface1 Phase index 1

src/main/java/neqsim/physicalproperties/methods/commonphasephysicalproperties/viscosity/MethaneViscosityMethod.java

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ public MethaneViscosityMethod(PhysicalProperties phase) {
1919
public double calcViscosity() {
2020

2121
// Check if there are other components than methane
22-
if (phase.getPhase().getNumberOfComponents() > 1
23-
|| !phase.getPhase().getComponent(0).getName().equalsIgnoreCase("methane")) {
22+
if (phase.getPhase().getNumberOfComponents() > 1
23+
|| !phase.getPhase().getComponent(0).getName().equalsIgnoreCase("methane")) {
2424
throw new Error("Methane viscosity model only supports PURE METHANE.");
2525
}
2626

27-
//The following is exactly the same as LBCViscosityMethod
28-
27+
// The following is exactly the same as LBCViscosityMethod
2928
double[] a = {0.10230, 0.023364, 0.058533, -0.040758, 0.0093324};
3029

3130
double T = phase.getPhase().getTemperature();
@@ -75,19 +74,27 @@ public double calcViscosity() {
7574
viscosity_LBC /= 1.0e3;
7675
// System.out.println("visc " + viscosity);
7776

78-
79-
//HERE ARE THE CORRECTION TERMS:
80-
double term_A = 0.0; //Declaring the variable so that it can be changed
77+
// HERE ARE THE CORRECTION TERMS:
78+
double term_A = 0.0; // Declaring the variable so that it can be changed
8179
if (T >= 345) {
82-
term_A = 1.1 * Math.pow(T/345 - 1, 1.2);
80+
term_A = 1.1 * Math.pow(T / 345 - 1, 1.2);
8381
} else {
84-
term_A = 0.64*(T/345 - 1) * (1 - 0.4*Math.exp(-Math.pow(T-298.15, 2) / 100)/(1+Math.exp(-(P-21))));
82+
term_A = 0.64 * (T / 345 - 1)
83+
* (1 - 0.4 * Math.exp(-Math.pow(T - 298.15, 2) / 100) / (1 + Math.exp(-(P - 21))));
8584
}
8685

87-
double A = Math.pow(10, -6) * ( term_A + 0.27 * Math.exp(-Math.pow(T-430, 2) / 9000) * Math.exp(-Math.pow(P-21, 2) / 35)/(1+Math.exp(-(P-15))) );
88-
double B = Math.pow(10, -8) * ( 1.2 * Math.pow(300/T, 3) * Math.pow(P, 1.2)/(1+Math.exp(-0.6*(P-20))) + 30 * (1 - T/400) * Math.exp(-Math.pow(P-15, 2) / 20) + 13*Math.exp(-Math.pow(P-12.8, 2) / 7) );
89-
double C = Math.pow(10, -8) * ( 1/(1+Math.exp((P-15)))*( 2*P * Math.exp(-Math.pow(T-375, 2) / 10000) + 8.0 * (P/4 - 1)) + 10.0 * Math.exp(-Math.pow(T-260, 2) / 300)/(1+Math.exp(0.9*(P-12))) );
90-
double D = Math.pow(10, -6) * ( 0.62 * (1 - T/430) * 1/(1+Math.exp(-0.5*(P-26))) + 0.306*Math.exp(-Math.pow(T-270, 2)/50)/(1+Math.exp(-(P-25))) - (265.2/T) * Math.exp(-Math.pow(T-270, 2)/160)/(1+Math.exp(-0.5*(P-25))) );
86+
double A = Math.pow(10, -6) * (term_A + 0.27 * Math.exp(-Math.pow(T - 430, 2) / 9000)
87+
* Math.exp(-Math.pow(P - 21, 2) / 35) / (1 + Math.exp(-(P - 15))));
88+
double B = Math.pow(10, -8)
89+
* (1.2 * Math.pow(300 / T, 3) * Math.pow(P, 1.2) / (1 + Math.exp(-0.6 * (P - 20)))
90+
+ 30 * (1 - T / 400) * Math.exp(-Math.pow(P - 15, 2) / 20)
91+
+ 13 * Math.exp(-Math.pow(P - 12.8, 2) / 7));
92+
double C = Math.pow(10, -8) * (1 / (1 + Math.exp((P - 15)))
93+
* (2 * P * Math.exp(-Math.pow(T - 375, 2) / 10000) + 8.0 * (P / 4 - 1))
94+
+ 10.0 * Math.exp(-Math.pow(T - 260, 2) / 300) / (1 + Math.exp(0.9 * (P - 12))));
95+
double D = Math.pow(10, -6) * (0.62 * (1 - T / 430) * 1 / (1 + Math.exp(-0.5 * (P - 26)))
96+
+ 0.306 * Math.exp(-Math.pow(T - 270, 2) / 50) / (1 + Math.exp(-(P - 25)))
97+
- (265.2 / T) * Math.exp(-Math.pow(T - 270, 2) / 160) / (1 + Math.exp(-0.5 * (P - 25))));
9198

9299
double eta = viscosity_LBC + A - B + C - D;
93100

src/main/java/neqsim/physicalproperties/methods/commonphasephysicalproperties/viscosity/PFCTViscosityMethodMod86.java

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class PFCTViscosityMethodMod86 extends Viscosity {
2525
// todo: is this parameter required?
2626
int phaseTypeNumb = 1;
2727
double[] GVcoef = {-2.090975e5, 2.647269e5, -1.472818e5, 4.716740e4, -9.491872e3, 1.219979e3,
28-
-9.627993e1, 4.274152, -8.141531e-2};
28+
-9.627993e1, 4.274152, -8.141531e-2};
2929
double visRefA = 1.696985927;
3030
double visRefB = -0.133372346;
3131
double visRefC = 1.4;
@@ -34,7 +34,7 @@ public class PFCTViscosityMethodMod86 extends Viscosity {
3434
double visRefG = 0.0;
3535

3636
double[] viscRefJ = {-1.035060586e1, 1.7571599671e1, -3.0193918656e3, 1.8873011594e2,
37-
4.2903609488e-2, 1.4529023444e2, 6.1276818706e3};
37+
4.2903609488e-2, 1.4529023444e2, 6.1276818706e3};
3838
double[] viscRefK = {-9.74602, 18.0834, -4126.66, 44.6055, 0.976544, 81.8134, 15649.9};
3939

4040
/**
@@ -93,7 +93,8 @@ public double calcViscosity() {
9393
}
9494
PCmix = 8.0 * tempPC1 / (tempPC2 * tempPC2);
9595
double TCmix = tempTC1 / tempTC2;
96-
double Mmix = (Mmtemp + 1.304e-4 * (Math.pow(Mwtemp / Mmtemp, 2.303) - Math.pow(Mmtemp, 2.303))) * 1e3; // phase.getPhase().getMolarMass();
96+
double Mmix =
97+
(Mmtemp + 1.304e-4 * (Math.pow(Mwtemp / Mmtemp, 2.303) - Math.pow(Mmtemp, 2.303))) * 1e3; // phase.getPhase().getMolarMass();
9798

9899
referenceSystem.setTemperature(phase.getPhase().getTemperature());
99100
referenceSystem.setPressure(phase.getPhase().getPressure());
@@ -106,14 +107,14 @@ public double calcViscosity() {
106107
double alfaMix = 1.0 + 7.378e-3 * Math.pow(redDens, 1.847) * Math.pow(Mmix, 0.5173);
107108
double alfa0 = 1.0 + 7.378e-3 * Math.pow(redDens, 1.847)
108109
* Math.pow(referenceSystem.getMolarMass() * 1.0e3, 0.5173);
109-
110+
110111
double T0 = phase.getPhase().getTemperature()
111112
* referenceSystem.getPhase(0).getComponent(0).getTC() / TCmix * alfa0 / alfaMix;
112113
double P0 = phase.getPhase().getPressure() * referenceSystem.getPhase(0).getComponent(0).getPC()
113114
/ PCmix * alfa0 / alfaMix;
114115

115116
double refVisosity = getRefComponentViscosity(T0, P0);
116-
117+
117118
double viscosity = refVisosity * Math.pow(TCmix / Tc0, -1.0 / 6.0)
118119
* Math.pow(PCmix / Pc0, 2.0 / 3.0) * Math.pow(Mmix / M0, 0.5) * alfaMix / alfa0;
119120
return viscosity;
@@ -132,36 +133,31 @@ public double getRefComponentViscosity(double temp, double pres) {
132133
referenceSystem.setTemperature(temp);
133134
referenceSystem.setPressure(pres);
134135
referenceSystem.init(1);
135-
double molDens = referenceSystem.getLowestGibbsEnergyPhase().getDensity() * 1e-3; //[kg/L]
136-
double critMolDens = 162.66e-3; //[kg/L] (Source: NIST)
136+
double molDens = referenceSystem.getLowestGibbsEnergyPhase().getDensity() * 1e-3; // [kg/L]
137+
double critMolDens = 162.66e-3; // [kg/L] (Source: NIST)
137138
double redMolDens = (molDens - critMolDens) / critMolDens;
138-
139+
139140
double viscRefO = 0.0;
140141
for (int i = 0; i < GVcoef.length; i++) {
141142
viscRefO += GVcoef[i] * Math.pow(temp, ((i + 1) - 4) / 3.0);
142143
}
143144

144-
145-
//Calculating the reference viscosity contributions:
145+
// Calculating the reference viscosity contributions:
146146
double temp1 = Math.pow(molDens, 0.1) * (viscRefJ[1] + viscRefJ[2] / Math.pow(temp, 3.0 / 2.0));
147147
double temp2 = redMolDens * Math.pow(molDens, 0.5)
148148
* (viscRefJ[4] + viscRefJ[5] / temp + viscRefJ[6] / Math.pow(temp, 2.0));
149149
double temp3 = Math.exp(temp1 + temp2);
150150

151-
double dTfreeze = temp - 90.69;
152-
double HTAN =
153-
(Math.exp(dTfreeze) - Math.exp(-dTfreeze)) / (Math.exp(dTfreeze) + Math.exp(-dTfreeze));
154-
155-
//This compensates for that the HTAN function is not defined for dTfreeze > 709.0:
156-
if (dTfreeze > 709.0) {
157-
double visRefE = 1.0;
158-
double visRefG = 0.0;
159-
} else {
160-
double visRefE = (HTAN + 1.0) / 2.0;
161-
double visRefG = (1.0 - HTAN) / 2.0;
162-
}
151+
/*
152+
* double dTfreeze = temp - 90.69; double HTAN = (Math.exp(dTfreeze) - Math.exp(-dTfreeze)) /
153+
* (Math.exp(dTfreeze) + Math.exp(-dTfreeze)); // This compensates for that the HTAN function is
154+
* not defined for dTfreeze > 709.0: if (dTfreeze > 709.0) { double visRefE = 1.0; double
155+
* visRefG = 0.0; } else { double visRefE = (HTAN + 1.0) / 2.0; double visRefG = (1.0 - HTAN) /
156+
* 2.0; }
157+
*/
163158

164-
double viscRef1 = (visRefA + visRefB * Math.pow(visRefC - Math.log(temp / visRefF), 2.0)) * molDens;
159+
double viscRef1 =
160+
(visRefA + visRefB * Math.pow(visRefC - Math.log(temp / visRefF), 2.0)) * molDens;
165161
double viscRef2 = visRefE * Math.exp(viscRefJ[0] + viscRefJ[3] / temp) * (temp3 - 1.0);
166162

167163
double temp4 = Math.pow(molDens, 0.1) * (viscRefK[1] + viscRefK[2] / Math.pow(temp, 3.0 / 2.0));

src/main/java/neqsim/process/equipment/ProcessEquipmentBaseClass.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ public void setTemperature(double temperature) {
240240
getFluid().setTemperature(temperature);
241241
}
242242

243-
244243
/** {@inheritDoc} */
245244
@Override
246245
public void setPressure(double pressure) {
@@ -355,7 +354,6 @@ public void setMinimumFlow(double minimumFlow) {
355354
this.minimumFlow = minimumFlow;
356355
}
357356

358-
359357
/**
360358
* <p>
361359
* Getter for the field <code>isActive</code>.

src/main/java/neqsim/process/equipment/adsorber/SimpleAdsorber.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ public class SimpleAdsorber extends ProcessEquipmentBaseClass {
3636
private double stageEfficiency = 0.25;
3737

3838
/**
39-
* {@inheritDoc}
39+
* <p>
40+
* Constructor for SimpleAdsorber.
41+
* </p>
4042
*
41-
* @param name a {@link java.lang.String} object
43+
* @param name name of the unit operation
4244
*/
4345
public SimpleAdsorber(String name) {
4446
super(name);

src/main/java/neqsim/process/equipment/compressor/Compressor.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,13 +1889,7 @@ public double getActualCompressionRatio() {
18891889
return actualCompressionRatio;
18901890
}
18911891

1892-
/**
1893-
* {@inheritDoc}
1894-
*
1895-
* <p>
1896-
* Set CompressorChartType
1897-
* </p>
1898-
*/
1892+
/** {@inheritDoc} */
18991893
public void setCompressorChartType(String type) {
19001894
if (type.equals("simple") || type.equals("fan law")) {
19011895
compressorChart = new CompressorChart();
@@ -1969,5 +1963,4 @@ public boolean isLimitSpeed() {
19691963
public void setLimitSpeed(boolean limitSpeed) {
19701964
this.limitSpeed = limitSpeed;
19711965
}
1972-
19731966
}

src/main/java/neqsim/process/equipment/compressor/CompressorChart.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,16 @@ public void addCurve(double speed, double[] flow, double[] head,
8383
/**
8484
* {@inheritDoc}
8585
*
86+
* <p>
8687
* This method initializes the compressor performance curves, including speed, flow, head, and
8788
* polytropic efficiency.
89+
* </p>
8890
*
8991
* <p>
9092
* The method takes chart conditions and initializes internal variables for different performance
9193
* parameters based on input arrays for speed, flow, head, and polytropic efficiency. It also
9294
* normalizes these parameters by calculating reduced values based on speed.
95+
* </p>
9396
*/
9497
@Override
9598
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head,
@@ -100,13 +103,16 @@ public void setCurves(double[] chartConditions, double[] speed, double[][] flow,
100103
/**
101104
* {@inheritDoc}
102105
*
106+
* <p>
103107
* This method initializes the compressor performance curves, including speed, flow, head, and
104108
* polytropic efficiency.
109+
* </p>
105110
*
106111
* <p>
107112
* The method takes chart conditions and initializes internal variables for different performance
108113
* parameters based on input arrays for speed, flow, head, and polytropic efficiency. It also
109114
* normalizes these parameters by calculating reduced values based on speed.
115+
* </p>
110116
*/
111117
@Override
112118
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head,

src/main/java/neqsim/process/equipment/compressor/CompressorChartAlternativeMapLookup.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,25 +179,27 @@ public void addCurve(double speed, double[] flow, double[] head,
179179
chartSpeeds.add(speed);
180180
}
181181

182-
/** {@inheritDoc} */
183182
/**
184183
* {@inheritDoc}
185184
*
185+
* <p>
186186
* Sets the compressor curves based on the provided chart conditions, speed, flow, head, and
187187
* polytropic efficiency values.
188+
* </p>
188189
*/
189190
@Override
190191
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head,
191192
double[][] polyEff) {
192193
setCurves(chartConditions, speed, flow, head, flow, polyEff);
193194
}
194195

195-
/** {@inheritDoc} */
196196
/**
197197
* {@inheritDoc}
198198
*
199+
* <p>
199200
* Sets the compressor curves based on the provided chart conditions, speed, flow, head,
200201
* flowPolytrpicEfficiency and polytropic efficiency values.
202+
* </p>
201203
*/
202204
@Override
203205
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head,
@@ -256,14 +258,13 @@ public ArrayList<Double> getClosestRefSpeeds(double speed) {
256258
return closestRefSpeeds;
257259
}
258260

259-
/** {@inheritDoc} */
260261
/**
261262
* {@inheritDoc}
262263
*
263-
* Calculates the polytropic head for a given flow and speed.
264-
*
264+
* <p>
265265
* This method interpolates the polytropic head values from reference speeds closest to the given
266266
* speed and averages them to estimate the polytropic head at the specified flow and speed.
267+
* </p>
267268
*/
268269
@Override
269270
public double getPolytropicHead(double flow, double speed) {
@@ -289,13 +290,14 @@ public double getPolytropicHead(double flow, double speed) {
289290
return sum / tempHeads.size();
290291
}
291292

292-
/** {@inheritDoc} */
293293
/**
294294
* {@inheritDoc}
295295
*
296+
* <p>
296297
* Calculates the polytropic efficiency of the compressor for a given flow and speed. The method
297298
* interpolates the efficiency values from reference speed curves and averages them to estimate
298299
* the efficiency at the specified conditions.
300+
* </p>
299301
*/
300302
@Override
301303
public double getPolytropicEfficiency(double flow, double speed) {

src/main/java/neqsim/process/equipment/compressor/CompressorChartAlternativeMapLookupExtrapolate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ public double getPolytropicHead(double flow, double speed) {
118118
/**
119119
* {@inheritDoc}
120120
*
121+
* <p>
121122
* Calculates the polytropic efficiency for a given flow and speed by interpolating or
122123
* extrapolating between reference compressor curves.
124+
* </p>
123125
*/
124126
@Override
125127
public double getPolytropicEfficiency(double flow, double speed) {

src/main/java/neqsim/process/equipment/distillation/Condenser.java

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ public class Condenser extends SimpleTray {
2828
private double reflux_value;
2929
private String reflux_unit;
3030

31+
/**
32+
* Constructor for the Condenser class.
33+
*
34+
* @param name a {@link java.lang.String} object
35+
*/
36+
public Condenser(String name) {
37+
super(name);
38+
}
39+
3140
/**
3241
* Checks if the separation process involves liquid reflux.
3342
*
@@ -64,15 +73,6 @@ public void setTotalCondenser(boolean isTotalCondenser) {
6473
this.totalCondenser = isTotalCondenser;
6574
}
6675

67-
/**
68-
* {@inheritDoc}
69-
*
70-
* @param name a {@link java.lang.String} object
71-
*/
72-
public Condenser(String name) {
73-
super(name);
74-
}
75-
7676
/**
7777
* <p>
7878
* Getter for the field <code>refluxRatio</code>.
@@ -129,13 +129,7 @@ public StreamInterface getProductOutStream() {
129129
return getGasOutStream();
130130
}
131131

132-
/**
133-
* {@inheritDoc}
134-
*
135-
* <p>
136-
* getLiquidOutStream.
137-
* </p>
138-
*/
132+
/** {@inheritDoc} */
139133
@Override
140134
public StreamInterface getLiquidOutStream() {
141135
if (totalCondenser || separation_with_liquid_reflux) {
@@ -145,13 +139,7 @@ public StreamInterface getLiquidOutStream() {
145139
}
146140
}
147141

148-
/**
149-
* {@inheritDoc}
150-
*
151-
* <p>
152-
* getLiquidOutStream.
153-
* </p>
154-
*/
142+
/** {@inheritDoc} */
155143
public StreamInterface getLiquidProductStream() {
156144
if (separation_with_liquid_reflux) {
157145
return mixedStreamSplitter.getSplitStream(1);
@@ -160,7 +148,6 @@ public StreamInterface getLiquidProductStream() {
160148
}
161149
}
162150

163-
164151
/** {@inheritDoc} */
165152
@Override
166153
public void run(UUID id) {

0 commit comments

Comments
 (0)