CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Looking for simple, robust interface tracking algorithm

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 27, 2010, 10:21
Default Looking for simple, robust interface capturing algorithm
  #1
New Member
 
Join Date: Feb 2010
Posts: 3
Rep Power: 7
ThomasTC is on a distinguished road
I'm building a 2D simulation algorithm for a two-phase incompressible viscous fluid simulation (water and air). My requirements are:
  • volume change as small as machine accuracy can get it
  • relatively simple to implement
  • publically available (well-documented in an article, or working source code)
  • I don't care much about physical accuracy
  • I don't care about the location of the interface at sub-grid accuracy
The (Eulerian) flow calculation itself is working fine, but I'm having great trouble with the interface (free surface) capturing.

Currently, I have a working implementation of the Hirt & Nichols SOLA-VOF scheme [1], but it has two problems: (1) unacceptable levels of volume change; (2) "flotsam and jetsam" all over the place.

I tried the piecewise linear Youngs scheme [2]. Since I could not access the original paper online, I used the description by Rudman [3] to implement it. It's screens full of code with conditionals and tangents and cotangents and angles; and I've got a bug somewhere. So I feel this is too complex for my needs.

I also looked at the MAC (marker-and-cell) style methods. In particular, I implemented something similar to Foster and Fedkiw [4]. But even with 25 markers per cell, they sometimes all advect out of a fluid cell, resulting in gaps in the fluid volume. Maybe it's possible to apply some correction to marker positions to prevent this?

I would like to try the SLIC scheme by Noh and Woodward [5], because it sounds pretty simple, but I can't find the paper online.

I am fairly new to the field of CFD, and I've been at this for two weeks now. Does anyone know a way to fix one of the algorithms I tried, or a suggestion for different algorithm altogether?

[1] Hirt and Nichols, 1979, "Volume of Fluid (VOF) methods for the dynamics of free boundaries"
[2] Youngs, 1982, "Time-dependent multi-material flow with large fluid distortion"
[3] Rudman, 1997, "Volume-tracking methods for interfacial flow calculations"
[4] Foster and Fedkiw, 2001, "Practical animation of liquids"

[5] Noh and Woodward, 1976, "SLIC (simple line interface calculation)"

Last edited by ThomasTC; February 27, 2010 at 10:53.
ThomasTC is offline   Reply With Quote

Old   February 17, 2012, 11:57
Default
  #2
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
I know this post is two years old and you probably aren't around anymore, but did you make any progess?
rmh26 is offline   Reply With Quote

Old   February 17, 2012, 13:45
Default
  #3
New Member
 
Join Date: Feb 2010
Posts: 3
Rep Power: 7
ThomasTC is on a distinguished road
You're in luck; I was subscribed to email updates

The only progress I recall that's not in my original post is a hack to fix most of the problems with VOF. Details are in my blog post here: http://frozenfractal.com/blog/2010/3...oblems-solved/

Here is the relevant section of code:

Code:
	for (size_t y = 1; y < d_ny - 1; ++y) {
		for (size_t x = 1; x < d_nx - 1; ++x) {
			switch (d_types(x, y)) {
				case SurfaceLeft:
					if (isInterior(x - 1, y)) {
						float move = min(1.0f - d_vof(x - 1, y), d_vof(x, y));
						d_vof(x, y) -= move;
						d_vof(x - 1, y) += move;
						if (d_vof(x, y) > 1.0f && isInterior(x + 1, y)) {
							d_vof(x + 1, y) += d_vof(x, y) - 1.0f;
							d_vof(x, y) = 1.0f;
						}
					}
					break;
				case SurfaceRight:
					if (isInterior(x + 1, y)) {
						float move = min(1.0f - d_vof(x + 1, y), d_vof(x, y));
						d_vof(x, y) -= move;
						d_vof(x + 1, y) += move;
						if (d_vof(x, y) > 1.0f && isInterior(x - 1, y)) {
							d_vof(x - 1, y) += d_vof(x, y) - 1.0f;
							d_vof(x, y) = 1.0f;
						}
					}
					break;
				case SurfaceBottom:
					if (isInterior(x, y - 1)) {
						float move = min(1.0f - d_vof(x, y - 1), d_vof(x, y));
						d_vof(x, y) -= move;
						d_vof(x, y - 1) += move;
						if (d_vof(x, y) > 1.0f && isInterior(x, y + 1)) {
							d_vof(x, y + 1) += d_vof(x, y) - 1.0f;
							d_vof(x, y) = 1.0f;
						}
					}
					break;
				case SurfaceTop:
					if (isInterior(x, y + 1)) {
						float move = min(1.0f - d_vof(x, y + 1), d_vof(x, y));
						d_vof(x, y) -= move;
						d_vof(x, y + 1) += move;
						if (d_vof(x, y) > 1.0f && isInterior(x, y - 1)) {
							d_vof(x, y - 1) += d_vof(x, y) - 1.0f;
							d_vof(x, y) = 1.0f;
						}
					}
					break;
				default:
					break;
			}
		}
	}
If you want me to hunt down the paper that describes this, reply on this thread and I'll see if I still have it somewhere. It's still not perfect though...
ThomasTC is offline   Reply With Quote

Old   February 17, 2012, 16:45
Default
  #4
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 374
Rep Power: 10
arjun is on a distinguished road
From your blog:

Quote:
Originally Posted by ThomasTC View Post

Another problem was fluid loss: because cells cannot be filled with fluid for more than 100%, all values above that were set to 100%. Over time, these small differences added up, resulting in slow evaporation of all the water in the simulation. As I wrote before, there seems to be no simple fix. This new algorithm performs much better in that respect, reducing fluid loss to a mere 0.1% after tens of seconds, which is quite acceptable.

There is a very easy fix to fluid loss. I recently was thinking about coupling VOF with immersed boundary and there this loss is significant so i had to think about this issue.

For me I am lucky whenever I run into problems I usually come up with neat solutions. I hope my luck not run out soon.

In this case the solution is this: At the start calculate the total volume of fluid. After every step calculate the fluid loss. You have to make up for this loss. what you are supposed to do is add the this much fluid to the system so that volume of this fluid remain constant. Question is how do you do this.

Easiest solution is that count the cells where volume fraction is between 0 and 1 , I used 0.1 and 0.9 as limit. Now add the lost fluid equally among them. That is add equally to the interface. If your time step was small this loss is usually small and you are adding very small values to each cell but keeping total volume constant.
arjun is offline   Reply With Quote

Old   February 17, 2012, 16:47
Default
  #5
New Member
 
Join Date: Feb 2010
Posts: 3
Rep Power: 7
ThomasTC is on a distinguished road
I think I actually tried that at some point, but it came with its own set of problems. Unfortunately, I can't remember what those were...
ThomasTC is offline   Reply With Quote

Old   February 17, 2012, 17:10
Default
  #6
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 374
Rep Power: 10
arjun is on a distinguished road
Quote:
Originally Posted by ThomasTC View Post
I think I actually tried that at some point, but it came with its own set of problems. Unfortunately, I can't remember what those were...

I did work for me but let me know of problems, there might be something i missed.

With small delta it the redistribution works out easily.
arjun is offline   Reply With Quote

Old   February 17, 2012, 19:13
Default
  #7
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
That sounds like the level set methods where they reinitialize the LS function to conserve mass at each time step.

Anyone have experience with combing AMR with these two phase flow problems. I fear I have to head down that path to get the results i'm looking for.
rmh26 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 34 October 16, 2014 05:27
VOF Interface Tracking Algorithm CFDtoy FLUENT 4 August 5, 2010 04:41
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
what is Interface tracking? gholamghar Main CFD Forum 1 March 18, 2009 06:58
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 15:14.