Skip to content

Commit

Permalink
style: whitespace (#924)
Browse files Browse the repository at this point in the history
* style: whitespace
  • Loading branch information
asmfstatoil authored Feb 22, 2024
1 parent 5133ef1 commit 4a4fc76
Show file tree
Hide file tree
Showing 73 changed files with 244 additions and 435 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ public void updateMoles() {
phasenumb);
}


// changeMoles += n_mol[i] -
// system.getPhase(phasenumb).getComponents()[components[i].getComponentNumber()]
// .getNumberOfMolesInPhase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public double initVelocity() {
/** {@inheritDoc} */
@Override
public void initFlowCalc() {

initVelocity();
init();

Expand Down Expand Up @@ -402,7 +401,9 @@ public void update() {
}

/**
* <p>update.</p>
* <p>
* update.
* </p>
*
* @param deltaTime a double
*/
Expand All @@ -424,6 +425,5 @@ public void update(double deltaTime) {
getBulkSystem().initBeta();
getBulkSystem().init_x_y();
getBulkSystem().initProperties();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public ControllerDeviceBaseClass() {
this("controller");
}


/** {@inheritDoc} */
@Override
public void setActive(boolean isActive) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public double getMeasuredValue(String measurement, String unit) {
double GOR_via_corrected_volume = tempFluid.getPhase("gas").getCorrectedVolume()
/ tempFluid.getPhase("oil").getCorrectedVolume();


System.out.println("Stream 2 (results inside MPM) " + " GOR sm3/sm3 " + GOR_in_sm3_sm3
+ " GOR Corrected by volume " + GOR_via_corrected_volume);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class WaterDewPointAnalyser extends StreamMeasurementDeviceBaseClass {
*/
public WaterDewPointAnalyser(StreamInterface stream) {
this("WaterDewPointAnalyser", stream);

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,4 @@ public double getAngle(String unit) {
public double getArea() {
return pi * Math.pow(this.internalDiameter, 2) / 4;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ public double stratifiedHoldUp(FluidSevereSlug fluid, Pipe pipe, SevereSlugAnaly
logger.debug("Could not find solution for stratified flow holdup");
} else {
holdUp = (gamma - 0.5 * Math.sin(2 * gamma)) / (pi);

}
return holdUp;
}
Expand Down Expand Up @@ -754,7 +753,6 @@ public static void main(String[] args) {
// inputStream.setFlowRate(0.00001, "MSm^3/day");
// System.out.println(inputStream.getFlowRate("kg/sec"));
// mySevereSlug4.getPredictedFlowRegime();

}

// To be implemented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,4 @@ public boolean equals(Object obj) {
&& Double.doubleToLongBits(weigthVesselShell) == Double
.doubleToLongBits(other.weigthVesselShell);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public interface ProcessEquipmentInterface extends SimulationInterface {
* Get a <code>initMechanicalDesign</code> for the equipment.
* </p>
**/
default void initMechanicalDesign() {

}
default void initMechanicalDesign() {}

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public CompressorChart generateCompressorChart(String generationOption) {
compChart.setHeadUnit("kJ/kg");
compChart.setCurves(chartConditions, speed, flow, head, polyEff);


// Generating surge curve
double minFlowSurgeFlow = 0.7 * refflow;
double refSurgeFlow = 0.8 * refflow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public class DistillationColumn extends ProcessEquipmentBaseClass implements Dis
* </p>
*
* @param numberOfTraysLocal a int
* @param hasReboiler a boolean
* @param hasCondenser a boolean
* @param hasReboiler a boolean
* @param hasCondenser a boolean
*/
public DistillationColumn(int numberOfTraysLocal, boolean hasReboiler, boolean hasCondenser) {
super("DistillationColumn");
Expand Down Expand Up @@ -86,9 +86,8 @@ public DistillationColumn(int numberOfTraysLocal, boolean hasReboiler, boolean h
* addFeedStream.
* </p>
*
* @param inputStream a
* {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
* @param inputStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
* @param feedTrayNumber a int
*/
public void addFeedStream(StreamInterface inputStream, int feedTrayNumber) {
Expand Down Expand Up @@ -158,15 +157,16 @@ public void init() {
double feedTrayTemperature = getTray(getFeedTrayNumber()).getTemperature();

if (trays.get(numberOfTrays - 1).getNumberOfInputStreams() > 0) {
condenserTemperature = ((MixerInterface) trays.get(numberOfTrays - 1)).getThermoSystem().getTemperature();
condenserTemperature =
((MixerInterface) trays.get(numberOfTrays - 1)).getThermoSystem().getTemperature();
} else {
condenserTemperature = feedTrayTemperature - 1.0;
}

reboilerTemperature = ((MixerInterface) trays.get(0)).getThermoSystem().getTemperature();

double deltaTempCondenser = (feedTrayTemperature - condenserTemperature)
/ (numberOfTrays * 1.0 - feedTrayNumber - 1);
double deltaTempCondenser =
(feedTrayTemperature - condenserTemperature) / (numberOfTrays * 1.0 - feedTrayNumber - 1);
double deltaTempReboiler = (reboilerTemperature - feedTrayTemperature) / (feedTrayNumber * 1.0);

double delta = 0;
Expand Down Expand Up @@ -199,17 +199,14 @@ public void init() {
((Runnable) trays.get(0)).run();

// massBalanceCheck();

}

/**
* <p>
* Getter for the field <code>gasOutStream</code>.
* </p>
*
* @return a
* {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
* @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
*/
public StreamInterface getGasOutStream() {
return gasOutStream;
Expand All @@ -220,9 +217,7 @@ public StreamInterface getGasOutStream() {
* Getter for the field <code>liquidOutStream</code>.
* </p>
*
* @return a
* {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
* @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
*/
public StreamInterface getLiquidOutStream() {
return liquidOutStream;
Expand All @@ -234,9 +229,7 @@ public StreamInterface getLiquidOutStream() {
* </p>
*
* @param trayNumber a int
* @return a
* {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
* object
* @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
*/
public SimpleTray getTray(int trayNumber) {
return trays.get(trayNumber);
Expand Down Expand Up @@ -431,7 +424,6 @@ public boolean componentMassBalanceCheck(String componentName) {
.getComponent(componentName).getFlowRate("kg/hr");
}
}

}

for (int i = 0; i < numberOfTrays; i++) {
Expand All @@ -456,7 +448,6 @@ public boolean componentMassBalanceCheck(String componentName) {
+ trays.get(i).getLiquidOutStream().getFluid().getComponent("water").getFlowRate("kg/hr")
+ " pressure " + trays.get(i).getGasOutStream().getPressure() + " temperature "
+ trays.get(i).getGasOutStream().getTemperature("C") + " feedtotray " + massFeedInput[i]);

}

double massError = 0.0;
Expand Down Expand Up @@ -503,15 +494,12 @@ public boolean massBalanceCheck() {
+ trays.get(i).getGasOutStream().getPressure() + " temperature "
+ trays.get(i).getGasOutStream().getTemperature("C"));
/*
* System.out.println( "tray " + i + " number of input streams " +
* numberOfInputStreams +
* System.out.println( "tray " + i + " number of input streams " + numberOfInputStreams +
* " water in gasout " +
* trays.get(i).getGasOutStream().getFluid().getPhase(0).getComponent("water")
* .getNumberOfmoles() + " water in liquidout " +
* trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent(
* "water")
* .getNumberOfmoles() + " pressure " +
* trays.get(i).getGasOutStream().getPressure() +
* trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent( "water")
* .getNumberOfmoles() + " pressure " + trays.get(i).getGasOutStream().getPressure() +
* " temperature " + trays.get(i).getGasOutStream().getTemperature("C"));
*/
}
Expand Down Expand Up @@ -562,7 +550,8 @@ public void energyBalanceCheck() {
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String[] args) {
neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
neqsim.thermo.system.SystemInterface testSystem =
new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
// testSystem.addComponent("methane", 10.00);
testSystem.addComponent("ethane", 10.0);
testSystem.addComponent("CO2", 10.0);
Expand All @@ -586,7 +575,8 @@ public static void main(String[] args) {
// column.getCondenser().setHeatInput(-70000.0);
// ((Condenser) column.getCondenser()).setRefluxRatio(0.2);

neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();
neqsim.processSimulation.processSystem.ProcessSystem operations =
new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(stream_1);
operations.add(column);
operations.run();
Expand All @@ -601,9 +591,7 @@ public static void main(String[] args) {
* getReboiler.
* </p>
*
* @return a
* {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
* object
* @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
*/
public SimpleTray getReboiler() {
return trays.get(0);
Expand All @@ -614,9 +602,7 @@ public SimpleTray getReboiler() {
* getCondenser.
* </p>
*
* @return a
* {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
* object
* @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
*/
public SimpleTray getCondenser() {
return trays.get(trays.size() - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ public void setOutTP(double temperature, double pressure) {
public boolean needRecalculation() {
if (inStream == null) {
return true;

}
if (inStream.getFluid().getTemperature() == lastTemperature
&& inStream.getFluid().getPressure() == lastPressure
Expand Down Expand Up @@ -234,10 +233,8 @@ public void runTransient(double dt, UUID id) {
increaseTime(dt);
return;
}

}


/** {@inheritDoc} */
@Override
public void displayResult() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public StreamInterface getSplitStream(int i) {
return localsplitter.getSplitStream(i);
}


/**
* <p>
* getMixedStream.
Expand All @@ -88,5 +87,4 @@ public void run(UUID id) {
localsplitter.setInletStream(localmixer.getOutletStream());
localsplitter.run();
}

}
Loading

0 comments on commit 4a4fc76

Please sign in to comment.