|
[Sponsors] |
interFoam: T-junction outlet boundary conditions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 2, 2020, 12:35 |
interFoam: T-junction outlet boundary conditions
|
#1 |
New Member
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6 |
Hello everybody,
I'm running some simulations in a T-junction (water enters through the vertical pipe and air through the horizontal one) using interFoam. The full case folder can be downloaded HERE (includes a .log file of the last simulation). The geometry and the mesh are the following (428k cells): Something strange is happening at the outlet, bubbles are not leaving the pipe in a proper way. These are the last pictures of the simulation, before the Courant number blows up: Air velocity is 0.5 m/s, water velocity is also 0.5 m/s. DeltaT is 1e-6, endTime is 0.0512. I paste here alpha.air, p_rgh and U files: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha.air; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet1 { type fixedValue; value uniform 1; } inlet2 { type fixedValue; value uniform 0; } walls1 { type constantAlphaContactAngle; theta0 155; limit gradient; value uniform 0; } walls2 { type fixedValue; value uniform 0; } outlet { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet1 { type fixedFluxPressure; value $internalField; } inlet2 { type fixedFluxPressure; value $internalField; } walls1 { type zeroGradient; } walls2 { type zeroGradient; } outlet { type fixedValue; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet1 { type fixedValue; value uniform (0.5 0 0); } inlet2 { type fixedValue; value uniform (0 -0.5 0); } walls1 { type noSlip; } walls2 { type noSlip; } outlet { type zeroGradient; } } // ************************************************************************* // I don't know where the error is. Outlet BC are zeroGradient for alpha.air and U files and fixedValue uniform 0 for pressure file (atmospheric pressure), all of them make sense to me. What should I change? Any help is appreciated, Carlos |
|
April 5, 2020, 12:59 |
|
#2 |
New Member
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6 |
Can someone help me, please?
|
|
April 6, 2020, 13:46 |
|
#3 |
New Member
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6 |
I would appreciate it
|
|
April 6, 2020, 17:07 |
|
#4 |
Member
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 14 |
Hi,
I downloaded and modified your case as follows: Controldict: AdjustTimeStep: Yes MaxCo: 1 MaxAlphaCo: 0.5 Boundary conditions for outlet patch: U: pressureInletOutletVelocity p_rgh: prghTotalPressure, P0 uniform 1e5 alpha.air: inletOutlet, inletvalue 0 Seems to run just fine. The time step is low, but that is to be expected as your geometry is only about 6 mm long. The velocity is quite significant for such a small geometry Animation of my results: https://drive.google.com/file/d/19v-...ew?usp=sharing |
|
April 8, 2020, 12:29 |
|
#5 | |
New Member
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6 |
Quote:
thank you very much! The key was to activate AdjustTimeStep, limiting the Courant number. I have 2 questions:
Thank you in advance, Carlos |
||
April 9, 2020, 17:14 |
|
#6 | |
Member
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 14 |
Quote:
I used paraview "save animation" to export each timestep to a png. You can combine these to make a video file. The filter used is "clip" set to alpha scalar (not inverted). Reduce opacity to "see through" the bubbles. It could be advantageous to extend your computational domain if you want to capture the actual flow conditions at the outlet. Are you trying to replicate experimental conditions? Is your geometry actually submerged in water or air? |
||
April 9, 2020, 19:27 |
|
#7 | ||
New Member
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6 |
Quote:
Quote:
Here the inlets are changed (liquid through the horizontal and air through the vertical), but the results at the outlet should be similar. In both cases the bubbles are exiting the geometry without any deformation. I want to replicate this behavior. I don't know if just changing some BC I can get this result or if the problem is more complex. In the paper they use the following BCs: I copied the BCs and I got the same results as before, the diameter of the bubbles gets smaller at the outlet... Any idea? Thank you very much gkarlsen |
|||
April 10, 2020, 04:08 |
|
#8 |
Member
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 14 |
There is probably a "correct" way to do this, but personally I would just elongate the horizontal part of the pipe for the simulation, and then cut it back to size during post processing. This should eliminate the disturbance from the BC at the outlet. I do not think bubbles would exit undisturbed in real life. The bouyancy/gravity alone could warp them.
|
|
May 20, 2022, 16:37 |
Can you request help
|
#9 |
New Member
mumu
Join Date: May 2022
Posts: 3
Rep Power: 4 |
Hello
I'm new to OpenFOAM and I'm trying to run a similar question. The blockMesh has always been unsuccessful, can you give me a blockMesh file? Thank you. |
|
Tags |
boundary condition, bubble, interfoam, t-junction |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam (HELYX-OS) pressure boundary conditions | SFr | OpenFOAM Running, Solving & CFD | 8 | June 23, 2016 17:36 |
Velocity vector in impeller passage | ngoc_tran_bao | CFX | 24 | May 3, 2016 22:16 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |