|
[Sponsors] |
February 11, 2014, 13:54 |
CLSVOF in InterFoam
|
#1 |
New Member
Deepak Kalaikadal
Join Date: Feb 2014
Posts: 6
Rep Power: 12 |
Hi,
I am trying to implement the CLSVOF scheme in interFoam. as given to Albadawi et al, International Journal of Multiphase Flow, 2013. In his paper, it is given that the redistancing of the level set function is solved by using the equation d(phi)/dt' = sign(phi)*(1-|grad(phi)|) where t' is an artificial time step chosen as delta t' = 0.1*delta x when I tried it on interFoam as solve ( fvm::ddt(lsPhi) +(sign(lsPhi) * mag(fvc::grad(lsPhi))) -sign(lsPhi) ); Foam compiles, but crashes on running due to dimension mismatch. Any idea how to set it right? Does t' have the units of distance, as it is based on the mesh size? Also, how do I solve this in a loop of artificial time until it converges to the steady state solution? |
|
March 16, 2014, 11:11 |
|
#2 |
New Member
adong
Join Date: Jul 2012
Posts: 1
Rep Power: 0 |
Hi
Try this 1- you define the field d and d0 (d is your lsPhi) volScalarField d ( IOobject ( "d", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); volScalarField d0 ( IOobject ( "d0", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("d0",dimensionSet(0,0,0,0,0,0,0) ,scalar(0)), d.boundaryField().types() ); 2- d have no dimension, for do not have one error of dimension you define: dimensionedScalar one = dimensionedScalar("one", dimensionSet(0,1,0,0,0,0,0), 1.0); 3- you define the quantity present in the article: const surfaceScalarField deltaCoeff = d.mesh().deltaCoeffs(); const scalar DX = (1.0/min(deltaCoeff).value()); scalar Dtau = 0.1*DX; scalar Gamma = 0.75*DX; scalar EPS = 0.1*DX; scalar NITER = EPS/Dtau; 4- the pseudo iteration d == Gamma*(2*alpha1-1.0); d0 == d; for (int loop = 0; loop < NITER; loop++) { // calculate distance function field fvScalarMatrix dEqn ( fvm::Sp(scalar(1),d) + Dtau*sign(d0)*mag(one*fvc::grad(d)) == d + Dtau*sign(d0) ); dEqn.solve(); } |
|
November 27, 2014, 12:50 |
Clsvof
|
#3 |
New Member
praveen kumar sharma
Join Date: Jun 2014
Posts: 17
Rep Power: 12 |
Hii everyone,
I am new in openFoam. I want to know how to use CLSVOF model in openFoam (or in foam extend) . Or I have to implement clsvof model separately. Is their any chance to install that model direct and i can use. |
|
January 22, 2016, 18:39 |
|
#4 |
New Member
Majid Haghshenas
Join Date: May 2015
Posts: 5
Rep Power: 11 |
Albadawi claimed that he gets less spurious currents with s-clsvof. But I've tried every thing he mentioned and double checked my solver times. I really doubt about his results since in his next paper he didn't use s-clsvof whereas he showed great result in this paper.
Anyone tried s-clsvof to get lower spurious current around the interface? |
|
January 27, 2016, 09:01 |
|
#5 |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
I am going to try the same thing within the next one or two weeks. If I find something, I will let you know.
|
|
January 28, 2016, 06:47 |
|
#6 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi guys;
i have a doubt regarding VOF's alpha. Interfoam's alpha calculated in some cases (at lower Capillary number flows, surface tension dominated flows) is highly smeared out. In such cases how can you link alpha and phi? There is huge error coming from alpha term everything else seems to work perfectly{like the calculation of surface tension force, capillary pressure etc}. Any advice over this issue, Saideep |
|
February 26, 2016, 12:27 |
|
#7 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Foamers,
Any development with this solver? The surface tension forces seen to be better than interfoam calculations but the velocities at the interface are shooting up. Meanwhile I have been trying to understand an other parallel solver named "VOSET". http://ac.els-cdn.com/S0045793015003...ea63ef66bfe6ce It looks much complicated and I think implemented in Fluent and not in OpenFOAM. Any share of updates; Saideep |
|
February 29, 2016, 09:56 |
|
#8 |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
Hello,
my experience with the S-CLSVOF solver so far is, that the solution is very sensitive to the value specified for the mesh step size (DX in the above post of feddy). In my case, I implemented the energy equation in interFoam. When I utilize the Heaviside function to update all the fluid properties and the face fluxes, the temperature gets unbounded after some time steps. Just physically, the results seem to be ok when I stick to updating the fluid properties and the face fluxes with alpha. However, I still need to compare some results with relevant test cases to see quantitative relations. Furthermore I will implement the direct specification of the mesh step size for the relevant regions instead of setting one fix value. Regarding the other method you just mentioned: I did not take a closer look to the paper but the coupling seems to be done fully geometrically. As far as I can say, the geometrical reconstruction of the interface is always the more accurate method but comes with a substantial coding effort. Therefore it would depend on your resources and coding skills whether you want to implement something like this. Regards, Michael |
|
February 29, 2016, 13:16 |
|
#9 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi,
but how is your velocity behavior? Do you observe any shoot ups at the interface surface or does it stabilize to an average value over time? By the way what Capillary number are you dealing with? Saideep |
|
March 1, 2016, 05:02 |
|
#10 |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
Hiho,
so far I did not experience odd velocities at the interface. My capillary number goes up to approximately 0.1, rising along with the runtime. Regards, Michael |
|
March 3, 2016, 14:40 |
|
#11 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi,
sorry to get back late. I am dealing with extremely low Ca values around e-5 or so. Did you try your code over a static droplet? If yes how does it behave? In general VOF is reliable for higher Ca flows but for very low Ca flows there seems to be a problem with random velocities at the interface of fluids. Saideep |
|
March 4, 2016, 06:19 |
|
#12 |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
Hi.
I did some further reading on the influence of spurious currents since I am quite new to OpenFOAM and VOF methods in general. My Ca number of 0.1 seems to be indeed quite high compared to cases where spurious currents are strongly recognized. I did not simulate a static droplet yet. However, I was planning to do this as one validation case of my final model. When I have any results I can send you the details. Regarding your spiking velocities at the interface - As far as I understand they are a result of the inaccurate curvature calculation from the alpha1 field. How strong did you couple the VOF and LS methods? Do you just calculate the distance field of the LS method to recalculate the unit normal vectors/ curvature in order to update the fluxes and calculate the surface tension force in UEqn.H and pEqn.H? You could also consider to update the fluxes and fluid properties with the Heaviside function and use the newly calculated fluxes in UEqn.H. I was also thinking to use the unit normal vector calculated from the LS field for the calculation of phir in the original alphaEqn.H. Considering the last step I am not sure if this will make the initialization of the LS field somewhat corrupted. Any thoughts? Regards, Michael |
|
March 4, 2016, 06:24 |
|
#13 |
New Member
praveen kumar sharma
Join Date: Jun 2014
Posts: 17
Rep Power: 12 |
Hi,
anyone knows what is time scale for spurious current in both when we use adaptive grid or uniform grid. |
|
March 4, 2016, 09:31 |
|
#14 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi,
Well, I just followed Albadawi's paper and tried both cases of linking my fluid properties with "Heaviside function" and using VOF's indicator function directly to be applied to compute the fluid properties. Though I found not much of difference. @ Pravven: I guess there is no time frame to see the spurious currents evolve. Initially during relaxation step, we see velocities but over time they should decompose, in general they dont decompose but generate vorticities due to force imbalance. Saideep |
|
March 7, 2016, 12:52 |
|
#15 |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
Hi.
I think that is not a bad thing. There should not be big differences. How exactly do you update your fluxes? I am still having problems when I do one recalculation of the alphaEqn with the MULES solver. Regarding my problems I am thinking about introducing a smoothed alpha field for the calculation of interface properties and just calculate the distance field without any coupling. That is only because I want to use the distance in phase change calculations. Maybe this would be another approach for your case too? Regards, Michael |
|
March 7, 2016, 14:57 |
|
#16 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Michael,
What do you mean by recalculation of alpha? You are calculation alpha advection only once at the start of the piso/ pimple loop. I have tried some filtering of alpha and interface curvature etc and seems to be fine for some cases. I am relatively new to level set method and well i was having the similar idea as you. I don't understand why do we need to run the loop to re-distance the LS function. If I specify the initialization of the LS function as (2*alpha1 -1) it is already on the interface(alpha1 = 0.5). From other papers where coupling of Ls with VOF is done, they advect the LS function at the start of the loop so it is essential to re-distance the function. But here we aren't advecting the LS function. Saideep |
|
March 7, 2016, 17:20 |
|
#17 | |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
Hi.
Albadawi suggests the following steps, among others: Quote:
Code:
{ word alphaScheme("div(phi,alpha)"); word alpharScheme("div(phirb,alpha)"); surfaceScalarField phic(mag(phi/mesh.magSf())); phic = min(interface.cAlpha()*phic, max(phic)); #include "calcK.H" surfaceScalarField phir(phic*nHatf); //surfaceScalarField phir(phic*interface.nHatf()); surfaceScalarField phiAlpha ( fvc::flux ( phi, alpha1, alphaScheme ) + fvc::flux ( -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme), alpha1, alpharScheme ) ); MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0); rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2; volScalarField& nu = const_cast<volScalarField&>(twoPhaseProperties.nu()()); nu == alpha1*nu1 + (scalar(1)-alpha1)*nu2; rhoCp == alpha1*rho1*cp1 + (scalar(1)-alpha1)*rho2*cp2; rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2; rhoPhiCp = phiAlpha*(rho1*cp1 - rho2*cp2) + phi*rho2*cp2; } The redistancing is still a necessary step. By initializing of the distance field you just take a "good guess" with the alpha field as a basis for the position of the interface. Code:
psi0 == (2*alpha1 - 1)*epsilon; psi == psi0; Code:
for (int corr=0; corr<int(epsilon.value()/deltaTau); corr++) { psi = psi + sign(psi0)*(scalar(1) - mag(fvc::grad(psi)*dimM))*deltaTau; psi.correctBoundaryConditions(); } What kind of smoothing did you use in your case? I am thinking to implement the laplacian filter Ubbink mentions in his work (Onno Ubbink, 1997, Numerical prediction of two fluid systems with sharp interfaces, Eq. 3.51). Regards, Michael |
||
July 9, 2016, 14:09 |
|
#18 |
Member
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14 |
Guys,
I tried S-CLSVOFFoam version by Takuya Yamamoto . He has modified the original version by A. Albadawi (i think) where he solves the volume fraction equation with interface normal calculated from the level set function which by default updates the flux using the level set. It appears to be a little better, but as Saideep pointed there are some odd velocities around the interface which seems to increase with mesh refinement. Nevertheless, the accuracy improves as the mesh is refined. (test case: rise of meniscus close to a wall) He has also another version where he uses different relations for calculating the delta and Heaveside function
__________________
Thanks and Regards Vignesh |
|
July 31, 2016, 02:58 |
|
#19 |
New Member
ali
Join Date: Jun 2016
Posts: 10
Rep Power: 10 |
Dear MajidHagh
do you try to regenerate numerical simulation data of bubble formation by air injection as is mentioned by Albadawi et al. (2013). I want to do that but my results are different. If yes, would you mind send me your setting files (0,constant,system). thanks a lot abdoli |
|
July 31, 2016, 10:56 |
S-clsvof
|
#20 |
New Member
Majid Haghshenas
Join Date: May 2015
Posts: 5
Rep Power: 11 |
I've worked on this method for a year and I faced problems as you did.
Recently I improved the method and I'm working on a paper which describes the correct way of implementing s-CLSVOF. I've simulated couple of two-phase cases to evaluate my solver and I got good result. I would release my solver online when I publish the paper. Hopefully it would be soon. Majid |
|
Tags |
clsvof, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
InterFoam stops after deltaT goes to 1e14 | francesco_b | OpenFOAM Running, Solving & CFD | 9 | July 25, 2020 07:36 |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 16:26 |
interFoam in parallel | gooya_kabir | OpenFOAM Running, Solving & CFD | 0 | December 9, 2013 06:09 |
Problem of InterFoam with LES SpalartAllmarasIDDES | keepfit | OpenFOAM | 3 | August 29, 2013 12:21 |
Open Channel Flow using InterFoam type solver | sxhdhi | OpenFOAM Running, Solving & CFD | 3 | May 5, 2009 22:58 |