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_Mollierand optionallySAM_Psychrometrics
dotnet test- 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.
