SarthakKeshari / calc_for_everything

This repository aims to provide Calculators for educational, professional, scientific, health and well-being and other purposes.
https://calc-for-everything-psi.vercel.app
MIT License
113 stars 103 forks source link

Molarity Calculator #500

Open Vedansh-Keshari opened 10 months ago

Vedansh-Keshari commented 10 months ago

Enter calculator name -

Molarity Calculator

Describe calculator functionality -

The Molarity Calculator as the name suggests takes the number of moles and the volume of the solution as input and gives the Molarity of the given solution as output. The inputs and outputs are inter-connected, if the user tries to change one of them, the other two values maintain the correct dependency and change along with it. In case you face a problem in calculating the number of Moles, you can simply refer to the Moles Calculator in the repository.

Under which category you wish to place it -

IshaanShettigar commented 10 months ago

I'd like to work on this

SarthakKeshari commented 10 months ago

Hey @IshaanShettigar, Assigned.

You may contribute your code under the folder path -

calc_for_everything\calculators\src\chemistry\molarityCalc

Issue completion deadline - 30th Oct 9:00:00 am IST

NOTE - In case the issue completion deadline is not met, the issue will be assigned to a new participant

SarthakKeshari commented 10 months ago

I apologize for the delay in my response, and I appreciate your understanding.

IshaanShettigar commented 10 months ago

@Vedansh-Keshari Can you provide a bit more clarity on the input and output of this calculator. I am aware of the basic Molarity formula Molarity (M) = moles of solute (mol) / liters of solution (L). You have mentioned "calculating the number of moles",isn't that the input that the user will give? Please clarify with an example of input output Thanks

Vedansh-Keshari commented 10 months ago

@IshaanShettigar If any user comes across a problem mentioning the mass of the substance and the molecular weight , but not the moles directly , then our Molarity Calculator should first use the formula Moles (n) = mass of substance / molecular weight of that substance . Just in case you want to get a clear understanding of how to calculate moles, you can check the Moles Calculator in the repository.

For example : Let's say you have 16 grams of Oxygen dissolved in 2 litres of water. Finding the Molarity of Oxygen here will be as follows.

mass of substance (m) = 16g Molecular Weight (W) = 32g/mol number of Moles of substance (n) = m / W = 16 / 32 = 0.5 mole

Volume of Solution (V) = 2 lt Molarity = n / V = 0.5 / 2 = 0.25 molar

So the output will be 0.25 M as per the Calculator.

SarthakKeshari commented 9 months ago

@IshaanShettigar, Since the issue completion deadline is crossed, Issue has been unassigned.

Kindly do not create a PR for the issue now.