CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

suddenly motion of a fluid at rest-InterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2018, 22:04
Default suddenly motion of a fluid at rest-InterFoam
  #1
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 8
rgrune is on a distinguished road
Hello, I use OpenFoam 5.0 and I have set up a laminar case in interFoam whose initial conditions are two fluids at rest(water and air), the boundary conditions are given at the end of the post. Initial and boundary conditions shouldn't carry out any motion of the fluids, however it indeed occurs!(It can be seen in the velocity field). I don't understand why this happen, I have heard there is a numerical diffusion which appears due to employed numerical method and that is why there is a no-zero velocity field, but the simulation produces a velocity field which shows "considerable" velocity values(maximum 0.65 m/s). Someone knows why this happen? I attach this link with the case and videos.

https://drive.google.com/open?id=1z5...dug9jdmuDAWZgu
Thanks in advance, any help is grateful.



Velocity boundary conditions
left noSlip
right noSlip
top pressureInletOutletVelocity(value uniform (0 0 0))
bottom noSlip

Pressure boundary conditions(p_rgh):
left fixedFluxPressure (value uniform 0)
right fixedFluxPressure (value uniform 0)
top totalPressure (value uniform 0)
bottom fixedFluxPressure (value uniform 0)

Phase boundary conditions(alpha):
left zeroGradient
right zeroGradient
top inletOutlet(inletValue uniform 0; value uniform 0)
bottom zeroGradient
rgrune is offline   Reply With Quote

Old   August 20, 2018, 18:07
Default
  #2
New Member
 
Stephen Waite
Join Date: May 2013
Location: Auckland, New Zealand
Posts: 29
Rep Power: 13
Stephen Waite is on a distinguished road
Hi there,

These are called spurious currents, they occur in Volume of Fluid methods at non-binary cells I believe due to the surface tension forces. Increasing mesh density at the interface will help decrease this (so you can use interDymFoam to track the interface and keep it refined if the surface is moving), and I have seen smoothing functions floating around on forums that try to help as well, but you will never be able to get rid of them completely (I think)
Stephen Waite is offline   Reply With Quote

Old   August 20, 2018, 18:10
Default
  #3
New Member
 
Stephen Waite
Join Date: May 2013
Location: Auckland, New Zealand
Posts: 29
Rep Power: 13
Stephen Waite is on a distinguished road
actually, just reading this thread

In attempt to decrease spurious currents in VOF

It sounds like increasing mesh density can make it worse, due to something called a capillary time step constraint, so maybe have a read through that one.
Stephen Waite is offline   Reply With Quote

Old   August 21, 2018, 09:10
Default
  #4
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi,


Not sure about the bc you used.


But if you are looking at noting happening:


left, right:
velocity fixedValue;
value uniform (0 0 0);


pressure zeroGradient;


alpha zeroGradient;


top, bottom:
velocity noSlip;


pressure fixedFluxPressure
--


Then nothing shall happen provided there is no contact angle, same fluids in the system.



This shall do the trick. It looks more like a boundary issue than spurious currents for me.
Saideep is offline   Reply With Quote

Old   August 22, 2018, 17:24
Default
  #5
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 8
rgrune is on a distinguished road
Hi, thinks for your answer, first I am testing with the modification of boundary conditions. Saideep, could you please specify the conditions of alpha for top and bottom too?
rgrune is offline   Reply With Quote

Old   August 23, 2018, 07:56
Default
  #6
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi,


It can be anything.


Like it can be a constantAlphaContactAngle but it would do nothing as the second phase is a layer below or above.


Even simpler, a zeroGrad also shall do the job with no issues.
Saideep is offline   Reply With Quote

Old   August 26, 2018, 16:47
Default
  #7
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 8
rgrune is on a distinguished road
Hi,
I modified the damBreak(laminar) case to envelop this "static-case" with the boundary condition that you said. The p_rgh condition at "atmosphere" (called here "top") in damBreak case is:

atmosphere
{
type totalPressure;
p0 uniform 0;
}


I am modifying it to:


top
{
type fixedFluxPressure;
value uniform 0;
}


However interFoam had a problem:

--> FOAM FATAL IO ERROR:
Unable to set reference cell for field p
Please supply either pRefCell or pRefPoint

file: /home/rgrune/testing_bc/system/fvSolution.PIMPLE from line 68 to line 71.

From function bool Foam::setRefCell(const volScalarField&, const volScalarField&, const Foam::dictionary&, Foam::label&, Foam::scalar&, bool)
in file cfdTools/general/findRefCell/findRefCell.C at line 105.
FOAM exiting


I am new using OpenFOAM and what I interpret is that a initial pressure value is required by fvSolution.


Later I also modified it to:
top
{
type fixedFluxPressure;
p0 uniform 0;
}

but it also didn't work(the same error in log.interFoam was reported).


For these attempts I have changed in blockMeshDict the top's patch-type from patch to wall(All the patches were set up as wall, except the "front and back" which are empty). I attach a link with the case.
https://drive.google.com/open?id=15-...3zahsguWM1o-Cz

Last edited by rgrune; August 26, 2018 at 20:06.
rgrune is offline   Reply With Quote

Old   August 29, 2018, 06:28
Default
  #8
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi,


incase you are still struggling with that error, you have to add pRefCell and pRefValue variables to 0 in fvSolution/PISO.


This will tell the solver to start the simulation with a known value at the boundary and then solve the required equations.


I think for your case, it is easy to look at the capillaryRise example rather than damBreak.
Saideep is offline   Reply With Quote

Reply

Tags
fluid at rest, interfoam, suddenly motion


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 19:02
Wrong multiphase flow at rotating interface Sanyo CFX 14 February 7, 2017 18:19
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Fluid Structure Interaction Apollo Main CFD Forum 5 July 4, 2011 17:15
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 16:47.