Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Projecting distance for Unit Vector

Status
Not open for further replies.

andykol

Programmer
Jul 31, 2009
3
GB
Hello,
I am calculating Unit vector for non orthogonal Cartesian grid. To calculate Unit Vector I need to project eg. y and x distance of east face of cell on i and j axis resp. I am using following formula-
Unit vector= Ue
Surface area= Se=sqrt(dx2+dy2)

Ue=(dy/se)i-(dx/se)j

Can anybody please tell me how I can calculate projection in Fortran?
 
andy,

sorry, I do not understand your problem.

You have x and y to be the coordinates in your non-orthogonal system with i,j axis.

Then x and y are the projections of your vector on these axis. And you have your unit vector as given in your formula.

Or could you post just a small sketch of what you are after ?

Norbert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top