-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cvd and multiphase corrections for reservoir (#1023)
* cvdfor reservoir * added some implementation of TPflash reservoir * update * fix error in simulation * update * update init(0) * start adding MPFM fitter
- Loading branch information
Showing
8 changed files
with
653 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/neqsim/processSimulation/processEquipment/reservoir/ReservoirCVDsim.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package neqsim.processSimulation.processEquipment.reservoir; | ||
|
||
import java.util.UUID; | ||
import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass; | ||
import neqsim.thermo.system.SystemInterface; | ||
|
||
/** | ||
* <p> | ||
* ReservoirCVDsim class. | ||
* </p> | ||
* | ||
* @author Even Solbraa | ||
* @version $Id: ReservoirCVDsim.java 1234 2024-05-31 10:00:00Z esolbraa $ | ||
*/ | ||
public class ReservoirCVDsim extends ProcessEquipmentBaseClass { | ||
private static final long serialVersionUID = 1000; | ||
|
||
public ReservoirCVDsim(String name, SystemInterface reservoirFluid) { | ||
super(name); | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public void run(UUID id) { | ||
|
||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/neqsim/processSimulation/processEquipment/reservoir/ReservoirDiffLibsim.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package neqsim.processSimulation.processEquipment.reservoir; | ||
|
||
import java.util.UUID; | ||
import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass; | ||
import neqsim.thermo.system.SystemInterface; | ||
|
||
/** | ||
* <p> | ||
* ReservoirDiffLibsim class. | ||
* </p> | ||
* | ||
* @author Even Solbraa | ||
* @version $Id: ReservoirDiffLibsim.java 1234 2024-05-31 10:00:00Z esolbraa $ | ||
*/ | ||
public class ReservoirDiffLibsim extends ProcessEquipmentBaseClass { | ||
private static final long serialVersionUID = 1000; | ||
|
||
public ReservoirDiffLibsim(String name, SystemInterface reservoirFluid) { | ||
super(name); | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public void run(UUID id) { | ||
|
||
} | ||
|
||
} |
97 changes: 97 additions & 0 deletions
97
src/main/java/neqsim/processSimulation/processEquipment/reservoir/ReservoirTPsim.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package neqsim.processSimulation.processEquipment.reservoir; | ||
|
||
import java.util.UUID; | ||
import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass; | ||
import neqsim.processSimulation.processEquipment.stream.Stream; | ||
import neqsim.processSimulation.processEquipment.stream.StreamInterface; | ||
import neqsim.thermo.system.SystemInterface; | ||
import neqsim.thermodynamicOperations.ThermodynamicOperations; | ||
|
||
/** | ||
* <p> | ||
* ReservoirTPsim class. | ||
* </p> | ||
* | ||
* @author Even Solbraa | ||
* @version $Id: ReservoirTPsim.java 1234 2024-05-31 10:00:00Z esolbraa $ | ||
*/ | ||
public class ReservoirTPsim extends ProcessEquipmentBaseClass { | ||
private static final long serialVersionUID = 1000; | ||
|
||
private SystemInterface reservoirFluid = null; | ||
private StreamInterface outStream = null; | ||
|
||
private double pressure = 100.0; | ||
private double temperature = 100.0; | ||
private double flowRate = 100.0; | ||
private String flowUnit = "kg/hr"; | ||
private String tUnit = "K"; | ||
private String pUnit = "bar"; | ||
|
||
private String prodPhaseName = "gas"; | ||
|
||
public SystemInterface getReserervourFluid() { | ||
return reservoirFluid; | ||
} | ||
|
||
public ReservoirTPsim(String name, SystemInterface reservoirFluid) { | ||
super(name); | ||
this.reservoirFluid = reservoirFluid; | ||
outStream = new Stream(getName() + "_out", reservoirFluid.clone()); | ||
} | ||
|
||
|
||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public void run(UUID id) { | ||
SystemInterface fluid1 = ((SystemInterface) reservoirFluid).clone(); | ||
fluid1.setTemperature(temperature, tUnit); | ||
fluid1.setPressure(pressure, pUnit); | ||
fluid1.setTotalFlowRate(flowRate, flowUnit); | ||
|
||
ThermodynamicOperations operations = new ThermodynamicOperations(fluid1); | ||
operations.TPflash(); | ||
|
||
if (prodPhaseName.equals("gas") && fluid1.hasPhaseType("gas")) { | ||
outStream.setFluid(fluid1.phaseToSystem("gas")); | ||
} else if (prodPhaseName.equals("oil") && fluid1.hasPhaseType("oil")) { | ||
outStream.setFluid(fluid1.phaseToSystem("oil")); | ||
} else { | ||
outStream.setFluid(fluid1.phaseToSystem(1)); | ||
} | ||
|
||
} | ||
|
||
public StreamInterface getOutStream() { | ||
return outStream; | ||
} | ||
|
||
public void setPressure(double reservoirPressure, String pUnit) { | ||
this.pressure = reservoirPressure; | ||
this.pUnit = pUnit; | ||
} | ||
|
||
public void setTemperature(double reservoirTemperature, String tUnit) { | ||
this.temperature = reservoirTemperature; | ||
this.tUnit = tUnit; | ||
} | ||
|
||
public String getProdPhaseName() { | ||
return prodPhaseName; | ||
} | ||
|
||
public void setProdPhaseName(String prodPhaseName) { | ||
this.prodPhaseName = prodPhaseName; | ||
} | ||
|
||
public void setFlowRate(double flowRate, String flowUnit) { | ||
this.flowRate = flowRate; | ||
this.flowUnit = flowUnit; | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
|
Oops, something went wrong.