Calculations
Properties
Soap property prediction from fatty-acid profiles.
blend_fatty_acids(oil_entries)
Compute a weighted-average fatty-acid profile for a blend of oils.
Each fatty-acid percentage is weighted by the oil's share (percentage) of total oils.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oil_entries
|
List[OilEntry]
|
List of oil entries in the recipe. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FattyAcidProfile |
FattyAcidProfile
|
The aggregated fatty acid profile for the blend. |
calculate_ins(oil_entries)
Weighted-average INS value of an oil blend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oil_entries
|
List[OilEntry]
|
List of oil entries in the recipe. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The effective INS value. |
calculate_iodine(oil_entries)
Weighted-average iodine value of an oil blend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oil_entries
|
List[OilEntry]
|
List of oil entries in the recipe. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The effective iodine value. |
predict_properties(oil_entries)
Predict soap properties from a list of oil entries.
Generates a full report of hardness, cleansing, conditioning, etc., based on the fatty acid profile of the blend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oil_entries
|
List[OilEntry]
|
List of oil entries in the recipe. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SoapProperties |
SoapProperties
|
The predicted properties. |
Skin Feel
Superfat character analysis for post-cook oil blends.
analyze_skin_feel(oils, base_oils=None, superfat_pct=5.0)
Profile the superfat character of a post-cook oil blend.
Reports four independent dimensions rather than a single classification
- Film Persistence: waxy saturates (palmitic+stearic) + wax boost. Solid-at-body-temp fats resist solubilization by soap micelles.
- Emollient Slip: oleic + ricinoleic (monounsaturated). Liquid emollients that provide slip and after-feel.
- Lather Impact: fluidity-weighted antifoam score, scaled by superfat % and adjusted for base soap interaction.
- DOS Risk: polyunsaturated FA (linoleic+linolenic) fraction. PUFA in the free oil phase oxidizes rapidly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oils
|
List[OilEntry]
|
The oils comprising the superfat phase. |
required |
base_oils
|
Optional[List[OilEntry]]
|
The base soap oils (used for coupling calculations). Defaults to None. |
None
|
superfat_pct
|
float
|
The total percentage of superfat. Defaults to 5.0. |
5.0
|
Returns:
| Name | Type | Description |
|---|---|---|
SkinFeel |
SkinFeel
|
A detailed analysis of the estimated skin feel. |
Mold
Mold size calculator — derive batch weight from mold dimensions.
batch_weight_for_mold(mold)
Return the target total batch weight (grams) for a given mold.
Estimated from oil weight (approx 65% of batch).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mold
|
MoldSpec
|
The mold estimation parameters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Estimated total batch weight in grams. |
mold_from_inches(length, width, height, fill_factor=0.95)
Create a :class:MoldSpec from inch measurements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
float
|
Length in inches. |
required |
width
|
float
|
Width in inches. |
required |
height
|
float
|
Height in inches. |
required |
fill_factor
|
float
|
Percentage of mold volume to fill (0.0-1.0). Defaults to 0.95. |
0.95
|
Returns:
| Name | Type | Description |
|---|---|---|
MoldSpec |
MoldSpec
|
The resulting mold specification with dimensions converted to cm. |
oil_weight_for_mold(mold)
Estimate target oil weight from mold size.
Uses defined oil density (approx 0.692 g/cm³).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mold
|
MoldSpec
|
The mold estimation parameters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Estimated oil weight in grams. |