Skip to content

Commit

Permalink
update mechanical design models for scrubber (#912)
Browse files Browse the repository at this point in the history
* update models

* update

* updates

* updates

* update

* update

* update
  • Loading branch information
EvenSol authored Feb 5, 2024
1 parent 11c7bb7 commit ce64f51
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public void setMaterialDesignStandard(MaterialPlateDesignStandard materialDesign
public double moduleLength = 0.0;
public Hashtable<String, DesignStandard> designStandard = new Hashtable<String, DesignStandard>();
public UnitCostEstimateBaseClass costEstimate = null;
double defaultLiquidDensity = 1000.0;
double defaultLiquidViscosity = 0.001012;

/**
* <p>
Expand Down Expand Up @@ -424,7 +426,7 @@ public void setPressureMarginFactor(double pressureMarginFactor) {
* @return a double
*/
public double getOuterDiameter() {
return 1.0; // processEquipment.getInternalDiameter();
return outerDiameter;
}

/**
Expand Down Expand Up @@ -1081,6 +1083,22 @@ public UnitCostEstimateBaseClass getCostEstimate() {
return costEstimate;
}

public void setDefaultLiquidDensity(double defaultLiqDens) {
this.defaultLiquidDensity = defaultLiqDens;
}

public double getDefaultLiquidDensity() {
return defaultLiquidDensity;
}

public void setDefaultLiquidViscosity(double defaultLiqVisc) {
this.defaultLiquidViscosity = defaultLiqVisc;
}

public double getDefaultLiquidViscosity() {
return defaultLiquidViscosity;
}

/** {@inheritDoc} */
@Override
public int hashCode() {
Expand Down Expand Up @@ -1170,4 +1188,6 @@ public boolean equals(Object obj) {
&& Double.doubleToLongBits(weigthVesselShell) == Double
.doubleToLongBits(other.weigthVesselShell);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public double calcWallThickness() {
- 0.2 * equipment.getMaxOperationPressure() / 10.0)
+ equipment.getCorrosionAllowanse();
}

return wallT / 1000.0; // return wall thickness in meter
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package neqsim.processSimulation.mechanicalDesign.separator;

import neqsim.processSimulation.mechanicalDesign.designStandards.GasScrubberDesignStandard;
import neqsim.processSimulation.mechanicalDesign.separator.sectionType.SepDesignSection;
import neqsim.processSimulation.processEquipment.ProcessEquipmentInterface;
import neqsim.processSimulation.processEquipment.separator.Separator;
import neqsim.processSimulation.processEquipment.separator.SeparatorInterface;
Expand Down Expand Up @@ -72,7 +73,9 @@ public void calcDesign() {
.getPhysicalProperties().getDensity();
double liqDensity = ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(1)
.getPhysicalProperties().getDensity();

if (((SeparatorInterface) getProcessEquipment()).getThermoSystem().getNumberOfPhases() == 1) {
liqDensity = getDefaultLiquidDensity();
}
maxDesignVolumeFlow = volumeSafetyFactor
* ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(0).getVolume()
/ 1e5;
Expand All @@ -81,17 +84,21 @@ public void calcDesign() {
innerDiameter = Math.sqrt(4.0 * getMaxDesignVolumeFlow()
/ (neqsim.thermo.ThermodynamicConstantsInterface.pi * maxGasVelocity * Fg));
tantanLength = innerDiameter * 5.0;
System.out.println("inner Diameter " + innerDiameter);
// System.out.println("inner Diameter " + innerDiameter);

// calculating from standard codes
// sepLength = innerDiameter * 2.0;
emptyVesselWeight = 0.032 * getWallThickness() * 1e3 * innerDiameter * 1e3 * tantanLength;

setOuterDiameter(innerDiameter + 2.0 * getWallThickness());
for (SeparatorSection sep : separator.getSeparatorSections()) {
sep.getMechanicalDesign().calcDesign();
internalsWeight += sep.getMechanicalDesign().getTotalWeight();
sep.setOuterDiameter(getOuterDiameter());
SepDesignSection sect = sep.getMechanicalDesign();
sect.calcDesign();
internalsWeight += sect.getTotalWeight();
}

System.out.println("internal weight " + internalsWeight);
// System.out.println("internal weight " + internalsWeight);

externalNozzelsWeight = 0.0;
double Wv = emptyVesselWeight + internalsWeight + externalNozzelsWeight;
Expand All @@ -104,17 +111,14 @@ public void calcDesign() {
moduleLength = innerDiameter * 2.5;
moduleLength = tantanLength * 1.5;
moduleHeight = innerDiameter * 2;
// }

setOuterDiameter(innerDiameter + 2.0 * getWallThickness());

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: " + materialsCost + " kNOK");

/*
* 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: " +
* materialsCost + " kNOK");
*/
setWeigthVesselShell(emptyVesselWeight);

tantanLength = innerDiameter * 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
*/
public class SeparatorMechanicalDesign extends MechanicalDesign {
private static final long serialVersionUID = 1000;

double wallThickness = 0.0;
private double outerDiameter = 0.0;
double gasLoadFactor = 1.0;
double volumeSafetyFactor = 1.0;
double Fg = 1.0;
Expand Down Expand Up @@ -163,11 +160,15 @@ public void calcDesign() {
double materialsCost = 0.0;
double gasDensity = ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(0)
.getPhysicalProperties().getDensity();

double liqDensity = ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(1)
.getPhysicalProperties().getDensity();
double liqViscosity = ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(1)
.getPhysicalProperties().getViscosity();

if (((SeparatorInterface) getProcessEquipment()).getThermoSystem().getNumberOfPhases() == 1) {
liqDensity = getDefaultLiquidDensity();
liqViscosity = getDefaultLiquidViscosity();
}
maxDesignVolumeFlow = volumeSafetyFactor
* ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(0).getVolume()
/ 1e5;
Expand All @@ -187,12 +188,12 @@ public void calcDesign() {
double sepratorLength = tantanLength + innerDiameter;

if (sepratorLength / innerDiameter > 6 || sepratorLength / innerDiameter < 3) {
System.out
.println("Fg need to be modified ... L/D separator= " + sepratorLength / innerDiameter);
// System.out
// .println("Fg need to be modified ... L/D separator= " + sepratorLength / innerDiameter);
tantanLength = innerDiameter * 5.0;
sepratorLength = tantanLength + innerDiameter;
}
System.out.println("inner Diameter " + innerDiameter);
// System.out.println("inner Diameter " + innerDiameter);

// alternative design
double bubbleDiameter = 250.0e-6;
Expand All @@ -211,12 +212,14 @@ public void calcDesign() {
// sepLength = innerDiameter * 2.0;
emptyVesselWeight = 0.032 * getWallThickness() * 1e3 * innerDiameter * 1e3 * tantanLength;

setOuterDiameter(innerDiameter + 2.0 * getWallThickness());
for (SeparatorSection sep : separator.getSeparatorSections()) {
sep.setOuterDiameter(getOuterDiameter());
sep.getMechanicalDesign().calcDesign();
internalsWeight += sep.getMechanicalDesign().getTotalWeight();
}

System.out.println("internal weight " + internalsWeight);
// System.out.println("internal weight " + internalsWeight);

externalNozzelsWeight = 0.0; // need to be implemented
double Wv = emptyVesselWeight + internalsWeight + externalNozzelsWeight;
Expand All @@ -230,15 +233,14 @@ public void calcDesign() {
moduleHeight = innerDiameter * 2 + 1.0;
// }

setOuterDiameter(innerDiameter + 2.0 * getWallThickness());

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: " + materialsCost + " kNOK");

/*
* 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: " +
* materialsCost + " kNOK");
*/
setWeigthVesselShell(emptyVesselWeight);

// tantanLength = innerDiameter * 5;
Expand Down Expand Up @@ -274,28 +276,4 @@ public void setDesign() {
((Separator) getProcessEquipment()).setSeparatorLength(tantanLength);
// this method will be implemented to set calculated design...
}

/** {@inheritDoc} */
@Override
public double getOuterDiameter() {
return outerDiameter;
}

/** {@inheritDoc} */
@Override
public double getWallThickness() {
return wallThickness;
}

/** {@inheritDoc} */
@Override
public void setWallThickness(double wallThickness) {
this.wallThickness = wallThickness;
}

/** {@inheritDoc} */
@Override
public void setOuterDiameter(double outerDiameter) {
this.outerDiameter = outerDiameter;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public DistillationTraySection(SeparatorSection separatorSection) {
/** {@inheritDoc} */
@Override
public void calcDesign() {
double vesselDiameter =
separatorSection.getSeparator().getMechanicalDesign().getOuterDiameter() * 1e3;
double vesselDiameter = separatorSection.getOuterDiameter() * 1e3;
if (vesselDiameter <= 616) {
totalWeight = 32.0;
} else if (vesselDiameter <= 770) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public MecMeshSection(SeparatorSection separatorSection) {
/** {@inheritDoc} */
@Override
public void calcDesign() {
double vesselDiameter =
separatorSection.getSeparator().getMechanicalDesign().getOuterDiameter() * 1e3;
double vesselDiameter = separatorSection.getOuterDiameter() * 1e3;
if (vesselDiameter <= 616) {
totalWeight = 5.0;
} else if (vesselDiameter <= 770) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public MechVaneSection(SeparatorSection separatorSection) {
@Override
public void calcDesign() {
double vesselDiameter =
separatorSection.getSeparator().getMechanicalDesign().getOuterDiameter() * 1e3;
separatorSection.getOuterDiameter() * 1e3;
if (vesselDiameter <= 616) {
totalWeight = 6.0;
} else if (vesselDiameter <= 770) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@

package neqsim.processSimulation.processEquipment.separator;

import java.util.ArrayList;
import java.util.UUID;
import neqsim.processSimulation.mechanicalDesign.separator.GasScrubberMechanicalDesign;
import neqsim.processSimulation.processEquipment.separator.sectionType.SeparatorSection;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.processSimulation.processEquipment.stream.StreamInterface;
import neqsim.thermo.system.SystemInterface;

/**
* <p>
Expand All @@ -25,18 +20,6 @@
public class GasScrubber extends Separator {
private static final long serialVersionUID = 1000;

SystemInterface thermoSystem;

SystemInterface gasSystem;
SystemInterface waterSystem;
SystemInterface liquidSystem;
SystemInterface thermoSystemCloned;

ArrayList<SeparatorSection> scrubberSection = null;
StreamInterface inletStream;
StreamInterface gasOutStream;
StreamInterface liquidOutStream;

/**
* <p>
* Constructor for GasScrubber.
Expand Down Expand Up @@ -94,76 +77,4 @@ public GasScrubberMechanicalDesign getMechanicalDesign() {
return new GasScrubberMechanicalDesign(this);
}

/**
* {@inheritDoc}
*
* <p>
* Setter for the field <code>inletStream</code>.
* </p>
*/
public void setInletStream(StreamInterface inletStream) {
this.inletStream = inletStream;

thermoSystem = inletStream.getThermoSystem().clone();
gasSystem = thermoSystem.phaseToSystem(thermoSystem.getPhases()[0]);
gasOutStream = new Stream("gasOutStream", gasSystem);

thermoSystem = inletStream.getThermoSystem().clone();
liquidSystem = thermoSystem.phaseToSystem(thermoSystem.getPhases()[1]);
liquidOutStream = new Stream("liquidOutStream", liquidSystem);
}

/**
* <p>
* addScrubberSection.
* </p>
*
* @param type a {@link java.lang.String} object
*/
public void addScrubberSection(String type) {
scrubberSection.add(new SeparatorSection("section" + scrubberSection.size() + 1, type, this));
}

/** {@inheritDoc} */
@Override
public StreamInterface getLiquidOutStream() {
return liquidOutStream;
}

/** {@inheritDoc} */
@Override
public StreamInterface getGasOutStream() {
return gasOutStream;
}

/** {@inheritDoc} */
@Override
public StreamInterface getGas() {
return getGasOutStream();
}

/** {@inheritDoc} */
@Override
public StreamInterface getLiquid() {
return getLiquidOutStream();
}

/** {@inheritDoc} */
@Override
public void run(UUID id) {
thermoSystem = inletStream.getThermoSystem().clone();
gasSystem = thermoSystem.phaseToSystem(thermoSystem.getPhases()[0]);
gasSystem.setNumberOfPhases(1);
gasOutStream.setThermoSystem(gasSystem);

thermoSystem = inletStream.getThermoSystem().clone();
liquidSystem = thermoSystem.phaseToSystem(thermoSystem.getPhases()[1]);
liquidSystem.setNumberOfPhases(1);
liquidOutStream.setThermoSystem(liquidSystem);
setCalculationIdentifier(id);
}

/** {@inheritDoc} */
@Override
public void displayResult() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public double getValue(String returnParameter, java.lang.String returnUnit) {
* </p>
*/
public void checkReferenceCondition() {
Double[] validvalues = {0.0, 15.0, 15.55, 20.0};
Double[] validvalues = {0.0, 15.0, 15.55, 20.0, 25.0};

if (!java.util.Arrays.stream(validvalues).anyMatch(Double.valueOf(energyRefT)::equals)) {
energyRefT = 25.0;
Expand Down
Loading

0 comments on commit ce64f51

Please sign in to comment.