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

TwoLiquidMixingFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2006, 14:05
Default Hi, I was wondering if anyone
  #1
New Member
 
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17
shawn is on a distinguished road
Hi,
I was wondering if anyone had an example of using the twoLiquidMixingFoam solver that they would be willing to share? The user and programer's reference don't seem to have one. I am interested in modeling some microfluidic mixers.

Cheers

Shawn Pfeil
shawn is offline   Reply With Quote

Old   November 13, 2006, 18:31
Default Enjoy, http://www.cfd-onli
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Enjoy,

twoStream.tgz

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 13, 2006, 19:54
Default I noticed in the controlDictio
  #3
New Member
 
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17
shawn is on a distinguished road
I noticed in the controlDictionary the solver is interFoam is twoLiquidMixingFoam not used? I'm a little bit of a newbie.

Thanks,
shawn is offline   Reply With Quote

Old   November 14, 2006, 13:21
Default Hi Hrv, (and others) I went t
  #4
New Member
 
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17
shawn is on a distinguished road
Hi Hrv, (and others)
I went to run the example you sent and got the following error:

--> FOAM FATAL ERROR : gradientInternalCoeffs cannot be called for a defaultFvPatchField.
(Actual type fixedMeanValue)
You are probably trying to solve for a field with a default boundary conditions.

From function defaultFvPatchField<type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basicFvPatchFields/default/defaultFvPatchField.C at line 421.

FOAM exiting

I noticed that when defining the boundary conditions you used an auxilary file outside of the blockMesh dictionary. The file boundary in the polyMesh/ directory. I'm a little new to OpenFOAM and am not entirely sure how this works. If somone has the time to clue me in I would greatly appreciate it. All the examples in the programing guide appear to have b.c.'s self contained in the blockMeshDictonary. Putting them in a seperate file has obvious advantages. I suspect my problem is that I have not figured out how to tell interFoam to look for the boundary file.

Cheers,

Shawn
shawn is offline   Reply With Quote

Old   November 14, 2006, 13:40
Default Aha, that's one of my new boun
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Aha, that's one of my new boundary conditions: change it to fixedValue and all will be well.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 14, 2006, 14:00
Default Hi, I still a little confused
  #6
New Member
 
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17
shawn is on a distinguished road
Hi,
I still a little confused. Is defaultFvPatchField a boundary condition you wrote? If so where is it referenced that I need to replace with a fixedValue? I didn't see it in the .OpenFOAM-1.3/Fields directory. Or do I need to replace some of the conditions in the blockMeshDictionary with fixedValue? Sorry for all the newbie questions.

Shawn
shawn is offline   Reply With Quote

Old   November 14, 2006, 14:14
Default edit 0/pd, line 42: change fix
  #7
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
edit 0/pd, line 42: change fixedMeanValue into fixedValue.

In any case, here's an updated version.

Hrv

twoStream.tgz

For the discussion on default b.c. please have a look through the forum - I have already explained this ad nauseum. :-)
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 14, 2006, 14:16
Default I figured it out.
  #8
New Member
 
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17
shawn is on a distinguished road
I figured it out.
shawn is offline   Reply With Quote

Old   January 26, 2007, 17:38
Default Hi, I was wondering if their
  #9
New Member
 
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17
shawn is on a distinguished road
Hi,
I was wondering if their is a simple way to make the viscosity in twoLiquidMixing foam a function of gamma. I am interested in mixing two newtonian liquids where the viscosity is a function of the fraction gamma. It seems like this should be fairly straightforward to code, but I wanted to ask the various c++ and OpenFoam masters before I invest the time. Also, if you could point me to the part of the code I need to tinker with that would be great.

Shawn
shawn is offline   Reply With Quote

Old   August 26, 2009, 02:46
Default
  #10
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 17
chiven is on a distinguished road
Hi, Dear Foamers, I update the example case using twoLiquidMixingFoam solver for OpenFOAM Version 1.6.

Enjoy,
Chiven
Attached Files
File Type: gz twoStream090826.gz (3.1 KB, 428 views)
chiven is offline   Reply With Quote

Old   May 4, 2010, 11:55
Default
  #11
New Member
 
Shawn Pfeil
Join Date: May 2010
Posts: 2
Rep Power: 0
shawn.pfeil is on a distinguished road
Hi,

I tried gunzip on the example and got out a binary file. I was expecting some directories? I just updated to OpenFOAM-1.6 and was hoping to find a good example to get up to speed.
shawn.pfeil is offline   Reply With Quote

Old   May 4, 2010, 12:32
Default
  #12
New Member
 
Shawn Pfeil
Join Date: May 2010
Posts: 2
Rep Power: 0
shawn.pfeil is on a distinguished road
I realized the file was a .tar.gz file and set up the example. It still gives an error. I ran blockMesh and then twoLiquidMixingFoam. The output is

Create time

Create mesh for time = 0


Reading g
Reading field p_rgh



--> FOAM FATAL IO ERROR:
cannot open file

file: /home/shp/OpenFOAM/OpenFOAM-1.6.x/tutorials/twoStream/0/p_rgh at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 62.

FOAM exiting

field p_rgh is not mentioned in any of the entries under system. What is this?

Shawn
shawn.pfeil is offline   Reply With Quote

Old   May 5, 2010, 05:45
Default
  #13
New Member
 
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16
yannH is on a distinguished road
Hi, I think you 've probably forgotten the "step" setFields

try this : blockMesh, setFields and finally twoLiquidMixingFoam

regards

Yann
yannH is offline   Reply With Quote

Old   May 18, 2010, 03:34
Default
  #14
Member
 
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 16
maolongliu is on a distinguished road
Sorry, I'm using this solver too.
I use your files.
Also I use setFields, but still no p_rgh file.


Quote:
Originally Posted by yannH View Post
Hi, I think you 've probably forgotten the "step" setFields

try this : blockMesh, setFields and finally twoLiquidMixingFoam

regards

Yann
maolongliu is offline   Reply With Quote

Old   May 18, 2010, 10:23
Default
  #15
Senior Member
 
Join Date: Dec 2009
Posts: 112
Rep Power: 17
heavy_user is on a distinguished road
Quote:
Originally Posted by hjasak View Post
Aha, that's one of my new boundary conditions: change it to fixedValue and all will be well.

Hrv
Hi Hrv,

is there a version of fixedMeanValue for Openfoam 1.6 yet ?
I would be really glad to get hold of it, if possible, since i have been dealing with a problem which might be solved by your boundary condition. But I kind of dislike the thought of going back do OF 1.5...or earlier.

thx & regards
heavy_user is offline   Reply With Quote

Old   May 20, 2010, 14:29
Default
  #16
Senior Member
 
Join Date: Dec 2009
Posts: 112
Rep Power: 17
heavy_user is on a distinguished road
omg, never mind my stupidity, plz!

Just figured it out ... for the records, fixedMeanValue works also with OF 1.6..

you need:

files file:
Code:
fixedMeanValueFvPatchFields.C

LIB = $(FOAM_USER_LIBBIN)/libfixedMeanValue
The options file needs only:

Code:
EXE_INC = \ 
      -I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \ 
       -lfiniteVolume
in the control dict you need to add:

Code:
libs ( "libfixedMeanValue.so" ) ;
heavy_user is offline   Reply With Quote

Old   May 24, 2010, 10:36
Default
  #17
Member
 
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 16
maolongliu is on a distinguished road
This is the one I modified on OpenFOAM 1.6.x.

Quote:
Originally Posted by maolongliu View Post
Sorry, I'm using this solver too.
I use your files.
Also I use setFields, but still no p_rgh file.
Attached Files
File Type: gz twoStream.tar.gz (43.3 KB, 203 views)
maolongliu is offline   Reply With Quote

Old   July 10, 2010, 11:43
Default
  #18
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Dear Foamers,

Does anyone of you know where I can find some informations about model being implemented in TwoLiquidMixingFoam, especially descriptions of the extra terms in NS equations ?
1. (fvc::grad(U) & fvc::grad(muEff))
2. what function reconstruct does ?

fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- mesh.magSf()*fvc::snGrad(p)
),
3. Why there is "- mesh.magSf()*fvc::snGrad(p)" to calculate pressure gradient instead of:
"-fvc::grad(p)" ?

Thanks for your help !
ZM
ziemowitzima is offline   Reply With Quote

Old   July 11, 2010, 06:47
Default
  #19
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by ziemowitzima View Post
2. what function reconstruct does ?

fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- mesh.magSf()*fvc::snGrad(p)
),
3. Why there is "- mesh.magSf()*fvc::snGrad(p)" to calculate pressure gradient instead of:
"-fvc::grad(p)" ?
They use flux reconstruction to introduce the pressure gradient and the buoyancy term (combined now with the introduction of p_rgh) in the momentum predictor. Due to this, the pressure gradient introduced as the contribution it gives to the flux, as argument of reconstruct().
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 12, 2010, 14:11
Default p_rgh at line 0
  #20
New Member
 
victor
Join Date: Jul 2010
Posts: 5
Rep Power: 16
vrosaless is on a distinguished road
Quote:
Originally Posted by maolongliu View Post
This is the one I modified on OpenFOAM 1.6.x.
Hello

Can you explain more on how to fix the error "p_rgh at line 0"

I get the same error for a case to run a wave Tank. I downloaded the file twoStream.tar.gz and but I got an error like the file is corrupted

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
vrosaless@ubuntu:~/Downloads$ gunzip twoStream.tar.g

Any help is wellcome

Thanks

Victor
vrosaless 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



All times are GMT -4. The time now is 13:08.