Skip to content

Commit

Permalink
Merge pull request #241 from asmfstatoil/cleanup_util
Browse files Browse the repository at this point in the history
Cleanup in util-examples
  • Loading branch information
EvenSol authored Dec 13, 2021
2 parents b3747a2 + ec943e8 commit cf6b9ef
Show file tree
Hide file tree
Showing 82 changed files with 101 additions and 757 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
package neqsim.physicalProperties.util.examples;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkCPAstatoil;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import org.apache.logging.log4j.*;

/*
* TPflash.java
*
* Created on 27. september 2001, 09:43
*/

/*
*
Expand All @@ -18,15 +13,8 @@
*/
public class TPflashWater {

private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TPflashWater.class);

/**
* Creates new TPflash
*/
public TPflashWater() {
}

public static void main(String args[]) {
SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 40.0, 100.01325);
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
package neqsim.physicalProperties.util.examples;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkEos;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import org.apache.logging.log4j.*;

/*
* TPflash.java
*
* Created on 27. september 2001, 09:43
*/

/*
*
* @author esol
* @version
*/
public class TPflash_1 {

private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TPflash_1.class);

/**
* Creates new TPflash
*/
public TPflash_1() {
}

public static void main(String args[]) {
SystemInterface testSystem = new SystemSrkEos(273.15 + 55, 100.0);
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
package neqsim.physicalProperties.util.examples;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemPrEos;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import org.apache.logging.log4j.*;

/*
* TPflash.java
*
* Created on 27. september 2001, 09:43
*/

/*
*
* @author esol
* @version
*/
public class TestCondensate {

private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TestCondensate.class);

/**
* Creates new TPflash
*/
public TestCondensate() {
}

public static void main(String args[]) {
// SystemInterface testSystem = new SystemSrkEos(273.15 + 15.0, 1.01325);
SystemInterface testSystem = new SystemPrEos(273.15 + 15.0, 1.01325);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package neqsim.physicalProperties.util.examples;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkEos;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import org.apache.logging.log4j.*;

/**
*
* @author esol //
*/
public class TestDiffusionCoefficient {

private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TestDiffusionCoefficient.class);

public static void main(String args[]) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package neqsim.physicalProperties.util.examples;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkEos;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import org.apache.logging.log4j.*;

/**
*
* @author esol //
*/
public class TestSolidAdsorption {

private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TestSolidAdsorption.class);

public static void main(String args[]) {
Expand Down Expand Up @@ -40,6 +39,5 @@ public static void main(String args[]) {
System.out.println("surface excess CO2 from oil "
+ testSystem.getInterphaseProperties().getAdsorptionCalc("oil").getSurfaceExcess("CO2")
+ " kg CO2/kg AC");

}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package neqsim.physicalProperties.util.examples;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkEos;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import org.apache.logging.log4j.*;

/**
*
* @author esol //
*/
public class TestSurfaceTenison {

private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TestSurfaceTenison.class);

public static void main(String args[]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import neqsim.processSimulation.processEquipment.stream.Stream;

public class AbsorberTest {

private static final long serialVersionUID = 1000;

/**
* This method is just meant to test the thermo package.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import neqsim.thermodynamicOperations.ThermodynamicOperations;

public class HeatExchanger {

private static final long serialVersionUID = 1000;

/**
* This method is just meant to test the thermo package.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
import neqsim.thermodynamicOperations.ThermodynamicOperations;

public class HeatExchanger2 {

private static final long serialVersionUID = 1000;

/**
* This method is just meant to test the thermo package.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
public class LNGfilling2 {
public static void main(String args[]) {

neqsim.thermo.system.SystemInterface testSystem =
new neqsim.thermo.system.SystemSrkEos((273.15 - 150.3), 1.02);
testSystem.addComponent("nitrogen", 0.1e-6);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
public class LNGtankfilling {
public static void main(String args[]) {

neqsim.thermo.system.SystemInterface testSystem =
new neqsim.thermo.system.SystemSrkEos((273.15 + 0.0), 1.02);
double total1 = 9.5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

import neqsim.processSimulation.processEquipment.heatExchanger.Heater;
import neqsim.processSimulation.processEquipment.mixer.StaticMixer;
import neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator;
import neqsim.processSimulation.processEquipment.splitter.Splitter;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.processSimulation.processEquipment.util.Adjuster;
import neqsim.processSimulation.processEquipment.valve.ThrottlingValve;
import neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator;
import neqsim.processSimulation.processEquipment.splitter.Splitter;

public class MEGinjection {

public static void main(String[] args) {

// Create the input fluid to the TEG process and saturate it with water at
// scrubber conditions
neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

import neqsim.processSimulation.processEquipment.mixer.StaticMixer;
import neqsim.processSimulation.processEquipment.mixer.StaticPhaseMixer;
import neqsim.processSimulation.processEquipment.separator.GasScrubber;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.processSimulation.processEquipment.util.StreamSaturatorUtil;
import neqsim.processSimulation.processEquipment.separator.GasScrubber;

public class MasstransferMeOH {

public static void main(String[] args) {

// Create the input fluid to the TEG process and saturate it with water at
// scrubber conditions
neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,
Expand Down Expand Up @@ -78,6 +77,5 @@ public static void main(String[] args) {
// mainMixer.getFluid().display();
// scrubber.getGasOutStream().displayResult();
System.out.println("hydt " + gasFromScrubber.getHydrateEquilibriumTemperature());

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
import neqsim.processSimulation.processEquipment.stream.StreamInterface;

public class OffshoreProcess {

private static final long serialVersionUID = 1000;

/**
* This method is just meant to test the thermo package.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
* @author esol
*/
public class OffshoreProcess3 {

private static final long serialVersionUID = 1000;

public static void main(String[] args) {
neqsim.thermo.system.SystemInterface testSystem = new SystemSrkEos(354.2, 120.0);

Expand Down Expand Up @@ -348,7 +345,6 @@ public static void main(String[] args) {
System.out.println("Power " + operations.getPower("W") / 1.0e6 + " MW");

System.out.println("exergy change " + operations.getExergyChange("J"));
System.out.println("total weight " + operations.getMechanicalWeight("kg") + " kg");

System.out.println("total weight " + operations.getMechanicalWeight("kg") + " kg");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
public class OnshoreMEGprocess {

public static void main(String[] args) {

neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,
10.00);
feedGas.addComponent("nitrogen", 0.4);
Expand Down Expand Up @@ -286,7 +285,5 @@ public static void main(String[] args) {
+ inletGasCooler.getOutStream().getFluid().getPhase("aqueous").getWtFrac("MEG") * 100.0);

operations.save("c:/temp/MEGdehydrationProcess.neqsim");

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
import neqsim.processSimulation.processEquipment.valve.ThrottlingValve;

public class TEGAbsorberTest {

private static final long serialVersionUID = 1000;

/**
* This method is just meant to test the thermo package.
*/
public static void main(String args[]) {

neqsim.thermo.system.SystemSrkEos testSystem = new neqsim.thermo.system.SystemSrkSchwartzentruberEos(
(273.15 + 20.0), 80.00);
testSystem.addComponent("methane", 120.00);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
import neqsim.processSimulation.measurementDevice.HydrateEquilibriumTemperatureAnalyser;
import neqsim.processSimulation.processEquipment.absorber.SimpleTEGAbsorber;
import neqsim.processSimulation.processEquipment.absorber.WaterStripperColumn;
import neqsim.processSimulation.processEquipment.distillation.Condenser;
import neqsim.processSimulation.processEquipment.distillation.DistillationColumn;
import neqsim.processSimulation.processEquipment.distillation.Reboiler;
import neqsim.processSimulation.processEquipment.filter.Filter;
import neqsim.processSimulation.processEquipment.heatExchanger.HeatExchanger;
import neqsim.processSimulation.processEquipment.heatExchanger.Heater;
import neqsim.processSimulation.processEquipment.mixer.StaticMixer;
import neqsim.processSimulation.processEquipment.pump.Pump;
import neqsim.processSimulation.processEquipment.separator.Separator;
import neqsim.processSimulation.processEquipment.stream.Stream;
import neqsim.processSimulation.processEquipment.util.Calculator;
import neqsim.processSimulation.processEquipment.util.Recycle;
import neqsim.processSimulation.processEquipment.util.SetPoint;
import neqsim.processSimulation.processEquipment.util.StreamSaturatorUtil;
import neqsim.processSimulation.processEquipment.valve.ThrottlingValve;
import neqsim.processSimulation.processSystem.ProcessSystem;
import neqsim.processSimulation.processEquipment.separator.Separator;

public class TEGdehydrationProcessDistillationJS {
/**
Expand Down Expand Up @@ -147,8 +144,7 @@ public class TEGdehydrationProcessDistillationJS {
*/
public double coldTEGpumpIsentropicEfficiency = 0.75;

public TEGdehydrationProcessDistillationJS() {

public TEGdehydrationProcessDistillationJS() {
}

public neqsim.processSimulation.processSystem.ProcessSystem getProcess() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
* @author esol
*/
public class TestMechanicalDesign {

private static final long serialVersionUID = 1000;

public static void main(String args[]) {

neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 20.0), 66.00);
testSystem.addComponent("methane", 5e6, "Sm3/day");
testSystem.addComponent("water", 3000, "kg/hr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
import neqsim.processSimulation.processEquipment.stream.Stream;

public class TestProcess4 {

private static final long serialVersionUID = 1000;

/**
* This method is just meant to test the thermo package.
*/
public static void main(String args[]) {

neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 28.0),
90.0);
testSystem.addComponent("methane", 79.034);
Expand Down
Loading

0 comments on commit cf6b9ef

Please sign in to comment.