PMV/PPD, moist-air, and refrigerant Mollier-diagram tools deployed as a secure AWS serverless web application.
This repository is intended to grow into a collection of engineering calculation tools with a shared web interface and AWS platform.
- CloudFront is the public HTTPS endpoint and adds security headers.
- A private, versioned S3 bucket stores the static web application.
- CloudFront routes
/api/*to an API Gateway HTTP API. - Separate Python Lambda functions calculate PMV/PPD and moist-air properties.
- API requests are throttled and validated server-side.
- The moist-air page renders an h-x psychrometric chart as browser-native SVG.
- The Mollier page runs the official CoolProp 8.0.0 WebAssembly build locally in the browser and renders a refrigerant p-h diagram.
The stack deploys independently, so existing calculators can remain available during acceptance testing and migration.
template-deploy.yaml— canonical AWS SAM/CloudFormation templatefunctions/pmv/app.py— ISO 7730 Fanger PMV/PPD calculationfunctions/air/app.pyandapp_release.py— psychrometric calculations and release handlerweb-release/— canonical static sitetests_verified/— regression and validation testsscripts/deploy-production.ps1— AWS CLI packaging and deployment
python -m pip install -r requirements-dev.txt
python -m pytest -c pytest-verified.iniThe PMV tests include representative values captured from the legacy API. The moist-air tests cover standard conditions, reverse calculation, and invalid-input responses.
The browser chart ports the equations and oblique-coordinate transform from
iguchi-lab/psychrometric-chart.
The Mollier tool adapts iguchi-lab/mollier-diagram
and vendors the official MIT-licensed CoolProp 8.0.0 JavaScript/WASM binaries. The pinned
vendor files and license are stored under web-release/mollier/vendor/coolprop-8.0.0/.
Prerequisites:
- Authenticated AWS CLI
- An existing private S3 artifact bucket for Lambda deployment packages
./scripts/deploy-production.ps1 `
-StackName engineering-calculators `
-Region ap-northeast-1 `
-ArtifactBucket your-private-artifact-bucketThe script validates and packages the template, deploys the stack, uploads web-release/, invalidates CloudFront, and prints the HTTPS URL.
Deploy to a parallel stack first and complete acceptance testing before removing legacy resources.