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

Permeability filling of container outlet condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 30, 2005, 05:02
Default Hi, I have 2 phases with in
  #1
unoder
Guest
 
Posts: n/a
Hi,

I have 2 phases with interFoam. I suppose they're both incompressible so I need an outlet in order to fill the container entirely with water. The shape is U-formed, so the problem is that the container will not be filled completely since now both phases are led out from outlet-section, *before* the container is entirely filled with water.

I want only to allow air to be led out, trapping the water inside the container. It's like applying permeability to the surrounding walls and I want to compare flow result with another program in which the permeability around the container is 250 cm^3/min. Perhaps it's not possible to apply a condition like this to Foam but any suggestions that will give comparable results are most welcome.

How do I do this? My outlet boundary condition so far is:

U:
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

gamma:
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

pd:
outlet
{
type fixedValue;
value uniform 0;
}
  Reply With Quote

Old   November 30, 2005, 14:27
Default Well, question asked in anothe
  #2
unoder
Guest
 
Posts: n/a
Well, question asked in another way: What would you do to simulate filling of a container completely? Don't tell me it can't be done in Foam...
  Reply With Quote

Old   December 1, 2005, 05:56
Default Well, a primitive suggestion.
  #3
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Well, a primitive suggestion. Make some few short outlets in walls of a container. Walls of those outlets should be hydrophobic (consult Henry, whether you can set the contact angle to 180).
Dimensions of the outlet you may want to compute from capillary pressure.
sergei is offline   Reply With Quote

Old   December 1, 2005, 10:37
Default Thanks Sergei, Henry, what
  #4
unoder
Guest
 
Posts: n/a
Thanks Sergei,

Henry, what are your comments on this problem?
  Reply With Quote

Old   April 12, 2006, 22:40
Default Hi, I am also curious about t
  #5
New Member
 
Look
Join Date: Mar 2009
Posts: 5
Rep Power: 17
look is on a distinguished road
Hi,
I am also curious about this question. Does anyone have any idea?
Thank you.
look is offline   Reply With Quote

Old   August 14, 2006, 13:15
Default I am interested in this issue.
  #6
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
I am interested in this issue. Any developments?
billy is offline   Reply With Quote

Old   January 18, 2008, 09:18
Default Hi all, I would like to si
  #7
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi all,

I would like to simulate the filling of a container, but don't know which boundary conditions to choose.

I've put inflow on the left side of my box, wall on the upper, lower and right side, empty on the front and back side (since i want to simulate a 2D domain).

I initialize the first cell on the left side to gamma = 1 and the other to gamma = 0.

My simulation fail to start, probably for the BC, How can I solve this issue? Does anyone have any suggestions?

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   January 18, 2008, 09:53
Default Hi Francesco, if you want t
  #8
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Hi Francesco,

if you want to fill something with something which allready contains something, you need to let that something out or compress it really much.

br

/eric
lillberg is offline   Reply With Quote

Old   January 18, 2008, 11:45
Default Hi Eric, I've put an outlet
  #9
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi Eric,

I've put an outlet at the right side of my box and now I succeed in filling it .
Now the problem is that the outlet surface doesn't behave as a wall for the fluid I have let in (gamma = 1). I'd like this surface to behave as a filter letting pass only the fluid with gamma = 0. How could I reach this aim?

Thank you in advance

Francesco
francesco_b is offline   Reply With Quote

Old   January 18, 2008, 14:15
Default Hmm... That would mean a BC
  #10
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Hmm...

That would mean a BC which has zeroGradient for the volocity for gamma=0 and wall for gamma > 0. Could be implemented but doesn't exist to my knowledge.

Try drilling a hole in the upper wall to let the air out. Or change the upper wall BC to atmospheric.

Good luck

//Eric
lillberg is offline   Reply With Quote

Old   January 21, 2008, 09:15
Default Hi Eric, I cannot drill a h
  #11
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi Eric,

I cannot drill a hole or put atmospheric BC since it is an injection molding process; this kind of BC would change the behaviour of the fluid. Any hint about how to implement my condition? Or about how to solve my problem?

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   January 21, 2008, 12:36
Default Hi Francesco! I think the s
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Francesco!

I think the solution to your problem would be to implement a boundary condition that is based on the mixed-condition and changes the valueFraction according to gamma. There are conditions in the sources that do similar things (have a look at inletOutlet) and use them as a template

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   January 22, 2008, 03:45
Default Hi Bernhard, I could implem
  #13
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi Bernhard,

I could implement this boundary condition as you suggest but I think this would not solve my problem since the flow is modified by the presence of the outflow and the result is not as I wish.

I've discuss about this problem also in the thread: "Injection of a fluid into a cavity"

You can see there my opinion about the whole problem. I appreciate any comments

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   January 22, 2008, 05:23
Default Hi Francesco! The question
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Francesco!

The question is: where does the air get out in "real life"? Through the inlet (as some backflow in the gamma=0 part you were describing above)? And what kind of condition are you using for the velocity there (propably fixedValue)?

Maybe a "gamma"-switched boundary conditon for the velocity (fixedValue for the parts with gamma=1, zeroGradient for the rest) would be the solution

Bernhard

PS: the "simple"=="no programming needs to be done" solution would be to split the inlet condition in two parts - a "lower" one with gamma=1, velocity fixedValue and a "upper" with gamma=0, velocity zeroGradient. But maybe I misunderstand your problem completely - could you provide us with a sketch?
__________________
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
gschaider is offline   Reply With Quote

Old   January 22, 2008, 09:27
Default Hi Bernhard, I'd like to us
  #15
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi Bernhard,

I'd like to use OF to simulate the injection of a fluid into a cavity which is empty, this is what molding softwares actually do. The presence of air makes the simulation more expensive and complicated. I've chosen the interFoam solver for the interface tracking, but I've had outlet problems, this seems to be the wrong way.
Probably it could better to use a single fluid solver, but I don't know which solver could perform this tasks:

1) Computation of the interface of fluid
2) Computation of the flow behind the interface

some important issues are:
A) Domain change every time-step
B) Flow is compressible and termodynamical effects are to be considered

I think the most difficult problem is A. Any hints about which solver could be the starting point?

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   January 31, 2008, 09:09
Default Hi Bernhard, as I said in
  #16
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi Bernhard,

as I said in a different thread. after many tries I think that interFoam could be a good start point, the problem of the outlet could be fixed with your suggestion. I'm trying now to realize this kind of "gamma-switched" BC.

Thank you for your help, I'll tell you if it works

Francesco
francesco_b is offline   Reply With Quote

Old   February 6, 2008, 04:00
Default Hi all, I've tried to creat
  #17
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi all,

I've tried to create the new boundary condition, but I've got some issues. I tell what I've done, so maybe someone could tell me which is my error.

I've copied the folder "outletInlet" which is in $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived to $FOAM_SRC/, renamed it "filterFvPatchField" and I've replaced the word "outletInlet" with "filter" inside the files. Than I've typed

cp -r $WM_PROJECT_DIR/src/filter $WM_PROJECT_USER_DIR/applications
cd $WM_PROJECT_USER_DIR/applications/filter

In the Make folder I've changed files and options to:

files:

filterFvPatchField.C

LIB = $(FOAM_USER_LIBBIN)/libfilterFvPatchField

options:

EXE_INC = \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \
-ltriSurface \
-lmeshTools \
-lfiniteVolume \
-lfilterFvPatchField

When I use the command

wmake libso

It gives me errors. I think that there's something wrong in the "files" and/or "options" but I cannot find what. Is it what I'm doing correct?

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   February 6, 2008, 04:28
Default Ok, I think I've found the err
  #18
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Ok, I think I've found the errors:

- in Make/files it should be filterFvPatchFields.C with the final "s".

- in Make/options I've add -L$(FOAM_USER_LIBBIN) to -lfilterFvPatchField

I've typed wmake libso and now it gave me the "up to date" message
francesco_b is offline   Reply With Quote

Old   February 7, 2008, 11:19
Default Hi all, now I'm having tro
  #19
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi all,

now I'm having trouble with the boundary condition. I've copied outletInlet and I've tried to write valueFraction as a function of gamma, but when I compile I get some issues about gamma.

The file filterFvPatchField.C has

template<class>
filterFvPatchField<type>::filterFvPatchField
(
const fvPatch& p,
const DimensionedField<type,>& iF,
const volScalarField& gamma
)
:
mixedFvPatchField<type>(p, iF),
gamma_("gamma")
{
this->refValue() = *this;
this->refGrad() = pTraits<type>::zero;
this->valueFraction() = 0.0;
}

and the updateCoeffs is

template<class>
void filterFvPatchField<type>::updateCoeffs()
{
if (this->updated())
{
return;
}

this->valueFraction() = 1.0 - gamma_();

mixedFvPatchField<type>::updateCoeffs();
}

}

I know that there are some errors, but I'm new to C++ and it is hard to understand this kind of code for me.

Can someone explain me which are the errors and how to fix them?

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   February 8, 2008, 11:36
Default I think I've fixed some issues
  #20
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
I think I've fixed some issues but still now I got some errors

on line 131 I have:

const volScalarField& gammap = gamma().mesh().lookupObject<volscalarfield>
(
gammaName_,
reinterpret_cast<const>(NULL),
reinterpret_cast<const>(NULL)
);

and on line 138:

this->valueFraction() = 1.0 - gammap();

I got this errors:

In file included from filterFvPatchField.H:142,
from filterFvPatchFields.H:30,
from filterFvPatchFields.C:29:
/usr/include/bits/mathcalls.h: In member function 'virtual void Foam::filterFvPatchField<type>::updateCoeffs()':
/usr/include/bits/mathcalls.h:265: error: too few arguments to function 'double gamma(double)'
filterFvPatchField.C:131: error: at this point in file
filterFvPatchField.C:131: error: expected primary-expression before '>' token
filterFvPatchField.C:138: error: no match for call to '(const Foam::GeometricField<double,>) ()'

Can someone explain me how to fix them? Pls

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Reply


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
outlet boundary condition Arman FLUENT 2 September 22, 2007 13:08
how to set boundary condition for a tank filling w namrata FLUENT 6 May 2, 2007 10:23
VOF Outlet boundary condition in cfd - ace JM Main CFD Forum 0 December 15, 2006 08:07
outlet condition in SEM Anis Phoenics 0 May 5, 2006 09:38
outlet Boundary condition Tol na Deen CFX 2 July 23, 2002 08:49


All times are GMT -4. The time now is 14:04.