Edible Oil Refinery, Soap & Detergent Chemical Manufacturing ERP: Crude Palm Oil (CPO) Tank Ullage, Saponification Batch Recipes, and By-Product Mass-Balance Accounting

How continuous edible oil refineries, laundry bar-soap plants, and liquid/powder detergent manufacturers automate tank-farm radar ullage, RBD Olein/Stearin/PFAD fractionation mass balance, inline jerrycan blow-molding, and distributor rebates.

Continuous process manufacturers—refining imported Crude Palm Oil (CPO), crude sunflower, or soybean oil into cooking oil, vegetable ghee, and margarine while converting Palm Fatty Acid Distillate (PFAD) and Palm Stearin into laundry bar soap, toilet soap noodles, and sulphonated detergent powders—operate on massive commodity volumes where a 0.4% unrecorded process refining loss translates into tens of millions of shillings per month.

At devManue, we design high-integrity Edible Oil Refinery, Soap & Detergent Chemical Manufacturing ERP platforms that integrate tank-farm radar level/temperature correction, continuous degumming/bleaching/deodorizing and dry-fractionation mass balance, saponification kettle recipe locks, inline PET/HDPE jerrycan blow-molding synchronization, and regional depot van-sales distribution.

1. Controlling Process Yield, Co-Product Costing & Packaging Synchronization

  • Temperature-Distorted Tank Farm Ullage & Pipeline Transfers: Crude palm oil and refined olein expand significantly when heated in shore tanks and day tanks (50°C–65°C). Measuring tank levels in liters without temperature-corrected specific gravity (SG) conversion to metric tons creates phantom inventory gains and masks pipeline pilferage.
  • Joint By-Product Costing Across Olein, Stearin & PFAD: Refining 1,000 MT of Crude Palm Oil yields primary Refined Bleached Deodorized (RBD) Palm Oil, which is then fractionated into liquid RBD Palm Olein (cooking oil) and solid RBD Palm Stearin (shortening/soap stock), plus PFAD (soap feedstock). Standard ERPs designed for discrete assembly cannot allocate joint raw-material and steam/bleaching-earth costs across co-products accurately.
  • Inline Blow-Molding Resin vs. Filling-Line Variance: Most edible oil plants blow their own 1L, 2L, 3L, 5L, and 20L yellow HDPE jerrycans inline. Without synchronizing virgin HDPE/masterbatch resin consumption with filled carton output, damaged or overweight jerrycans silently drain packaging margins.
Stage 01→
Shore Tank & Weighbridge
Port Pipeline Intake, Radar Level + Temp SG Metric Ton Conversion
Stage 02→
Physical Refining & Fractionation
Bleaching Earth/Phosphoric Dosing & Olein/Stearin/PFAD Mass Balance
Stage 03→
Saponification & Detergent
PFAD/Stearin + Caustic Soda Kettles, Plodder Extrusion & Spray Tower
Stage 04→
Inline Blow-Molding & Filling
HDPE Resin Silo Sync, 1L–20L Gravimetric Filling & Carton Coding
Stage 05✓
Depot & Export Dispatch
Tiered Wholesaler Rebates, KRA eTIMS & Transit Tanker Seals

2. Temperature-Corrected Tank Farm Metric Tonnage & Refinery Mass-Balance Engine

Our process-manufacturing core converts radar tank strapping-table volumes and temperature probe readings into exact metric tons (MT), then reconciles continuous refinery batch inputs against primary and co-product outputs:

from decimal import Decimal, ROUND_HALF_UP

class EdibleOilRefineryMassBalanceEngine:
    """
    Computes temperature-corrected metric tonnage in oil storage tanks and audits
    continuous refinery + fractionation mass-balance yields.
    """
    BASE_DENSITY_AT_50C = Decimal("0.8910")  # MT per cubic meter for RBD Palm Oil at 50°C
    TEMP_CORRECTION_FACTOR = Decimal("0.00068")  # Density change per °C

    @classmethod
    def calculate_tank_metric_tons(
        cls,
        strapped_volume_m3: Decimal,
        oil_temp_celsius: Decimal,
    ) -> Decimal:
        temp_delta = oil_temp_celsius - Decimal("50.0")
        corrected_density = cls.BASE_DENSITY_AT_50C - (temp_delta * cls.TEMP_CORRECTION_FACTOR)
        metric_tons = strapped_volume_m3 * corrected_density
        return metric_tons.quantize(Decimal("0.001"), rounding=ROUND_HALF_UP)

    @staticmethod
    def audit_refining_and_fractionation_yield(
        cpo_input_mt: Decimal,
        rbd_olein_output_mt: Decimal,
        rbd_stearin_output_mt: Decimal,
        pfad_distillate_mt: Decimal,
        free_fatty_acid_ffa_pct: Decimal,
    ) -> dict:
        total_recovered_mt = rbd_olein_output_mt + rbd_stearin_output_mt + pfad_distillate_mt
        process_loss_mt = max(Decimal("0"), cpo_input_mt - total_recovered_mt)
        process_loss_pct = (process_loss_mt / cpo_input_mt * Decimal("100")).quantize(
            Decimal("0.01"), rounding=ROUND_HALF_UP
        ) if cpo_input_mt > 0 else Decimal("0.00")
        olein_yield_pct = (rbd_olein_output_mt / cpo_input_mt * Decimal("100")).quantize(
            Decimal("0.01"), rounding=ROUND_HALF_UP
        ) if cpo_input_mt > 0 else Decimal("0.00")

        return {
            "total_recovered_mt": total_recovered_mt.quantize(Decimal("0.001")),
            "olein_yield_pct": olein_yield_pct,
            "process_refining_loss_pct": process_loss_pct,
            "excess_loss_alert": process_loss_pct > Decimal("1.10"),
        }

3. Soap Noodle Plodders, Detergent Spray Towers & Wholesaler Container Rebates

In the soap and detergent division, the ERP manages caustic soda (NaOH), silicate, optical brightener, and perfume dosing tolerances, tracks moisture weight loss during bar-soap curing, and links finished cartons directly into our FMCG depot and van-sales engine with automated monthly tonnage rebates for top-tier distributors.

Refinery & Chemical Plant MetricLegacy Spreadsheets & Manual TallyingdevManue Custom Enterprise ERP
Tank Farm Daily Stock ValuationManual dip-tape readings ignoring thermal expansionReal-time radar level + PT100 temperature correction to 0.001 MT
Refining & Fractionation Loss ControlEnd-of-month accounting reconciliationsShift-by-shift CPO vs. Olein/Stearin/PFAD mass-balance audit
Co-Product & Soap Feedstock CostingArbitrary fixed transfer prices for PFAD/StearinDynamic net-realizable-value (NRV) joint cost allocation
Inline Jerrycan Blow-Molding SyncSeparate resin and filling spreadsheetsGram-weight parison audit vs. filled 5L/20L jerrycan count
Architectural Continuity & Deep Dives

Explore related production architectures and enterprise engineering guides:

// High-Throughput Engineering • Systems Architecture Consulting

Scaling Python & Django APIs or Resolving Concurrency Bottlenecks?

We partner with engineering founders and tech leads to architect resilient distributed systems, optimize async worker pools, design scalable databases, and eliminate production latency spikes.

All Insights
Chat on WhatsApp