Path Integral from n*n array
Show older comments
I have an n * n array, which represents a scalar field. I wish to determine the path(line?) integral of a closed path around the centre of the array.
I think the values of the field change by angle rather than distance, so the distance from the centre of the array at which the closed path is measured should not be important, but I would like to confirm this too.
I have a number of questions
1) Must the path be "smooth"? Does it need to be a circle of radius (1/2n(*some fraction)) if the area of the path is critical which I need to determine) centred on the array
Or
2) Can I just sum the perimeter values of the array - i.e. the path is a square.
3) Is there a matlab function for this, or do I need to manually tell matlab which values of the array to sum?
4) Is this the correct methodology for a line integral (I have never calculated such a thing before)
thanks a lot!
7 Comments
David Goodmanson
on 15 Jul 2017
Edited: David Goodmanson
on 15 Jul 2017
Hi William,
For a scalar field there are two possible ways to do the path integral. For each small step dl along the path, the first way sums up [scalar times dl], keeping track of the vector nature of dl. The second way simply sums up [scalar times length of dl] for each step. I believe in all cases the answer does depend on the path taken from point a to point b, with one exception: the first way, when the scalar field is constant everywhere. Then the integration is independent of path and proportional to the vector displacement b - a, and the integral around a closed loop = 0. But that case is not very interesting.
William White
on 20 Jul 2017
David Goodmanson
on 21 Jul 2017
Hi William,
Now you have a two-component vector field, which changes the story considerably. For some fields it is possible for the line integral to be independent of path. However, you say that Ux and Uy represent displacement. Do these mean small displacements at every point, compared to their initial positions, as in the theory of elasticity? In that case it does not appear to be very useful to do line integrals.
William White
on 22 Jul 2017
David Goodmanson
on 23 Jul 2017
Edited: David Goodmanson
on 23 Jul 2017
Hi William,
It's true that you can do an integral on a path around the origin to find the net displacement, but not with these functions. The ux and uy functions here are the results after the integration has been done. With b = 1, nu (almost) arbitrary, the values for ux are
just above neg x axis 1/2
just below neg x axis -1/2
just above pos x axis small
just below pos x axis -small
so the net displacement is b on the negative x axis and 0 on the positive x axis.
To do this by integration you will need expressions for the the derivatives of ux and uy, called the distortion tensor.
William White
on 24 Jul 2017
Hi David, Thanks for that...You have jumped a few steps (or so it seems). I have a few questions if you don't mind...
1) These functions are for displacements, so why cannot I get the net displacement? I dont understand why the integration (summation) has already been done?
2) How did you come by those results?
3) I was under the impression that the total displacement at a point was the vector sum of the Ux and Uy displacements at that point?
4) The crux is, I have different formulae (from the literature) which appear to give different solutions (displacement fields); and I figured a sure-fire way to confirm the validity was to take a path around the origin, which, if correct, would equal b?
kind regards W
David Goodmanson
on 26 Jul 2017
Hi William, Since this is not a Matlab topic this website is not the right forum, but if you want to discuss further feel free to contract me via my profile.
Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!