# Level set & distance functions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 26, 2006, 16:38 Level set & distance functions #1 Renato. Guest   Posts: n/a When solving free surface flows with level set methods we have to specify an interface as initial condition to transport through some way. I understood that the first interface would be the 0 level set of a signed distance function where the values < 0 indicate one fluid and values > 0 the other. The signed distance function can be generated solving the following equation: phi,t + sign(phi)*(1-||grad(phi)||) where: phi: is the signed distance function; grad: gradient operator; sign: signal function; phi,t: time derivative of phi Now, my question is: Which boundary (or initial) condition should I prescribe in order to get the first signed distance function according to the initial interface desired to transport? I was thinking about prescribing a zero distance on nodes (I'm using FEM) of the interface as boundary conditions. Should I prescribe values positive and negative, as initial conditions, according to where is the fluid "A" and "B"? It was not clear for me in the papers I read (a bunch of Sussman's and Sethian's papers). They only tell about reinitialization procedures during the time integration procedure when a signed distance functions is already supposed to exist. In VOF and pseudo-concentration methods we only need to set which fluid has "concentration" 1 and 0 as initial conditions to the transport solver (besides de flow conditions) and the problem is defined. Does anybody could help me? Thanks Renato.

 January 26, 2006, 19:32 Re: Level set & distance functions #2 Pete Guest   Posts: n/a For the reinitialization process, no phi boundary condition is needed. Generally, upwind schemes have to be used to solve the reinitialization equation, which guarantees the information to propagate from the interface to elsewhere. You know, there's no phi information coming into the domain from the boundaries, so no boundary condition needed. As for initial condition, you can simply assign +1 and -1 to the node points. After reinitialization, you'll eventually get the signed distance function. By the way, the classical FEM is not a good choice for level set equations because it is basically a kind of central discretization without upwinding ability. There're some variants such as SUPG, characteristic Galerkin, discontinuous Galerkin, etc. Maybe DG method outforms others in solving advection equations. Hope I answered your questions. Pete

 January 26, 2006, 21:14 Re: Level set & distance functions #3 Renato. Guest   Posts: n/a Hi Pete, So... prescribing a sharp gradient of +1 and -1 as initial condition to get the desired initial interface (level set 0) the ("re")initialization equation should converge to the smooth signed distance function?! OK ;-) Regarding the method, I suppose, I will not have problems to solve the reinitialization and level set equations because I already have a FEM solver with SUPG and shock capturing working fine to solve VOF problems. You know, in VOF problems we need to solve the advection equation of a sharp gradient during all simulation time. Now, I'm learning about level set methods because I found out that I don't have to change so many things on my VOF program to solve, naively, level set problems. Basically, I'll need to convert my step initial condition into a signed distance function and implement some kind of reinitialization procedure after each time step. The advection solver can be reused to transport the level set as well as the reinitialization equation. By the way... I think the idea behind level set, pseudo-concentration and VOF methods to solve free surface problems are basically the same: solve an advection equation over some kind of scalar field able to capture an interface between two immiscible fluids. The difficulties are also basically the same... solve, accurately, hyperbolic equations... thanks a lot for your reply. Renato.

 January 27, 2006, 06:11 Re: Level set & distance functions #4 Pete Guest   Posts: n/a Renato,you are right. It's only the 0 level set that matters. SUPG works for VOF!? That's amazing. Do you have any papers on this? To my knowledge, to keep the sharpness of interface is not an easy issue, one has to use special propagation schemes. Some guys used FCT schems, but the disspation has to be very carefully controlled-- not so big to smooth out the interface and not so small to produce oscillations. By the way, as you are using FEM, does your VOF work on unstructured mesh? I agree with you in the last paragraph. The inteface is transported by flow, that's the reason why all methods have similar forms. The only difference is the scalar functions used to represent the interface: level set, volume fraction, concentration, phase field variable... Cheers, Pete

 January 27, 2006, 14:38 Re: Level set & distance functions #5 Renato. Guest   Posts: n/a SUPG works for VOF after applying a shock capturing stabilization or a "cutting function" to cut undesirable values (<0 or >1) as was done in the following work http://www.ktu.lt/lt/mokslas/zurnala...IAUSKAS151.pdf Regarding the mesh, I've been running the dam break validation problem in a unstructured tetrahedra mesh and up to now the results seems to be ok according to Koshizuka's and Moyce's experimental results. Now I'm struggling with a tricky (or dumb) question regarding the deduction of the FEM matrices and vectors... as I have nodal signed distances what would be the sign for an element? At a first view it seems easy but consider the following example: suppose nodal distances for a tetrahedra element cut by the 0 level set: 0.0 0.0 -0.2 +1.5 I could compute an "element sign" in two ways: 1st) 0.0+0.0-0.2+1.5 = sign(+1.3) = +1 2nd) sign(0.0)+sign(0.0)+sign(-0.2)+sign(+1.5) = 0+0-1+1 = 0 Which one would be correct? I don't know much about FDM and FVM but I think this problem would never happen with these methods because all information is carried out at nodal level. Regards Renato.

 February 1, 2006, 15:57 Re: Level set & distance functions #6 John Guest   Posts: n/a This is a useful reference for you I guess: http://www.math.unizh.ch/fileadmin/m...ints/03-04.pdf

 February 6, 2006, 22:13 Re: Level set & distance functions #7 john Guest   Posts: n/a and this one too: http://scitation.aip.org/getabs/serv...cvips&gifs=yes

 February 7, 2006, 07:46 Re: Level set & distance functions #8 Curious Guest   Posts: n/a Hi John, I'd already got this one. Very nice! thanks a lot for your references. Renato.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post uter Main CFD Forum 2 August 3, 2015 09:31 CFDnewbie Main CFD Forum 3 July 7, 2009 12:07 rubby Main CFD Forum 2 March 7, 2009 03:02 Kai Yan Main CFD Forum 10 December 25, 2007 07:12 ls newbie Main CFD Forum 0 March 17, 2004 15:17

All times are GMT -4. The time now is 17:38.