Solve Coding Problem with Efficient Wide Boiling Program - Get Help Now!

  • Thread starter Thread starter chammakh24
  • Start date Start date
  • Tags Tags
    Coding
AI Thread Summary
The discussion centers around issues with a Fortran program designed for calculations related to boiling. The primary problem identified is that the variable 'j' does not increment beyond 1, preventing the program from calculating new temperatures as intended. A suggestion is made to move the initialization of 'j' to before the loop labeled '100 CONTINUE' to allow for proper incrementing. This adjustment aims to ensure that the program can progress through its iterations correctly and perform the necessary calculations. The conversation highlights the need for proper variable management within loops to achieve the desired functionality in the code.
chammakh24
Messages
2
Reaction score
0
please i need help in this code

program wide_boiling
implicit none
integer :: i, j, m
real :: Trosee, Tbulle, P, RR(100), vf(100),
real :: aT1(3), aT6(3), ap1(3), z(3), ap2(3)
real ::, x(3), T, k(3,10)
m=0
T=518.67
m=m+1
do i = 1,3
k(i,m) = (aT1(i)/(T(m)**2))+(aP1(i)*log(P))+aT6(i)+(aP2(i)/P**2)
k(i,m) = exp(k(i,m))
write(6,*) ¢k(i,m) = ¢,¢ ¢,k(i,m),¢ ¢,¢ i = ¢,¢ ¢,i,' ¢,¢m = ¢,¢ ¢,m
end do
100 continue
j=0
vf =0.25
j=j+1
RR(j) = 0
do i = 1,3
RR(j) = RR(j)+(k(i,j)-1)*z(i)/(1+(k(i,j)-1)*vf(j))
end do
write(6,*) ?RR(j)=?,RR(j),? ?,?j=?,j
if(abs(RR(j)).LE.5E-3) then
do i = 1,3
x(i) = z(i)/(1+(k(i,j)-1)*vf(j))
end do
write(6,*) ?x(i)= ?,x(i),? ?,?i = ?,i,? ?,? j = ?,j
else
dRR(j) = 0
do i = 1,3
dRR(j)=dRR(j)+(z(i)*((k(i,m)-1)**2))/((z(i)*((k(i,m)-1)**2))/(1+(k(i,m)*vf(j)))**2)
end do
write(6,*) ?dRR(j)=?,dRR(j),? ?,?j=?,j
vf(j)=vf(j)-(RR(j)/dRR(j))
write(6,*) ?vf(j)=?,vf(j),? ?,?j=?,j
go to 100
end if
end program wide_boiling
 
Technology news on Phys.org


chammakh24 said:
please i need help in this code

program wide_boiling
implicit none
integer :: i, j, m
real :: Trosee, Tbulle, P, RR(100), vf(100),
real :: aT1(3), aT6(3), ap1(3), z(3), ap2(3)
real ::, x(3), T, k(3,10)
m=0
T=518.67
m=m+1
do i = 1,3
k(i,m) = (aT1(i)/(T(m)**2))+(aP1(i)*log(P))+aT6(i)+(aP2(i)/P**2)
k(i,m) = exp(k(i,m))
write(6,*) ¢k(i,m) = ¢,¢ ¢,k(i,m),¢ ¢,¢ i = ¢,¢ ¢,i,' ¢,¢m = ¢,¢ ¢,m
end do
100 continue
j=0
vf =0.25
j=j+1
RR(j) = 0
do i = 1,3
RR(j) = RR(j)+(k(i,j)-1)*z(i)/(1+(k(i,j)-1)*vf(j))
end do
write(6,*) ?RR(j)=?,RR(j),? ?,?j=?,j
if(abs(RR(j)).LE.5E-3) then
do i = 1,3
x(i) = z(i)/(1+(k(i,j)-1)*vf(j))
end do
write(6,*) ?x(i)= ?,x(i),? ?,?i = ?,i,? ?,? j = ?,j
else
dRR(j) = 0
do i = 1,3
dRR(j)=dRR(j)+(z(i)*((k(i,m)-1)**2))/((z(i)*((k(i,m)-1)**2))/(1+(k(i,m)*vf(j)))**2)
end do
write(6,*) ?dRR(j)=?,dRR(j),? ?,?j=?,j
vf(j)=vf(j)-(RR(j)/dRR(j))
write(6,*) ?vf(j)=?,vf(j),? ?,?j=?,j
go to 100
end if
end program wide_boiling

That's a pretty vague question. What's wrong?
 


the prb is that when the programe do the go to 100 he dosen't incr again i don't know way
he should calcul the new tempretaure but he dosent
 


The way your program is structured, j never exceeds 1. I suggest placing the statement j = 0 before 100 CONTINUE.
 
Moderator's note: this discussion has been moved to its own thread.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top