Class EclipseFluidReadWrite
java.lang.Object
neqsim.thermo.util.readwrite.EclipseFluidReadWrite
EclipseFluidReadWrite class.
- Version:
- $Id: $Id
- Author:
- asmund
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static org.apache.logging.log4j.LoggerLogger object for class.static StringConstantpseudoName="" -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidapplyLBCViscosityModel(SystemInterface fluid, double[] lbcParams) Apply LBC viscosity model with custom parameters to fluid.private static voidApply PFCT (Pedersen) viscosity model to all phases.private static double[][]Gets binary interaction parameters from fluid.private static StringgetEOSType(SystemInterface fluid) Determines the EOS type string for the fluid.private static double[]Get LBC parameters from fluid if LBC viscosity model is active.private static booleanCheck if PFCT (Pedersen) viscosity model is active on any phase.static SystemInterfaceread.static SystemInterfaceread.static SystemInterfaceread.static SystemInterfacereadE300File(String inputFile) readE300File.static voidsetComposition(SystemInterface fluid, String inputFile) setComposition.static voidsetComposition(SystemInterface fluid, String inputFile, String pseudoNameIn) setComposition.private static StringshortenComponentName(String name) Shortens component names to E300 compatible format.static StringtoE300String(SystemInterface fluid) Convert a NeqSim fluid to Eclipse E300 format string.static StringtoE300String(SystemInterface fluid, double reservoirTempC) Convert a NeqSim fluid to Eclipse E300 format string.static voidwrite(SystemInterface fluid, String outputFile) Write a NeqSim fluid to Eclipse E300 compositional EOS file format.static voidwrite(SystemInterface fluid, String outputFile, double reservoirTempC) Write a NeqSim fluid to Eclipse E300 compositional EOS file format.static voidwrite(SystemInterface fluid, Path outputPath, double reservoirTempC) Write a NeqSim fluid to Eclipse E300 compositional EOS file format.private static voidwriteToWriter(SystemInterface fluid, Writer writer, double reservoirTempC) Internal method to write E300 content to a Writer.
-
Field Details
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
pseudoName
ConstantpseudoName=""
-
-
Constructor Details
-
EclipseFluidReadWrite
public EclipseFluidReadWrite()
-
-
Method Details
-
setComposition
setComposition.
- Parameters:
fluid- aSystemInterfaceobjectinputFile- aStringobjectpseudoNameIn- aStringobject
-
setComposition
setComposition.
- Parameters:
fluid- aSystemInterfaceobjectinputFile- aStringobject
-
read
read.
- Parameters:
inputFile- aStringobjectpseudoNameIn- aStringobject- Returns:
- a
SystemInterfaceobject
-
read
read.
- Parameters:
inputFile- aStringobject- Returns:
- a
SystemInterfaceobject
-
read
read.
- Parameters:
inputFile- aStringobject representing the path to the input filefluidNames- an array ofStringobjects representing the names of the fluids- Returns:
- a
SystemInterfaceobject representing the thermodynamic system
-
readE300File
readE300File.
- Parameters:
inputFile- aStringobject- Returns:
- a
SystemInterfaceobject
-
write
Write a NeqSim fluid to Eclipse E300 compositional EOS file format.The exported file contains all EOS parameters needed to recreate the fluid in Eclipse 300 or read it back into NeqSim, including: component names, critical properties, acentric factors, molecular weights, volume shifts, parachors, mole fractions, and binary interaction coefficients.
- Parameters:
fluid- the fluid to exportoutputFile- path to output file (e.g., "myfluid.e300")- Throws:
IOException- if writing fails
-
write
public static void write(SystemInterface fluid, String outputFile, double reservoirTempC) throws IOException Write a NeqSim fluid to Eclipse E300 compositional EOS file format.- Parameters:
fluid- the fluid to exportoutputFile- path to output filereservoirTempC- reservoir temperature in Celsius for RTEMP keyword- Throws:
IOException- if writing fails
-
write
public static void write(SystemInterface fluid, Path outputPath, double reservoirTempC) throws IOException Write a NeqSim fluid to Eclipse E300 compositional EOS file format.- Parameters:
fluid- the fluid to exportoutputPath- output file pathreservoirTempC- reservoir temperature in Celsius- Throws:
IOException- if writing fails
-
toE300String
Convert a NeqSim fluid to Eclipse E300 format string.- Parameters:
fluid- the fluid to export- Returns:
- E300 format content as string
-
toE300String
Convert a NeqSim fluid to Eclipse E300 format string.- Parameters:
fluid- the fluid to exportreservoirTempC- reservoir temperature in Celsius- Returns:
- E300 format content as string
-
writeToWriter
private static void writeToWriter(SystemInterface fluid, Writer writer, double reservoirTempC) throws IOException Internal method to write E300 content to a Writer.- Parameters:
fluid- the fluid to exportwriter- output writerreservoirTempC- reservoir temperature in Celsius- Throws:
IOException- if writing fails
-
isPFCTViscosityModelActive
Check if PFCT (Pedersen) viscosity model is active on any phase.- Parameters:
fluid- the fluid- Returns:
- true if PFCT viscosity model is active
-
getEOSType
Determines the EOS type string for the fluid.- Parameters:
fluid- the fluid- Returns:
- EOS type string (SRK, PR, etc.)
-
shortenComponentName
-
getBinaryInteractionParameters
Gets binary interaction parameters from fluid.- Parameters:
fluid- the fluid- Returns:
- 2D array of kij values
-
applyLBCViscosityModel
Apply LBC viscosity model with custom parameters to fluid.- Parameters:
fluid- the fluid to configurelbcParams- array of 5 LBC dense contribution parameters
-
applyPFCTViscosityModel
Apply PFCT (Pedersen) viscosity model to all phases.- Parameters:
fluid- the fluid to configure
-
getLBCParametersFromFluid
Get LBC parameters from fluid if LBC viscosity model is active.- Parameters:
fluid- the fluid- Returns:
- array of 5 LBC parameters, or null if not using LBC model
-