creating a 2D physical coordinates matrix from 1D flux coordinate array
9 views (last 30 days)
Show older comments
Hi everyone, i'm pretty new to the MATLAB world and i'm having some troubles finding solutions to my problem, i hope some of you guys can help me solve this
i will describe you first the context and then explain my issues
so i have two different datasets, describing two parameters of a fusion reactor plasma as a function of their position
1) the first data set is a matrix 65x40 containing the values (magnetic field) as a function of two physical coordinates, a radial one R (going from 0.75 to 2.67 m in 40 discrete points) and a vertical one Z (going from -1.5 to +1.5 in 65 discrete points)
2) the second data set contains the values of the other parameter (density), as function of a flux coordinate. The flux coordinate is defined as 0 at the center of the plasma and equal to 1 at the last closed magnetic surface. every value of rho identifies the contour of a surface on the poloidal plane (the cross section of a donut shaped reactor).
now, for my calculation i need to express the second data set as a function of the physical coordinates grid. I also have the transformation matrix: it contains the values of rho as a function of the Z and R coordinates. now my problems are:
the values expressed in the RHO 1D array don't exactly correspond the ones found in the transform matrix (eg i got 0.95 rho in the 1D array, and values around 0.95454, 0.943233 etc. in the matrix): i need to work on a "closest value" basis when extracting the values from the transformation matrix. In that way i can assign to each value of the density a set of points on the physical grid, composing the surface contour identified by the starting rho. From those values, i need to build the density matrix
i hope i was clear enough with my exposition...it can be difficult to translate mathematics and physics to human language, sometimes :D
0 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!