Input Configurations
Enums
Enums provide named symbolic constants, making the code more understandable and less error-prone.
DWSIM Packages
Used to select the thermodynamic model from DWSIM, which governs how physical and chemical properties are calculated.
DWSIM Packages
class DWSIMPackage(Enum):
ActivityCoefficient = 'ActivityCoefficient'
BlackOil = 'BlackOil'
CAPEOPEN = 'CAPEOPEN'
ChaoSeader = 'ChaoSeader'
CoolProp = 'CoolProp'
CoolPropIncompressibleMixture = 'CoolPropIncompressibleMixture'
CoolPropIncompressiblePure = 'CoolPropIncompressiblePure'
DebyeHuckel = 'DebyeHuckel'
ElectrolyteBase = 'ElectrolyteBase'
ElectrolyteNRTL = 'ElectrolyteNRTL'
ExUNIQUAC = 'ExUNIQUAC'
GraysonStreed = 'GraysonStreed'
Raoult = 'Raoult'
LKP = 'LKP'
LIQUAC2 = 'LIQUAC2'
MODFAC = 'MODFAC'
NISTMFAC = 'NISTMFAC'
NRTL = 'NRTL'
PengRobinson = 'PengRobinson'
PengRobinson1978 = 'PengRobinson1978'
PengRobinsonLK = 'PengRobinsonLK'
PRSV2 = 'PRSV2'
PRSV2VL = 'PRSV2VL'
Seawater = 'Seawater'
SRK = 'SRK'
SourWater = 'SourWater'
SteamTables = 'SteamTables'
UNIFAC = 'UNIFAC'
UNIFACLL = 'UNIFACLL'
UNIQUAC = 'UNIQUAC'
Wilson = 'Wilson'
Format Type
Used to standardize the input .xlsx
file format to match the default output structure used during the processing phase.
Filter Operations
Operation Type
Defines types of operations that can be performed in the filtering phase.
Operations Filter
Phase Type
Represents the phase of the material stream: overall, vapor, oily, or aqueous.
Phase Type
Compound Basis
Defines the reference basis for compound data, with an associated default unit depending on the selected basis.
Compound Basis
class CompoundBasis(Enum):
MOLE_FRAC = 'MolarComposition'
MASS_FRAC = 'MassComposition'
MOLE_FLOW = 'CompoundMolarFlow'
MASS_FLOW = 'CompoundMassFlow'
@property
def default_unit(self):
return {
CompoundBasis.MASS_FLOW: 'kg/h',
CompoundBasis.MOLE_FLOW: 'kmol/h',
CompoundBasis.MOLE_FRAC: None,
CompoundBasis.MASS_FRAC: None,
}.get(self, None)
Molar Flow Unit
Specifies the unit of measurement for molar flow, used when a different unit is required instead of the default.
Mass Flow Unit
Specifies the unit of measurement for mass flow, used when a different unit is required instead of the default.
Global Variables
These global constants configure how the system reads input data, selects calculation options, handles logging, and writes results. They ensure consistent behavior across the application and should be set before processing begins.
File and Path Configuration
INPUT_FILE
Path to the input .xlsx
file containing the composition data.
OUTPUT_FOLDER
Directory to store the output files generated by the process.
Processing Options
PACKAGE
Thermodynamic model selected from DWSIMPackages
, used for property calculations inside DWSIM.
FORMAT_TYPE
Used to standardize the input file format with the expected default structure during processing.
FRACTION_PHASE
Specifies which phase (overall, vapor, oil, or water) will be used for fraction output.
BASIS_UNIT
Set the unit associated with the selected BASIS
, such as 'kmol/h'
for MOLE_FLOW
.
OPERATION
Type of operation filter to apply (e.g., CO₂ filtering).
ONLY_SIMULATED_VALUE
If True
, only simulation-generated data is used. If False
, pre-existing data in the input file will be included.
DEBUG_MODE
When True
, disables calculations like burn rate and evaporation, enabling debugging.