
[Sponsors] 
September 26, 2007, 09:36 
Equation Problem

#1 
Guest
Posts: n/a

Hi I am having the data which containing x,y,z coordinates for different i,j,k. My problem is i want to find the distance between two points and find the total distance along one direction(i or j or z direction).
for example i am adding all the values of "i" and store it in "a" a=0 do i=1,50 a=a+i enddo Now "a" will have the total value of all "i" Like above example i written a equation for calculating total distance. In my case V1=x,V2=y,V3=z {distance}=SQRT((V1(i+1,j,k)V1(i,j,k))**2+(V2(i+1,j,k)V2(i,j,k))**2+V3(i+1,j,k)V3(i,j,k))**2) But it not working well. Can you help me to sort it out ? Velan 

September 26, 2007, 16:30 
Re: Equation Problem

#2 
Guest
Posts: n/a

I take it you are approximating arc length in i, j or k directions. Your expression lacks a left parenthesis before the V3(i+1,j,k) term, but other than that, everything looks okay. Why do you say it is not working well?


September 27, 2007, 07:54 
Re: Equation Problem

#3 
Guest
Posts: n/a

can you please check the below link(Zoom it for clear vision)
http://homepages.iitb.ac.in/~vadivel...nlineskel.jpg Above figure shows my geomety, where i and k are constants, and j varying from "a" to "e". http://homepages.iitb.ac.in/~vadivel...ineztemp.jpg Above figure shows the plot between zaxis VS temperature. Then i added the equation {distance}=SQRT((V1(i,j+1,k)V1(i,j,k))**2+(V2(i,j+1,k)V2(i,j,k))**2+(V3(i,j+1,k)V3(i,j,k))**2) http://homepages.iitb.ac.in/~vadivel...tancetemp.jpg Above figure shows the plot between distance VS temperature. In this figure line should come almost straight. But here its coming strange. I not able to figure it out where the problem is ? Thanks Velan 

September 27, 2007, 12:32 
Re: Equation Problem

#4 
Guest
Posts: n/a

Sorry, but I am unable to view those jpg files. My browser reports some "Invalid Gateway" error. Could be some firewall/security related issue. Perhaps someone else would be able to view your files and help.


September 27, 2007, 13:36 
Re: Equation Problem

#5 
Guest
Posts: n/a

Hi Himansu, Due to some technical reason, today our homepage server was down. It will be bootup soon. I will intimate you after boot or i will try someother way(can you give me ur mail id. I will send that picture)
Thanks Velan 

September 27, 2007, 17:10 
Re: Equation Problem

#6 
Guest
Posts: n/a

I will try your links again tomorrow. I prefer not to use email, thanks.


September 27, 2007, 22:25 
Re: Equation Problem

#7 
Guest
Posts: n/a

Hi Its working now. Can you please check it !


September 27, 2007, 22:26 
Re: Equation Problem

#8 
Guest
Posts: n/a

Hi I am sorry still its not working


October 1, 2007, 11:39 
Re: Equation Problem

#9 
Guest
Posts: n/a

okay, I can see the jpg files now, the server appears to be up now. You are probably just missing the "accumulator" variable 'a' that you mentioned in your first post. Your equation should be
distance = 0 do j = 1, jmax1 dssq = (x(j+1)x(j))**2 + (y(j+1)y(j))**2 + (z(j+1)z(j))**2 distance = distance + SQRT(dssq) end do From your second jpg plot, the distance should vary from 0 to at least 0.3, whereas your final jpg plot (of T2 vs distance) shows T2 in the right range, but distance ranging only from 0 to about 0.015 (which is more the order of magnitude of the increments in arc length than their sum), and T2 appears a multivalued function of "distance", which leads to my diagnosis of probable cause. 

October 1, 2007, 21:32 
Re: Equation Problem

#10 
Guest
Posts: n/a

Yes, you are correct. But how can i write equation for that formula in tecplot. I though earlier about the accumulator. But i dont know how to write it in tecplot.


October 2, 2007, 17:14 
Re: Equation Problem

#11 
Guest
Posts: n/a

Quite difficult to do in Tecplot. If it can be done at all in Tecplot, it would be using a macro with a loop and loopdependent equation LHS range specification and equation RHS loopdependent valueblanking. Would also be computationally highly inefficient. It is intimidating even thinking about it. Why not write the data out to a file, add a new distance variable using simple Fortran loops, and read it back in to Tecplot for display?


October 2, 2007, 17:20 
Re: Equation Problem

#12 
Guest
Posts: n/a

Alternatively, Tecplot will allow you to "Extract Data" along a polyline. You could extract along a polyline that approximates the line you have in mind, and specify that Tecplot include a "distance" variable when extracting the data into a line zone. This option pops up in a dialog box when you extract data.


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problem with Poisson equation with Neumann BC  Jeff67  Main CFD Forum  0  March 27, 2011 11:23 
Solve single but higher order equation by OF 1.6 suffering Problem  alundilong  OpenFOAM Programming & Development  0  December 23, 2010 14:53 
Assistance with oneway wave equation  Frank  Main CFD Forum  5  March 14, 2007 11:56 
Problem with momentum equation  Francisco  Main CFD Forum  4  August 5, 2004 20:04 
Energy equation convergence problem  Reza  Main CFD Forum  0  August 27, 2003 13:09 