"Computational solutions for the curious mind. Exploring the intersection of Python programming and rigorous science, featuring solved problems in NASA physics, chemistry, and beyond."
Friday, 20 March 2026
Applications of Elemental Properties
This code in python demonstrates how to calculate molecular weights, physical properties like mole fractions, partial pressure calculations using the mixture composition and application like making molar solutions and calculation of gas solubilities using Henry's law.
First of all, a dictionary of all elements and their atomic weights was created.
Then from the name and number of atoms present in the formula, molecular weights were calculated. These were stored in a dictionary to access them later on.
The code is profusely commented and explained using # and f-string. It is free to use and I hope it will be useful tonthe students of physical chemistry.
Now for the code
Author: My name is Ranjit Singh. I am retired from a petroleum company and a coding enthusiast. I am trying coding chemistry, physics and astronomy problems.
Subscribe to:
Post Comments (Atom)
Visualizing Particle Kinematics with Python
Understanding the relationship between position, velocity, and acceleration is fundamental to physics. However, seeing how these variables e...
-
The important source of aerosols in the stratosphere is the formation of carbonyl sulfide (COS) droplets. These droplets are more dangerou...
-
This code in python demonstrates how to calculate molecular weights, physical properties like mole fractions, partial pressure calculations ...
-
The code is based on finding volume, density and orbit radius of some dwarf planets. Further we tried to match these densities with one'...
No comments:
Post a Comment