Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #853

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();

}
}
Loading