gworky-engine
v1.0.0
Published
Groundwork Decision Engine — Evidence-based computational models and financial, health, and energy calculators for smarter life decisions.
Maintainers
Readme
Groundwork Decision Engine (@gworkycom/engine)
Groundwork Decision Engine is an open-source, zero-dependency suite of evidence-based computational models for personal finance, preventive health, and home energy decisions.
Developed by the Groundwork Research Desk, this library powers the interactive calculators available on gworky.com/tools.
Key Modules
- Solar Panel Payback & ROI: Calculates 20-year net savings, federal ITC tax credits, utility escalation, and break-even periods.
- Mortgage Refinance Break-Even: Computes monthly payment differentials, closing cost amortization, and net lifetime interest savings.
- TDEE & Macronutrient Allocation: Implements the Mifflin-St Jeor equation with validated activity multi-tiers.
- Zone 2 Cardiovascular Physiology: Calculates lactate threshold training heart rate zones for mitochondrial density.
- HVAC Psychrometric Sizing: Simplified Manual J heating/cooling load and CFM airflow estimator.
Installation
npm install @gworkycom/engineor with yarn / pnpm:
pnpm add @gworkycom/engineQuickstart
1. Solar Payback & 20-Year Net Savings
import { calculateSolarPayback } from "@gworkycom/engine";
const result = calculateSolarPayback({
systemCost: 20000,
annualOutputKwh: 9000,
electricityRatePerKwh: 0.16,
federalCreditRate: 0.30, // 30% Residential Clean Energy Credit
annualUtilityIncreaseRate: 0.03, // 3% annual escalation
});
console.log(result);
// {
// netCost: 14000,
// firstYearSavings: 1440,
// paybackYears: 8.4,
// twentyYearNetSavings: 24890.12
// }2. Mortgage Refinance Break-Even
import { calculateMortgageRefinance } from "@gworkycom/engine";
const refinance = calculateMortgageRefinance({
currentBalance: 350000,
currentRate: 0.06875, // 6.875%
newRate: 0.0575, // 5.750%
closingCosts: 4500,
remainingTermMonths: 320,
newTermMonths: 360,
});
console.log(`Monthly Savings: $${refinance.monthlySavings}`);
console.log(`Break-even: ${refinance.breakEvenMonths} months`);Interactive Web Demos & Documentation
All mathematical formulas, underlying peer-reviewed literature, and interactive web calculators are maintained at:
- Interactive Calculators: https://gworky.com/tools
- Embed Generator: https://gworky.com/embed-builder
- Citations & Research Methodology: https://gworky.com/citations
- Open Science DOI Archive: https://doi.org/10.5281/zenodo.22011566
License
MIT © Groundwork Media
