I'm trying to figure out how to plot the stability of 4 minerals — $\ce{CaCO3}$, $\ce{CaSO4}$, $\ce{CaMg(CO3)2}$, and $\ce{CaMg3(CO3)4}$ — with axes of $\mathrm{ln}\,a_{\ce{Mg^{+2}}}$ vs $\mathrm{ln}\,a_{\ce{SO_4^{-2}}}$ where $\mathrm{ln}\,a$ is the natural log of the activities of each ionic species. The activity of carbonate is a given.
I found solubility $K$ for each dissolution, based on the Gibbs free energy, $R$, and $T = 25^\circ \mathrm{C}$, then tried to set up equations to plot the following:
- $\mathrm{ln}\,K_{\ce{sp,\,CaCO3}} = \mathrm{ln}\,a_{\ce{Ca}} + \mathrm{ln}\,a_{\ce{CO_3}}$
- $\mathrm{ln}\,K_{\ce{sp,\,CaSO4}} = \mathrm{ln}\,a_{\ce{Ca}} + \mathrm{ln}\,a_{\ce{SO_4}}$
- $\mathrm{ln}\,K_{\ce{sp,\,CaMg(CO_3)_2}} = \mathrm{ln}\,a_{\ce{Ca}} + \mathrm{ln}\,a_{\ce{Mg}} + 2\,\mathrm{ln}\,a_{\ce{CO_3}}$
- $\mathrm{ln}\,K_{\ce{sp,\,CaMg_3(CO_3)_4}} = \mathrm{ln}\,a_{\ce{Ca}} + 3\,\mathrm{ln}\,a_{\ce{Mg}} + 4\,\mathrm{ln}\,a_{\ce{CO_3}}$
Based on the thermo data each $\mathrm{ln}\,K$ is a constant (since $T$, $P$ are constant), since the activity of carbonate is given it seems like I should be able to solve equation 1 for the activity of calcium, but then each equation is a point not a line.
I'm confused as to how each of the equations is dependent on $\ce{SO_4}$ at all (which is supposed to be my y axis), and how to relate everything. I tried to treat activity $\ce{Ca}$ as variable, then solve for it in terms of activity $\ce{SO_4}$, to then make equations 3, 4 dependent on $\ce{SO_4}$, and $\ce{Mg}$, but then I had no idea how to treat equations 1 and 2. Also the values I got for that were really big, the lines were on $y=35+3x$ and $y=18+x$.
This question is based on a question for a textbook, which I'm trying to use to study for an upcoming exam (1 week), so any help would be greatly appreciated.