Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

Microscale Heat Transfer Project Assignment

The analytical approach to determining bulk properties of an ideal gas based on molecular data. One key aspect of the analytical models is the assumption of an infinite number of molecules. Therefore, the analytical approach breaks down at the nanoscale, so computational approaches are used instead. In this project you will get a brief glimpse of some of the computational approaches used to modeling ideal gases computationally using the Direct Simulation Monte Carlo (DSMC) method.

1. One of the important aspects of kinetic theory is sampling from a probability distribution function f(x), where x is the property that is distributed among the molecules. In order to accurately model a system of molecules, random positions, velocities, and energies must be assigned such that the resultant distribution of properties follows that prescribed by the theory.

a. The easiest way to do this is to integrate the probability distribution function -∞f(x)dx = 1 since 100% of all sampled values of x lie between -∞ and ∞. This allows you to develop a relation for f(x). Then, the cumulative distribution function is defined as F(x) = -∞xf(x) dx. Setting F(x) equal to a random number R in the range 0 ≤ R ≤ 1 allows for accurate sampling using a random number generator.

i. Show that using this technique, a randomly assigned value of x for a uniform distribution of x between a and b (no values of x outside of the range a ≤ x ≤ b) is: x = a + R(b - a) [hint: f(x) is constant in the range a ≤ x ≤ b].

ii. How would you randomly assign a value of x for the distribution f(x) = cx, where all values of x lie between a and b?

iii. Use MATLAB to show plots of the distributions for 10,000 samples of x for both (i) and (ii) for a = 3, b = 12. Create a normalized histogram with 30 bins and compare the results to the theoretical curves of f(x)dx, where dx is the width of the bins.

b. There are situations where the method in part (a) doesn't work mathematically. Therefore, the acceptance-rejection method is used.

i. Show that the method in part (a) for the x-velocity component in an equilibrium gas f(vx) = (β/π½)exp(-β2vx2) yields F(vx) = ½(1 + erf(βvx)), where erf is the Gaussian error function. This shows that you cannot solve directly for vx by setting F(vx) = R.

ii. The acceptance-rejection method is written as f^(x) = f(x)/fmax, where fmax is the maximum value of the distribution function. Determine f^(vx) for the distribution in (i).

iii. In this technique, a value of v^x is sampled using a uniform distribution between a = -3/β and b = 3/β. Write out the expression for sampling of v^x using the result from Part (a, i).

iv. The expression for v^x developed in (iii) replaces vx in the expression for f^(vx) in (ii)-write out the final expression for f^(vx) in terms of R.

v. For a given randomly determined value of f^(vx) using (iv), the value is accepted if f^(vx) > R2, where R2 is a second randomly generated number. Run MATLAB for 10,000 points with this technique to show that it obtains the appropriate distribution by comparing to the Maxwell x-velocity distribution. Use β = 1 and 30 bins for collection in your histogram.

2. In this project we are only focusing on a 1-d velocity distribution.

a. Starting with Eq. 2.36, show that (vx2)- = kBT/m.

b. If we assume that Eq. 2.62 is still valid for a 1-d distribution, then show that vrms,x = 1/2β.

c. Combine parts (a) and (b) to show that β = √(m/4kBT).

3. Our simplified 1-d DSMC simulation will test conduction between two plates at different temperatures. Consider a channel between two infinite parallel plates. The plate at x = 0 contains a temperature of Tc = 290 K, and the plate at x = L = 2 μm is at Th = 310 K. The spherical monatomic molecules have a diameter of d = 0.2 nm and a molar mass of M = 30 kg/kmol.

a. Initialize a set of 10,000 molecules with randomly-assigned positions in 0 ≤ x ≤ L.

b. Apply the acceptance-rejection method to randomly assign x-velocity vectors for each molecule using a temperature of Ti = 300 K.

c. Divide the domain into Ncell = 25 cells in the x-direction. The cells are of equal thickness Δx. So, the minimum x-value for cell i is (i - 1)Δx, and the maximum x-value is iΔx.

d. Use a "for" loop to do the following:

i. Advance the positions of the molecules using xnew = xold + vxΔt, where Δt = 0.2 ns.

ii. Check to see if the molecules hit a wall by seeing if xnew < 0 or xnew > L. If this happens, then scale the x-velocity of the particle using vnew = -vold√(Twall/Ti), where Twall equals either Tc(x = 0) or Th(x = L). Determine the new position of the molecules at the end of the time step by examining the pre- and post-collision portions of the timestep.

iii. Randomly determine if collisions occur in the channel. For Na molecules in the cell, then randomly select ∼Na/2 collision pairs using the FindPairs function provided. The probability that a collision occurs in a given pair is calculated using

P~ = (Na/Nr)(gΔt/√2Λr)

where Na is the number of molecules in the cell, Nr = ρrΔx, ρr = N/L, g = |vx,1 = vx,2|, and Λr = [√2πρr3d2]-1. A collision occurs if a random number R < P~. As a hint, use the floor command in MATLAB to help quickly identify which cell a molecule is in.

iv. If a collision occurs, then re-sample an x-velocity using the acceptance-rejection method to get a parameter vcoll. Use the temperature Ti in doing the sampling. The new x-velocities for molecules 1 and 2 are calculated using v1,new = vcm + vcoll, v2,new = vcm - vcoll , where vcm = ½(v1,old + v2,old).

e. Run the simulation for 1000 steps, calculating the average the number of molecules ?Na? in each bin. Plot this parameter versus the x-position of the center of the bins. Also, determine the percentage of molecule pairs that collide throughout the duration of the simulation. Physically explain any trend seen in the plot.

f. Repeat steps a-e for 1,000 molecules run for 10,000 steps. Comment on and explain any differences you see in the two sets of plots or collision percentage for the two cases.

g. Repeat step f for a molecular diameter of 2 nm. Comment on and explain any differences you see in the two sets of plots or collision percentage for the two cases.

Attachment:- Assignment Files.rar

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M92745144
  • Price:- $60

Guranteed 36 Hours Delivery, In Price:- $60

Have any Question?


Related Questions in MATLAB

Assignmentafter the success of your robo-advice venture you

Assignment After the success of your robo-advice venture you decide to explore alternative sources of profitability for your company. You realize that Australian investors are often forced to chose between expensive acti ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

Assignment details -need to write a code for connecting

Assignment Details - Need to write a code for connecting segments (Lines) a special case of TSP. The problem is to connect lines in 2d/ 3d space with path obstructions. Can you help me write the code for this? Hope you m ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As