Finite volume advection of sharp interfaces #22794
-
Hello, I am trying to model the advection of a sharp interface using the Weakly Compressible Finite Volume Navier Stokes kernels to model a two phase immiscible flow. I am having issues with it not converging with sharp interfaces. To simplify the problem, I have a created a minimum worked example for the advection of a circle in 2D using a single fluid with a constant user specified velocity. To test if the issue is a having a sharp step, I am using a smoothed step function, the idea being the smoothness parameter can be dropped to get closer to an ideal step function. The input file is below. The best results I can get are using crank-nicolson with a Van Leer flux limiter and the default petsc options (although ILU performs almost identically) but there is still quite a lot of excessive diffusion, as in the images below. Pushing the smoothing parameter below 0.0005 (so driving it closer to a step) stops it converging. I can't see anything I am obviously doing wrong, but I suspect I am missing something. My only other thoughts are around trying to implement a more complex flux limiter scheme such as CICSAM. Any suggestions greatly appreciated. Thanks! Input file:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Hello @lindsayad @grmnptr @tanoret you may want to pitch in First I would remove the temperature variable for now since it does not play a role. This will make the problem faster to run and wont affect results at this point. You may just comment out the kernel and turn the T variable into an auxiliary variable. This is similar to several text book / code studies of the diffusivity / quality of discretization schemes that you may have already found out there VanLeer makes sense as a good candidate Do you have the (non)convergence history for a non-converging case? Guillaume |
Beta Was this translation helpful? Give feedback.
-
I’ll come back to this tomorrow but the limiters we have (vanLeer and Minmod) fall back to almost upwind where they encounter large gradients (not very smooth solutions). That explains the excess diffusivity with vanLeer. I don’t think we have a less diffusive scheme at the moment (besides the regular weighted average which can result in oscillatory behavior), but I’ll take a look at your input tomorrow. Also, I recommend following @GiudGiud ‘s instructions to see what the issue is with the convergence. |
Beta Was this translation helpful? Give feedback.
-
Hello both, Thanks for the suggestions. Neither moving out the temperature to an auxvariable nor reducing the viscosity (I dropped it to 1E-5, it was unrealistically high) improved convergence. I have turned debug on and get the following print out:
so it does look like phi is the one struggling to converge. Thanks for the links, I will take a look at them. I know that FOAM, specifically interFOAM, has some nice examples of this, it is on my to do list to try to back out of the code what they implement as I have not yet found a good summary of it. |
Beta Was this translation helpful? Give feedback.
-
You don't need to paste all the diverging timesteps. Probably the first one or two is plenty. Do you need to resolve the velocity and scalar fields at the same time? Can you first compute the velocity field, and then model the transport of phi? |
Beta Was this translation helpful? Give feedback.
You don't need to paste all the diverging timesteps. Probably the first one or two is plenty. Do you need to resolve the velocity and scalar fields at the same time? Can you first compute the velocity field, and then model the transport of phi?