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
Steam Distillation - Purification of Organic Compounds This technique is applicable for the separation and purification of those organic compounds that are solids or liquids wh

Q. Name the Oxide Minerals? These minerals consist of oxides of metals, which are formed either by oxidation of sulphide minerals or by direct oxidation of metals. Highly elect

why He and H cannot liqueified by linde''s method

K c is the equilibrium constants when the concentrations are expressed in moles/litre K c = Product of concentrate ions of products / product of concentrate ions of reactants

In the cases that we carried out in lectures we assumed that, in scaling up: If the TIP Speed was constant then (Note: Because D a and D t are constructed at a fixed ratio we

how can i make best assignment on unit cell topic?

Edible colours - Chemicals in food Edible colours employed for food are mainly dyes. The make use of food dyes is specifically wide spread. They are utilized to colour everythi

i want all the information of all the periods from 13th to 18th present in p block element

law of crystallography

The number of neutron in tritium is : (1) 1        (2) 2        (4) 3        (4) 0 Ans: 2