mol
気体の状態方程式 \(pV = nRT\)
p:圧力 [hPa] V:体積 [L] n:モル数 [mol] R:モル気体定数 \(8.31 * 10**3) [Pa・L/(mol・K)] T:絶対温度 [K]
<p><label>気圧 :</label><input type="Input" id="pressure" value="1013"><label> [hPa]</label></p>
<p><label>体積 :</label><input type="Input" id="volume" value="1"><label> [L]</label></p>
<p><label>モル気体定数:</label><input type="Input" id="factor" value="8.31"><label> x10<sup>3</sup> [Pa・L/(mol・K)]</label></p>
<p><label>温度 :</label><input type="Input" id="temperature" value="25"><label> [℃]</label></p>
<button onclick="buttonclick()">Click</button>
<p><span id="mol"></span> mol</p>
<script>
function buttonclick(){
let pressure = Number(document.getElementById("pressure").value)*100;
let volume = Number(document.getElementById("volume").value);
let factor = Number(document.getElementById("factor").value)*10**3;
let temperature = Number(document.getElementById("temperature").value) + 273.15;
let mol = document.getElementById("mol");
let pV = pressure * volume;
let RT = factor * temperature;
let n = pV/RT;
mol.innerHTML = n;
}
</script>
コメント