Skip to content

Commit

Permalink
update models
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Feb 4, 2024
1 parent 11c7bb7 commit 4995956
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public void calcDesign() {
.getPhysicalProperties().getDensity();
double liqDensity = ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(1)
.getPhysicalProperties().getDensity();

if (((SeparatorInterface) getProcessEquipment()).getThermoSystem().getNumberOfPhases() == 1) {
liqDensity = defaultLiquidDensity;
}
maxDesignVolumeFlow = volumeSafetyFactor
* ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(0).getVolume()
/ 1e5;
Expand Down Expand Up @@ -104,6 +106,7 @@ public void calcDesign() {
moduleLength = innerDiameter * 2.5;
moduleLength = tantanLength * 1.5;
moduleHeight = innerDiameter * 2;
setOuterDiameter(innerDiameter+2*wallThickness);
// }

setOuterDiameter(innerDiameter + 2.0 * getWallThickness());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class SeparatorMechanicalDesign extends MechanicalDesign {
double volumeSafetyFactor = 1.0;
double Fg = 1.0;
double retentionTime = 60.0;
double defaultLiquidDensity = 1000.0;
double defaultLiquidViscosity = 0.001012;

/**
* <p>
Expand Down Expand Up @@ -163,11 +165,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 = defaultLiquidDensity;
liqViscosity = defaultLiquidViscosity;
}
maxDesignVolumeFlow = volumeSafetyFactor
* ((SeparatorInterface) getProcessEquipment()).getThermoSystem().getPhase(0).getVolume()
/ 1e5;
Expand Down Expand Up @@ -298,4 +304,8 @@ public void setWallThickness(double wallThickness) {
public void setOuterDiameter(double outerDiameter) {
this.outerDiameter = outerDiameter;
}

public void setDefaultLiquidDensity(double defaultLiqDens) {
this.defaultLiquidDensity = defaultLiqDens;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.junit.jupiter.api.Test;
import neqsim.processSimulation.costEstimation.CostEstimateBaseClass;
import neqsim.processSimulation.mechanicalDesign.pipeline.PipelineMechanicalDesign;
import neqsim.processSimulation.mechanicalDesign.separator.GasScrubberMechanicalDesign;
import neqsim.processSimulation.mechanicalDesign.separator.SeparatorMechanicalDesign;
import neqsim.processSimulation.mechanicalDesign.valve.ValveMechanicalDesign;
import neqsim.processSimulation.processEquipment.heatExchanger.Heater;
Expand Down Expand Up @@ -152,6 +153,35 @@ void testRunDesignCalculationforSeparator() {
System.out.println("separator weight structual steel " + sepMechDesign.weightStructualSteel);
}

@Test
void testRunDesignCalculationforGasScrubber() {

SystemInterface thermoSystem = new SystemSrkEos(298.0, 120.0);
thermoSystem.addComponent("nitrogen", 1.0);
thermoSystem.addComponent("methane", 99.0);
thermoSystem.setMixingRule("classic");

Stream inlets = new Stream("inlet stream", thermoSystem);
inlets.setTemperature(20.0, "C");
inlets.setPressure(120.0, "bara");
inlets.setFlowRate(15.0, "MSm3/day");
inlets.run();

Separator sep1 = new Separator(inlets);
sep1.run();

GasScrubberMechanicalDesign sepMechDesign = new GasScrubberMechanicalDesign(sep1);
sepMechDesign.setMaxOperationPressure(180);
sepMechDesign.calcDesign();
System.out.println("separator inner diameter " + sepMechDesign.innerDiameter);
System.out.println("separator weight vessel shell " + sepMechDesign.weigthVesselShell);
System.out.println("separator weight structual steel " + sepMechDesign.weightStructualSteel);

sep1.addSeparatorSection("filters", "meshpad");
sepMechDesign.calcDesign();

}

@Test
void testRunDesignCalculationforValve() {
ValveMechanicalDesign valve1MechDesign =
Expand Down

0 comments on commit 4995956

Please sign in to comment.