Class LumpingConfigBuilder
This builder provides a clear and intuitive way to configure lumping settings, avoiding the
confusion between setNumberOfLumpedComponents and setNumberOfPseudoComponents.
Example usage:
// For PVTlumpingModel: keep C6-C9 separate, lump C10+ into 5 groups
fluid.getCharacterization().configureLumping().model("PVTlumpingModel").plusFractionGroups(5)
.build();
// For standard model: create exactly 6 total pseudo-components from C6+
fluid.getCharacterization().configureLumping().model("standard").totalPseudoComponents(6)
.build();
// No lumping: keep all individual SCN components
fluid.getCharacterization().configureLumping().noLumping().build();
- Version:
- 1.0
- Author:
- ESOL
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Characteriseprivate int[]Custom carbon number boundaries.private static final org.apache.logging.log4j.LoggerLogger object for class.private Stringprivate intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionLumpingConfigBuilder(Characterise characterise) Constructor for LumpingConfigBuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and apply the lumping configuration.customBoundaries(int... boundaries) Set custom carbon number boundaries for lumping groups.Set the lumping model to use.Configure for no lumping - keeps all individual SCN components.plusFractionGroups(int n) Set the number of groups to create from the plus fraction only (C10+).totalPseudoComponents(int n) Set the total number of pseudo-components to create.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger object for class. -
characterise
-
modelName
-
plusFractionGroups
private int plusFractionGroups -
totalPseudoComponents
private int totalPseudoComponents -
customBoundaries
private int[] customBoundariesCustom carbon number boundaries.
-
-
Constructor Details
-
LumpingConfigBuilder
Constructor for LumpingConfigBuilder.- Parameters:
characterise- the Characterise instance to configure
-
-
Method Details
-
model
Set the lumping model to use.Available models:
"PVTlumpingModel"- Default. Keeps TBP fractions (C6-C9) separate, only lumps C10+"standard"- Lumps all fractions from C6 into equal-weight groups"no lumping"- Keeps all individual SCN components (C6-C80)
- Parameters:
modelName- the name of the lumping model- Returns:
- this builder for method chaining
-
noLumping
Configure for no lumping - keeps all individual SCN components.This is equivalent to calling
model("no lumping").- Returns:
- this builder for method chaining
-
plusFractionGroups
Set the number of groups to create from the plus fraction only (C10+).Use with:
"PVTlumpingModel"This method directly controls how many lumped groups are created from the plus fraction (C10 through C80). The TBP fractions (C6-C9) are kept as separate pseudo-components.
Total pseudo-components = number of TBP fractions + plusFractionGroups
- Parameters:
n- number of groups to create from C10+ fraction- Returns:
- this builder for method chaining
-
totalPseudoComponents
Set the total number of pseudo-components to create.Use with:
"standard"modelThis method controls the total number of pseudo-components created by lumping all heavy fractions (C6 through C80) into equal-weight groups.
Warning: When used with
"PVTlumpingModel", the actual number of lumped groups is calculated as: totalPseudoComponents - numberOfTBPfractions. If this results in fewer groups than the default minimum, the setting may be overridden.- Parameters:
n- total number of pseudo-components- Returns:
- this builder for method chaining
-
customBoundaries
Set custom carbon number boundaries for lumping groups.This allows matching specific PVT lab report groupings. For example:
// Creates groups: C6, C7-C9, C10-C14, C15-C19, C20+ .customBoundaries(6, 7, 10, 15, 20)
Each value represents the starting carbon number for a group. The final group extends to the heaviest component (C80 typically).
- Parameters:
boundaries- starting carbon numbers for each group- Returns:
- this builder for method chaining
-
build
Build and apply the lumping configuration.This method validates the configuration and applies it to the characterization model.
- Returns:
- the configured Characterise instance for further operations
- Throws:
IllegalArgumentException- if configuration is invalid
-