Skip to content

Commit

Permalink
javadoc: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Nov 23, 2024
1 parent ddd30e5 commit f921ffa
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 41 deletions.
2 changes: 2 additions & 0 deletions src/main/java/neqsim/datapresentation/jfreechart/Graph2b.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -302,6 +303,7 @@ public ChartPanel getChartPanel() {
*
* @param args the command line arguments
*/
@ExcludeFromJacocoGeneratedReport
public static void main(String[] args) {
new Graph2b().setVisible(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1468,10 +1468,11 @@ public double getActualCompressionRatio() {
}

/**
* {@inheritDoc}
*
* <p>
* Set CompressorChartType
* </p>
*
*/
public void setCompressorChartType(String type) {
if (type.equals("simple") || type.equals("fan law")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ public void addCurve(double speed, double[] flow, double[] head, double[] polytr
* The method takes chart conditions and initializes internal variables for different performance
* parameters based on input arrays for speed, flow, head, and polytropic efficiency. It also
* normalizes these parameters by calculating reduced values based on speed.
*
* @param chartConditions An array of conditions used for the compressor chart. (Currently unused)
* @param speed An array representing the compressor speed values.
* @param flow A 2D array representing the flow rates at different speeds.
* @param head A 2D array representing the head values at different speeds.
* @param polyEff A 2D array representing the polytropic efficiency values at different speeds.
*/
@Override
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
*/

/**
* <p>CompressorChartAlternativeMapLookup class.</p>
*
* @author asmund
* @version $Id: $Id
*/
Expand Down Expand Up @@ -172,14 +174,10 @@ public void addCurve(double speed, double[] flow, double[] head, double[] polytr

/** {@inheritDoc} */
/**
* {@inheritDoc}
*
* Sets the compressor curves based on the provided chart conditions, speed, flow, head, and
* polytropic efficiency values.
*
* @param chartConditions an array of chart conditions (not used in this method)
* @param speed an array of speed values for the compressor
* @param flow a 2D array of flow values corresponding to each speed
* @param head a 2D array of head values corresponding to each speed
* @param polyEff a 2D array of polytropic efficiency values corresponding to each speed
*/
@Override
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head,
Expand Down Expand Up @@ -208,6 +206,7 @@ public void setCurves(double[] chartConditions, double[] speed, double[][] flow,
* lowest reference speed is returned. If the given speed is higher than the highest reference
* speed, the highest reference speed is returned.
*
* @return an ArrayList of the closest reference speeds
* @param speed the speed to find the closest reference speeds for
* @return an ArrayList of the closest reference speeds
*/
Expand Down Expand Up @@ -243,14 +242,12 @@ public ArrayList<Double> getClosestRefSpeeds(double speed) {

/** {@inheritDoc} */
/**
* {@inheritDoc}
*
* Calculates the polytropic head for a given flow and speed.
*
* This method interpolates the polytropic head values from reference speeds closest to the given
* speed and averages them to estimate the polytropic head at the specified flow and speed.
*
* @param flow the flow rate for which the polytropic head is to be calculated
* @param speed the speed at which the polytropic head is to be calculated
* @return the calculated polytropic head
*/
@Override
public double getPolytropicHead(double flow, double speed) {
Expand Down Expand Up @@ -278,13 +275,11 @@ public double getPolytropicHead(double flow, double speed) {

/** {@inheritDoc} */
/**
* {@inheritDoc}
*
* Calculates the polytropic efficiency of the compressor for a given flow and speed. The method
* interpolates the efficiency values from reference speed curves and averages them to estimate
* the efficiency at the specified conditions.
*
* @param flow the flow rate through the compressor
* @param speed the rotational speed of the compressor
* @return the polytropic efficiency at the specified flow and speed
*/
@Override
public double getPolytropicEfficiency(double flow, double speed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,26 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
* <p>CompressorChartAlternativeMapLookupExtrapolate class.</p>
*
* @author ASMF
*/
public class CompressorChartAlternativeMapLookupExtrapolate
extends CompressorChartAlternativeMapLookup {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(CompressorChartAlternativeMapLookupExtrapolate.class);


/**
* {@inheritDoc}
*
* Retrieves the closest reference speeds to the given speed from the compressor chart values. The
* method returns a list containing one or two speeds: - If the given speed matches a reference
* speed, the list contains only that speed. - If the given speed is between two reference speeds,
* the list contains both speeds. - If the given speed is less than the lowest reference speed,
* the list contains the lowest reference speed. - If the given speed is greater than the highest
* reference speed, the list contains the highest reference speed.
*
* @param speed the speed to find the closest reference speeds for.
* @return a list of the closest reference speeds.
* @throws IllegalStateException if no reference speeds are available in the chart values.
*/
@Override
public ArrayList<Double> getClosestRefSpeeds(double speed) {
Expand Down Expand Up @@ -59,12 +62,10 @@ public ArrayList<Double> getClosestRefSpeeds(double speed) {
}

/**
* {@inheritDoc}
*
* Calculates the polytropic head for a given flow and speed by interpolating or extrapolating
* between reference compressor curves.
*
* @param flow the flow rate for which the polytropic head is to be calculated
* @param speed the speed at which the compressor is operating
* @return the polytropic head corresponding to the given flow and speed
*/
@Override
public double getPolytropicHead(double flow, double speed) {
Expand Down Expand Up @@ -95,14 +96,10 @@ public double getPolytropicHead(double flow, double speed) {
}

/**
* {@inheritDoc}
*
* Calculates the polytropic efficiency for a given flow and speed by interpolating or
* extrapolating between reference compressor curves.
*
* @param flow the flow rate for which the polytropic efficiency is to be calculated
* @param speed the speed at which the compressor is operating
* @return the polytropic efficiency at the given flow and speed
* @throws IllegalArgumentException if no valid reference speeds are found for the given speed or
* if the curve data for a reference speed is invalid
*/
@Override
public double getPolytropicEfficiency(double flow, double speed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

/**
* Compressor chart generator.
*
*
* This class generates a compressor chart based on the provided compressor and the specified
* generation option.
*
*
* Supports generating normal curves and alternative curves.
*
*
* @author Even Solbraa
*/
public class CompressorChartGenerator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public interface CompressorInterface extends ProcessEquipmentInterface, TwoPortI
* Set CompressorChartType
* </p>
*
* @param type a {@link java.lang.String} object
*/
public void setCompressorChartType(String type);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/neqsim/process/equipment/util/Recycle.java
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public void setTemperature(double temp) {
* Setter for the tolerance fields.
* </p>
* Set tolerances to tolerance input.
*
*
* @param tolerance the tolerance to set
*/
public void setTolerance(double tolerance) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/neqsim/process/processmodel/ProcessSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public void setName(String name) {

/**
* Setter for the field <code>runStep</code>.
*
*
* @param runStep A <code>boolean</code> value if run only one iteration
*/
public void setRunStep(boolean runStep) {
Expand All @@ -746,7 +746,7 @@ public void setRunStep(boolean runStep) {

/**
* Getter for the field <code>runStep</code>.
*
*
* @return A <code>boolean</code> value if run only one iteration
*/
public boolean isRunStep() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,10 @@ public interface AttractiveTermInterface extends Cloneable, java.io.Serializable
*/
public AttractiveTermInterface clone();

/**
* <p>getm.</p>
*
* @return a double
*/
public double getm();
}
5 changes: 5 additions & 0 deletions src/main/java/neqsim/thermo/system/SystemInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -2662,5 +2662,10 @@ public default void setPhysicalPropertyModel(int type) {
*/
public void setForceSinglePhase(String phasetypename);

/**
* <p>isInitialized.</p>
*
* @return a boolean
*/
public boolean isInitialized();
}
5 changes: 5 additions & 0 deletions src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ public abstract class SystemThermo implements SystemInterface {
// Initialization
boolean isInitialized = false;

/**
* <p>isInitialized.</p>
*
* @return a boolean
*/
public boolean isInitialized() {
return isInitialized;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* TPgradientFlash class handles thermodynamic calculations with temperature and pressure gradients.
*
* @author ASMF
*/
public class TPgradientFlash extends Flash {
private static final long serialVersionUID = 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* <p>ExcludeFromJacocoGeneratedReport class.</p>
*
* @author ASMF
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ExcludeFromJacocoGeneratedReport {
Expand Down

0 comments on commit f921ffa

Please sign in to comment.