Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Molecular motions can be described by random walks 2) The state that nature chooses is based on maximizing entropy (and so minimizing Gibbs free

image text in transcribed

1) Molecular motions can be described by random walks 2) The state that nature chooses is based on maximizing entropy (and so minimizing Gibbs free energy) 3) Evaporation-condensation is an example of an equilibrium that forms at a Gibbs minimum. 4) Simulate in Matlab this random walk evaporation problem. Your simulation should allow molecules that can move to a nearby site to do so, prevent molecules that cannot move from doing so, and should allow a gravitational tendency to move down more often than up. Code outline follows: NumRows 25; NumCols = 25; FracFull 0.6; gravity 0; plotevery 100; TheReactor = zeros(NumRows,NumCols); TheReactor(round((1-FracFull)*NumRows)end,:)-1 figure(gcf) clf for ii 1:1000000 thepixel choose a pixel at random'); if (thepixel is occupied) if ii/plotevery-round(ii/plotevery) imshow(-TheReactor,'InitialMagnification',2000); en therandstep = (choose a random step in x and y'); ('deal with any random steps from thepixel are outside of the reactor"); ('determine whether the random step from thepixel is already occupied); (if it is NOT occupied the occupy it, and liberate thepixel location); end end 1) Molecular motions can be described by random walks 2) The state that nature chooses is based on maximizing entropy (and so minimizing Gibbs free energy) 3) Evaporation-condensation is an example of an equilibrium that forms at a Gibbs minimum. 4) Simulate in Matlab this random walk evaporation problem. Your simulation should allow molecules that can move to a nearby site to do so, prevent molecules that cannot move from doing so, and should allow a gravitational tendency to move down more often than up. Code outline follows: NumRows 25; NumCols = 25; FracFull 0.6; gravity 0; plotevery 100; TheReactor = zeros(NumRows,NumCols); TheReactor(round((1-FracFull)*NumRows)end,:)-1 figure(gcf) clf for ii 1:1000000 thepixel choose a pixel at random'); if (thepixel is occupied) if ii/plotevery-round(ii/plotevery) imshow(-TheReactor,'InitialMagnification',2000); en therandstep = (choose a random step in x and y'); ('deal with any random steps from thepixel are outside of the reactor"); ('determine whether the random step from thepixel is already occupied); (if it is NOT occupied the occupy it, and liberate thepixel location); end end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago