0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

小学生の濃度の計算

Posted at

■ 問題①:濃度と全体質量から成分と水の質量を求める

  • 条件:濃度 $r %$、全体質量 $A$ [g]

  • 式:

    • 溶質(食塩など):

      $$
      s = \frac{r}{100} \times A
      $$

    • 溶媒(水など):

      $$
      w = A - s
      $$


■ 問題②:既存液を薄めるのに必要な水の質量

  • 条件:濃度 $p%$ の液体 $A$ g を、濃度 $r%$ にしたい

  • 式:

    • 成分量一定より:

      $$
      s = \frac{p}{100} \times A
      $$

    • 希釈後の全体量:

      $$
      A' = \frac{s}{r/100}
      $$

    • 加える水の質量:

      $$
      w = A' - A
      $$


■ 問題③:濃い溶液を薄める水の量

  • 条件:濃度 $p%$ の液体 $A$ g を、濃度 $r%$ に薄めたい

  • 式は上記②と同じ構造:

    $$
    s = \frac{p}{100} \times A,\quad A' = \frac{s}{r/100},\quad w = A' - A
    $$


■ 問題④:異なる濃度の溶液の混合後の濃度

  • 条件:

    • 濃度 $p_1%$、質量 $A_1$ の液体
    • 濃度 $p_2%$、質量 $A_2$ の液体
  • 式:

    $$
    s_1 = \frac{p_1}{100} \times A_1,\quad s_2 = \frac{p_2}{100} \times A_2
    $$

    $$
    \text{濃度} = \frac{s_1 + s_2}{A_1 + A_2} \times 100
    $$


■ 問題⑤:濃い液を水に加えて指定濃度にする(密度付き)

  • 条件:

    • 水 $W$ g、水は1g = 1cm³とする
    • 目標濃度 $r%$
    • 原液濃度 $p%$、体積換算係数 $d$ [cm³/g]
  • 式:

    • 原液質量 $x$ [g] を未知数とする:

      $$
      \frac{p x}{W + x} = r
      $$

      解いて:

      $$
      x = \frac{r W}{p - r}
      $$

    • 体積 $v$:

      $$
      v = x \times d
      $$


■ 問題⑥:ある溶液を指定濃度まで薄めるのに必要な水の体積

  • 条件:

    • 濃度 $p%$、体積 $V$ [L](または mL)
    • 密度 $\rho$ [g/mL]、目標濃度 $r%$
  • 式:

    • 成分量:

      $$
      s = \frac{p}{100} \times V \times \rho
      $$

    • 希釈後全体質量:

      $$
      M = \frac{s}{r/100}
      $$

    • 加える水の質量:

      $$
      w = M - V \times \rho
      $$

    • 水の体積:

      $$
      V_{\text{add}} = \frac{w}{\rho_{\text{water}}}
      $$

    (通常 $\rho_{\text{water}} = 1$)


# Program Name: dilution_mixing_solver.py
# Creation Date: 20250728
# Overview: General utility to solve dilution and mixing concentration problems
# Usage: Adjust the input values for each problem case and run to compute results

# 定数定義 / Define constants
# 問題①:濃度と全体質量から成分と水の質量を求める
r1 = 20         # 目標濃度 [%]
A1 = 150        # 全体質量 [g]

# 問題②:既存液体をうすめる
p2 = 20         # 元の濃度 [%]
r2 = 5          # 希釈後濃度 [%]
A2 = 100        # 元の液体質量 [g]

# 問題③:濃いアルコールをうすめる
p3 = 95
r3 = 50
A3 = 100

# 問題④:異なる濃度の液体を混ぜる
p4_1 = 20
A4_1 = 100
p4_2 = 8
A4_2 = 200

# 問題⑤:水にこい液体を加える
W5 = 125        # 水の質量 [g]
r5 = 10         # 希釈後の濃度 [%]
p5 = 35         # 原液の濃度 [%]
d5 = 0.85       # 原液の体積換算 [cm³/g]

# 問題⑥:溶液を薄めるための水の体積
p6 = 20
V6 = 1.0        # 元の液体体積 [L]
rho6 = 1.2      # 濃溶液の密度 [g/mL]
r6 = 5
rho_water = 1.0 # 水の密度 [g/mL]

# 関数定義 / Define functions

def compute_solute_water(r, A):
    s = (r / 100) * A              # 溶質量 / Solute mass
    w = A - s                      # 溶媒(水)量 / Solvent mass
    return s, w

def dilution_water(p, r, A):
    s = (p / 100) * A              # 成分量(不変) / Solute mass
    A_new = s / (r / 100)          # 希釈後の全体量 / New total mass
    w = A_new - A                  # 加える水の量 / Water to add
    return w

def mix_concentration(p1, A1, p2, A2):
    s1 = (p1 / 100) * A1
    s2 = (p2 / 100) * A2
    return (s1 + s2) / (A1 + A2) * 100  # 混合後濃度 [%]

def required_concentrate_volume(W, r, p, d):
    x = (r * W) / (p - r)          # 必要な濃縮液質量 [g]
    v = x * d                      # 必要な濃縮液体積 [cm³]
    return x, v

def required_water_volume(p, V, rho, r, rho_water=1.0):
    s = (p / 100) * V * rho        # 成分量 [g]
    M = s / (r / 100)              # 希釈後の質量 [g]
    w = M - V * rho                # 必要な水の質量 [g]
    V_add = w / rho_water          # 水の体積 [L]
    return V_add

# 計算 / Calculation
s1, w1 = compute_solute_water(r1, A1)
w2 = dilution_water(p2, r2, A2)
w3 = dilution_water(p3, r3, A3)
conc4 = mix_concentration(p4_1, A4_1, p4_2, A4_2)
x5, v5 = required_concentrate_volume(W5, r5, p5, d5)
v6 = required_water_volume(p6, V6, rho6, r6, rho_water)

# 出力 / Output
print(f"[Q1] Solute: {s1:.1f} g, Water: {w1:.1f} g")
print(f"[Q2] Water to add: {w2:.1f} g")
print(f"[Q3] Water to add: {w3:.1f} g")
print(f"[Q4] Final concentration: {conc4:.2f} %")
print(f"[Q5] Concentrate mass: {x5:.2f} g, Volume: {v5:.2f} cm³")
print(f"[Q6] Water to add: {v6:.2f} L")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?