Skip to content

Commit

Permalink
release 2.5.23 (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored May 9, 2024
1 parent 811b5a0 commit 4c18143
Show file tree
Hide file tree
Showing 18 changed files with 119 additions and 116 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.22</revision>
<revision>2.5.23</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 pomJava21.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.22</revision>
<revision>2.5.23</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.22</revision>
<revision>2.5.23</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 @@ -182,13 +182,13 @@ public void runCalc() {
viscosity[i] = Double.NaN;
isoThermalCompressibility[i] = Double.NaN;
}
System.out.println("pressure " + getThermoSystem().getPressure() + " relative volume "
+ relativeVolume[i] + " liquid rel vol " + liquidRelativeVolume[i] + " Zgas " + Zgas[i]
+ " Yfactor " + getYfactor()[i] + " isoCompfactor " + getIsoThermalCompressibility()[i]);
// System.out.println("pressure " + getThermoSystem().getPressure() + " relative volume "
// + relativeVolume[i] + " liquid rel vol " + liquidRelativeVolume[i] + " Zgas " + Zgas[i]
// + " Yfactor " + getYfactor()[i] + " isoCompfactor " + getIsoThermalCompressibility()[i]);
}

System.out.println("test finished");
System.out.println("test finished");
// System.out.println("test finished");
// System.out.println("test finished");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ public void runCalc() {

for (int i = 0; i < pressures.length; i++) {
relativeVolume[i] = totalVolume[i] / saturationVolume;
System.out.println("rel volume " + relativeVolume[i]);
// System.out.println("rel volume " + relativeVolume[i]);
}
System.out.println("test finished");
// System.out.println("test finished");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ public BaseContract(SystemInterface system, String terminal, String country) {
Double.parseDouble(dataSet.getString("MAXVALUE")), dataSet.getString("UNIT"),
Double.parseDouble(dataSet.getString("ReferenceTdegC")),
Double.parseDouble(dataSet.getString("ReferenceTdegC")), referencePressure, ""));// dataSet.getString("Comments"));
System.out.println(dataSet.getString("Comments"));
System.out.println("specification added..." + numb);
// System.out.println(dataSet.getString("Comments"));
// System.out.println("specification added..." + numb);
}
} catch (Exception ex) {
logger.error("error in comp", ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ public static void main(String[] args) {
+ stream1.getThermoSystem().getWtFraction(1) * DensityOil
+ stream1.getThermoSystem().getWtFraction(2) * Densityliquid;
// operations.run();
System.out.println("work " + compressor1.getTotalWork() + " density " + Density1 + " Cp "
+ Cpone + " SPEED OF SOUND " + stream1.getThermoSystem().getPhase(0).getSoundSpeed());
// System.out.println("work " + compressor1.getTotalWork() + " density " + Density1 + " Cp "
// + Cpone + " SPEED OF SOUND " + stream1.getThermoSystem().getPhase(0).getSoundSpeed());

compressor1.solveEfficiency(390.15);
compressor1.getOutletStream().displayResult();
System.out.println("Hvap " + stream1.getThermoSystem().getHeatOfVaporization() + " POLI "
+ compressor1.getPolytropicEfficiency() + " dentity "
+ stream1.getThermoSystem().getDensity() + " cp " + stream1.getThermoSystem().getCp());
// System.out.println("Hvap " + stream1.getThermoSystem().getHeatOfVaporization() + " POLI "
// + compressor1.getPolytropicEfficiency() + " dentity "
// + stream1.getThermoSystem().getDensity() + " cp " + stream1.getThermoSystem().getCp());
stream1.getThermoSystem().display();

double massFlowGas = stream1.getThermoSystem().getPhase(0).getBeta()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,83 +8,87 @@
import neqsim.processSimulation.processEquipment.valve.ThrottlingValve;

/**
* <p>TestTransientFlow2 class.</p>
* <p>
* TestTransientFlow2 class.
* </p>
*
* @author ESOL
* @version $Id: $Id
* @since 2.2.3
*/
public class TestTransientFlow2 {
/**
* <p>main.</p>
*
* @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 + 25.0), 10.00);
testSystem.addComponent("methane", 0.900);
testSystem.addComponent("ethane", 0.100);
testSystem.addComponent("n-heptane", 1.00);
testSystem.createDatabase(true);
testSystem.setMixingRule(2);
/**
* <p>
* main.
* </p>
*
* @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 + 25.0), 10.00);
testSystem.addComponent("methane", 0.900);
testSystem.addComponent("ethane", 0.100);
testSystem.addComponent("n-heptane", 1.00);
testSystem.createDatabase(true);
testSystem.setMixingRule(2);

Stream stream_1 = new Stream("Stream1", testSystem);
ThrottlingValve valve_1 = new ThrottlingValve("valve_1", stream_1);
valve_1.setOutletPressure(5.0);
valve_1.setPercentValveOpening(50);
Stream stream_1 = new Stream("Stream1", testSystem);
ThrottlingValve valve_1 = new ThrottlingValve("valve_1", stream_1);
valve_1.setOutletPressure(5.0);
valve_1.setPercentValveOpening(50);

Separator separator_1 = new Separator("separator_1");
separator_1.addStream(valve_1.getOutletStream());
Separator separator_1 = new Separator("separator_1");
separator_1.addStream(valve_1.getOutletStream());

ThrottlingValve valve_2 = new ThrottlingValve("valve_2", separator_1.getLiquidOutStream());
valve_2.setOutletPressure(1.0);
valve_2.setPercentValveOpening(50);
// valve_2.setCv(10.0);
ThrottlingValve valve_2 = new ThrottlingValve("valve_2", separator_1.getLiquidOutStream());
valve_2.setOutletPressure(1.0);
valve_2.setPercentValveOpening(50);
// valve_2.setCv(10.0);

ThrottlingValve valve_3 = new ThrottlingValve("valve_3", separator_1.getGasOutStream());
valve_3.setOutletPressure(1.0);
valve_3.setPercentValveOpening(50);
ThrottlingValve valve_3 = new ThrottlingValve("valve_3", separator_1.getGasOutStream());
valve_3.setOutletPressure(1.0);
valve_3.setPercentValveOpening(50);

VolumeFlowTransmitter flowTransmitter = new VolumeFlowTransmitter(stream_1);
flowTransmitter.setUnit("m^3/hr");
flowTransmitter.setMaximumValue(10.0);
flowTransmitter.setMinimumValue(1.0);
VolumeFlowTransmitter flowTransmitter = new VolumeFlowTransmitter(stream_1);
flowTransmitter.setUnit("m^3/hr");
flowTransmitter.setMaximumValue(10.0);
flowTransmitter.setMinimumValue(1.0);

ControllerDeviceInterface flowController = new ControllerDeviceBaseClass();
flowController.setTransmitter(flowTransmitter);
flowController.setReverseActing(true);
flowController.setControllerSetPoint(1.0);
flowController.setControllerParameters(0.7, 300.0, 0.0);
ControllerDeviceInterface flowController = new ControllerDeviceBaseClass();
flowController.setTransmitter(flowTransmitter);
flowController.setReverseActing(true);
flowController.setControllerSetPoint(1.0);
flowController.setControllerParameters(0.7, 300.0, 0.0);

neqsim.processSimulation.processSystem.ProcessSystem operations =
new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(stream_1);
operations.add(valve_1);
operations.add(separator_1);
operations.add(valve_2);
operations.add(valve_3);
neqsim.processSimulation.processSystem.ProcessSystem operations =
new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(stream_1);
operations.add(valve_1);
operations.add(separator_1);
operations.add(valve_2);
operations.add(valve_3);

operations.add(flowTransmitter);
valve_1.setController(flowController);
operations.add(flowTransmitter);
valve_1.setController(flowController);

operations.run();
operations.displayResult();
valve_2.setPercentValveOpening(0.1);
valve_3.setPercentValveOpening(0.1);
// transient behaviour
operations.setTimeStep(5.0);
for (int i = 0; i < 460; i++) {
System.out.println("volume flow " + flowTransmitter.getMeasuredValue()
+ " valve opening " + valve_1.getPercentValveOpening() + " pressure "
+ separator_1.getGasOutStream().getPressure());
operations.runTransient();
}
operations.run();
operations.displayResult();
valve_2.setPercentValveOpening(0.1);
valve_3.setPercentValveOpening(0.1);
// transient behaviour
operations.setTimeStep(5.0);
for (int i = 0; i < 460; i++) {
// System.out.println("volume flow " + flowTransmitter.getMeasuredValue()
// + " valve opening " + valve_1.getPercentValveOpening() + " pressure "
// + separator_1.getGasOutStream().getPressure());
operations.runTransient();
}

operations.displayResult();
System.out.println("volume flow " + flowTransmitter.getMeasuredValue() + " valve opening "
+ valve_1.getPercentValveOpening());
operations.displayResult();
// System.out.println("volume flow " + flowTransmitter.getMeasuredValue() + " valve opening "
// + valve_1.getPercentValveOpening());

// operations.displayResult();
}
// operations.displayResult();
}
}
40 changes: 20 additions & 20 deletions src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,24 @@ public void testCompressibility() {
testOps.TPflash();
testSystem.init(3);
testSystem.init(3);
System.out.println("molar volume gas+oil is " + testSystem.getMolarVolume());
System.out.println("molar volume gas is " + testSystem.getPhase(0).getMolarVolume());
System.out.println("fugacity of gas phase " + testSystem.getPhase(0).getFugacity(0));
System.out.println("residual enthalpy of gas phase is " + testSystem.getPhase(0).getHresTP());
System.out.println(
"isochoric heat capacity of gas phase is " + testSystem.getPhase(0).getCv("J/mol"));
System.out
.println("isobaric heat capacity of gas phase is " + testSystem.getPhase(0).getCp("J/mol"));
System.out
.println("internal energy of gas phase is " + testSystem.getPhase(0).getInternalEnergy());
System.out.println("molar volume liquid is " + testSystem.getPhase(1).getMolarVolume());
System.out.println("fugacity of gas phase " + testSystem.getPhase(1).getFugacity(0));
System.out.println("enthalpy of gas phase is " + testSystem.getPhase(1).getEnthalpy("J/mol"));
System.out.println(
"isochoric heat capacity of gas phase is " + testSystem.getPhase(1).getCv("J/mol"));
// ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
// testOps.TPflash();

/*
* System.out.println("molar volume gas+oil is " + testSystem.getMolarVolume());
* System.out.println("molar volume gas is " + testSystem.getPhase(0).getMolarVolume());
* System.out.println("fugacity of gas phase " + testSystem.getPhase(0).getFugacity(0));
* System.out.println("residual enthalpy of gas phase is " +
* testSystem.getPhase(0).getHresTP()); System.out.println(
* "isochoric heat capacity of gas phase is " + testSystem.getPhase(0).getCv("J/mol"));
* System.out .println("isobaric heat capacity of gas phase is " +
* testSystem.getPhase(0).getCp("J/mol")); System.out
* .println("internal energy of gas phase is " + testSystem.getPhase(0).getInternalEnergy());
* System.out.println("molar volume liquid is " + testSystem.getPhase(1).getMolarVolume());
* System.out.println("fugacity of gas phase " + testSystem.getPhase(1).getFugacity(0));
* System.out.println("enthalpy of gas phase is " +
* testSystem.getPhase(1).getEnthalpy("J/mol")); System.out.println(
* "isochoric heat capacity of gas phase is " + testSystem.getPhase(1).getCv("J/mol")); //
* ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); //
* testOps.TPflash();
*/
// testSystem.initProperties();
// assertEquals(0.9711401538454589, testSystem.getPhase(0).getZ(), 0.001);
}
Expand Down Expand Up @@ -222,8 +222,8 @@ public void checkPhaseEnvelope() throws Exception {
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
try {
testOps.calcPTphaseEnvelope();
System.out.println("Cricondenbar " + (testOps.get("cricondenbar")[0] - 273.15) + " "
+ testOps.get("cricondenbar")[1]);
// System.out.println("Cricondenbar " + (testOps.get("cricondenbar")[0] - 273.15) + " "
// + testOps.get("cricondenbar")[1]);
} catch (Exception ex) {
assertTrue(false);
throw new Exception(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public static void main(String args[]) {
} catch (Exception ex) {
}
testSystem.display();
System.out.println("pH " + testSystem.getPhase("aqueous").getpH());
// System.out.println("pH " + testSystem.getPhase("aqueous").getpH());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void main(String args[]) {
} catch (Exception ex) {
}
testSystem.display();
System.out.println("pH " + testSystem.getPhase(1).getpH());
// System.out.println("pH " + testSystem.getPhase(1).getpH());
logger.info("pH " + testSystem.getPhase(1).getpH());
logger.info(
"activity coefficiet water " + testSystem.getPhase("aqueous").getActivityCoefficient(2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ public static void main(String args[]) {
*/
testSystem.addTBPfraction("C7", 5, 100.0 / 1000.0, 0.72);
testSystem.addPlusFraction("C8", 50, 230.0 / 1000.0, 0.84);
//testSystem.addPlusFraction("C8", 34, 200.0 / 1000.0, 0.82);
// testSystem.addPlusFraction("C8", 34, 200.0 / 1000.0, 0.82);
testSystem.getCharacterization().getLumpingModel().setNumberOfLumpedComponents(12);
testSystem.getCharacterization().characterisePlusFraction();
/*
* testSystem.getInterphaseProperties().setInterfacialTensionModel(0);
*/
System.out.println("number of components " + testSystem.getNumberOfComponents());
// System.out.println("number of components " + testSystem.getNumberOfComponents());
testSystem.useVolumeCorrection(true);
testSystem.createDatabase(true);
testSystem.setMixingRule(2);
testSystem.setMultiPhaseCheck(true);
System.out.println("number of components " + testSystem.getNumberOfComponents());
// System.out.println("number of components " + testSystem.getNumberOfComponents());
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);

try {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/neqsim/thermo/util/example/TestUMRPRU.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public static void main(String args[]) {

double numCp = (ent1 - ent2) / 0.002;

System.out.println("Cp " + cp + " numCp " + numCp);
System.out.println("entropy " + testSystem.getPhase(1).getEntropy());
//System.out.println("Cp " + cp + " numCp " + numCp);
//System.out.println("entropy " + testSystem.getPhase(1).getEntropy());

// thermo.ThermodynamicModelTest testModel = new
// thermo.ThermodynamicModelTest(testSystem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ void testpropertyFlashRegressions() throws IOException {
ArrayList<Double> fractions = (ArrayList<Double>) inputData.get("fractions");

if (compNames == null) {
System.out.println("Skips test " + test.toString());
// System.out.println("Skips test " + test.toString());
/*
* for (int k = 0; k < fractions.size(); k++) { fluid.addComponent(k, fractions.get(k)); }
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ void testRun() {
heater_TP_setter_test_stream.setOutPressure(5.9061164855957 - 0.01, "bara");
heater_TP_setter_test_stream.setOutTemperature(79.8487854003906, "C");
heater_TP_setter_test_stream.run();
System.out.println("Gas out from degasser " + heater_TP_setter_test_stream.getOutStream()
.getFluid().getPhase("gas").getFlowRate("kg/hr"));
//System.out.println("Gas out from degasser " + heater_TP_setter_test_stream.getOutStream()
// .getFluid().getPhase("gas").getFlowRate("kg/hr"));
heater_TP_setter_test_stream.getOutStream().getThermoSystem().prettyPrint();

neqsim.processSimulation.processEquipment.heatExchanger.Heater heater_TP_setter_test_stream2 =
Expand All @@ -153,8 +153,8 @@ void testRun() {
heater_TP_setter_test_stream2.setOutTemperature(79.8487854003906, "C");
heater_TP_setter_test_stream2.run();

System.out.println("Gas out from degasser2 " + heater_TP_setter_test_stream2.getOutStream()
.getFluid().getPhase("gas").getFlowRate("kg/hr"));
//System.out.println("Gas out from degasser2 " + heater_TP_setter_test_stream2.getOutStream()
// .getFluid().getPhase("gas").getFlowRate("kg/hr"));
}

private int findComponentIndex(String[] componentNames, String componentName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import java.util.Arrays;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
Expand Down Expand Up @@ -42,7 +41,7 @@ void testDewP() {
12.501491987760147, 15.075672692089958, 18.51283799420178, 23.330378296334104,
29.71319711031059, 37.25532259549197, 43.660805656603934, 45.75836660678656,
46.42490219574348, 46.83203503669948, 46.869568345957006, 46.903557772489435};
System.out.println(Arrays.toString(dewPointPressures));
// System.out.println(Arrays.toString(dewPointPressures));
assertArrayEquals(expectedDewPointPressures, dewPointPressures, 10E-10);
}

Expand Down
Loading

0 comments on commit 4c18143

Please sign in to comment.