recording data along an internal boundary defined by a levelset

12 views
Skip to first unread message

matei

unread,
Oct 19, 2009, 10:16:29 PM10/19/09
to amrita-ebook
I hope someone can help me with this one.

In a simulation with an internally defined boundary, defined using the
levelset function PSI, I would like to record some variables along a
line of constant PSI.

Is there any direct way I can do that? So far, I have used the
"probe" command, while manually parametrizing a sequence of (x,y)
coordinates along any curve of interest.

Is there any more elegant way using the PSI function?

Thanks in advance.
matei

James Quirk

unread,
Oct 20, 2009, 12:12:58 AM10/20/09
to matei, amrita-ebook
Matei,
There's no really clean way to do what you ask with
the existing functionality. But you might be
able to get away with the following.

Suppose that your line of constant PSI was predominantly
horizontal then you could write:

do x=$x1,$x2,$dc
along x=$x locate Y[] when PSI[]==$PSItarget -> y
probe MYFUNC[] at $x,$y -> v
end do

As written the test used to locate $PSItarget is not
very robust and you would probably need to explore something
along the lines of:

abs(PSI[]-$PSItarget) < $tol

The other alternaive would be to output the field data in
a form that could be read by MATLAB, or OCTAVE, and the
use whatever machinery they have to extract a contour.

James



>
> Thanks in advance.
> matei
> >

Matei Radulescu

unread,
Oct 20, 2009, 12:29:43 PM10/20/09
to amrita...@googlegroups.com, James Quirk
James,
Thanks, I will try that.
matei
Reply all
Reply to author
Forward
0 new messages