Skip to content

Commit

Permalink
Merge branch 'master' into fix-bug-TEG-MLA
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored Nov 26, 2023
2 parents fd552f7 + 865622c commit c7732ff
Show file tree
Hide file tree
Showing 6 changed files with 517 additions and 113 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<version>${revision}${sha1}${changelist}</version>

<properties>
<revision>2.5.9</revision>
<revision>2.5.10</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sha1/>
Expand Down
2 changes: 1 addition & 1 deletion pomJava8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<version>${revision}${sha1}${changelist}-Java8</version>

<properties>
<revision>2.5.9</revision>
<revision>2.5.10</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sha1 />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public class DistillationColumn extends ProcessEquipmentBaseClass implements Dis
* </p>
*
* @param numberOfTraysLocal a int
* @param hasReboiler a boolean
* @param hasCondenser a boolean
* @param hasReboiler a boolean
* @param hasCondenser a boolean
*/
public DistillationColumn(int numberOfTraysLocal, boolean hasReboiler, boolean hasCondenser) {
super("DistillationColumn");
Expand Down Expand Up @@ -86,8 +86,9 @@ public DistillationColumn(int numberOfTraysLocal, boolean hasReboiler, boolean h
* addFeedStream.
* </p>
*
* @param inputStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
* @param inputStream a
* {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
* @param feedTrayNumber a int
*/
public void addFeedStream(StreamInterface inputStream, int feedTrayNumber) {
Expand Down Expand Up @@ -154,20 +155,18 @@ public void init() {
// ((Runnable) trays.get(numberOfTrays - 1)).run();
((Runnable) trays.get(0)).run();


double feedTrayTemperature = getTray(getFeedTrayNumber()).getTemperature();

if (trays.get(numberOfTrays - 1).getNumberOfInputStreams() > 0) {
condenserTemperature =
((MixerInterface) trays.get(numberOfTrays - 1)).getThermoSystem().getTemperature();
condenserTemperature = ((MixerInterface) trays.get(numberOfTrays - 1)).getThermoSystem().getTemperature();
} else {
condenserTemperature = feedTrayTemperature - 1.0;
}

reboilerTemperature = ((MixerInterface) trays.get(0)).getThermoSystem().getTemperature();

double deltaTempCondenser =
(feedTrayTemperature - condenserTemperature) / (numberOfTrays * 1.0 - feedTrayNumber - 1);
double deltaTempCondenser = (feedTrayTemperature - condenserTemperature)
/ (numberOfTrays * 1.0 - feedTrayNumber - 1);
double deltaTempReboiler = (reboilerTemperature - feedTrayTemperature) / (feedTrayNumber * 1.0);

double delta = 0;
Expand Down Expand Up @@ -208,7 +207,9 @@ public void init() {
* Getter for the field <code>gasOutStream</code>.
* </p>
*
* @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
* @return a
* {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
*/
public StreamInterface getGasOutStream() {
return gasOutStream;
Expand All @@ -219,7 +220,9 @@ public StreamInterface getGasOutStream() {
* Getter for the field <code>liquidOutStream</code>.
* </p>
*
* @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
* @return a
* {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
* object
*/
public StreamInterface getLiquidOutStream() {
return liquidOutStream;
Expand All @@ -231,7 +234,9 @@ public StreamInterface getLiquidOutStream() {
* </p>
*
* @param trayNumber a int
* @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
* @return a
* {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
* object
*/
public SimpleTray getTray(int trayNumber) {
return trays.get(trayNumber);
Expand Down Expand Up @@ -498,12 +503,15 @@ public boolean massBalanceCheck() {
+ trays.get(i).getGasOutStream().getPressure() + " temperature "
+ trays.get(i).getGasOutStream().getTemperature("C"));
/*
* System.out.println( "tray " + i + " number of input streams " + numberOfInputStreams +
* System.out.println( "tray " + i + " number of input streams " +
* numberOfInputStreams +
* " water in gasout " +
* trays.get(i).getGasOutStream().getFluid().getPhase(0).getComponent("water")
* .getNumberOfmoles() + " water in liquidout " +
* trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent( "water")
* .getNumberOfmoles() + " pressure " + trays.get(i).getGasOutStream().getPressure() +
* trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent(
* "water")
* .getNumberOfmoles() + " pressure " +
* trays.get(i).getGasOutStream().getPressure() +
* " temperature " + trays.get(i).getGasOutStream().getTemperature("C"));
*/
}
Expand Down Expand Up @@ -554,8 +562,7 @@ public void energyBalanceCheck() {
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String[] args) {
neqsim.thermo.system.SystemInterface testSystem =
new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
// testSystem.addComponent("methane", 10.00);
testSystem.addComponent("ethane", 10.0);
testSystem.addComponent("CO2", 10.0);
Expand All @@ -579,8 +586,7 @@ public static void main(String[] args) {
// column.getCondenser().setHeatInput(-70000.0);
// ((Condenser) column.getCondenser()).setRefluxRatio(0.2);

neqsim.processSimulation.processSystem.ProcessSystem operations =
new neqsim.processSimulation.processSystem.ProcessSystem();
neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(stream_1);
operations.add(column);
operations.run();
Expand All @@ -595,7 +601,9 @@ public static void main(String[] args) {
* getReboiler.
* </p>
*
* @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
* @return a
* {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
* object
*/
public SimpleTray getReboiler() {
return trays.get(0);
Expand All @@ -606,7 +614,9 @@ public SimpleTray getReboiler() {
* getCondenser.
* </p>
*
* @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
* @return a
* {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
* object
*/
public SimpleTray getCondenser() {
return trays.get(trays.size() - 1);
Expand Down
Loading

0 comments on commit c7732ff

Please sign in to comment.