Density theory, Chemistry

Assignment Help:

The assignment is basically concerned with the writing of a number of functions which can implement the density theory described above. These functions will then be called by a program which will load data ?les containing the composition of a number of natural waters and make some plots comparing them. The organization of the functions is up to you, but one way of doing this is to have

  • assign2.m containing the "driver" code which reads water composition data and makes plots
  • density.m containing the function density, and subfunctions appmolalvol, and istrength. This will compute the density for a given chemical composition, with the subfunctions computing the apparent molal volume for a particular ion, and the ionic strength of the solution.
  • salinity.m containing the function salinity which will compute the salinity of a given composition.
  • loadcomp.m containing the function loadcomp which will load data in a given ?lename, and return a row vector containing the different molalities mi, as well as the salinities (I suggest the use of structures to keep all information for a particular composition together).

Some other hints are:

  • Since there are 7 different ions, you could use a different variable name for each in your code. However, it is more ef?cient to store their data in row vectors, where each column represents data for a particular ion.
  • Avoid "hard-wiring" numbers (like those in Table 1) into your code more than once. Keep the (?xed) data for molar masses, ionic charges, and so on in row vectors, or in some form of data structure. This makes it much easier to modify your data to take into account changes in the molar masses, number of ions in the compositions, or other factors. Also, it is sometimes helpful to write another function, say myconstants, whose sole purpose is to provide this data structure to any function that needs this information.
  • Above all, resist the tendency to start writing code BEFORE you REALLY understand WHAT you have to code. IN PARTICULAR, use pencil and paper to specify the INPUTS and OUTPUTs of all functions, andspecifyWHERE (in what functions) the different kinds of information in Table 1 is required.

Related Discussions:- Density theory

Describe about halide minerals, Q. Describe about Halide Minerals? High...

Q. Describe about Halide Minerals? Highly electropositive alkali and alkaline earth metals tend to form halide salts, which being soluble in water are washed away into the ocea

Hydrogen peroxide, Hydrogen Peroxide Hydrogen peroxide is the other im...

Hydrogen Peroxide Hydrogen peroxide is the other important hydride of oxygen. The oldest method of its preparation is by the action of dilute sulphuric acid on barium peroxide

Describe the scope of emission spectrometric methods, Problem 1: Descri...

Problem 1: Describe TDM and mention its clinical significance in clinical practice. Definition of TDM Show the importance of TDM and its clinical significance in clini

Gabriel phthalimide synthesis - nitrogen containing compound, Gabriel phtha...

Gabriel phthalimide synthesis: This method includes the subsequent three steps. 1. Phthalimide is reacted along with KOH to form potassium phthalimide. 2. The potassium salt

Explain cesium fluoride, Explain cesium fluoride Compound (2), cesium f...

Explain cesium fluoride Compound (2), cesium fluoride, would be most likely to exist as an ionic species, due to Cs and F come from opposite corners of the periodic table.

Orbital angular momentum for a d-electron, Orbital angular momentum for a d...

Orbital angular momentum for a d-electron is: (1) 6h/ 2Π             (2) √6/ 2 Π (3) 12 h/ 2Π (4)  √12h/ 2Π Ans:  √6/ 2 Π

Number of electrons with the neon atom, Which of the following atoms and io...

Which of the following atoms and ions are isoelectronic i.e. have the same number of electrons with the neon atom: (1) F -                      (2) Oxygen atom         (

Acetylene tetrachloride (westron), Acetylene tetrachloride (Westron), CHCl ...

Acetylene tetrachloride (Westron), CHCl 2 ·CHCl 2 It is as well called as sym. tetrachloroethane. It is made by the action of chlorine on acetylene in existence of a catalyst

In neutral atom, In neutral atom, which particles are equivalent: (1) P...

In neutral atom, which particles are equivalent: (1) P + e +                               (2 ) e - e +                (3) e -, P +                              (

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd