diff --git a/src/main/java/neqsim/processSimulation/processEquipment/mixer/Mixer.java b/src/main/java/neqsim/processSimulation/processEquipment/mixer/Mixer.java index bab3981e6..5ec3635fa 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/mixer/Mixer.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/mixer/Mixer.java @@ -6,15 +6,12 @@ import java.text.FieldPosition; import java.util.ArrayList; import java.util.Objects; - import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass; import neqsim.processSimulation.processEquipment.stream.Stream; import neqsim.processSimulation.processEquipment.stream.StreamInterface; @@ -30,451 +27,449 @@ * @version $Id: $Id */ public class Mixer extends ProcessEquipmentBaseClass implements MixerInterface { - private static final long serialVersionUID = 1000; - - protected ArrayList streams = new ArrayList(0); - private int numberOfInputStreams = 0; - protected StreamInterface mixedStream; - private boolean isSetOutTemperature = false; - private double outTemperature = Double.NaN; - static Logger logger = LogManager.getLogger(Mixer.class); - - /** - *

- * Constructor for Mixer. - *

- */ - public Mixer() { - super("Mixer"); - } - - /** - *

- * Constructor for Mixer. - *

- * - * @param name a {@link java.lang.String} object - */ - public Mixer(String name) { - super(name); - } - - /** {@inheritDoc} */ - @Override - public SystemInterface getThermoSystem() { - return mixedStream.getThermoSystem(); - } - - /** {@inheritDoc} */ - @Override - public void replaceStream(int i, StreamInterface newStream) { - streams.set(i, newStream); - } - - /** {@inheritDoc} */ - @Override - public void addStream(StreamInterface newStream) { - streams.add(newStream); - - try { - if (getNumberOfInputStreams() == 0) { - mixedStream = (Stream) streams.get(0).clone(); // cloning the first stream - // mixedStream.getThermoSystem().setNumberOfPhases(2); - // mixedStream.getThermoSystem().reInitPhaseType(); - // mixedStream.getThermoSystem().init(0); - // mixedStream.getThermoSystem().init(3); - } - } catch (Exception e) { - e.printStackTrace(); - } - - numberOfInputStreams++; - } - - /** - *

- * getStream. - *

- * - * @param i a int - * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object - */ - public StreamInterface getStream(int i) { - return streams.get(i); + private static final long serialVersionUID = 1000; + + protected ArrayList streams = new ArrayList(0); + private int numberOfInputStreams = 0; + protected StreamInterface mixedStream; + private boolean isSetOutTemperature = false; + private double outTemperature = Double.NaN; + static Logger logger = LogManager.getLogger(Mixer.class); + + /** + *

+ * Constructor for Mixer. + *

+ */ + @Deprecated + public Mixer() { + super("Mixer"); + } + + /** + *

+ * Constructor for Mixer. + *

+ * + * @param name a {@link java.lang.String} object + */ + public Mixer(String name) { + super(name); + } + + /** {@inheritDoc} */ + @Override + public SystemInterface getThermoSystem() { + return mixedStream.getThermoSystem(); + } + + /** {@inheritDoc} */ + @Override + public void replaceStream(int i, StreamInterface newStream) { + streams.set(i, newStream); + } + + /** {@inheritDoc} */ + @Override + public void addStream(StreamInterface newStream) { + streams.add(newStream); + + try { + if (getNumberOfInputStreams() == 0) { + mixedStream = (Stream) streams.get(0).clone(); // cloning the first stream + // mixedStream.getThermoSystem().setNumberOfPhases(2); + // mixedStream.getThermoSystem().reInitPhaseType(); + // mixedStream.getThermoSystem().init(0); + // mixedStream.getThermoSystem().init(3); + } + } catch (Exception e) { + e.printStackTrace(); } - /** - *

- * mixStream. - *

- */ - public void mixStream() { - int index = 0; - String compName = new String(); - double lowestPressure = mixedStream.getThermoSystem().getPhase(0).getPressure(); - boolean hasAddedNewComponent = false; - for (int k = 1; k < streams.size(); k++) { - if (streams.get(k).getThermoSystem().getPhase(0).getPressure() < lowestPressure) { - lowestPressure = streams.get(k).getThermoSystem().getPhase(0).getPressure(); - mixedStream.getThermoSystem().getPhase(0).setPressure(lowestPressure); - } - for (int i = 0; i < streams.get(k).getThermoSystem().getPhase(0) - .getNumberOfComponents(); i++) { - boolean gotComponent = false; - String componentName = - streams.get(k).getThermoSystem().getPhase(0).getComponent(i).getName(); - // System.out.println("adding: " + componentName); - - double moles = streams.get(k).getThermoSystem().getPhase(0).getComponent(i) - .getNumberOfmoles(); - // System.out.println("moles: " + moles + " " + - // mixedStream.getThermoSystem().getPhase(0).getNumberOfComponents()); - for (int p = 0; p < mixedStream.getThermoSystem().getPhase(0) - .getNumberOfComponents(); p++) { - if (mixedStream.getThermoSystem().getPhase(0).getComponent(p).getName() - .equals(componentName)) { - gotComponent = true; - index = streams.get(0).getThermoSystem().getPhase(0).getComponent(p) - .getComponentNumber(); - compName = streams.get(0).getThermoSystem().getPhase(0).getComponent(p) - .getComponentName(); - } - } - - if (gotComponent) { - // System.out.println("adding moles starting...."); - mixedStream.getThermoSystem().addComponent(index, moles); - // mixedStream.getThermoSystem().init_x_y(); - // System.out.println("adding moles finished"); - } else { - hasAddedNewComponent = true; - // System.out.println("ikke gaa hit"); - mixedStream.getThermoSystem().addComponent(compName, moles); - } - } + numberOfInputStreams++; + } + + /** + *

+ * getStream. + *

+ * + * @param i a int + * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object + */ + public StreamInterface getStream(int i) { + return streams.get(i); + } + + /** + *

+ * mixStream. + *

+ */ + public void mixStream() { + int index = 0; + String compName = new String(); + double lowestPressure = mixedStream.getThermoSystem().getPhase(0).getPressure(); + boolean hasAddedNewComponent = false; + for (int k = 1; k < streams.size(); k++) { + if (streams.get(k).getThermoSystem().getPhase(0).getPressure() < lowestPressure) { + lowestPressure = streams.get(k).getThermoSystem().getPhase(0).getPressure(); + mixedStream.getThermoSystem().getPhase(0).setPressure(lowestPressure); + } + for (int i = 0; i < streams.get(k).getThermoSystem().getPhase(0) + .getNumberOfComponents(); i++) { + boolean gotComponent = false; + String componentName = + streams.get(k).getThermoSystem().getPhase(0).getComponent(i).getName(); + // System.out.println("adding: " + componentName); + + double moles = + streams.get(k).getThermoSystem().getPhase(0).getComponent(i).getNumberOfmoles(); + // System.out.println("moles: " + moles + " " + + // mixedStream.getThermoSystem().getPhase(0).getNumberOfComponents()); + for (int p = 0; p < mixedStream.getThermoSystem().getPhase(0) + .getNumberOfComponents(); p++) { + if (mixedStream.getThermoSystem().getPhase(0).getComponent(p).getName() + .equals(componentName)) { + gotComponent = true; + index = + streams.get(0).getThermoSystem().getPhase(0).getComponent(p).getComponentNumber(); + compName = + streams.get(0).getThermoSystem().getPhase(0).getComponent(p).getComponentName(); + } } - if (hasAddedNewComponent) - mixedStream.getThermoSystem() - .setMixingRule(mixedStream.getThermoSystem().getMixingRule()); - // mixedStream.getThermoSystem().init_x_y(); - // mixedStream.getThermoSystem().initBeta(); - // mixedStream.getThermoSystem().init(2); - } - - /** - *

- * guessTemperature. - *

- * - * @return a double - */ - public double guessTemperature() { - double gtemp = 0; - for (int k = 0; k < streams.size(); k++) { - gtemp += streams.get(k).getThermoSystem().getTemperature() - * streams.get(k).getThermoSystem().getNumberOfMoles() - / mixedStream.getThermoSystem().getNumberOfMoles(); - } - return gtemp; - } - - /** - *

- * calcMixStreamEnthalpy. - *

- * - * @return a double - */ - public double calcMixStreamEnthalpy() { - double enthalpy = 0; - for (int k = 0; k < streams.size(); k++) { - streams.get(k).getThermoSystem().init(3); - enthalpy += streams.get(k).getThermoSystem().getEnthalpy(); - // System.out.println("total enthalpy k : " + ( ((Stream) - // streams.get(k)).getThermoSystem()).getEnthalpy()); - } - // System.out.println("total enthalpy of streams: " + enthalpy); - return enthalpy; - } - /** {@inheritDoc} */ - @Override - public StreamInterface getOutStream() { - return mixedStream; - } - - /** {@inheritDoc} */ - @Override - public void run() { - double enthalpy = 0.0; - // ((Stream) streams.get(0)).getThermoSystem().display(); - SystemInterface thermoSystem2 = streams.get(0).getThermoSystem().clone(); - - // System.out.println("total number of moles " + - // thermoSystem2.getTotalNumberOfMoles()); - mixedStream.setThermoSystem(thermoSystem2); - // thermoSystem2.display(); - ThermodynamicOperations testOps = new ThermodynamicOperations(thermoSystem2); - if (streams.size() > 0) { - mixedStream.getThermoSystem().setNumberOfPhases(2); - mixedStream.getThermoSystem().reInitPhaseType(); - mixedStream.getThermoSystem().init(0); - - mixStream(); - - enthalpy = calcMixStreamEnthalpy(); - // System.out.println("temp guess " + guessTemperature()); - if (!isSetOutTemperature) { - mixedStream.getThermoSystem().setTemperature(guessTemperature()); - } else { - mixedStream.setTemperature(outTemperature, "K"); - } - // System.out.println("filan temp " + mixedStream.getTemperature()); - } - if (isSetOutTemperature) { - if (!Double.isNaN(getOutTemperature())) - mixedStream.getThermoSystem().setTemperature(getOutTemperature()); - testOps.TPflash(); - mixedStream.getThermoSystem().init(2); + if (gotComponent) { + // System.out.println("adding moles starting...."); + mixedStream.getThermoSystem().addComponent(index, moles); + // mixedStream.getThermoSystem().init_x_y(); + // System.out.println("adding moles finished"); } else { - try { - testOps.PHflash(enthalpy, 0); - } catch (Exception e) { - logger.error(e.getMessage()); - if (!Double.isNaN(getOutTemperature())) - mixedStream.getThermoSystem().setTemperature(getOutTemperature()); - testOps.TPflash(); - } - } - - // System.out.println("enthalpy: " + - // mixedStream.getThermoSystem().getEnthalpy()); - // System.out.println("enthalpy: " + enthalpy); - // System.out.println("temperature: " + - // mixedStream.getThermoSystem().getTemperature()); - - // System.out.println("beta " + mixedStream.getThermoSystem().getBeta()); - // outStream.setThermoSystem(mixedStream.getThermoSystem()); - } - - /** {@inheritDoc} */ - @Override - public void displayResult() { - SystemInterface thermoSystem = mixedStream.getThermoSystem(); - DecimalFormat nf = new DecimalFormat(); - nf.setMaximumFractionDigits(5); - nf.applyPattern("#.#####E0"); - - JDialog dialog = new JDialog(new JFrame(), "Results from TPflash"); - Container dialogContentPane = dialog.getContentPane(); - dialogContentPane.setLayout(new FlowLayout()); - - thermoSystem.initPhysicalProperties(); - String[][] table = new String[50][5]; - String[] names = {"", "Phase 1", "Phase 2", "Phase 3", "Unit"}; - table[0][0] = ""; - table[0][1] = ""; - table[0][2] = ""; - table[0][3] = ""; - StringBuffer buf = new StringBuffer(); - FieldPosition test = new FieldPosition(0); - - for (int i = 0; i < thermoSystem.getNumberOfPhases(); i++) { - for (int j = 0; j < thermoSystem.getPhases()[0].getNumberOfComponents(); j++) { - table[j + 1][0] = thermoSystem.getPhases()[0].getComponents()[j].getName(); - buf = new StringBuffer(); - table[j + 1][i + 1] = - nf.format(thermoSystem.getPhases()[i].getComponents()[j].getx(), buf, test) - .toString(); - table[j + 1][4] = "[-]"; - } - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 2][0] = "Density"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 2][i + 1] = - nf.format(thermoSystem.getPhases()[i].getPhysicalProperties().getDensity(), buf, - test).toString(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 2][4] = "[kg/m^3]"; - - // Double.longValue(thermoSystem.getPhases()[i].getBeta()); - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 3][0] = "PhaseFraction"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 3][i + 1] = - nf.format(thermoSystem.getPhases()[i].getBeta(), buf, test).toString(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 3][4] = "[-]"; - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 4][0] = "MolarMass"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 4][i + 1] = - nf.format(thermoSystem.getPhases()[i].getMolarMass() * 1000, buf, test) - .toString(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 4][4] = "[kg/kmol]"; - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 5][0] = "Cp"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 5][i + 1] = nf.format( - (thermoSystem.getPhases()[i].getCp() - / (thermoSystem.getPhases()[i].getNumberOfMolesInPhase() - * thermoSystem.getPhases()[i].getMolarMass() * 1000)), - buf, test).toString(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 5][4] = "[kJ/kg*K]"; - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 7][0] = "Viscosity"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 7][i + 1] = - nf.format((thermoSystem.getPhases()[i].getPhysicalProperties().getViscosity()), - buf, test).toString(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 7][4] = "[kg/m*sec]"; - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 8][0] = "Conductivity"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 8][i + 1] = - nf.format(thermoSystem.getPhases()[i].getPhysicalProperties().getConductivity(), - buf, test).toString(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 8][4] = "[W/m*K]"; - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 10][0] = "Pressure"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 10][i + 1] = - Double.toString(thermoSystem.getPhases()[i].getPressure()); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 10][4] = "[bar]"; - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 11][0] = "Temperature"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 11][i + 1] = - Double.toString(thermoSystem.getPhases()[i].getTemperature()); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 11][4] = "[K]"; - Double.toString(thermoSystem.getPhases()[i].getTemperature()); - - buf = new StringBuffer(); - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 13][0] = "Stream"; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 13][i + 1] = name; - table[thermoSystem.getPhases()[0].getNumberOfComponents() + 13][4] = "-"; - } - - JTable Jtab = new JTable(table, names); - JScrollPane scrollpane = new JScrollPane(Jtab); - dialogContentPane.add(scrollpane); - dialog.pack(); - dialog.setVisible(true); - } - - /** {@inheritDoc} */ - @Override - public void setPressure(double pres) { - for (int k = 0; k < streams.size(); k++) { - streams.get(k).getThermoSystem().setPressure(pres); + hasAddedNewComponent = true; + // System.out.println("ikke gaa hit"); + mixedStream.getThermoSystem().addComponent(compName, moles); } - mixedStream.getThermoSystem().setPressure(pres); + } } - - /** - *

- * setTemperature. - *

- * - * @param temp a double - */ - public void setTemperature(double temp) { - for (int k = 0; k < streams.size(); k++) { - streams.get(k).getThermoSystem().setTemperature(temp); - } - mixedStream.getThermoSystem().setTemperature(temp); + if (hasAddedNewComponent) + mixedStream.getThermoSystem().setMixingRule(mixedStream.getThermoSystem().getMixingRule()); + // mixedStream.getThermoSystem().init_x_y(); + // mixedStream.getThermoSystem().initBeta(); + // mixedStream.getThermoSystem().init(2); + } + + /** + *

+ * guessTemperature. + *

+ * + * @return a double + */ + public double guessTemperature() { + double gtemp = 0; + for (int k = 0; k < streams.size(); k++) { + gtemp += streams.get(k).getThermoSystem().getTemperature() + * streams.get(k).getThermoSystem().getNumberOfMoles() + / mixedStream.getThermoSystem().getNumberOfMoles(); } - - /** - *

- * Getter for the field outTemperature. - *

- * - * @return a double - */ - public double getOutTemperature() { - return outTemperature; + return gtemp; + } + + /** + *

+ * calcMixStreamEnthalpy. + *

+ * + * @return a double + */ + public double calcMixStreamEnthalpy() { + double enthalpy = 0; + for (int k = 0; k < streams.size(); k++) { + streams.get(k).getThermoSystem().init(3); + enthalpy += streams.get(k).getThermoSystem().getEnthalpy(); + // System.out.println("total enthalpy k : " + ( ((Stream) + // streams.get(k)).getThermoSystem()).getEnthalpy()); } - - /** - *

- * Setter for the field outTemperature. - *

- * - * @param outTemperature a double - */ - public void setOutTemperature(double outTemperature) { - isSetOutTemperature(true); - this.outTemperature = outTemperature; + // System.out.println("total enthalpy of streams: " + enthalpy); + return enthalpy; + } + + /** {@inheritDoc} */ + @Override + public StreamInterface getOutletStream() { + return mixedStream; + } + + /** {@inheritDoc} */ + @Override + public void run() { + double enthalpy = 0.0; + // ((Stream) streams.get(0)).getThermoSystem().display(); + SystemInterface thermoSystem2 = streams.get(0).getThermoSystem().clone(); + + // System.out.println("total number of moles " + + // thermoSystem2.getTotalNumberOfMoles()); + mixedStream.setThermoSystem(thermoSystem2); + // thermoSystem2.display(); + ThermodynamicOperations testOps = new ThermodynamicOperations(thermoSystem2); + if (streams.size() > 0) { + mixedStream.getThermoSystem().setNumberOfPhases(2); + mixedStream.getThermoSystem().reInitPhaseType(); + mixedStream.getThermoSystem().init(0); + + mixStream(); + + enthalpy = calcMixStreamEnthalpy(); + // System.out.println("temp guess " + guessTemperature()); + if (!isSetOutTemperature) { + mixedStream.getThermoSystem().setTemperature(guessTemperature()); + } else { + mixedStream.setTemperature(outTemperature, "K"); + } + // System.out.println("filan temp " + mixedStream.getTemperature()); } - - /** - *

- * isSetOutTemperature. - *

- * - * @return a boolean - */ - public boolean isSetOutTemperature() { - return isSetOutTemperature; + if (isSetOutTemperature) { + if (!Double.isNaN(getOutTemperature())) + mixedStream.getThermoSystem().setTemperature(getOutTemperature()); + testOps.TPflash(); + mixedStream.getThermoSystem().init(2); + } else { + try { + testOps.PHflash(enthalpy, 0); + } catch (Exception e) { + logger.error(e.getMessage()); + if (!Double.isNaN(getOutTemperature())) + mixedStream.getThermoSystem().setTemperature(getOutTemperature()); + testOps.TPflash(); + } } - /** - *

- * isSetOutTemperature. - *

- * - * @param isSetOutTemperature a boolean - */ - public void isSetOutTemperature(boolean isSetOutTemperature) { - this.isSetOutTemperature = isSetOutTemperature; + // System.out.println("enthalpy: " + + // mixedStream.getThermoSystem().getEnthalpy()); + // System.out.println("enthalpy: " + enthalpy); + // System.out.println("temperature: " + + // mixedStream.getThermoSystem().getTemperature()); + + // System.out.println("beta " + mixedStream.getThermoSystem().getBeta()); + // outStream.setThermoSystem(mixedStream.getThermoSystem()); + } + + /** {@inheritDoc} */ + @Override + public void displayResult() { + SystemInterface thermoSystem = mixedStream.getThermoSystem(); + DecimalFormat nf = new DecimalFormat(); + nf.setMaximumFractionDigits(5); + nf.applyPattern("#.#####E0"); + + JDialog dialog = new JDialog(new JFrame(), "Results from TPflash"); + Container dialogContentPane = dialog.getContentPane(); + dialogContentPane.setLayout(new FlowLayout()); + + thermoSystem.initPhysicalProperties(); + String[][] table = new String[50][5]; + String[] names = {"", "Phase 1", "Phase 2", "Phase 3", "Unit"}; + table[0][0] = ""; + table[0][1] = ""; + table[0][2] = ""; + table[0][3] = ""; + StringBuffer buf = new StringBuffer(); + FieldPosition test = new FieldPosition(0); + + for (int i = 0; i < thermoSystem.getNumberOfPhases(); i++) { + for (int j = 0; j < thermoSystem.getPhases()[0].getNumberOfComponents(); j++) { + table[j + 1][0] = thermoSystem.getPhases()[0].getComponents()[j].getName(); + buf = new StringBuffer(); + table[j + 1][i + 1] = + nf.format(thermoSystem.getPhases()[i].getComponents()[j].getx(), buf, test).toString(); + table[j + 1][4] = "[-]"; + } + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 2][0] = "Density"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 2][i + 1] = + nf.format(thermoSystem.getPhases()[i].getPhysicalProperties().getDensity(), buf, test) + .toString(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 2][4] = "[kg/m^3]"; + + // Double.longValue(thermoSystem.getPhases()[i].getBeta()); + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 3][0] = "PhaseFraction"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 3][i + 1] = + nf.format(thermoSystem.getPhases()[i].getBeta(), buf, test).toString(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 3][4] = "[-]"; + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 4][0] = "MolarMass"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 4][i + 1] = + nf.format(thermoSystem.getPhases()[i].getMolarMass() * 1000, buf, test).toString(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 4][4] = "[kg/kmol]"; + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 5][0] = "Cp"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 5][i + 1] = + nf.format((thermoSystem.getPhases()[i].getCp() + / (thermoSystem.getPhases()[i].getNumberOfMolesInPhase() + * thermoSystem.getPhases()[i].getMolarMass() * 1000)), + buf, test).toString(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 5][4] = "[kJ/kg*K]"; + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 7][0] = "Viscosity"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 7][i + 1] = + nf.format((thermoSystem.getPhases()[i].getPhysicalProperties().getViscosity()), buf, test) + .toString(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 7][4] = "[kg/m*sec]"; + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 8][0] = "Conductivity"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 8][i + 1] = nf + .format(thermoSystem.getPhases()[i].getPhysicalProperties().getConductivity(), buf, test) + .toString(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 8][4] = "[W/m*K]"; + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 10][0] = "Pressure"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 10][i + 1] = + Double.toString(thermoSystem.getPhases()[i].getPressure()); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 10][4] = "[bar]"; + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 11][0] = "Temperature"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 11][i + 1] = + Double.toString(thermoSystem.getPhases()[i].getTemperature()); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 11][4] = "[K]"; + Double.toString(thermoSystem.getPhases()[i].getTemperature()); + + buf = new StringBuffer(); + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 13][0] = "Stream"; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 13][i + 1] = name; + table[thermoSystem.getPhases()[0].getNumberOfComponents() + 13][4] = "-"; } - /** - *

- * Getter for the field numberOfInputStreams. - *

- * - * @return a int - */ - public int getNumberOfInputStreams() { - return numberOfInputStreams; + JTable Jtab = new JTable(table, names); + JScrollPane scrollpane = new JScrollPane(Jtab); + dialogContentPane.add(scrollpane); + dialog.pack(); + dialog.setVisible(true); + } + + /** {@inheritDoc} */ + @Override + public void setPressure(double pres) { + for (int k = 0; k < streams.size(); k++) { + streams.get(k).getThermoSystem().setPressure(pres); } - - /** {@inheritDoc} */ - @Override - public double getEntropyProduction(String unit) { - getOutStream().run(); - double entrop = 0.0; - for (int i = 0; i < numberOfInputStreams; i++) { - getStream(i).getFluid().init(3); - entrop += getStream(i).getFluid().getEntropy(unit); - } - getOutStream().getThermoSystem().init(3); - return getOutStream().getThermoSystem().getEntropy(unit) - entrop; + mixedStream.getThermoSystem().setPressure(pres); + } + + /** + *

+ * setTemperature. + *

+ * + * @param temp a double + */ + public void setTemperature(double temp) { + for (int k = 0; k < streams.size(); k++) { + streams.get(k).getThermoSystem().setTemperature(temp); } - - /** {@inheritDoc} */ - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + Objects.hash(isSetOutTemperature, mixedStream, numberOfInputStreams, - outTemperature, streams); - return result; - } - - /** {@inheritDoc} */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!super.equals(obj)) - return false; - if (getClass() != obj.getClass()) - return false; - Mixer other = (Mixer) obj; - return isSetOutTemperature == other.isSetOutTemperature - && Objects.equals(mixedStream, other.mixedStream) - && numberOfInputStreams == other.numberOfInputStreams && Double - .doubleToLongBits(outTemperature) == Double.doubleToLongBits(other.outTemperature) - && Objects.equals(streams, other.streams); + mixedStream.getThermoSystem().setTemperature(temp); + } + + /** + *

+ * Getter for the field outTemperature. + *

+ * + * @return a double + */ + public double getOutTemperature() { + return outTemperature; + } + + /** + *

+ * Setter for the field outTemperature. + *

+ * + * @param outTemperature a double + */ + public void setOutTemperature(double outTemperature) { + isSetOutTemperature(true); + this.outTemperature = outTemperature; + } + + /** + *

+ * isSetOutTemperature. + *

+ * + * @return a boolean + */ + public boolean isSetOutTemperature() { + return isSetOutTemperature; + } + + /** + *

+ * isSetOutTemperature. + *

+ * + * @param isSetOutTemperature a boolean + */ + public void isSetOutTemperature(boolean isSetOutTemperature) { + this.isSetOutTemperature = isSetOutTemperature; + } + + /** + *

+ * Getter for the field numberOfInputStreams. + *

+ * + * @return a int + */ + public int getNumberOfInputStreams() { + return numberOfInputStreams; + } + + /** {@inheritDoc} */ + @Override + public double getEntropyProduction(String unit) { + getOutletStream().run(); + double entrop = 0.0; + for (int i = 0; i < numberOfInputStreams; i++) { + getStream(i).getFluid().init(3); + entrop += getStream(i).getFluid().getEntropy(unit); } + getOutletStream().getThermoSystem().init(3); + return getOutletStream().getThermoSystem().getEntropy(unit) - entrop; + } + + /** {@inheritDoc} */ + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + Objects.hash(isSetOutTemperature, mixedStream, numberOfInputStreams, + outTemperature, streams); + return result; + } + + /** {@inheritDoc} */ + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (!super.equals(obj)) + return false; + if (getClass() != obj.getClass()) + return false; + Mixer other = (Mixer) obj; + return isSetOutTemperature == other.isSetOutTemperature + && Objects.equals(mixedStream, other.mixedStream) + && numberOfInputStreams == other.numberOfInputStreams + && Double.doubleToLongBits(outTemperature) == Double.doubleToLongBits(other.outTemperature) + && Objects.equals(streams, other.streams); + } } diff --git a/src/main/java/neqsim/processSimulation/processEquipment/mixer/MixerInterface.java b/src/main/java/neqsim/processSimulation/processEquipment/mixer/MixerInterface.java index 81bbd54bb..28bee7b1c 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/mixer/MixerInterface.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/mixer/MixerInterface.java @@ -18,37 +18,50 @@ * @version $Id: $Id */ public interface MixerInterface extends ProcessEquipmentInterface { - /** - *

- * addStream. - *

- * - * @param newStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} - * object - */ - public void addStream(StreamInterface newStream); + /** + *

+ * addStream. + *

+ * + * @param newStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} + * object + */ + public void addStream(StreamInterface newStream); - /** - *

- * getOutStream. - *

- * - * @return a {@link neqsim.processSimulation.processEquipment.stream.Stream} object - */ - public StreamInterface getOutStream(); + /** + *

+ * getOutStream. + *

+ * + * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object + */ + public StreamInterface getOutletStream(); - /** - *

- * replaceStream. - *

- * - * @param i a int - * @param newStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} - * object - */ - public void replaceStream(int i, StreamInterface newStream); + /** + *

+ * getOutStream. + *

+ * + * @deprecated use {@link #getOutletStream} instead + * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object + */ + @Deprecated + default public StreamInterface getOutStream() { + return getOutletStream(); + } - /** {@inheritDoc} */ - @Override - public SystemInterface getThermoSystem(); + /** + *

+ * replaceStream. + *

+ * + * @param i a int + * @param newStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} + * object + */ + public void replaceStream(int i, StreamInterface newStream); + + /** {@inheritDoc} */ + @Override + public SystemInterface getThermoSystem(); } diff --git a/src/main/java/neqsim/processSimulation/processEquipment/separator/Hydrocyclone.java b/src/main/java/neqsim/processSimulation/processEquipment/separator/Hydrocyclone.java index 273232904..57f81a05d 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/separator/Hydrocyclone.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/separator/Hydrocyclone.java @@ -110,7 +110,7 @@ public StreamInterface getOilOutStream() { @Override public void run() { inletStreamMixer.run(); - thermoSystem = inletStreamMixer.getOutStream().getThermoSystem().clone(); + thermoSystem = inletStreamMixer.getOutletStream().getThermoSystem().clone(); // double oilInWaterIn = 0.0001; // // thermoSystem.getPhase("aqueous").getOilMolarConcentration(); diff --git a/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java b/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java index bac03b64e..2072bfe39 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java @@ -7,7 +7,6 @@ import java.util.ArrayList; import java.util.Objects; - import neqsim.processSimulation.mechanicalDesign.separator.SeparatorMechanicalDesign; import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass; import neqsim.processSimulation.processEquipment.mixer.Mixer; @@ -197,7 +196,7 @@ public SystemInterface getThermoSystem() { @Override public void run() { inletStreamMixer.run(); - thermoSystem2 = inletStreamMixer.getOutStream().getThermoSystem().clone(); + thermoSystem2 = inletStreamMixer.getOutletStream().getThermoSystem().clone(); thermoSystem2.setPressure(thermoSystem2.getPressure() - pressureDrop); if (thermoSystem2.hasPhaseType("gas")) { @@ -295,20 +294,20 @@ public void runTransient(double dt) { liquidOutStream.getThermoSystem().init(3); double volume1 = thermoSystem.getVolume(); // System.out.println("volume1 " + volume1); - double deltaEnergy = inletStreamMixer.getOutStream().getThermoSystem().getEnthalpy() + double deltaEnergy = inletStreamMixer.getOutletStream().getThermoSystem().getEnthalpy() - gasOutStream.getThermoSystem().getEnthalpy() - liquidOutStream.getThermoSystem().getEnthalpy(); // System.out.println("enthalph delta " + deltaEnergy); double newEnergy = thermoSystem.getInternalEnergy() + dt * deltaEnergy; for (int i = 0; i < thermoSystem.getPhase(0).getNumberOfComponents(); i++) { - double dn = inletStreamMixer.getOutStream().getThermoSystem().getPhase(0).getComponent(i) + double dn = inletStreamMixer.getOutletStream().getThermoSystem().getPhase(0).getComponent(i) .getNumberOfMolesInPhase() - + inletStreamMixer.getOutStream().getThermoSystem().getPhase(1).getComponent(i) + + inletStreamMixer.getOutletStream().getThermoSystem().getPhase(1).getComponent(i) .getNumberOfMolesInPhase() - gasOutStream.getThermoSystem().getPhase(0).getComponent(i).getNumberOfMolesInPhase() - liquidOutStream.getThermoSystem().getPhase(0).getComponent(i).getNumberOfMolesInPhase(); // System.out.println("dn " + dn); - thermoSystem.addComponent(inletStreamMixer.getOutStream().getThermoSystem().getPhase(0) + thermoSystem.addComponent(inletStreamMixer.getOutletStream().getThermoSystem().getPhase(0) .getComponent(i).getComponentNumber(), dn * dt); } ThermodynamicOperations thermoOps = new ThermodynamicOperations(thermoSystem); diff --git a/src/main/java/neqsim/processSimulation/processEquipment/separator/ThreePhaseSeparator.java b/src/main/java/neqsim/processSimulation/processEquipment/separator/ThreePhaseSeparator.java index 8760f714e..6292d8ce8 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/separator/ThreePhaseSeparator.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/separator/ThreePhaseSeparator.java @@ -157,7 +157,7 @@ public StreamInterface getOilOutStream() { @Override public void run() { inletStreamMixer.run(); - thermoSystem = inletStreamMixer.getOutStream().getThermoSystem().clone(); + thermoSystem = inletStreamMixer.getOutletStream().getThermoSystem().clone(); thermoSystem.setMultiPhaseCheck(true); ThermodynamicOperations thermoOps = new ThermodynamicOperations(thermoSystem); diff --git a/src/test/java/neqsim/processSimulation/util/example/MEGinjection.java b/src/test/java/neqsim/processSimulation/util/example/MEGinjection.java index 6b027c415..c5a9bc502 100644 --- a/src/test/java/neqsim/processSimulation/util/example/MEGinjection.java +++ b/src/test/java/neqsim/processSimulation/util/example/MEGinjection.java @@ -68,7 +68,7 @@ public static void main(String[] args) { feedGasMEGmixer.addStream(feedGasStream); feedGasMEGmixer.addStream(MEGFeed); - Heater pipeline = new Heater("gas-MEG pipeline", feedGasMEGmixer.getOutStream()); + Heater pipeline = new Heater("gas-MEG pipeline", feedGasMEGmixer.getOutletStream()); pipeline.setOutTemperature(273.15 + 35.5); pipeline.setOutPressure(80.2); @@ -119,7 +119,7 @@ public static void main(String[] args) { MEGmixer1.addStream(slugCatcher.getGasOutStream()); MEGmixer1.addStream(MEGsplitter.getSplitStream(0)); - ThrottlingValve DPvalve1 = new ThrottlingValve("DP valve 1", MEGmixer1.getOutStream()); + ThrottlingValve DPvalve1 = new ThrottlingValve("DP valve 1", MEGmixer1.getOutletStream()); DPvalve1.setOutletPressure(70.0); neqsim.processSimulation.processSystem.ProcessSystem onshoreOperations = diff --git a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess.java b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess.java index 7d8650de2..29b99feb2 100644 --- a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess.java +++ b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess.java @@ -91,7 +91,7 @@ public static void main(String args[]) { mixer.addStream(stream_4); mixer.addStream(stream_5); - NeqStream stream_6 = new NeqStream("after mixer stream", mixer.getOutStream()); + NeqStream stream_6 = new NeqStream("after mixer stream", mixer.getOutletStream()); Pipeline pipe = new TwoPhasePipeLine("pipe", stream_6); pipe.setOutputFileName("c:/tempAsgard.nc"); diff --git a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java index 4968d541f..8eb232ef0 100644 --- a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java +++ b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java @@ -153,7 +153,7 @@ public static void main(String[] args) { mixermp.addStream(mpseparator.getGasOutStream()); Compressor compressor2stage = - new Compressor("2nd stage recompressor", mixermp.getOutStream()); + new Compressor("2nd stage recompressor", mixermp.getOutletStream()); compressor2stage.setIsentropicEfficiency(0.75); // compressor2stage.setOutletPressure(75.0); @@ -172,7 +172,7 @@ public static void main(String[] args) { mixer.addStream(scrubbberfrom2ndstage.getGasOutStream()); Heater dewPointScrubberCooler = - new Heater("dew point scrubber cooler2", mixer.getOutStream()); + new Heater("dew point scrubber cooler2", mixer.getOutletStream()); dewPointScrubberCooler.setOutTemperature(273.15 + 32.3); Separator mpscrubber = diff --git a/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java b/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java index 4a444f2ca..82b228834 100644 --- a/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java +++ b/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java @@ -89,7 +89,7 @@ public static void main(String[] args) { MEGmixer1.addStream(inletCompressor2ndstage.getOutletStream()); MEGmixer1.addStream(MEGsplitter1.getSplitStream(0)); - Cooler inletGasCooler = new Cooler("dehydration cooler", MEGmixer1.getOutStream()); + Cooler inletGasCooler = new Cooler("dehydration cooler", MEGmixer1.getOutletStream()); inletGasCooler.setOutTemperature(10.0, "C"); StaticMixer MEGmixer2 = new StaticMixer("MEG mixer 2"); @@ -97,7 +97,7 @@ public static void main(String[] args) { MEGmixer2.addStream(MEGsplitter1.getSplitStream(1)); HeatExchanger heatEx = - new HeatExchanger("gas-gas heat exchanger", MEGmixer2.getOutStream()); + new HeatExchanger("gas-gas heat exchanger", MEGmixer2.getOutletStream()); heatEx.setGuessOutTemperature(273.15 - 10.0); heatEx.setUAvalue(30000.0); @@ -105,7 +105,8 @@ public static void main(String[] args) { MEGmixer3.addStream(heatEx.getOutStream(0)); MEGmixer3.addStream(MEGsplitter1.getSplitStream(2)); - ThrottlingValve presRedValveLT = new ThrottlingValve("JT valve", MEGmixer3.getOutStream()); + ThrottlingValve presRedValveLT = + new ThrottlingValve("JT valve", MEGmixer3.getOutletStream()); presRedValveLT.setOutletPressure(92.0); ThreePhaseSeparator mpseparator = @@ -206,7 +207,7 @@ public static void main(String[] args) { makeupMixer.addStream(leanMEGtoMixer); makeupMixer.addStream(makeupMEG); - Stream streamToResycle = new Stream("streamToResycle", makeupMixer.getOutStream()); + Stream streamToResycle = new Stream("streamToResycle", makeupMixer.getOutletStream()); Recycle resycleLeanMEG = new Recycle("lean MEG resycle"); resycleLeanMEG.addStream(streamToResycle); diff --git a/src/test/java/neqsim/processSimulation/util/example/OnshoreProcess1.java b/src/test/java/neqsim/processSimulation/util/example/OnshoreProcess1.java index bd0103d9c..7499f24fa 100644 --- a/src/test/java/neqsim/processSimulation/util/example/OnshoreProcess1.java +++ b/src/test/java/neqsim/processSimulation/util/example/OnshoreProcess1.java @@ -251,7 +251,8 @@ public static void main(String args[]) { MEGmixer1.addStream(MEGstream_1); MEGmixer1.addStream(snohvitFormationWaterStream); - ThrottlingValve valve1 = new ThrottlingValve("snohvit valve", MEGmixer1.getOutStream()); + ThrottlingValve valve1 = + new ThrottlingValve("snohvit valve", MEGmixer1.getOutletStream()); valve1.setOutletPressure(125.0); // Albatross reservoir stream @@ -275,12 +276,13 @@ public static void main(String args[]) { mixer1.addStream(valve1.getOutletStream()); mixer1.addStream(valve2.getOutletStream()); - WaterContentAnalyser waterAnalyser3 = new WaterContentAnalyser(mixer1.getOutStream()); + WaterContentAnalyser waterAnalyser3 = + new WaterContentAnalyser(mixer1.getOutletStream()); waterAnalyser3.setName("Total Water Analyser"); // Pipeline SimpleTPoutPipeline pipeLine1 = - new SimpleTPoutPipeline("snohvit pipeline", mixer1.getOutStream()); + new SimpleTPoutPipeline("snohvit pipeline", mixer1.getOutletStream()); pipeLine1.setOutPressure(55.0); pipeLine1.setOutTemperature(273.15 + 5.0); pipeLine1.setNumberOfLegs(1); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGAbsorberTest.java b/src/test/java/neqsim/processSimulation/util/example/TEGAbsorberTest.java index 25ab3443f..3646a97a4 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGAbsorberTest.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGAbsorberTest.java @@ -89,7 +89,7 @@ public static void main(String args[]) { mix.addStream(reboiler.getOutletStream()); mix.addStream(mixStream); - StreamInterface ReboilLiqStream = mix.getOutStream(); + StreamInterface ReboilLiqStream = mix.getOutletStream(); ReboilLiqStream.setName("ReboilLiqStream"); // Stream ReboilGasStream = reboiler.getOutStream(); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcess2.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcess2.java index a21019f94..9290099c2 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcess2.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcess2.java @@ -102,7 +102,7 @@ public static void main(String[] args) { Mixer mixerTOreboiler = new Mixer("reboil mxer"); mixerTOreboiler.addStream(richGLycolHeater2.getOutletStream()); - Heater heaterToReboiler = new Heater("heaterToReboiler", mixerTOreboiler.getOutStream()); + Heater heaterToReboiler = new Heater("heaterToReboiler", mixerTOreboiler.getOutletStream()); heaterToReboiler.setOutTemperature(273.15 + 206.6); Separator regenerator2 = new Separator("regenerator2", heaterToReboiler.getOutletStream()); @@ -191,7 +191,7 @@ public static void main(String[] args) { makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); - resycleLeanTEG.addStream(makeupMixer.getOutStream()); + resycleLeanTEG.addStream(makeupMixer.getOutletStream()); neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem(); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java index 6938bc915..fcaf0a2cb 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java @@ -195,7 +195,7 @@ public static void main(String[] args) { makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); - resycleLeanTEG.addStream(makeupMixer.getOutStream()); + resycleLeanTEG.addStream(makeupMixer.getOutletStream()); resycleLeanTEG.setOutletStream(TEGFeed); resycleLeanTEG.setPriority(200); resycleLeanTEG.setDownstreamProperty("flow rate"); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java index 269c65b06..454a483fe 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java @@ -193,7 +193,7 @@ public static void main(String[] args) { makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); - resycleLeanTEG.addStream(makeupMixer.getOutStream()); + resycleLeanTEG.addStream(makeupMixer.getOutletStream()); resycleLeanTEG.setOutletStream(TEGFeed); resycleLeanTEG.setPriority(200); resycleLeanTEG.setDownstreamProperty("flow rate"); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java index c41a2b1cc..ebbcb1865 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java @@ -230,7 +230,7 @@ public static neqsim.processSimulation.processSystem.ProcessSystem getProcess() makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); - resycleLeanTEG.addStream(makeupMixer.getOutStream()); + resycleLeanTEG.addStream(makeupMixer.getOutletStream()); resycleLeanTEG.setOutletStream(TEGFeed); resycleLeanTEG.setPriority(200); resycleLeanTEG.setDownstreamProperty("flow rate"); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java index 8a0ffe484..640bf3fc8 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java @@ -347,7 +347,7 @@ public neqsim.processSimulation.processSystem.ProcessSystem getProcess() { makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); - resycleLeanTEG.addStream(makeupMixer.getOutStream()); + resycleLeanTEG.addStream(makeupMixer.getOutletStream()); resycleLeanTEG.setOutletStream(TEGFeed); resycleLeanTEG.setPriority(200); resycleLeanTEG.setDownstreamProperty("flow rate"); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java index e9141bd51..03c85249e 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java @@ -352,7 +352,7 @@ public neqsim.processSimulation.processSystem.ProcessSystem getProcess() { makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); - resycleLeanTEG.addStream(makeupMixer.getOutStream()); + resycleLeanTEG.addStream(makeupMixer.getOutletStream()); resycleLeanTEG.setOutletStream(TEGFeed); resycleLeanTEG.setPriority(200); resycleLeanTEG.setDownstreamProperty("flow rate"); diff --git a/src/test/java/neqsim/processSimulation/util/example/TestSeparationTrain.java b/src/test/java/neqsim/processSimulation/util/example/TestSeparationTrain.java index 5679329fd..44be1b824 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TestSeparationTrain.java +++ b/src/test/java/neqsim/processSimulation/util/example/TestSeparationTrain.java @@ -74,7 +74,7 @@ public static void main(String args[]) { thirdStageMixer.addStream(secondStageSeparator.getGasOutStream()); Cooler thirdSstageCoooler = - new Cooler("thirdSstageCoooler", thirdStageMixer.getOutStream()); + new Cooler("thirdSstageCoooler", thirdStageMixer.getOutletStream()); thirdSstageCoooler.setOutTemperature(273.15 + 30.0); ThreePhaseSeparator thirdStageScrubber = new ThreePhaseSeparator( @@ -93,7 +93,7 @@ public static void main(String args[]) { Cooler oilCooler = new Cooler("oilCooler", thirdStageSeparator.getLiquidOutStream()); oilCooler.setOutTemperature(273.15 + 30.0); - Cooler inletGasCooler = new Cooler("inletGasCooler", HPgasMixer.getOutStream()); + Cooler inletGasCooler = new Cooler("inletGasCooler", HPgasMixer.getOutletStream()); inletGasCooler.setOutTemperature(273.15 + 30.0); Separator gasInletScrubber = diff --git a/src/test/java/neqsim/processSimulation/util/example/WellStreamMixer.java b/src/test/java/neqsim/processSimulation/util/example/WellStreamMixer.java index 2b8924c90..87cca5fbd 100644 --- a/src/test/java/neqsim/processSimulation/util/example/WellStreamMixer.java +++ b/src/test/java/neqsim/processSimulation/util/example/WellStreamMixer.java @@ -72,7 +72,7 @@ public static void main(String[] args) { wellStramMixer.addStream(wellStream_1); wellStramMixer.addStream(wellStream_2); - Stream mixerdStream = new Stream("mixed stream", wellStramMixer.getOutStream()); + Stream mixerdStream = new Stream("mixed stream", wellStramMixer.getOutletStream()); neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem(); diff --git a/src/test/java/neqsim/processSimulation/util/example/multiThreadTest.java b/src/test/java/neqsim/processSimulation/util/example/multiThreadTest.java index 5e5d474b9..21f56e15c 100644 --- a/src/test/java/neqsim/processSimulation/util/example/multiThreadTest.java +++ b/src/test/java/neqsim/processSimulation/util/example/multiThreadTest.java @@ -37,7 +37,7 @@ public static void main(String args[]) { MixerInterface mixer = new StaticMixer("Mixer 1"); mixer.addStream(stream_1); - StreamInterface stream_3 = mixer.getOutStream(); + StreamInterface stream_3 = mixer.getOutletStream(); stream_3.setName("stream3"); Separator separator = new Separator("Separator 1", stream_3); @@ -77,7 +77,7 @@ public static void main(String args[]) { MixerInterface mixer2 = new StaticMixer("Mixer 1"); mixer2.addStream(stream_22); - StreamInterface stream_32 = mixer2.getOutStream(); + StreamInterface stream_32 = mixer2.getOutletStream(); stream_32.setName("stream32"); Separator separator2 = new Separator("Separator 1", stream_32); diff --git a/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java b/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java index f1df40d8d..6b75c7209 100644 --- a/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java +++ b/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java @@ -39,7 +39,7 @@ public static void main(String[] args) { mix.addStream(stream_air); // mix.addStream(stream_water); - Separator separator = new Separator("separator", mix.getOutStream()); + Separator separator = new Separator("separator", mix.getOutletStream()); Heater heater1 = new Heater("heater1", separator.getLiquidOutStream()); heater1.setOutTemperature(273.15 + 20); diff --git a/src/test/java/neqsim/processSimulation/util/example/process2.java b/src/test/java/neqsim/processSimulation/util/example/process2.java index ca0305a8d..304d1116a 100644 --- a/src/test/java/neqsim/processSimulation/util/example/process2.java +++ b/src/test/java/neqsim/processSimulation/util/example/process2.java @@ -41,7 +41,7 @@ public static void main(String args[]) { MixerInterface mixer = new StaticMixer("Mixer 1"); mixer.addStream(heater.getOutletStream()); - StreamInterface stream_3 = mixer.getOutStream(); + StreamInterface stream_3 = mixer.getOutletStream(); stream_3.setName("stream3"); Separator separator = new Separator("Separator 1", stream_3); diff --git a/src/test/java/neqsim/processSimulation/util/example/propaneTwoStageCoolingCycle.java b/src/test/java/neqsim/processSimulation/util/example/propaneTwoStageCoolingCycle.java index 8eacd005a..3b47b20e7 100644 --- a/src/test/java/neqsim/processSimulation/util/example/propaneTwoStageCoolingCycle.java +++ b/src/test/java/neqsim/processSimulation/util/example/propaneTwoStageCoolingCycle.java @@ -61,12 +61,12 @@ public static void main(String args[]) { propMixer.addStream(compressor1.getOutletStream()); propMixer.addStream(medPresSep.getGasOutStream()); - Compressor compressor2 = new Compressor("compressor2", propMixer.getOutStream()); + Compressor compressor2 = new Compressor("compressor2", propMixer.getOutletStream()); compressor2.setOutletPressure(stream_1.getPressure()); Heater cooler3 = new Heater("Heater", compressor2.getOutletStream()); cooler3.setSpecification("out stream"); - cooler3.setOutStream(stream_1); + cooler3.setOutletStream(stream_1); neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem(); diff --git a/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess.java b/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess.java index 9b7fe652a..eb85cf345 100644 --- a/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess.java +++ b/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess.java @@ -37,7 +37,7 @@ public static void main(String args[]) { Mixer mixerHP = new neqsim.processSimulation.processEquipment.mixer.StaticMixer("Mixer HP"); mixerHP.addStream(stream_1); - Separator separator = new Separator("Separator 1", mixerHP.getOutStream()); + Separator separator = new Separator("Separator 1", mixerHP.getOutletStream()); ThrottlingValve LP_valve = new ThrottlingValve("LPventil", separator.getLiquidOutStream()); LP_valve.setOutletPressure(5.0); @@ -63,7 +63,7 @@ public static void main(String args[]) { mixer.addStream(separator.getGasOutStream()); mixer.addStream(gasScrubber.getGasOutStream()); - Compressor HPcompressor = new Compressor("HPcompressor", mixer.getOutStream()); + Compressor HPcompressor = new Compressor("HPcompressor", mixer.getOutletStream()); HPcompressor.setOutletPressure(200.0); neqsim.processSimulation.processSystem.ProcessSystem operations = diff --git a/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java b/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java index b0584b57e..a25343fe6 100644 --- a/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java +++ b/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java @@ -32,7 +32,7 @@ public static void main(String args[]) { mixer_inlet.addStream(stream_inlet); ThreePhaseSeparator separator_inlet = - new ThreePhaseSeparator("Separator 1", mixer_inlet.getOutStream()); + new ThreePhaseSeparator("Separator 1", mixer_inlet.getOutletStream()); Stream stream_gasFromSep = new Stream("stream_gasFromSep", separator_inlet.getGasOutStream());