Files
generalFunctions/index.js
Rene De Ren 089f4c5129 Add position constants, reactor/settler config schemas
- New src/constants/positions.js: POSITIONS enum (upstream/downstream/atEquipment/delta)
- New src/configs/reactor.json: Full schema for CSTR/PFR reactor parameters and ASM3 initial state
- New src/configs/settler.json: Schema for settler node
- Export POSITIONS, POSITION_VALUES, isValidPosition from index.js

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:43:24 +01:00

61 lines
2.0 KiB
JavaScript

/**
* generalFunctions/index.js
* -----------------------------------------------------------
* Central barrel file for re-exporting helpers and configurations.
* Provides both namespace exports and dynamic loading capabilities.
* now we can load modules like this:
* const { menuUtils, outputUtils } = require('generalFunctions');
*/
// Core helper modules
const outputUtils = require('./src/helper/outputUtils.js');
const logger = require('./src/helper/logger.js');
const validation = require('./src/helper/validationUtils.js');
const configUtils = require('./src/helper/configUtils.js');
const assertions = require('./src/helper/assertionUtils.js')
const coolprop = require('./src/coolprop-node/src/index.js');
// Domain-specific modules
const { MeasurementContainer } = require('./src/measurements/index.js');
const configManager = require('./src/configs/index.js');
const nrmse = require('./src/nrmse/errorMetrics.js');
const state = require('./src/state/state.js');
const convert = require('./src/convert/index.js');
const MenuManager = require('./src/menu/index.js');
const predict = require('./src/predict/predict_class.js');
const interpolation = require('./src/predict/interpolation.js');
const childRegistrationUtils = require('./src/helper/childRegistrationUtils.js');
const { loadCurve } = require('./datasets/assetData/curves/index.js');
const { POSITIONS, POSITION_VALUES, isValidPosition } = require('./src/constants/positions.js');
const Fysics = require('./src/convert/fysics.js');
// Gravity helper (used by rotatingMachine for efficiency calculations)
const gravity = {
getStandardGravity: () => 9.80665,
fysics: new Fysics()
};
// Export everything
module.exports = {
predict,
interpolation,
configManager,
outputUtils,
configUtils,
logger,
validation,
assertions,
MeasurementContainer,
nrmse,
state,
coolprop,
convert,
MenuManager,
childRegistrationUtils,
loadCurve,
gravity,
POSITIONS,
POSITION_VALUES,
isValidPosition
};