SAM_Validation is a repository containing validation tests for various SAM toolkits. Welcome and let's make the opensource journey continue. π€
π§ͺ A modular validation suite for the Sustainable Analytical Model (SAM) platform developed by Hoare Lea.
This repository compares outputs from SAM modules against trusted reference implementations such as PsychroLib and IAPWS-IF97 to ensure numerical correctness, thermodynamic validity, and regression stability.
This repository helps verify the physical and numerical accuracy of core SAM components, such as:
SAM_Mollier
(moist air / psychrometrics)SAM_IAPWS
(pure water/steam thermodynamics)SAM_SolarCalculator
(solar irradiance and weather input models)
SAM_Validation/
βββ SAM_Mollier/ # Validation tests for SAM_Mollier
β βββ Test/ # Test files (e.g., HumidityRatioTests.cs, EnthalpyTests.cs)
β βββ validationfiles/ # Reference data (e.g., psychrolib_validation.csv)
βββ SAM_IAPWS/ # Validation tests for SAM_IAPWS
β βββ Test/ # Test files
β βββ validationfiles/ # Reference data
βββ SAM_SolarCalculator/ # Validation tests for SAM_SolarCalculator
β βββ Test/ # Test files
β βββ validationfiles/ # Reference data
βββ .github/
β βββ workflows/test.yml # GitHub Actions for CI
βββ README.md # Project overview and structure
βββ RunInstructions.md # How to set up and run the tests
βββ TestPlan.md # Summary of test coverage and status
βββ CreateSolution.md # How to create and configure the solution
Each toolkit directory contains:
Test/
: Unit and integration tests.validationfiles/
: Reference data used for validation.
β‘οΈ See RunInstructions.md for first-time setup and test execution.
β‘οΈ See TestPlan.md for an overview of planned and implemented tests.
β‘οΈ See CreateSolution.md for help creating a solution and linking references.
Validates:
HumidityRatio.HumidityRatio(...)
against PsychroLib 2.5.0- Tolerance: Β±0.0005 kg/kg
More tests to come:
- Enthalpy
- Dew point
- Wet bulb
Ensure you have:
- .NET SDK 7.0
- References to
SAM_Mollier
and optionallySAM_Psychrometrics
dotnet test
- π PsychroLib 2.5.0
- π IAPWS-IF97 Steam Tables
- π SAM_Mollier
- Validate humidity ratio (RH-based)
- Validate enthalpy
- Validate dew point, wet bulb
- Add Region 1β5 tests for
SAM_IAPWS
- Validate solar input with
SAM_SolarCalculator
- Shared test utilities & loader helpers
- Michal Dengusiak β Lead architect and domain expert
To install SAM from .exe just download and run latest installer otherwise rebuild using VS SAM
SAM is free software licenced under GNU Lesser General Public Licence - https://www.gnu.org/licenses/lgpl-3.0.html
Each contributor holds copyright over their respective contributions.
The project versioning (Git) records all such contribution source information.
See LICENSE and COPYRIGHT_HEADER.