Skip to content

Commit

Permalink
style: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Jan 9, 2025
1 parent b9019a3 commit 82c00d5
Show file tree
Hide file tree
Showing 44 changed files with 21 additions and 130 deletions.
1 change: 0 additions & 1 deletion src/main/java/neqsim/fluidmechanics/flownode/FlowNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.FluidBoundaryInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.InterphaseTransportCoefficientBaseClass;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.InterphaseTransportCoefficientInterface;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* @version $Id: $Id
*/
public class EnhancementFactorAlg extends EnhancementFactor {

/**
* <p>
* Constructor for EnhancementFactorAlg.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @version $Id: $Id
*/
public class EnhancementFactorNumeric extends EnhancementFactor {

/**
* <p>
* Constructor for EnhancementFactorNumeric.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import Jama.Matrix;
import neqsim.fluidmechanics.flownode.FlowNode;
import neqsim.mathlib.generalmath.TDMAsolve;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ public void run(UUID id) {
/ MW),
n / (n - 1.0));
setOutletPressure(pressureRatio * getInletPressure());

}
if (useOutTemperature)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ public class CompressorChartAlternativeMapLookupExtrapolate
/** Logger object for class. */
static Logger logger = LogManager.getLogger(CompressorChartAlternativeMapLookupExtrapolate.class);


/**
* {@inheritDoc}
*
* <p>
* 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.
* </p>
*/
@Override
public ArrayList<Double> getClosestRefSpeeds(double speed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ public void run(UUID id) {
firstTime = true;
}


/**
* Runs the heat exchanger simulation using a specified stream approach.
*
Expand All @@ -729,7 +728,6 @@ public void runSpecifiedStream(UUID id) {
// This method needs to be defined based on specific requirements
}


public double getTemperatureApproach() {
return temperatureApproach;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @version 1.0
*/
public interface MultiStreamHeatExchangerInterface extends ProcessEquipmentInterface {

// ================================
// Stream Management Methods
// ================================
Expand Down
1 change: 0 additions & 1 deletion src/main/java/neqsim/process/equipment/stream/Stream.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public class Stream extends ProcessEquipmentBaseClass implements StreamInterface
protected double lastFlowRate = 0.0;
protected double[] lastComposition = null;


/**
* Constructor for Stream.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package neqsim.process.equipment.util;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.UUID;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ public void run(UUID id) {
thermoSystem.setPressure(thermoSystem.getPressure(pressureUnit) - deltaPressure,
pressureUnit);
setOutletPressure(thermoSystem.getPressure());

}

if ((thermoSystem.getPressure(pressureUnit) - pressure) < 0) {
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/neqsim/process/processmodel/ProcessModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@

/**
* <p>
* ProcessModel class.
* ProcessModel class. Manages a collection of processes that can be run in steps or continuously.
* </p>
*
* Manages a collection of processes that can be run in steps or continuously.
*
*
*/
public class ProcessModel implements Runnable {

/** Logger object for class. */
static Logger logger = LogManager.getLogger(ProcessModel.class);
private Map<String, ProcessSystem> processes = new LinkedHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ public PedersenHeavyOilPlusModel() {
}

class WhitsonGammaModel extends PedersenPlusModel {

/** Serialization version UID. */
private static final long serialVersionUID = 1000;
public double[] zValues;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/neqsim/thermo/component/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,6 @@ public void setMolarMass(double value, String unit) {
molarMass = refMolarMass * 1.0 / conversionFactor;
}


/** {@inheritDoc} */
@Override
public final boolean doSolidCheck() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp
public double getGamma(PhaseInterface phase, int numberOfComponents, double temperature,
double pressure, PhaseType pt, double[][] HValpha, double[][] HVgij, double[][] intparam,
String[][] mixRule) {

return 0.0;
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/neqsim/thermo/mixingrule/CPAMixingRules.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ public double calcDelta(int siteNumber1, int siteNumber2, int compnumb1, int com
* ((PhaseCPAInterface) phase).getGcpa();
}


public double calcDelta(int compnumb1, int compnumb2, PhaseInterface phase, double temperature,
double pressure, int numbcomp) {
if (assosSchemeType[compnumb1][compnumb2] == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ void testByName() {
assertEquals(PhysicalPropertyModel.WATER, PhysicalPropertyModel.byName("water"));
}


@Test
void testByValue() {
assertEquals(PhysicalPropertyModel.AMINE, PhysicalPropertyModel.byValue(3));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,5 +383,4 @@ public void runCurveTest2() {
org.apache.logging.log4j.LogManager.getLogger(CompressorChartTest.class)
.debug("surge flow rate " + comp1.getSurgeFlowRate());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ public void testPowerEffSpec() {
// compressor1.getOutletStream().getFluid().prettyPrint();
}


/**
* <p>
* test run with energy stream input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ void testRun1() {
assertEquals(97.992627692, heatEx.getOutStream(2).getTemperature("C"), 1e-3);
assertEquals(69.477801, heatEx.getOutStream(0).getTemperature("C"), 1e-3);
assertEquals(1000, heatEx.getUAvalue(), 0.1);

}

@Test
void testRun2() {

neqsim.process.processmodel.ProcessSystem operations =
new neqsim.process.processmodel.ProcessSystem();

Expand Down Expand Up @@ -160,7 +158,5 @@ void testRun2() {

assertEquals(-26.931795168, separator2.getFluid().getTemperature("C"), 1e-3);
assertEquals(17.37650429489, heatEx.getOutStream(1).getTemperature("C"), 1e-3);

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.pump.PumpChart;

public class PumpChartTest {
@Test
Expand Down
1 change: 0 additions & 1 deletion src/test/java/neqsim/process/equipment/pump/PumpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.pump.Pump;
import neqsim.process.equipment.stream.Stream;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void testSimpleSeparator() {
fluid1.setTemperature(55.0, "C");
fluid1.setPressure(55.0, "bara");


Stream feedStream = new Stream("feed fluid", fluid1);
Separator separator1 = new Separator("sep1", feedStream);

Expand All @@ -98,13 +97,10 @@ public void testSimpleSeparator() {
processOps.add(separator1);
processOps.run();


Assertions.assertEquals(0.06976026260, feedStream.getFluid().getPhase(PhaseType.OIL).getBeta(),
1e-5);

Assertions.assertEquals(0.06976026260, separator1.getFluid().getPhase(PhaseType.OIL).getBeta(),
1e-5);


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.processmodel.ProcessSystem;
import neqsim.thermo.system.SystemSrkEos;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.equipment.stream.VirtualStream;
import neqsim.process.processmodel.ProcessSystem;
import neqsim.thermo.system.SystemSrkEos;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import neqsim.process.equipment.separator.ThreePhaseSeparator;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.process.equipment.util.FlowSetter;
import neqsim.process.measurementdevice.MultiPhaseMeter;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkEos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.equipment.util.GORfitter;
import neqsim.process.measurementdevice.MultiPhaseMeter;
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.equipment.util.MPFMfitter;
import neqsim.process.measurementdevice.MultiPhaseMeter;
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.junit.jupiter.api.Test;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.process.measurementdevice.pHProbe;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkCPAstatoil;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public ProcessSystem getinletModel() {
};

public ProcessSystem getCompressorProcess(StreamInterface gasFeedStream) {

neqsim.process.equipment.compressor.Compressor compressor1 =
new neqsim.process.equipment.compressor.Compressor("Compressor1", gasFeedStream);
compressor1.setPolytropicEfficiency(0.56);
Expand All @@ -89,7 +88,6 @@ public ProcessModel getCombinedModel() {
ProcessSystem compressorProcess = getCompressorProcess(
((ThreePhaseSeparator) inletProcess.getUnit("1st stage separator")).getGasOutStream());


ProcessModel combinedProcess = new ProcessModel();
combinedProcess.add("feed process", inletProcess);
combinedProcess.add("compressor process", compressorProcess);
Expand Down Expand Up @@ -122,7 +120,6 @@ public void testCombinedProcess() {
((Compressor) (fullProcess.get("compressor process")).getUnit("Compressor1"))
.setOutletPressure(100.0, "bara");


try {
fullProcess.run();
} catch (Exception ex) {
Expand All @@ -133,7 +130,5 @@ public void testCombinedProcess() {
((Compressor) fullProcess.get("compressor process").getUnit("Compressor1"))
.getOutletStream().getTemperature("C"),
0.1);

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,9 @@ public void testProcess() {
feedStream.setFlowRate(204094, "kg/hr");
operations.run();


assertTrue(seccondStageCompressor.isSurge(seccondStageCompressor.getPolytropicFluidHead(),
seccondStageCompressor.getInletStream().getFlowRate("m3/hr")));


double pressurespeedclac = seccondStageCompressor.getOutletPressure();
double speedcomp = seccondStageCompressor.getSpeed();

Expand Down
Loading

0 comments on commit 82c00d5

Please sign in to comment.