Skip to content

Commit

Permalink
chore: remove unused imports and format
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Oct 16, 2024
1 parent 1701075 commit d1e81ee
Show file tree
Hide file tree
Showing 48 changed files with 174 additions and 209 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public class InterphasePackedBed extends InterphaseReactorFlow
* Constructor for InterphasePackedBed.
* </p>
*/
public InterphasePackedBed() {
}
public InterphasePackedBed() {}

/**
* <p>
Expand Down Expand Up @@ -78,19 +77,21 @@ public double calcInterphaseMassTransferCoefficient(int phase, double schmidtNum
double massTrans = 0;
if (phase == 1) {
// massTrans = 0.0002;
redMassTrans = 0.0051 * Math.pow(node.getReynoldsNumber(phase), 0.67) * Math.pow(schmidtNumber, -0.5)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), 0.4);
redMassTrans =
0.0051 * Math.pow(node.getReynoldsNumber(phase), 0.67) * Math.pow(schmidtNumber, -0.5)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), 0.4);
massTrans = redMassTrans * Math.pow(
node.getBulkSystem().getPhases()[phase].getPhysicalProperties().getKinematicViscosity()
* gravity,
1.0 / 3.0);
System.out.println("mas trans liq " + massTrans);
}
if (phase == 0) {
redMassTrans = 3.6 * Math.pow(node.getReynoldsNumber(phase), 0.7) * Math.pow(schmidtNumber, 0.33)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), -2.0);
redMassTrans =
3.6 * Math.pow(node.getReynoldsNumber(phase), 0.7) * Math.pow(schmidtNumber, 0.33)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), -2.0);
massTrans = redMassTrans * node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getBulkSystem().getPhases()[phase].getPhysicalProperties().getKinematicViscosity()
/ schmidtNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public class InterphaseReactorFlow extends InterphaseTwoPhase {
* Constructor for InterphaseReactorFlow.
* </p>
*/
public InterphaseReactorFlow() {
}
public InterphaseReactorFlow() {}

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@ public TwoPhasePackedBedFlowNode() {
* </p>
*
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param pipe a
* {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
* @param pipe a {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
*/
public TwoPhasePackedBedFlowNode(SystemInterface system, GeometryDefinitionInterface pipe) {
super(system, pipe);
this.flowNodeType = "packed bed";
this.interphaseTransportCoefficient = new InterphasePackedBed(this);
this.fluidBoundary = new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
this.fluidBoundary =
new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
}

/**
* <p>
* Constructor for TwoPhasePackedBedFlowNode.
* </p>
*
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param interphaseSystem a {@link neqsim.thermo.system.SystemInterface} object
* @param pipe a
* {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
* @param pipe a {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
*/
public TwoPhasePackedBedFlowNode(SystemInterface system, SystemInterface interphaseSystem,
GeometryDefinitionInterface pipe) {
super(system, pipe);
this.flowNodeType = "packed bed";
this.interphaseTransportCoefficient = new InterphasePackedBed(this);
this.fluidBoundary = new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
this.fluidBoundary =
new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
}

/** {@inheritDoc} */
Expand Down Expand Up @@ -106,12 +106,14 @@ public double calcHydraulicDiameter() {
/** {@inheritDoc} */
@Override
public double calcReynoldNumber() {
reynoldsNumber[1] = getSuperficialVelocity(1) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[1].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[1].getPhysicalProperties().getViscosity();
reynoldsNumber[0] = getSuperficialVelocity(0) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[0].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[0].getPhysicalProperties().getViscosity();
reynoldsNumber[1] =
getSuperficialVelocity(1) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[1].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[1].getPhysicalProperties().getViscosity();
reynoldsNumber[0] =
getSuperficialVelocity(0) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[0].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[0].getPhysicalProperties().getViscosity();
System.out.println("rey liq " + reynoldsNumber[1]);
System.out.println("rey gas " + reynoldsNumber[0]);
return reynoldsNumber[1];
Expand All @@ -120,7 +122,8 @@ public double calcReynoldNumber() {
/** {@inheritDoc} */
@Override
public double calcContactLength() {
interphaseContactArea = pipe.getPacking().getSurfaceAreaPrVolume() * getLengthOfNode() * pipe.getArea();
interphaseContactArea =
pipe.getPacking().getSurfaceAreaPrVolume() * getLengthOfNode() * pipe.getArea();
return wallContactLength[0];
}

Expand Down Expand Up @@ -149,8 +152,8 @@ public void update() {
for (int componentNumber = 0; componentNumber < getBulkSystem().getPhases()[0]
.getNumberOfComponents(); componentNumber++) {
if (componentNumber == 1) {
double liquidMolarRate = getFluidBoundary().getInterphaseMolarFlux(componentNumber)
* getInterphaseContactArea(); // getInterphaseContactLength(0)*getGeometry().getNodeLength();
double liquidMolarRate =
getFluidBoundary().getInterphaseMolarFlux(componentNumber) * getInterphaseContactArea(); // getInterphaseContactLength(0)*getGeometry().getNodeLength();
double gasMolarRate = -getFluidBoundary().getInterphaseMolarFlux(componentNumber)
* getInterphaseContactArea(); // getInterphaseContactLength(0)*getGeometry().getNodeLength();
System.out.println("liquidMolarRate" + liquidMolarRate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void main(String[] args) {
) {
while (dataSet.next()) {
ChungFunction function = new ChungFunction();
double guess[] = { 0.3211 };
double guess[] = {0.3211};
function.setInitialGuess(guess);

SystemInterface testSystem = new SystemSrkEos(280, 0.001);
Expand All @@ -50,8 +50,8 @@ public static void main(String[] args) {
testSystem.createDatabase(true);
testSystem.init(0);
testSystem.setMixingRule(2);
double sample1[] = { Double.parseDouble(dataSet.getString("Temperature")) };
double standardDeviation1[] = { 0.1 };
double sample1[] = {Double.parseDouble(dataSet.getString("Temperature"))};
double standardDeviation1[] = {0.1};
SampleValue sample = new SampleValue(Double.parseDouble(dataSet.getString("Viscosity")),
0.001, sample1, standardDeviation1);
sample.setFunction(function);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void main(String[] args) {
ViscosityFunction function = new ViscosityFunction();
// double guess[] = {-66.2, 11810, 0.1331, -0.0000983}; //mdea
// double guess[] = {-5.771E1, 7.647E3, 1.442E-1, -1.357E-4}; //water
double guess[] = { -10.14, 3868.803, -0.00550507 }; // ,0.000001}; //,0.001}; //MEG
double guess[] = {-10.14, 3868.803, -0.00550507}; // ,0.000001}; //,0.001}; //MEG
// double guess[] = { -53.92523097004079, 9741.992308,0,0.106066223998382};
// //TEG
function.setInitialGuess(guess);
Expand All @@ -55,8 +55,8 @@ public static void main(String[] args) {
double temp = Double.parseDouble(dataSet.getString("Temperature"));
testSystem.setTemperature(temp);
testSystem.init(0);
double sample1[] = { temp };
double standardDeviation1[] = { 0.1 };
double sample1[] = {temp};
double standardDeviation1[] = {0.1};
SampleValue sample = new SampleValue(Double.parseDouble(dataSet.getString("Viscosity")),
Double.parseDouble(dataSet.getString("StdDev")), sample1, standardDeviation1);
sample.setFunction(function);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public class ViscosityFunction extends LevenbergMarquardtFunction {
* Constructor for ViscosityFunction.
* </p>
*/
public ViscosityFunction() {
}
public ViscosityFunction() {}

/** {@inheritDoc} */
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ public class AbsorberMechanicalDesign extends SeparatorMechanicalDesign {
* Constructor for AbsorberMechanicalDesign.
* </p>
*
* @param equipment a
* {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
* @param equipment a {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
*/
public AbsorberMechanicalDesign(ProcessEquipmentInterface equipment) {
super(equipment);
Expand All @@ -46,8 +45,9 @@ public void readDesignSpecifications() {
if (getDesignStandard().containsKey("pressure vessel design code")) {
System.out.println("pressure vessel code standard: "
+ getDesignStandard().get("pressure vessel design code").getStandardName());
wallThickness = ((PressureVesselDesignStandard) getDesignStandard().get("pressure vessel design code"))
.calcWallThickness();
wallThickness =
((PressureVesselDesignStandard) getDesignStandard().get("pressure vessel design code"))
.calcWallThickness();
} else {
System.out.println("no pressure vessel code standard specified......");
return;
Expand All @@ -65,10 +65,12 @@ public void readDesignSpecifications() {
if (getDesignStandard().containsKey("separator process design")) {
System.out.println("separator process design: "
+ getDesignStandard().get("separator process design").getStandardName());
gasLoadFactor = ((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getGasLoadFactor();
volumeSafetyFactor = ((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getVolumetricDesignFactor();
gasLoadFactor =
((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getGasLoadFactor();
volumeSafetyFactor =
((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getVolumetricDesignFactor();
} else {
System.out.println("no separator process design specified......");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ public class GasScrubberMechanicalDesign extends SeparatorMechanicalDesign {
* Constructor for GasScrubberMechanicalDesign.
* </p>
*
* @param equipment a
* {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
* @param equipment a {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
*/
public GasScrubberMechanicalDesign(ProcessEquipmentInterface equipment) {
super(equipment);
Expand All @@ -39,10 +38,12 @@ public void readDesignSpecifications() {
if (getDesignStandard().containsKey("gas scrubber process design")) {
System.out.println("gas scrubber process design: "
+ getDesignStandard().get("gas scrubber process design").getStandardName());
gasLoadFactor = ((GasScrubberDesignStandard) getDesignStandard().get("gas scrubber process design"))
.getGasLoadFactor();
volumeSafetyFactor = ((GasScrubberDesignStandard) getDesignStandard().get("gas scrubber process design"))
.getVolumetricDesignFactor();
gasLoadFactor =
((GasScrubberDesignStandard) getDesignStandard().get("gas scrubber process design"))
.getGasLoadFactor();
volumeSafetyFactor =
((GasScrubberDesignStandard) getDesignStandard().get("gas scrubber process design"))
.getVolumetricDesignFactor();
} else {
System.out.println("no separator process design specified......");
}
Expand Down Expand Up @@ -111,15 +112,11 @@ public void calcDesign() {
moduleLength = tantanLength * 1.5;
moduleHeight = innerDiameter * 2;
/*
* System.out.println("wall thickness: " + separator.getName() + " " +
* getWallThickness() +
* " m"); System.out.println("separator dry weigth: " + emptyVesselWeight +
* " kg");
* System.out.println("wall thickness: " + separator.getName() + " " + getWallThickness() +
* " m"); System.out.println("separator dry weigth: " + emptyVesselWeight + " kg");
* System.out.println("total skid weigth: " + totalSkidWeight + " kg");
* System.out.println("foot print: width:" + moduleWidth + " length " +
* moduleLength +
* " height " + moduleHeight + " meter.");
* System.out.println("mechanical price: " +
* System.out.println("foot print: width:" + moduleWidth + " length " + moduleLength +
* " height " + moduleHeight + " meter."); System.out.println("mechanical price: " +
* materialsCost + " kNOK");
*/
setWeigthVesselShell(emptyVesselWeight);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ public class SeparatorMechanicalDesign extends MechanicalDesign {
* Constructor for SeparatorMechanicalDesign.
* </p>
*
* @param equipment a
* {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
* @param equipment a {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
*/
public SeparatorMechanicalDesign(ProcessEquipmentInterface equipment) {
super(equipment);
Expand All @@ -57,20 +56,23 @@ public void readDesignSpecifications() {
if (getDesignStandard().containsKey("pressure vessel design code")) {
System.out.println("pressure vessel code standard: "
+ getDesignStandard().get("pressure vessel design code").getStandardName());
wallThickness = ((PressureVesselDesignStandard) getDesignStandard().get("pressure vessel design code"))
.calcWallThickness();
wallThickness =
((PressureVesselDesignStandard) getDesignStandard().get("pressure vessel design code"))
.calcWallThickness();
} else {
System.out.println("no pressure vessel code standard specified......");
}

if (getDesignStandard().containsKey("separator process design")) {
System.out.println("separator process design: "
+ getDesignStandard().get("separator process design").getStandardName());
gasLoadFactor = ((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getGasLoadFactor();
gasLoadFactor =
((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getGasLoadFactor();
Fg = ((SeparatorDesignStandard) getDesignStandard().get("separator process design")).getFg();
volumeSafetyFactor = ((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getVolumetricDesignFactor();
volumeSafetyFactor =
((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getVolumetricDesignFactor();
retentionTime = 120.0; // ((SeparatorDesignStandard)
// getDesignStandard().get("separator process
// design")).getLiquidRetentionTime("API12J", this);
Expand All @@ -86,7 +88,7 @@ public void displayResults() {
Container dialogContentPane = dialog.getContentPane();
dialogContentPane.setLayout(new BorderLayout());

String[] names = { "Name", "Value", "Unit" };
String[] names = {"Name", "Value", "Unit"};
String[][] table = new String[16][3]; // createTable(getProcessEquipment().getName());

table[1][0] = "Separator Inner Diameter";
Expand Down Expand Up @@ -195,7 +197,8 @@ public void calcDesign() {

// alternative design
double bubbleDiameter = 250.0e-6;
double bubVelocity = 9.82 * Math.pow(bubbleDiameter, 2.0) * (liqDensity - gasDensity) / 18.0 / liqViscosity;
double bubVelocity =
9.82 * Math.pow(bubbleDiameter, 2.0) * (liqDensity - gasDensity) / 18.0 / liqViscosity;
double Ar = ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getLiquidVolume()
/ 1e5 / bubVelocity;
double Daim = Math.sqrt(Ar / 4.0);
Expand Down Expand Up @@ -231,15 +234,11 @@ public void calcDesign() {
// }

/*
* System.out.println("wall thickness: " + separator.getName() + " " +
* getWallThickness() +
* " m"); System.out.println("separator dry weigth: " + emptyVesselWeight +
* " kg");
* System.out.println("wall thickness: " + separator.getName() + " " + getWallThickness() +
* " m"); System.out.println("separator dry weigth: " + emptyVesselWeight + " kg");
* System.out.println("total skid weigth: " + totalSkidWeight + " kg");
* System.out.println("foot print: width:" + moduleWidth + " length " +
* moduleLength +
* " height " + moduleHeight + " meter.");
* System.out.println("mechanical price: " +
* System.out.println("foot print: width:" + moduleWidth + " length " + moduleLength +
* " height " + moduleHeight + " meter."); System.out.println("mechanical price: " +
* materialsCost + " kNOK");
*/
setWeigthVesselShell(emptyVesselWeight);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public class DistillationTraySection extends SepDesignSection {
* </p>
*
* @param separatorSection a
* {@link neqsim.processsimulation.processequipment.separator.sectiontype.SeparatorSection}
* object
* {@link neqsim.processsimulation.processequipment.separator.sectiontype.SeparatorSection}
* object
*/
public DistillationTraySection(SeparatorSection separatorSection) {
super(separatorSection);
Expand Down
Loading

0 comments on commit d1e81ee

Please sign in to comment.