Question
C++, Putt, emacs Particle Size Distribution Simulation 1. Generate and analyze a Gaussian particle size distribution. (a) Use the Gaussian random number generator to generate
C++, Putt, emacs
Particle Size Distribution Simulation
1. Generate and analyze a Gaussian particle size distribution.
(a) Use the Gaussian random number generator to generate 100 particle diameters with a mean of 50 m and a standard deviation of 5 m. Store the generated particles sizes in a vector. Reject any unphysical sizes.
(b) Write a function to return the average particle size.
(c) Write a function to return the standard deviation of the particles sizes.
2. Create number frequency histogram of the distribution.
(a) Determine how many size ranges (bins) you will use for your histogram and what their widths will be.
(b) Create a vector to store the number of particles in a bin.
(c) Normalize the data by dividing the number of particles in each bin by the total number of particles to get the fraction of particles in each bin. Store these values in a vector.
(d) Normalize the particle fractions in each bin by dividing each fraction by the bin width. This is the normalized histogram.
3. Plot the normalized data as a histogram.
Please and Thank You
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started