Density theory, Chemistry

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.
Posted Date: 3/15/2013 5:35:36 AM | Location : United States







Related Discussions:- Density theory, Assignment Help, Ask Question on Density theory, Get Answer, Expert's Help, Density theory Discussions

Write discussion on Density theory
Your posts are moderated
Related Questions
If change in energy (ΔE) = 3x 10 -8 j, h= 6.64x 10 -34 j-s  and c= 3x 10 8 m/s  then wavelength of the light is: (1) 6.36x 10 3 Å                 (2) 6.36x 10 5 Å

Relative strength of the bases (Basic nature of -NH2) The dissimilarity in base strength in several amines can be described on the basis of inductive effect. The +I effect incr

Uses of Dihydric alcohols (a) Dihydric alcohols are used as antifreeze in car radiators. (b) Dihydric alcohols is used in the manufacture of dacron, dioxane etc. (c) Dihy

Describe Conformation energy profile -Ethane   Conformation energy profile for ethane


Are there any other palatable inorganic acids other than phosphoric acid? I need it because I on a research for finding food replacing plants ---- us becoming autotrophs. I am on t

Mustard Although the primary use of mustard seeds is a condiments, important new food applications are regularly being found. Commercially available mustard products include m

Which has highest second ionisation energy? Electronic config of Na(+) is noble gas config. . so its very difficult to remove an electron so it will have very high 2nd ionisati

Calculation of Number of Atoms per Unit Cell of HCP (n):  One half of the each of the 2 base centre atoms (2x1/2), one six of the every of the 12 corner atoms (12x1/6) and all

about occurence,properties of the following metal copper.gold,mercury