Skip to content

Commit

Permalink
add inflow unit
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Dec 24, 2023
1 parent 0d36609 commit 610c28e
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package neqsim.processSimulation.processEquipment.reservoir;

import java.util.UUID;
import neqsim.processSimulation.processEquipment.TwoPortEquipment;
import neqsim.processSimulation.processEquipment.stream.StreamInterface;

/**
* <p>
* WellFlow class.
Expand All @@ -8,5 +12,41 @@
* @author asmund
* @version $Id: $Id
*/
public class WellFlow {
public class WellFlow extends TwoPortEquipment {
private static final long serialVersionUID = 1000;

/**
* <p>
* Constructor for WellFlow.
* </p>
*
* @param name a {@link java.lang.String} object
*/
public WellFlow(String name) {
super(name);
}

/** {@inheritDoc} */
@Override
public void setInletStream(StreamInterface stream) {
super.setInletStream(stream);
StreamInterface outStream = stream.clone();
outStream.setName("outStream");
super.setOutletStream(outStream);
}

/** {@inheritDoc} */
@Override
public void run(UUID id) {



}

/** {@inheritDoc} */
@Override
public void runTransient(double dt, UUID id) {

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package neqsim.processSimulation.processEquipment.reservoir;

import org.junit.jupiter.api.Test;
import neqsim.processSimulation.processEquipment.stream.StreamInterface;
import neqsim.processSimulation.processSystem.ProcessSystem;

public class WellFlowTest {
@Test
void testRun() {

neqsim.thermo.system.SystemInterface fluid1 =
new neqsim.thermo.system.SystemPrEos(373.15, 100.0);
fluid1.addComponent("water", 3.599);
fluid1.addComponent("nitrogen", 0.599);
fluid1.addComponent("CO2", 0.51);
fluid1.addComponent("methane", 62.8);
fluid1.addPlusFraction("C7", 10.5, 180.0 / 1000.0, 840.0 / 1000.0);
fluid1.getCharacterization().characterisePlusFraction();
fluid1.setMixingRule(2);
fluid1.setMultiPhaseCheck(true);

SimpleReservoir reservoirOps = new SimpleReservoir("Well 1 reservoir");
reservoirOps.setReservoirFluid(fluid1, 1e9, 100000.0, 10.0e7);

StreamInterface producedGasStream = reservoirOps.addGasProducer("gasproducer_1");
producedGasStream.setFlowRate(1000.0, "kg/day");

WellFlow wellflow = new WellFlow("well flow unit");
wellflow.setInletStream(producedGasStream);

ProcessSystem process = new ProcessSystem();
process.add(reservoirOps);
process.add(producedGasStream);
process.add(wellflow);


}

@Test
void testRunTransient() {

}


}

0 comments on commit 610c28e

Please sign in to comment.