CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

using setFields to make a sinusodial phase condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 9, 2011, 17:12
Default using setFields to make a sinusodial phase condition
  #1
Member
 
Walter Schostak
Join Date: May 2011
Posts: 35
Rep Power: 5
wschosta is on a distinguished road
Hello foamers!

I'm working on a two phase flow simulation that will (hopefully eventually) model the kelvin helmholtz instability test. I was wondering if it's possible to set an initial phase condition other than a box using the setFields command. Currently what I'm doing is rewriting all of the alpha1 and U values from within createFields.H and I feel like this is a very roundabout way of accomplishing what I'm trying to do.

So, any suggestions on setFields? I know it goes back to setFieldsDict but I don't know what the possible parameters are.
wschosta is offline   Reply With Quote

Old   June 10, 2011, 10:10
Default
  #2
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 8
gwierink is on a distinguished road
Hi Walter,

Have a look at swak4Foam.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   June 13, 2011, 17:05
Default
  #3
Member
 
Walter Schostak
Join Date: May 2011
Posts: 35
Rep Power: 5
wschosta is on a distinguished road
Hi Gijs, I have considered using the groovyBC and funkyFields parts of swak4Foam but for my purposes it would be optimal to only use the functions contained within the distributed libraries of OpenFOAM. I realize the documentation of such functions isn't as great as user made functions such as those in swak4Foam but it's a burden I have to live with.

I appreciate your input but I guess I'll just stick to setFields and the reassigning loops I've constructed.
wschosta is offline   Reply With Quote

Old   June 14, 2011, 02:11
Default
  #4
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 8
gwierink is on a distinguished road
Hi Walter,

Alright, well, many things are possible with the "standard" OpenFOAM pack as well. There are also other cell selection methods, to call it like that, in e.g. the cellSet utility. For instance, nearestToCell, sphereToCell, surfaceToCell, and so on. Maybe having a look there is useful. cellSet lives in: $FOAM_UTILITIES/mesh/manipulation/cellSet

Hope that is of any help.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 9, 2011, 15:20
Default
  #5
New Member
 
Concordia_CFD
Join Date: Jul 2010
Location: Canada
Posts: 24
Rep Power: 6
marzbali is on a distinguished road
Hello Gijs,

Do these functioned that you mentioned such as sphereToCell work in 2D axisymmetric simulations? Because I tried to patch a droplet in my domain and I got a cylinder instead!! I have used sphereToCell, cellSet, FunkySet and they all gave me the same shape!

Thanks a lot in advance.
Marzbali
marzbali is offline   Reply With Quote

Old   November 9, 2011, 19:29
Default
  #6
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 8
gwierink is on a distinguished road
Hi Marzbali,

A sphere in 2D should result in a cylinder of one cell length. If you would a like to set a cylinder specifically, there is also a cylinderToCell function. To be honest, I do not really understand the problem. In 2D you should get a circle/cylinder, right?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 9, 2011, 23:47
Default
  #7
New Member
 
Concordia_CFD
Join Date: Jul 2010
Location: Canada
Posts: 24
Rep Power: 6
marzbali is on a distinguished road
sorry I found my mistake, i didn't consider x as my axis!
marzbali is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VOF for single phase? vuccj7 FLUENT 0 April 20, 2011 20:59
wall boundary condition for dispersed phase dicara CFX 3 October 27, 2010 05:50
Source Term used in Eulerian Model(Two phase) Padian FLUENT 1 May 19, 2008 04:47
OpenFOAM with IBM AIX matthias OpenFOAM Installation 20 March 25, 2008 04:36
a way to make lots of money quick and easy no lies Dob Main CFD Forum 0 October 10, 2006 17:45


All times are GMT -4. The time now is 01:15.