|
[Sponsors] |
September 23, 2015, 04:57 |
Two-Phase Inlet Velocities [solved]
|
#1 |
New Member
Join Date: Sep 2015
Posts: 4
Rep Power: 10 |
Hello,
i am trying to simulate two-phase flow coming from a set of large pipes, flowing through a number of interconnected chambers and pipes, and exiting through another pipe. there are some open boundaries through which air can enter and exit. i am using interFoam based on the multiphase/interFoam/ras examples. while it is super slow (~7s per 24h walltime on 12 cores), it works, as long as i use alpha=1 on the inlets. now i want to adjust inlet conditions. i know how much water goes in and how fast it is. the first thing i tried was to adjust alpha and just set fixedValue velocities for my inlets and check the flow using functionObjects. while that results in the right amount of water, it pushes way to much air into the system, resulting in very high velocities (air) and an even slower simulation. also the spraying of a mixture is just not what i need. what i want is a nice stream of water on the bottom of my inlets and just a bit of air above that. now i know i could split the inlet patches while meshing and set them up as two individual boundaries - but as i have a set of different inflows i would like to try, that would mean making a whole bunch of models in blender and having to snappyhexmesh them all. redoing the process every time i think of another inflow to test. is there a better way? can i specify per phase velocities on the same inlet patch? any scriptable way? Last edited by ninnghazad; September 25, 2015 at 11:16. |
|
September 25, 2015, 05:49 |
Progress, but no success
|
#2 |
New Member
Join Date: Sep 2015
Posts: 4
Rep Power: 10 |
so i found funkySetBoundaryFields, and it seems to be just what i need. but i still have some problems with it. while i am able to set alpha nicely, the velocities i try to set the same way get ignored. this is my funkySetBoundaryDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object funkySetBoundaryDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // velocities { field U; expressions ( { target value; patchName "inlet_0"; expression "(pos().z<=2.639655604) ? -11.99 : 0"; } { target value; patchName "inlet_1"; expression "(pos().z<=2.71130699) ? -9.84 : 0"; } ); } alpha { field alpha.water; expressions ( { target value; patchName "inlet_0"; expression "(pos().z<=2.639655604) ? 1 : 0"; } { target value; patchName "inlet_1"; expression "(pos().z<=2.71130699) ? 1 : 0"; } ); } so i looked at the examples that came with swak4Foam and saw this in funkySetBoundaryDict.dambreak: Code:
expression "(pos().y<thres) ? vector(1,0,0)*(maxY-pos().y) : vector(0,0,0)"; edit: i found out about normal() funkySetBoundaryDict syntax, but still only alpha gets set, U won't change... Last edited by ninnghazad; September 25, 2015 at 08:45. |
|
September 25, 2015, 11:16 |
|
#3 |
New Member
Join Date: Sep 2015
Posts: 4
Rep Power: 10 |
wohoo! it works!
the problem was my 0/U, i still had remnants of old tries in there, but as i fixed my inlets to look like this: Code:
inlet_0 { type fixedValue; value uniform (0 0 0); } Code:
expression "(pos().z<=2.639655604) ? normal()*-11.99 : vector(0,0,0)"; out of interest i also tried it with Code:
expression "(pos().z<=2.639655604) ? -11.99 : 0"; Code:
target refValue; |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VOF Inlet condition | Rizwan | FLUENT | 15 | July 5, 2018 16:33 |
Wrong velocities at first cell of velocity inlet boundaries | Bahram | OpenFOAM Bugs | 9 | September 24, 2015 10:52 |
iteration questions in discrete phase | iknowjesus | FLUENT | 4 | March 13, 2015 06:07 |
Three Phase flow into a reservoir... | akjha | Main CFD Forum | 0 | December 15, 2014 07:01 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 05:13 |