Public script
PtC Ink Formulation RDE
Doctoral Researcher
Description
Catalyst ink formulation for Pt/C catalysts for RDE measurements, with fixed solid concentration.
This public script can be saved to your dashboard or opened in GetHug to run and modify. Its raw server storage path is not exposed.
Show Code Preview
# Import necessary libraries
import sys
# Known constants
NAFION_DENSITY = 0.878 # g/mL for 5 wt% Nafion solution
units = {}
units["NAFION_DENSITY"] = "g/mL"
GEOMETRIC_SURFACE_AREA = 0.196 # cm^2
units["GEOMETRIC_SURFACE_AREA"] = "cm^2"
pt_mass_per_cm2 = 30
ipa_to_diw_ratio = 2
ionomer_to_carbon_ratio = 0.3
catalyst_concentration = 1.5
# Input values
try:
catalyst_mass = float(input("Enter the amount of catalyst powder used (mg): "))
units["catalyst_mass"] = "mg"
pt_weight_percent = float(input("Enter the weight percent of Pt in the catalyst powder (wt%): "))
units["pt_weight_percent"] = "wt%"
except ValueError as e:
print(f"Invalid input: {e}")
sys.exit(1)
# Calculations
# 1. Total ink volume
total_ink_volume = catalyst_mass / catalyst_concentration # mL
units["total_ink_volume"] = "mL"
# 2. Ionomer content
carbon_mass = catalyst_mass * (1 - pt_weight_percent / 100) # mg
units["carbon_mass"] = "mg"
ionomer_mass = carbon_mass * ionomer_to_carbon_ratio # mg
units["ionomer_mass"] = "mg"
nafion_solution_mass = ionomer_mass / 0.05 # mg
units["nafion_solution_mass"] = "mg"
nafion_solution_volume = nafion_solution_mass / NAFION_DENSITY # μL
units["nafion_solution_volume"] = "μL"
# 3. Volume of water and IPA needed
remaining_volume = total_ink_volume * 1000 - nafion_solution_volume # μL
units["remaining_volume"] = "μL"
# 4. Calculate IPA and DIW volumes
ipa_volume = remaining_volume * ipa_to_diw_ratio / (1 + ipa_to_diw_ratio) # μL
units["ipa_volume"] = "μL"
diw_volume = remaining_volume - ipa_volume # μL
units["diw_volume"] = "μL"
# 5. Pt concentration in ink
pt_mass_total = catalyst_mass * (pt_weight_percent / 100) # mg
units["pt_mass_total"] = "mg"
pt_concentration_in_ink = pt_mass_total * 1000 / (total_ink_volume * 1000) # μg/μL
units["pt_concentration_in_ink"] = "μg/μL"
# 6. Ink volume needed for deposition
pt_mass_on_disk = pt_mass_per_cm2 * GEOMETRIC_SURFACE_AREA # μg
units["pt_mass_on_disk"] = "μg"
ink_volume_for_deposition = pt_mass_on_disk / pt_concentration_in_ink # μL
units["ink_volume_for_deposition"] = "μL"
# Outputs
print("=== Results ===")
print(f"IPA volume: {ipa_volume:.2f} μL")
print(f"DIW volume: {diw_volume:.2f} μL")
print(f"Sum of IPA and DIW volume: {remaining_volume:.2f} μL")
print(f"Volume of Nafion solution needed: {nafion_solution_volume:.2f} μL")
print(f"Volume of ink to be deposited on disk: {ink_volume_for_deposition:.2f} μL")
# Variable summary
print("=== Variable Summary ===")
for k, v in units.items():
try:
if not isinstance(eval(k), (list, dict, set)):
print(f" {k} = {eval(k)} [{v}]")
except:
pass