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

Initializing freesurface in 3D geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2007, 06:42
Default Dear OpenFOAM users I am lo
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Dear OpenFOAM users

I am looking for help on specifying free-surface interface for a 3d geometry. The problem setup is following:

I have a shake-flask geometry. I am using interFoam to simulate the mixing of two fluids. Right now I am stuck with how to specify the height of the free surface. In CFX it could be done easily using the step function (ref. tutorial 7 of CFX). I am attaching the figure for clarity.



Please help me !!!!
Thanks in advance

With Kind regards
Jaswi
jaswi is offline   Reply With Quote

Old   June 4, 2007, 11:08
Default setField?
  #2
liu
Senior Member
 
Xiaofeng Liu
Join Date: Mar 2009
Location: State College, PA, USA
Posts: 118
Rep Power: 17
liu is on a distinguished road
setField?
__________________
Xiaofeng Liu, Ph.D., P.E.,
Assistant Professor
Department of Civil and Environmental Engineering
Penn State University
223B Sackett Building
University Park, PA 16802


Web: http://water.engr.psu.edu/liu/
liu is offline   Reply With Quote

Old   June 4, 2007, 11:17
Default Thanks Liu. I have looked i
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Thanks Liu.

I have looked into the dambreak problem and trying with the box option. What i am not sure is that whether one could use the box command to specify a 3d region. box requires min and max. right now my approach is trial and error :-). If you please know how box works then please help

Kind Regards
Jaswi
jaswi is offline   Reply With Quote

Old   June 4, 2007, 11:54
Default In setField you specify the co
  #4
New Member
 
Joakim Möller
Join Date: Mar 2009
Posts: 26
Rep Power: 17
joakim is on a distinguished road
In setField you specify the coordinates of the boxdiagonal. For example, if you specify the coordinates of a unitbox centered at origo you would do

(-0.5,-0.5,-0.5) (0.5,0.5,0.5)

If your box can enclose the region of interest than this should be straight forward.

Good luck

/Joakim
joakim is offline   Reply With Quote

Old   June 5, 2007, 05:30
Default Thanks a lot Joakim. It works
  #5
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Thanks a lot Joakim. It works !!!!. Just one last doubt :-)...
The domain is cylindrical and the box command is rectangular. I am specifying a box with the size a little larger than my cylinder. Does setField works on the set :

(cylinder) Intersection (box)
----
Also i have seen some people using funkySetField. Did u ever come across it !!!. With box command the interface is not very sharp and i am just wondering if funkySetField will give sharper interface. I am just a bit short of time to give it a try for now :-)


Thanks once again. U saved my life :-D

With Kind Regards
Jaswi
jaswi is offline   Reply With Quote

Old   June 5, 2007, 05:44
Default Hi Jaswi Yes it works fine.
  #6
New Member
 
Joakim Möller
Join Date: Mar 2009
Posts: 26
Rep Power: 17
joakim is on a distinguished road
Hi Jaswi

Yes it works fine.
I have never tried the funkySetField.

Hope things works for you.

Regards

/Joakim
joakim is offline   Reply With Quote

Old   June 5, 2007, 07:20
Default Hi Jaswi! @funkySetFields:
  #7
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 Jaswi!

@funkySetFields: I don't know what you mean with sharp. With

funkySetField . yourCase -field gamma -condition "pos().z<0" -expression "1."

you would get a partially filled geometry. The "problem" (and I think the same is true for setFields with the box option) is that the condition is only evaluated for the centers of the cells. So if the cell layer around z==0 is not "parallel" to the xy-plane you might get a "ragged" interface (no partially filled cells). So actually it produces a "sharper" interface than is desirable for that case
__________________
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   June 5, 2007, 08:50
Default Thanks a lot Bernhard shall
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Thanks a lot Bernhard

shall give it a try :-)

Regards
Jaswi

PS: Bernhard I am posting a further query. Please take a look at your convenience.
jaswi is offline   Reply With Quote

Old   August 20, 2008, 12:10
Default Hi, I download "funkSetfiel
  #9
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi,

I download "funkSetfields" from the wiki page, when I try to compile it, I run into erros:

//***************
./ValueExpressionDriver.H:22: error: incomplete type 've::ValueExpressionParser' used in nested name specifier
./ValueExpressionDriver.H:22: error: 'yylval' was not declared in this scope
./ValueExpressionDriver.H:22: error: expected primary-expression before '*' token
./ValueExpressionDriver.H:22: error: 'yylloc' was not declared in this scope
./ValueExpressionDriver.H:22: error: expected primary-expression before '&' token
./ValueExpressionDriver.H:22: error: 'driver' was not declared in this scope
./ValueExpressionDriver.H:22: error: initializer expression list treated as compound expression
ValueExpressionParser.tab.cc: In member function 'virtual int yy::ValueExpressionParser::parse()':
ValueExpressionParser.tab.cc:409: error: 'velex' cannot be used as a function
In file included from ValueExpressionParser.yy:63,
from ./ValueExpressionDriver.H:11,
from ValueExpressionLexer.ll:3:
./ValueExpressionDriverLogicalTemplates.H:7: error: expected initializer before '<' token
./ValueExpressionDriverLogicalTemplates.H:13: error: expected initializer before '<' token
./ValueExpressionDriverLogicalTemplates.H:48: error: invalid use of incomplete type 'struct ValueExpressionDriver'
ValueExpressionParser.yy:27: error: forward declaration of 'struct ValueExpressionDriver'
./ValueExpressionDriverLogicalTemplates.H:74: error: invalid use of incomplete type 'struct ValueExpressionDriver'
ValueExpressionParser.yy:27: error: forward declaration of 'struct ValueExpressionDriver'
./ValueExpressionDriverLogicalTemplates.H:105: error: invalid use of incomplete type 'struct ValueExpressionDriver'
ValueExpressionParser.yy:27: error: forward declaration of 'struct ValueExpressionDriver'
./ValueExpressionDriverLogicalTemplates.H:133: error: invalid use of incomplete type 'struct ValueExpressionDriver'
ValueExpressionParser.yy:27: error: forward declaration of 'struct ValueExpressionDriver'
In file included from ValueExpressionLexer.ll:3:
./ValueExpressionDriver.H:22: error: incomplete type 've::ValueExpressionParser' used in nested name specifier
./ValueExpressionDriver.H:22: error: 'yylval' was not declared in this scope
./ValueExpressionDriver.H:22: error: expected primary-expression before '*' token
./ValueExpressionDriver.H:22: error: 'yylloc' was not declared in this scope
./ValueExpressionDriver.H:22: error: expected primary-expression before '&' token
./ValueExpressionDriver.H:22: error: 'driver' was not declared in this scope
./ValueExpressionDriver.H:22: error: initializer expression list treated as compound expression
lex.ve.c:6945: error: redefinition of 'int velex'
./ValueExpressionDriver.H:22: error: 'int velex' previously defined here
lex.ve.c:6945: error: incomplete type 've::ValueExpressionParser' used in nested name specifier
lex.ve.c:6945: error: 'yylval' was not declared in this scope
lex.ve.c:6945: error: expected primary-expression before '*' token
lex.ve.c:6945: error: 'yylloc' was not declared in this scope
lex.ve.c:6945: error: expected primary-expression before '&' token
lex.ve.c:6945: error: 'driver' was not declared in this scope
ValueExpressionParser.tab.cc: In member function 'unsigned char yy::ValueExpressionParser::yytranslate_(int)':
ValueExpressionParser.tab.cc:2141: warning: use of old-style cast
ValueExpressionParser.yy: At global scope:
ValueExpressionParser.yy:327: error: expected unqualified-id before '&' token
ValueExpressionParser.yy:327: error: expected ',' or '...' before '&' token
ValueExpressionParser.yy:327: error: invalid use of incomplete type 'struct ve::ValueExpressionParser'
//************************

Could anyone give me some ideas?

BTW:I read the "README" file, it says it works for OF 1.4, but I am now using 1.4.1-dev

Kind regards

feng
fw407 is offline   Reply With Quote

Old   August 20, 2008, 13:27
Default Hi, I get some idea from th
  #10
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi,

I get some idea from the following link, and the problem is solved.....

http://www.cfd-online.com/OpenFOAM_D...ges/1/368.html

kind regards

feng
fw407 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
Problem in Initializing Blocking for 2d geometry nitin Dewangan CFX 6 October 24, 2008 01:03
Effects of turbulence on freesurface sek OpenFOAM Running, Solving & CFD 4 March 22, 2008 21:48
Need following paper about freesurface analysis Morteza Main CFD Forum 1 July 13, 2006 13:32
Difficult BCs about Freesurface Simulation by VOF Yongguang Cheng FLUENT 0 September 19, 2003 07:39
FreeSurface simulation Chengxuan Fu Siemens 0 January 27, 2001 06:08


All times are GMT -4. The time now is 05:52.