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

Reaction of nickel cadmium storage cell charging and, Reaction of nickel ca...

Reaction of nickel cadmium storage cell charging #Minimum 100 words accepted#

Preparation of dimethylbutan, Preparation of dimethylbutan: Procedur...

Preparation of dimethylbutan: Procedure: Prepare a mixture of 3,3-dimethylbutan-2-one (trivial name pinacolone; 20.0 g, 0.200 moles), redistilled benzaldehyde (24.0 g,

Co2 is isostructural with, Co2 is isostructural with: (1) SnCl 2       ...

Co2 is isostructural with: (1) SnCl 2                             (2) So 2      (3 ) HgCl 2                              (4) All the above ans: HgCl 2

Explain the post-harvest handling of fresh produce, Post-harvest handling o...

Post-harvest handling of fresh produce Fruits and vegetables because of their high moisture content are extremely susceptible to deteriorate, especially under tropical c

Lubricant., Explain the mechanism of fluid film or hydrodynamic lubrication...

Explain the mechanism of fluid film or hydrodynamic lubrication.

Organic chemistry, how much glucose C6H12O6 you need to start with to prepa...

how much glucose C6H12O6 you need to start with to prepare 4.6 times 10 to power 4 Kg of C2H5OH if the yield in the reaction is %64.5 C6H12O6+3O2= 4CO2+C2H5oh+3H2O

What do you understand by marine biodiversity, Question : (i) What do ...

Question : (i) What do you understand by marine biodiversity? (ii) Give full nomenclature (common and scientific names) for species from marine fauna and species from mari

Explain about chemistry and matter, Q. Explain about Chemistry and Matter? ...

Q. Explain about Chemistry and Matter? Chemistry is the study of matter as well as the changes that it undergoes. Matter is anything which has mass and takes up space. Mas

Molarity , sulphuric acid can be made with concentration of 99%. However fo...

sulphuric acid can be made with concentration of 99%. However for different industrial process different concentration are used. For a specific industrial requirement, 62% H2SO4 is

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