Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Nov 16, 2023
1 parent a133a5b commit 1cbccda
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class NeqSimUnit extends TwoPortEquipment {
private String equipment = "pipeline";
String flowPattern = "stratified";
private double length = 1.0;
public int numberOfNodes = 100;
public int numberOfNodes = 10;
private double ID = 0.5;
private double outerTemperature = 283.15;
public double interfacialArea = 0.0;
Expand Down Expand Up @@ -87,11 +87,11 @@ public void run(UUID id) {
public void runDroplet() {
PipeData pipe1 = new PipeData(getID(), 0.00025);
FlowNodeInterface test = new DropletFlowNode(thermoSystem, pipe1);
test.setInterphaseModelType(1);
test.setInterphaseModelType(0);
test.setLengthOfNode(getLength() / (numberOfNodes * 1.0));
test.getGeometry().getSurroundingEnvironment().setTemperature(getOuterTemperature());

test.getFluidBoundary().setHeatTransferCalc(false);
test.getFluidBoundary().setHeatTransferCalc(true);
test.getFluidBoundary().setMassTransferCalc(true);
double length = 0;
test.initFlowCalc();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package neqsim.processSimulation.processSystem;

import org.junit.jupiter.api.Test;
import neqsim.processSimulation.processEquipment.mixer.StaticPhaseMixer;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkEos;

public class MassTransferTest extends neqsim.NeqSimTest {

@Test
public void runProcess() throws InterruptedException {
SystemInterface thermoSystem = new SystemSrkEos(273.15 + 15, 60.0);
thermoSystem.addComponent("nitrogen", 0.01);
thermoSystem.addComponent("CO2", 0.019);
thermoSystem.addComponent("methane", 0.925);
thermoSystem.addComponent("ethane", 0.045);
thermoSystem.setMixingRule("classic");

SystemInterface ethaneSystem = ((SystemInterface) thermoSystem).clone();
ethaneSystem.setMolarComposition(new double[] {0, 0, 0, 1.0});

Stream feedStream = new Stream("feed stream", thermoSystem);
feedStream.setFlowRate(10.0 * 24, "MSm3/day");

Stream ethaneStream = new Stream("ethane stream", ethaneSystem);
feedStream.setFlowRate(200000.0, "kg/hr");

StaticPhaseMixer mainMixer = new StaticPhaseMixer("gas ethane mixer");
mainMixer.addStream(feedStream);
mainMixer.addStream(ethaneStream);

neqsim.processSimulation.processEquipment.util.NeqSimUnit pipeline =
new neqsim.processSimulation.processEquipment.util.NeqSimUnit(mainMixer.getOutletStream(),
"pipeline", "stratified");
pipeline.setLength(0.1);
pipeline.setID(1.0);

neqsim.processSimulation.processSystem.ProcessSystem operations =
new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(feedStream);
operations.add(ethaneStream);
operations.add(mainMixer);
operations.add(pipeline);

operations.run();

pipeline.getOutletStream().getFluid().prettyPrint();

}
}

0 comments on commit 1cbccda

Please sign in to comment.