Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Reflow Rotate Ler Typewriter Highlight From Blank Bookmark Image Annotation PDF File From Clipboard Sign sible Audio & Video View Comment Create Protect Links Insert
Reflow Rotate Ler Typewriter Highlight From Blank Bookmark Image Annotation PDF File From Clipboard Sign sible Audio & Video View Comment Create Protect Links Insert MA E 23 60 Num. Analysis and Prog. Lab Assignment 5 Oce2/3, 2018 2 Problem, 4 1501 Using the generated positions, calculate and print the total potential energy of the system An easily implemented (but not the most eflicient) way of calculating this energy is: where , is the potential energy of the particle. This quantity is calculated by considermg all of the potential interactions the sh particle has with every other particle: 1. Include comments in your code giving your name, the date, and a code description 2. Also include comments in your Output doc/x that give the corresponding problem number 3. Whenever printing a valuc to the screen, also print a statement defining the value and any units. Example: Do "the distance x is 23 meters"; Don't "23 Molecular dynamics is a computer simulation method for studying the physical movements of atoms and molecules. Write a C script that simulates N number of particles where N is input by the user. Define and use a structure containing the following varlables: whore dyj is the distance between the ith and jth particle and A, B, and C are constants. Use A-5, B-10, C-100 Approach: Iterate over each body (i). Within that loop, iterative over every other body G). Calculate the distance between i an (dj). Use that distance to ealeulate b Sum . positions (g) e velocities) all those for the 2th body to find '. Sum all those to find 111. e kinetic energy (T) * potential euergy () Note that each body has three positious, three velocities, a scalar kinetic energy, and a scalar potential energy Problem 1 [30 Assuming a cubic simulation volume of (100 x 100 x 100) with center at (0,0,0), randomly generate Boating numbers for the particle positions () Problem 2 35 Randomly gencrate particle velocities () where the velocity magnitude is constrained by Problem 3 (35) Using the generated velocitics, calculate and print the total kinetic energy of the system. Assuming the particles do not rotate, the total kinetic energy is given by: 4: 4 You may assume the particles are all of the same material and have a unit mass of 1. Reflow Rotate Ler Typewriter Highlight From Blank Bookmark Image Annotation PDF File From Clipboard Sign sible Audio & Video View Comment Create Protect Links Insert MA E 23 60 Num. Analysis and Prog. Lab Assignment 5 Oce2/3, 2018 2 Problem, 4 1501 Using the generated positions, calculate and print the total potential energy of the system An easily implemented (but not the most eflicient) way of calculating this energy is: where , is the potential energy of the particle. This quantity is calculated by considermg all of the potential interactions the sh particle has with every other particle: 1. Include comments in your code giving your name, the date, and a code description 2. Also include comments in your Output doc/x that give the corresponding problem number 3. Whenever printing a valuc to the screen, also print a statement defining the value and any units. Example: Do "the distance x is 23 meters"; Don't "23 Molecular dynamics is a computer simulation method for studying the physical movements of atoms and molecules. Write a C script that simulates N number of particles where N is input by the user. Define and use a structure containing the following varlables: whore dyj is the distance between the ith and jth particle and A, B, and C are constants. Use A-5, B-10, C-100 Approach: Iterate over each body (i). Within that loop, iterative over every other body G). Calculate the distance between i an (dj). Use that distance to ealeulate b Sum . positions (g) e velocities) all those for the 2th body to find '. Sum all those to find 111. e kinetic energy (T) * potential euergy () Note that each body has three positious, three velocities, a scalar kinetic energy, and a scalar potential energy Problem 1 [30 Assuming a cubic simulation volume of (100 x 100 x 100) with center at (0,0,0), randomly generate Boating numbers for the particle positions () Problem 2 35 Randomly gencrate particle velocities () where the velocity magnitude is constrained by Problem 3 (35) Using the generated velocitics, calculate and print the total kinetic energy of the system. Assuming the particles do not rotate, the total kinetic energy is given by: 4: 4 You may assume the particles are all of the same material and have a unit mass of 1
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