# Permeability filling of container outlet condition

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

 November 30, 2005, 06:02 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; }

 November 30, 2005, 15:27 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...

 December 1, 2005, 06:56 Well, a primitive suggestion. #3 Member   sergei shulepov Join Date: Mar 2009 Posts: 37 Rep Power: 10 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.

 December 1, 2005, 11:37 Thanks Sergei, Henry, what #4 unoder Guest   Posts: n/a Thanks Sergei, Henry, what are your comments on this problem?

 April 12, 2006, 22:40 Hi, I am also curious about t #5 New Member   Look Join Date: Mar 2009 Posts: 5 Rep Power: 10 Hi, I am also curious about this question. Does anyone have any idea? Thank you.

 August 14, 2006, 13:15 I am interested in this issue. #6 Senior Member   Billy Join Date: Mar 2009 Posts: 167 Rep Power: 10 I am interested in this issue. Any developments?

 January 18, 2008, 10:18 Hi all, I would like to si #7 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 January 18, 2008, 10:53 Hi Francesco, if you want t #8 Member     Eric Lillberg Join Date: Mar 2009 Location: Stockholm Posts: 80 Rep Power: 10 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

 January 18, 2008, 12:45 Hi Eric, I've put an outlet #9 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 January 18, 2008, 15:15 Hmm... That would mean a BC #10 Member     Eric Lillberg Join Date: Mar 2009 Location: Stockholm Posts: 80 Rep Power: 10 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

 January 21, 2008, 10:15 Hi Eric, I cannot drill a h #11 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 January 21, 2008, 13:36 Hi Francesco! I think the s #12 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,020 Rep Power: 43 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

 January 22, 2008, 04:45 Hi Bernhard, I could implem #13 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 January 22, 2008, 06:23 Hi Francesco! The question #14 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,020 Rep Power: 43 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

 January 22, 2008, 10:27 Hi Bernhard, I'd like to us #15 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 January 31, 2008, 10:09 Hi Bernhard, as I said in #16 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 February 6, 2008, 05:00 Hi all, I've tried to creat #17 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 February 6, 2008, 05:28 Ok, I think I've found the err #18 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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

 February 7, 2008, 12:19 Hi all, now I'm having tro #19 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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 filterFvPatchField::filterFvPatchField ( const fvPatch& p, const DimensionedField& iF, const volScalarField& gamma ) : mixedFvPatchField(p, iF), gamma_("gamma") { this->refValue() = *this; this->refGrad() = pTraits::zero; this->valueFraction() = 0.0; } and the updateCoeffs is template void filterFvPatchField::updateCoeffs() { if (this->updated()) { return; } this->valueFraction() = 1.0 - gamma_(); mixedFvPatchField::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

 February 8, 2008, 12:36 I think I've fixed some issues #20 Member   Francesco Boschetto Join Date: Mar 2009 Location: Italy Posts: 56 Rep Power: 10 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 ( gammaName_, reinterpret_cast(NULL), reinterpret_cast(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::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) ()' Can someone explain me how to fix them? Pls Thanks in advance Francesco

 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 Arman FLUENT 2 September 22, 2007 13:08 namrata FLUENT 6 May 2, 2007 10:23 JM Main CFD Forum 0 December 15, 2006 09:07 Anis Phoenics 0 May 5, 2006 09:38 Tol na Deen CFX 2 July 23, 2002 08:49

All times are GMT -4. The time now is 22:16.