JustAnswer > Programming
Ask A Question|Register|Login|Help
JustAnswer

Programming

Ask a Programming Question, Get an Answer ASAP!

Have your own Programming question?

4 Programmers are Online Now
characters left:
Not a Programming Question?
Bookmark and Share

Question

The temperature distribution in a thin metal plate with constant (or isothermal) temperatures on each side can be modeled by using a two dimensional grid.

Typically, the number of points in the grid is specified, as are the constant temperatures on the four sides. The temperatures of the interior point are usually initialized to zero, but they change according to the temperatures around them. Assume that the temperature of an interior point can be computed as the average of the four adjacent temperatures; the points shaded above represent the adjacent temperatures for the point labeled x in the grid. Each time the temperature of an interior point changes, the temperatures of the points adjacent to it change. These changes continue until a thermal equilibrium is achieved and all temperatures become constant.
1. Write a program to model this temperature distribution for a grid with six rows and eight columns.
a. Read in an initial temperat

Submitted: 182 days and 23 hours ago.
Category: Programming
Value: $22
Status: CLOSED
+
Read More

Optional Information

OS: Windows XP; Browser: IE

Already Tried:
I have tried opening the file but I keep recieving a program error which causes my computer to shut down but the program will compile

Posted by lifesaver 182 days and 23 hours ago.

Info Request

Hi XXXXXXXXX,
Which programming language are you using(C,C++,JAVA)

Also the question is incomplete i think?

182 days and 23 hours ago.

Reply

I am using just c. Here is the rest of the question:

a. Read in an initial temperature distribution from a file named initialtemps.txt. The format of the file is 6 rows of 8 numbers. Use one 2 dimensional array to store the temperatures.

b. Allow the user to modify the initial distribution, after it is read, by specifying new values for the points on the four sides of the grid (top, left, right, and bottom as shown above).

c. Compute the final temperature distribution by updating the temperatures at each point, moving across the rows until the temperature differences for all the updates are less than a tolerance value that the user is prompted to enter. When a point is updated, its new value should be used to update the next point. Print the final temperature distribution to the screen, with a descriptive header to include the number of iterations (updates of the entire grid) that were required to converge to the final distribution, in a 6 by 8 matrix format. Also, write the final distribution to a file named finaltemps.txt in the same matrix format, but with no other text, so that this file could be read back into the program if that was desired. Run this case for 3 values of tolerance that differ by at least one order of magnitude. Note the change in the number of iterations required for convergence as the tolerance values change and note these results in the header information documenting your program.

2. Modify the program from part 1 so that the updates are performed by marching down each column, one by one, instead of marching across each row.

3. Modify the program in part 1 so that two arrays are used and so that the program can perform the updates as if they all happen at the same time. Thus, all temperatures are updated using one set of array values. The two arrays are need so that all the old temperatures are available to compute the each new array. Compare the number of iterations required (for the same tolerance value) with the number required for convergence using the part 1 program, and note this comparison in the header documentation for part 3.

 

Posted by lifesaver 182 days and 23 hours ago.

Info Request

Well i think its a lot of work to be done.I will opt out so that other experts here may help..

182 days and 23 hours ago.

Reply

ok

Posted by Raj 182 days and 23 hours ago.

Info Request

Ok

Can you upload the txt file which is suppose to have the input.......
as well as you said you have the code which is getting compiled but gets terminated after getting an error can you also upload that file if possible

Use the following link to upload:
www.rapidshare.com

after uploading it will give an link please post that link here....

Edited by Raj on 5/23/2009 at 9:44 PM

182 days and 23 hours ago.

Reply

http://rapidshare.com/files/236479840/sar.c.html this is the link to my answer to part a number one this is the only one that is on my computer at home. The rest are at school. sorry.

Here is the txt file

http://rapidshare.com/files/236480294/initialtemps_1_.txt.html

Posted by Raj 182 days and 23 hours ago.

Info Request

Ok when do you need the code??

Ok tell me step by step what is to be done..........
If possible then like:

1st Program will read the initial values from file(i.e. 0)
Can you please tell me what are temperatures specified in 8 columns are for??
I got 4 temperatures are for (left plate,right plate,top plate and bottom plate but remaining 4 i didn't got that)(if something specific then please do specify that)
2nd It will ask for an tolerance value.
3rd will take user input for temperature

It will do even if thats not possible, but please don't forget to mention the day when you need this done.....

Edited by Raj on 5/23/2009 at 10:12 PM

182 days and 22 hours ago.

Reply

i need the code by ten o clock tonight. I have a copy of the entire question with a picture you can upload it at rapid share

http://rapidshare.com/files/236488538/ceg.doc.html

 

Posted by Raj 182 days and 22 hours ago.

Info Request

how much time is left for 10?
what time zone you are in?
If time left is less then 24 hrs. then thas not possible from my side...and i will opt out for some other expert..

182 days and 22 hours ago.

Reply

four hours

Posted by Raj 182 days and 22 hours ago.

Info Request

its no possible for me to do in 4 hrs. because it 4:08 am here
so i will opt out and let other expert help you with this....

182 days and 22 hours ago.

Reply

ok thank you so much for trying i'm not good at this stuff and he gave this to us today

Posted by Raj 182 days and 22 hours ago.

Info Request

i am really very sorry because it will take time to do this
if more time was assigned then i would have done this for you.....

182 days and 22 hours ago.

Reply

ok thanks

+
Read More

Related Programming Questions

  • How do I write a macro that saves a file with a variable nam...
  • how do i activate a stolen visa gift card
  • i want to look up every other sunday on excel...how do I do
  • Help with simple array process
  • I have a Sony Vaio Laptop model PCG-7Y2L operating on Window...
  • new to access....how do i replace in a form the latest date
  • i need help using blueJ. i have an assignment creeating a ma...
  • I have a worksheet with days of the week for each month goin...



Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Question List | Become an Expert | Terms of Service | Security & Privacy | About Us
© 2003-2009 JustAnswer Corp.