calculate_ideal_gas
Calculate the missing variable in the ideal gas law PV=nRT by providing three of the four parameters: pressure, volume, moles, or temperature.
Instructions
Solve PV=nRT. Provide any 3 of: pressure_pa, volume_m3, moles, temperature_k. R=8.314. Returns: {error}. See list_bundles for related 'science' calculators.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pressure_pa | No | Pressure in Pa | |
| volume_m3 | No | Volume in m³ | |
| moles | No | Amount in mol | |
| temperature_k | No | Temperature in K |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Computed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools). | |
| formula | No | Human-readable formula or method used (e.g. "I=P·r·t", "Magnus formula"). | |
| source | No | Authoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21"). | |
| reference_url | No | Link to a calcul2 page documenting the calculation in detail. |