@welldot/utils

@welldot/utils

Pure functions that analyze a parsed .well file, from volumes and drawdown to permit status, production totals and water quality indicators, following the spec's derivation rules.

@welldot/utils computes what a .well file deliberately does not store. The spec forbids storing derived values (design principles): drawdown, specific capacity, production volumes, permit status and exceedances are calculated from the data whenever they are needed. This package is where those calculations live, so every tool gets the same answers.

All functions are pure: they take a Well from @welldot/core and return values, with no DOM, no network and no side effects. The one exception is the SIAGAS importer, a separate entry point that fetches registry pages.

import { parseWell } from '@welldot/core';
import {
  calculateHoleFillVolume,
  formatNumber,
  getLatestStaticLevel,
} from '@welldot/utils';

const well = parseWell(text);

formatNumber(calculateHoleFillVolume('gravel_pack', well), {
  fractionDigits: 2,
  suffix: 'm³',
}); // '1.88 m³'
getLatestStaticLevel(well); // 3.94 (m below ground)

What it covers

AreaExamplesGuide
Geometry and volumesAnnular volumes, gravel pack and seal estimates, depths and diametersGeometry and volumes
HydraulicsStatic and dynamic levels, drawdown, specific capacity, Jacob losses, test chart seriesWater levels and pumping tests
PermitsPermit status, condition deadlines and their fulfillment, permit warningsPermits
OperationMeter volumes, production by period, operating regime, well status, pumpsOperation and production
Water qualityExceedances, ion balance, facies, Piper and Stiff values, QA/QCWater quality
ImportData logger exports, the SIAGAS registryLogger import, SIAGAS import
DisplayNumber, date and coordinate formattingFormatting

Units

The package follows the format's units: depths in meters, diameters in millimeters, flow in m³/h (Units). Volumes come out in m³, specific capacity in m²/h (m³/h per meter) and unit drawdown in h/m².

Next