Skip to content
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 @@ -103,7 +103,7 @@ public void solveTransient(int type, UUID id) {
// System.out.println("time step: " + i + " " +
// this.getTimeSeries().getTimeStep()[i]);
// System.out.println("time: " + i + " " + this.getTimeSeries().getTime()[i]);
// flowSolver.solveTDMA();
flowSolver.solveTDMA();
display.setNextData(this, this.getTimeSeries().getTime(i));
}
calcIdentifier = id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,39 +91,35 @@ void testSolveSteadyState() {
@Test
void testSolveTransient() {
testInit();
pipe.solveSteadyState(10);
// transient solver
double[] times = {0, 10000, 20000}; // , 30000, 40000, 50000}; //, 60000, 70000, 80000,
// 90000};
pipe.getTimeSeries().setTimes(times);

SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos(285.15, 200.0);
testSystem.addComponent("methane", 0.9);
testSystem.addComponent("ethane", 0.1);

SystemInterface testSystem2 = new neqsim.thermo.system.SystemSrkEos(315.15, 200.0);
testSystem2.addComponent("methane", 26000.0);
testSystem2.addComponent("ethane", 1.10);
SystemInterface testSystem2 = new neqsim.thermo.system.SystemSrkEos(285.15, 200.0);
testSystem2.addComponent("methane", 0.9);
testSystem2.addComponent("ethane", 0.1);
testSystem2.createDatabase(true);
testSystem2.init(0);
testSystem2.init(3);
testSystem2.initPhysicalProperties();
testSystem2.setTotalFlowRate(80.0, "MSm3/day");

SystemInterface testSystem3 = new neqsim.thermo.system.SystemSrkEos(285.15, 200.0);
testSystem3.addComponent("methane", 29000.0);
testSystem3.addComponent("ethane", 1221.10);
testSystem3.init(0);

SystemInterface[] systems = {testSystem, testSystem2, testSystem2}; // , testSystem2,
SystemInterface[] systems = {testSystem2, testSystem2}; // ,
// testSystem2,
// testSystem2,
// testSystem2}; //,testSystem2,testSystem2,testSystem2,testSystem2,testSystem2};
pipe.getTimeSeries().setInletThermoSystems(systems);
pipe.getTimeSeries().setNumberOfTimeStepsInInterval(10);
// double[] outletFlowRates = {0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
// 0.01, 0.01, 0.01};
// double[] outletFlowRates = {0.01, 0.01, 0.01};// , 0.01, 0.01, 0.01, 0.01, 0.01,
// 0.01, 0.01, 0.01};s
// pipe.getTimeSeries().setOutletMolarFlowRate(outletFlowRates);

// pipe.solveTransient(20);
// System.out.println("pressure " +
// pipe.getTimeSeries().getThermoSystem()[1].getPressure("bara");
pipe.solveTransient(20);
System.out.println("pressure " + pipe.getNode(10).getBulkSystem().getPressure("bara"));
// pipe.getDisplay().displayResult("composition");
// pipe.getDisplay().displayResult("pressure");
pipe.getDisplay().displayResult("pressure");
// pipe.getDisplay().displayResult("composition");
// pipe.getDisplay(1).displayResult();
}
Expand Down