Skip to content

Commit

Permalink
Twoport (#322)
Browse files Browse the repository at this point in the history
Neqsimunit is the last twoport
  • Loading branch information
asmfstatoil authored Jun 5, 2022
1 parent 288d270 commit da74f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import neqsim.fluidMechanics.flowNode.twoPhaseNode.twoPhasePipeFlowNode.DropletFlowNode;
import neqsim.fluidMechanics.flowNode.twoPhaseNode.twoPhasePipeFlowNode.StratifiedFlowNode;
import neqsim.fluidMechanics.geometryDefinitions.pipe.PipeData;
import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass;
import neqsim.processSimulation.processEquipment.TwoPortEquipment;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.processSimulation.processEquipment.stream.StreamInterface;
import neqsim.thermo.system.SystemInterface;
Expand All @@ -18,11 +18,9 @@
* @author esol
* @version $Id: $Id
*/
public class NeqSimUnit extends ProcessEquipmentBaseClass {
public class NeqSimUnit extends TwoPortEquipment {
private static final long serialVersionUID = 1000;

StreamInterface inletStream;
StreamInterface outStream;
SystemInterface thermoSystem;
private String equipment = "pipeline";
String flowPattern = "stratified";
Expand Down Expand Up @@ -56,27 +54,16 @@ public NeqSimUnit(StreamInterface inletStream, String equipment, String flowPatt
* @param inletStream a {@link neqsim.processSimulation.processEquipment.stream.Stream} object
*/
public void setInletStream(StreamInterface inletStream) {
this.inletStream = inletStream;
this.inStream = inletStream;

thermoSystem = inletStream.getThermoSystem().clone();
outStream = new Stream("outStream", thermoSystem);
}

/**
* <p>
* Getter for the field <code>outStream</code>.
* </p>
*
* @return a {@link neqsim.processSimulation.processEquipment.stream.Stream} object
*/
public StreamInterface getOutStream() {
return outStream;
}

/** {@inheritDoc} */
@Override
public void run() {
thermoSystem = inletStream.getThermoSystem().clone();
thermoSystem = inStream.getThermoSystem().clone();
if (equipment.equals("pipeline") && flowPattern.equals("stratified")) {
runStratified();
} else if (equipment.equals("pipeline") && flowPattern.equals("annular")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public double calcMixStreamEnthalpy() {
}

/** {@inheritDoc} */
@Override
@Deprecated
public StreamInterface getOutStream() {
return mixedStream;
}
Expand Down

0 comments on commit da74f8a

Please sign in to comment.