# printstack with interFoam solver for a simple droplet on a flat plate

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

 August 2, 2013, 00:23 printstack with interFoam solver for a simple droplet on a flat plate #1 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi, i am using interFoam solver for a simple droplet on a flat plate problem. However I am getting following error. Code: ``` Courant Number mean: 0.0145633 max: 0.336031 Interface Courant Number mean: 0.00266015 max: 0.297604 deltaT = 6.43228e-05 Time = 0.25 DILUPBiCG: Solving for alpha1, Initial residual = 0.000261318, Final residual = 1.9315e-08, No Iterations 1 Phase-1 volume fraction = 0.0663864 Min(alpha1) = -1.60472e-09 Max(alpha1) = 0.999996 DILUPBiCG: Solving for alpha1, Initial residual = 0.000257121, Final residual = 1.74159e-08, No Iterations 1 Phase-1 volume fraction = 0.0663864 Min(alpha1) = -1.56573e-09 Max(alpha1) = 0.999996 DILUPBiCG: Solving for alpha1, Initial residual = 0.000253059, Final residual = 1.5876e-08, No Iterations 1 Phase-1 volume fraction = 0.0663864 Min(alpha1) = -1.52736e-09 Max(alpha1) = 0.999996 DICPCG: Solving for p_rgh, Initial residual = 0.00568533, Final residual = 0.000220873, No Iterations 2 time step continuity errors : sum local = 0.000142762, global = 1.42374e-06, cumulative = 0.000414823 DICPCG: Solving for p_rgh, Initial residual = 0.00125021, Final residual = 4.41295e-05, No Iterations 4 time step continuity errors : sum local = 2.85196e-05, global = 1.98374e-06, cumulative = 0.000416807 DICPCG: Solving for p_rgh, Initial residual = 0.000346175, Final residual = 7.05486e-08, No Iterations 39 time step continuity errors : sum local = 4.56036e-08, global = -1.35202e-09, cumulative = 0.000416805 ExecutionTime = 106.02 s ClockTime = 410 s Courant Number mean: 0.0142799 max: 0.26863 Interface Courant Number mean: 0.00259935 max: 0.247942 deltaT = 7.62195e-05 Time = 0.250076 #0 Foam::error::printStack(Foam::Ostream&) in "/home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 void Foam::MULES::implicitSolve(Foam::geometricOneField const&, Foam::GeometricField&, Foam::GeometricField const&, Foam::GeometricField&, Foam::zeroField const&, Foam::zeroField const&, double, double) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #4 Foam::MULES::implicitSolve(Foam::GeometricField&, Foam::GeometricField const&, Foam::GeometricField&, double, double) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #5 in "/home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/bin/BCFoam" #6 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #7 in "/home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/bin/BCFoam" Floating point exception (core dumped)``` Error seems to be similar as discussed in this thread, so I posted here with a hope to get some reply. Regards Last edited by wyldckat; August 17, 2013 at 08:15. Reason: Added [CODE][/CODE]

 August 2, 2013, 05:18 #2 Senior Member     Mojtaba Amiraslanpour Join Date: Jun 2011 Location: Zanjan, Iran Posts: 287 Rep Power: 8 dear @mebinitap, Maybe you can decrease relaxation factors as I have mentioned earlier. or maybe choosing a robust convection scheme can converge your case, but it would be more diffusive. best __________________ Learn OpenFOAM in Persian for free, And ask your questions here. Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman"

 August 22, 2013, 08:08 #3 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 Greetings to all! FYI: I've moved the two posts above from the following thread, since the solver was very different: Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel @mebinitap: I don't know if Mojtaba's answer helped you solve the problem, but if it didn't, please provide more information about your problem. Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 August 22, 2013, 09:14 #4 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi Bruno, Actually I was trying to model a droplet sitting on a plate, which is vibrating. For that I used a 2D rectangle domain (in blockMesh) and used sphereTocell to define alpha. But it seems droplet is slipping out of the domain. It happens even if drop is at the centre of the domain, so its not a surface roughness error i guess. Next i tried to use circular mesh which shows the same problem. But when i use a spherical 3D domain, i am not being able to run the case, ending up with printStack error as i mentioned earlier. One more thing I want to share (although not relevant here) that there is no such unusual behavior if i was use a cm sized domain and drop. Do you have any idea why it shows problem in smaller dimensions (mm)

 August 22, 2013, 09:24 #5 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 OK, a few details: Although the size of the plate and drop are in cm or mm, your mesh is actually in metres, correct? Is the boundary condition on the "U" field for the walls of your vibrating plate set to moving walls? Mesh resolution and resolution transition is extremely important. Here's such an example: Strange Results at Tank Outlet with InterFoam post #17 __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 August 22, 2013, 09:30 #6 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi, Thanks for the reply. Yes, the mesh is in metres and the BC is also the movingWall. But I have no idea about resolution transition. So better I'll check the post you mentioned first. Regards

 August 30, 2013, 08:56 #7 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi Bruno, I read the post "Strange Results at Tank Outlet with InterFoam ", but I am still confused about how the results are different for same arrangement in two cases (in cmetres and in mm). For a simple case, I put a spherical drop in a chamber of mm size and it fluctuates rigorously with interFoam solver, while if i increase the size of domain and droplet to cm the fluctuations are reduced. At this point there is no flow field and all the four boundaries are wall, then why is this difference in two cases..Can you explain or give me a hint. Thanks

 August 31, 2013, 08:53 #8 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 Hi mebinitap, Well, without an example case, I'm not able to do a similar analysis to the one I gave on that other thread. When I mentioned that thread, I also was thinking about you analysing more closely the simulation, from a physical point of view. This way, you could understand better what's happening. OK, even without an example to prove my point, here's my deduction from last night: Assumptions:It's the same fluid in the two cases. I'll assume it's water, for making it easier to imagine or even experiment. The mesh has the same resolution in both scales, so that we have enough cells to properly simulate the droplet. There is a tutorial in OpenFOAM that should be related to this issue: "multiphase/interFoam/laminar/capillaryRise" - this tutorial simulates the capillary action of a fluid on the wall of a tube. The idea is that when the tube has got a diameter small enough, the capillary action is very visible: http://en.wikipedia.org/wiki/Capillary_action Then there is also the related topic of the contact angle + surface tension: http://en.wikipedia.org/wiki/Surface_tension So, if my deduction is correct, what you are seeing is rather simple:The simulation in centimetres shows a drop of water that has 1000 times more mass than the one in millimetres. Therefore, the more mass it has, then gravity related forces are stronger than the molecular forces. From an extreme point of view one could see that:A droplet of 1 mm in diameter could be almost spheric and remain spheric; While the one with 1cm of diameter will be crushed by it's own weight, leading to having the shape of an inverted+squished U. Therefore, it'll be easier for the 1cm droplet to absorb kinetic energy than the 1mm one, since the 1cm one has more weight. Then there is also another problem: having insufficient mesh resolution for the millimetre sized plate can lead to not being able to properly simulate the effects of the surface tension. If you can provide examples of the two cases, that would be really helpful for demonstrating this Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

September 2, 2013, 03:01
#9
New Member

Join Date: Apr 2013
Posts: 24
Rep Power: 5
Hi Bruno

Thanks for your time..So from what you said 1 cm drop should deform more than the mm one, which is not the case. This means the resolution has got an issue.. So I increased the resolution further, even then the drop (mm in size) tends to deform..Since I want to see the shape deformation under vibration effects, its very important that the droplet remain steady (doesnot deform on its own) without any external force..How can I stop the motion in the drop..
(The case is attached )

Thanks,
Attached Files
 Droplet.tar.gz (1.3 KB, 24 views)

September 7, 2013, 13:52
#10
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
Hi mebinitap,

You didn't attach the dynamic mesh information, nonetheless I think I found one of the problems.

Attached is the tutorial "multiphase/interFoam/laminar/damBreak", modified to use your files. Nonetheless, I had to switch your "alpha1" field values from 0 to 1 and 1 to 0, so that the droplet would be made of water.
In addition, the "controlDict" is configured to write time snapshots frequently, because I wanted to examine what was going on.
Which lead me to find one of the big problems: you forgot to initiate the pressure field with the water's gravity-induced pressure. This leads to pulling the air very hard, because the gravity+pressure is suddenly activated when you start the simulation. In addition, the initial pressure should be in absolute value, not relative.
In other words, the initial pressure field should be set to atmospheric pressure, not 0. Example given here: http://foam.sourceforge.net/docs/cpp...5.html#details ("totalPressureFvPatchScalarField")

I found such a situation some time ago, here: dambreak tutorial's weird velocity field. post #7

I did a quick search and found this:
Quote:
 Originally Posted by ckroener you could use funkySetFields for example: http://openfoamwiki.net/index.php/Co...funkySetFields in 5.1 it is described how to initialise a pressure field gradient due to gravity.
Namely: http://openfoamwiki.net/index.php/Co...due_to_gravity

For your case, I created the file "system/funkySetFieldsDict" with the following content:
Code:
```FoamFile
{
version     2.0;
format      ascii;
class       dictionary;
location    "system";
object      funkySetFieldsDict;
}

expressions
(
pressureWater
{
field p_rgh; //field to initialise
expression "9.81 * 1000.0 * (0.001-pos().y) + 100000.0";
condition  "pow((pos().x-0.002),2) + pow(pos().y,2) <= pow(0.001,2)";
keepPatches 1; //keep the boundary conditions that were set before
}
);```
The attached case is already adjusted to use this dictionary and funkySetFields as well.

Now, based on this case, I would say that only after the droplet on this simulation as come to a stand-still, only then you should start the vibration plate. Keep in mind that you can use mapFields, in order to use the result of this simulation on another simulation.

Best regards,
Bruno
Attached Files
 staticDroplet.tar.gz (3.2 KB, 20 views)
__________________

 September 9, 2013, 06:56 #11 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi, Thanks for your time and the detailed explanation. I will try run the case as you said and get back again later. Regards

 September 13, 2013, 07:22 #12 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi, I ran the case with quite longer time period but the deformations does not seem to decay (even with further refinement). I even tried circular mesh around the drop instead of rectangular blocks. Is it because the interface is not sharply defined. I used snappyHexMesh for a 3D case , still not working. Can you provide any idea.. Thanks

 September 14, 2013, 08:21 #13 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 Hi mebinitap, I forgot to mention this before, but there is a solver that might help you to get the initial position of the droplet, namely for when it is meant to be stationary. The solver is LTSInterFoam and you'll find some information about it here: http://www.openfoam.org/version2.0.0/steady-vof.php Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 September 18, 2013, 08:49 #14 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi Bruno, Thanks again for your time..I tried LTSInterFoam as you suggested, but then droplet breaks up within a few seconds. Can you refer me to some links where the solver is explained in detail. The only problem is that the droplet interface is fluctuating too much and the rate is not much affected by timesteps and meshing. Its the same even for a full droplet at the center of the atmosphere so must not be a surface issue. Do you have any idea what could be the possible problem. Regards

 September 21, 2013, 15:19 #15 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 Hi mebinitap, Unfortunately I'm not aware of any more tutorials about LTSInterFoam, beyond the one that OpenFOAM has got in the "tutorials" folder. Nonetheless, I've remembered about two tutorials that might help to gather some more ideas: "multiphase/interFoam/laminar/capillaryRise" - this one can be useful for gathering some ideas on how the boundary conditions and environment settings are defined, given this case's objective. "multiphase/interDyMFoam/ras/damBreakWithObstacle" - this tutorial uses additional mesh refinement in an attempt to improve the mesh on the interface surface between the two fluids. Either way, it is very much possible that the simulation you're trying to perform is on a scale for which the "inter*Foam" solvers provided in OpenFOAM cannot handle. As for more ideas: Try contacting OpenCFD's support http://www.openfoam.com/support/ - at the very least, they can give you a straight answer if this can be simulated with the current version of OpenFOAM and how much it would cost to implement this is, in case it doesn't have this feature yet. Try using a more viscous fluid instead of water, in an attempt to make it less wobbly. Then, when the pressure distribution is more even and when it stops wobbling, you can then continue the simulation for a while longer with the correct viscosity. Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 September 22, 2013, 23:25 #16 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi Bruno Thank you so much..You were right..I got an instant reply from the support team that interFoam (VOF) is not good for surface-tension dominant problem..So may be i need some other solver that doesnot implement VOF technique. Regards wyldckat likes this. Last edited by mebinitap; September 23, 2013 at 03:24.

 September 23, 2013, 16:08 #17 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 Hi mebinitap, I'm glad you've gotten a straight answer! As for another solver... I'm not aware of any other solver that can specifically can work for this The closest I can think of is multiphaseEulerFoam, which should be well explained here: multiphaseEulerFoam - but it's designed for multiple phases, not just two phases. But with any luck, since it's Euler based, perhaps it can handle well surface tensions. The only other possibility that comes to mind would involve using dynamic meshes with two regions and using a force-tension calculation mechanism for the meshed surface in between phases... but I'm not aware of any solver that already does this. There is also "navalFoam" or "shipFoam" (I can't remember which one is the most recent), which are community created solvers... but I'm not sure if it applies to this kind of simulation: Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 September 24, 2013, 01:19 #18 New Member   Join Date: Apr 2013 Posts: 24 Rep Power: 5 Hi Bruno, I was thinking of twoPhaseEulerFoam for two phase system..It seems the interface can be sharply defined in this solver and is also based on Euler method. Anyways I will try what you suggested and let you know if i can get any better results.. Regards Binita

 October 5, 2013, 07:24 #19 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,748 Blog Entries: 39 Rep Power: 103 Hi Binita, I found this thread just now and thought that it might come in handy for your case: interFoam - validation for bubble/droplet flows in microfluidics Best regards, Bruno __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 October 5, 2013, 10:13 #20 Member   Duong A. Hoang Join Date: Apr 2009 Location: Delft, Netherlands Posts: 92 Rep Power: 9 Hi Binita, Regarding the capability of the interFoam solver for your problem, I think michielm already pointed out the problem here Simulating liquid droplet deformation the droplet can not stay at the center of the surface due to the fact that there is no contact angle hysteresis implementation in interFoam. Thus, the deformation of the droplet will not decay as well. Regarding to surface-tension-dominant flows, if you want a very accurate solver to resolve the interface, you can try MMIT (moving mesh interface tracking) developed by Turkovic and Jasak. However, there is no contact angle boundary condition with that method yet, I believe. Regarding the error in your first post, I saw a 'Floating point exception' error. Could it be that you have in the case something divided by zero? That is the first thing I would check. Please check all steps in interFoam and try to find where is the problem. You might can see something in the result of previous time step (t = 0.25). Good luck. Regards, Duong wyldckat likes this.

 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 Blasius_Pohlhausen_Crocco Main CFD Forum 12 September 30, 2013 17:35 baoaero OpenFOAM 7 June 7, 2013 05:53 tstorm FLUENT 2 August 11, 2009 14:16 seb62 OpenFOAM Running, Solving & CFD 1 January 17, 2009 04:30 CFD Student Main CFD Forum 0 March 6, 2007 10:27

All times are GMT -4. The time now is 20:56.