
[Sponsors] 
October 11, 2011, 10:30 
groovyBC results in negative alpha

#1 
New Member
Andreas Otto
Join Date: Sep 2009
Posts: 11
Rep Power: 10 
Hello everyone,
I'm trying to implement groovyBc's in my calculations. I'm using OpenFOAM 2.0.x and started with the circulatingSplashtutorial from within the latest swak4FOAMversion withot changing anything. Unfortunately the solution run after blockMesh and interDyMFOAM led to strongly negative values for alpha1 and consequently broke very soon after only 4 time steps: /**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.0.x   \\ / A nd  Web: www.OpenFOAM.com   \\/ M anipulation   \**/ Build : 2.0.xd31ba4c8844f Exec : interDyMFoam Date : Oct 11 2011 Time : 16:17:23 Host : donaldduck PID : 11393 Case : /home/.../OpenFOAM/OpenFOAM2.0.x/applications/utilities/swak4Foam/Examples/groovyBC/circulatingSplash nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Selecting dynamicFvMesh dynamicRefineFvMesh Reading field p_rgh Reading field alpha1 Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Calculating field g.h PIMPLE: Operating solver in PISO mode time step continuity errors : sum local = 0, global = 0, cumulative = 0 GAMGPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 0, global = 0, cumulative = 0 Courant Number mean: 0 max: 0 Starting time loop Interface Courant Number mean: 0 max: 0 Courant Number mean: 0 max: 0 deltaT = 0.00025 Time = 0.00025 Selected 0 cells for refinement out of 32768. Selected 0 split points out of a possible 0. MULES: Solving for alpha1 Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1 MULES: Solving for alpha1 Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1 MULES: Solving for alpha1 Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1 swak4Foam: Allocating new repository for sampledGlobalVariables GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 0.001340854, No Iterations 1 time step continuity errors : sum local = 1.306237e07, global = 3.144612e08, cumulative = 3.144612e08 GAMG: Solving for p_rgh, Initial residual = 0.9365981, Final residual = 0.01857663, No Iterations 3 time step continuity errors : sum local = 8.123623e07, global = 8.57249e08, cumulative = 1.17171e07 GAMGPCG: Solving for p_rgh, Initial residual = 0.004712629, Final residual = 1.693463e09, No Iterations 6 time step continuity errors : sum local = 2.931039e13, global = 4.719646e15, cumulative = 1.17171e07 ExecutionTime = 1.06 s ClockTime = 1 s Interface Courant Number mean: 0 max: 0 Courant Number mean: 0.0001562778 max: 0.1799902 deltaT = 0.0001346154 Time = 0.000384615 Selected 0 cells for refinement out of 32768. Selected 0 split points out of a possible 0. MULES: Solving for alpha1 Liquid phase volume fraction = 3.943487e06 Min(alpha1) = 0.03230549 Max(alpha1) = 1 MULES: Solving for alpha1 Liquid phase volume fraction = 7.886973e06 Min(alpha1) = 0.06461096 Max(alpha1) = 1 MULES: Solving for alpha1 Liquid phase volume fraction = 1.183046e05 Min(alpha1) = 0.09691642 Max(alpha1) = 1 GAMG: Solving for p_rgh, Initial residual = 0.527714, Final residual = 0.01038129, No Iterations 3 time step continuity errors : sum local = 5.175253e07, global = 2.021781e07, cumulative = 3.193491e07 GAMG: Solving for p_rgh, Initial residual = 0.009505424, Final residual = 0.0004487535, No Iterations 3 time step continuity errors : sum local = 3.3844e08, global = 8.449231e09, cumulative = 3.277983e07 GAMGPCG: Solving for p_rgh, Initial residual = 0.0004157884, Final residual = 4.699711e09, No Iterations 4 time step continuity errors : sum local = 3.91228e13, global = 3.629063e14, cumulative = 3.277984e07 ExecutionTime = 1.42 s ClockTime = 1 s Does anybody know the reason for this behaviour? 

October 12, 2011, 03:59 

#2 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,754
Rep Power: 29 
Hi Andreas
Two comments on this: 1. You are beginning with an empty domain and take alpha out of it. Is that what you want? 2. Try to add the momentum predictor in fvSolution and run the simulation again. My experience with the inter***Foam type solvers is that "2" is required, but in your case it is most probably caused by beginning with an empty domain. Kind regards, Niels 

October 12, 2011, 04:37 

#3  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,013
Rep Power: 43 
Quote:
If you get it too run I'd very much apprechiate it if you contribute the relevant changes (I'm sorry, but I currently don't have the time for this) Just some hints that might be helpful:  write out every timestep for a failing run and see where the trouble (negative alpha) starts  try to isolate the problem (although I'm afraid the problem is a mixture of the two):  make the inlet "stationary" by multiplying all instances of time() with 0  try to run the transient inlet without mesh refinement Bernhard 

October 13, 2011, 08:58 
problem solved

#4 
New Member
Andreas Otto
Join Date: Sep 2009
Posts: 11
Rep Power: 10 
Dear Bernhard,
you were right, it was a problem with the boundary conditions. I left alpha1BCs as given in the example and changed UBCs to /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: dev   \\ / A nd  Web: http://www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { floor { type fixedValue; value uniform (0 0 0); } atmosphere { type groovyBC; value uniform (0 0 0); variables "r1=0.25*(max(pts().x)min(pts().x));r2=r1*0.2*(10.5*cos(54*time()));"; valueExpression "(sqrt(pow(pos().xr1*sin(10*time()),2)+pow(pos().zr1*cos(15*time()),2))<r2) ? vector(0,1,0) : vector(0,0,0)"; } spill { type pressureInletOutletVelocity; phi phi; value uniform (0 0 0); } sides { type pressureInletOutletVelocity; phi phi; value uniform (0 0 0); } } and p_rghBcs to /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 1.6   \\ / A nd  Web: http://www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 2 0 0 0 0]; internalField uniform 0; boundaryField { floor { type buoyantPressure; value uniform 0; } sides { type totalPressure; value uniform 0; p0 uniform 0; U U; phi phi; gamma 1; value uniform 0; } spill { type buoyantPressure; value uniform 0; p0 uniform 0; U U; phi phi; gamma 1; value uniform 0; } atmosphere { type buoyantPressure; p0 uniform 0; U U; phi phi; rho rho; psi none; gamma 1; value uniform 0; } // ************************************************** *********************** // Now the case runs fine at least until the time 0.35s where I stopped the calculation after 16 hours runtime. By the way: very nice example. Perhaps you can include it in your next version of swak4FOAM. Andreas 

October 13, 2011, 15:12 

#5  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,013
Rep Power: 43 
Hi Andreas!
Quote:
Quote:
hg commit hg bundle splashFixBundle and send me the splashFixBundlefile. That way I can inject it into the repository, the changes will be attributed to you and I can't take credit for fixes I was too lazy to do myself Bernhard 

December 12, 2013, 04:42 

#6 
New Member
Faraj
Join Date: Feb 2010
Posts: 22
Rep Power: 9 
set alpha = 0.5 to all field


December 12, 2013, 05:29 

#7 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,013
Rep Power: 43 
I've been meditating on this sentence all morning. Is this the interFoamequivalent to "Kill'em all"?
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
BlockMesh FOAM warning  gaottino  OpenFOAM Native Meshers: blockMesh  7  July 19, 2010 14:11 
[ICEM] Hex refinement negative quality afterwards  Anorky  ANSYS Meshing & Geometry  8  March 22, 2010 04:25 
Axisymmetrical mesh  Rasmus Gjesing (Gjesing)  OpenFOAM Native Meshers: blockMesh  10  April 2, 2007 14:00 
Problems with repeating results  Lee  Siemens  4  May 26, 2006 03:39 
Determining alpha and beta for porous baffle  Liaqat Khan  Siemens  1  October 27, 2000 04:44 