Part 1- Simulation This part is worth 10 points In this assignment, you will be
ID: 3701527 • Letter: P
Question
Part 1- Simulation This part is worth 10 points In this assignment, you will be simulating diffusion 2 dimensions. Imagine that you have a pipette (an eye dropper) and a beaker. The eye dropper has a coloured fluid in it, and the beaker has a transparent fluid. We're going to simulate the diffusion of the coloured fluid in the transparent fluid from the top of the beaker (in 2 dimensions) We're going to simulate diffusion using a method known as a random walk. We're going to move atoms of our coloured fluid a random amount in the z direction and a random amount in the y direction N times for N total units of time Experiment 1. Ask the user for inputs: o The number of time units to simulate oThe number of atoms we should simulate o The radius of the beaker coordinates), which is at exactly the center of the beaker (at the origin, 0, 0). of the radius of the beaker. If an aton has, move it 10% closer to the origin (ie., make the vector 90% as big as it was before 2. Create a 2-d array of x, y coordinates that represent the position of our atoms in the fluid. Initially, all atoms are in the same spot in the fluid (they all have the same z and y 3. For each unit of time, add a random amount to the z coordinate and a random amount to the y coordinate. After adding the random amount, check if any atoms have gone outsideExplanation / Answer
#I have assumed all the atoms will move simultaneously and together. Let me know if every atom has to move seperately.
Output:-
Enter number of time units to simulate: 2
Enter number of atoms to simulate: 3
Enter the radius of the beaker: 50
79.56 165.06
79.56 165.06
79.56 165.06
#Please do leave an upvote so that other students with similar doubts can benefit from this