Skip to content

Validation framework for SAM modules using standard psychrometric and thermodynamic references (e.g. PsychroLib, IAPWS-IF97).

License

Notifications You must be signed in to change notification settings

HoareLea/SAM_Validation

Repository files navigation

SAM_Validation

SAM_Validation is a repository containing validation tests for various SAM toolkits. Welcome and let's make the opensource journey continue. 🀝

SAM_Validation

πŸ§ͺ 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.


βœ… Purpose

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)

πŸ“ Structure

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.

πŸ“˜ Getting Started

➑️ 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.


πŸ§ͺ Current Test Coverage

βœ… SAM_Mollier/Test/HumidityRatioTests.cs

Validates:

  • HumidityRatio.HumidityRatio(...) against PsychroLib 2.5.0
  • Tolerance: Β±0.0005 kg/kg

More tests to come:

  • Enthalpy
  • Dew point
  • Wet bulb

πŸ”§ Run the Tests Locally

Ensure you have:

  • .NET SDK 7.0
  • References to SAM_Mollier and optionally SAM_Psychrometrics
dotnet test

πŸ“š References


πŸ›  Roadmap

  • 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

πŸ‘₯ Maintainers

  • Michal Dengusiak – Lead architect and domain expert

Resources

Installing

To install SAM from .exe just download and run latest installer otherwise rebuild using VS SAM

Licence

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.

About

Validation framework for SAM modules using standard psychrometric and thermodynamic references (e.g. PsychroLib, IAPWS-IF97).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages