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

InterFoam- rotating wall. Initializing swirl in setFields

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

Like Tree1Likes
  • 1 Post By vonboett

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2012, 03:05
Default InterFoam- rotating wall. Initializing swirl in setFields
  #1
New Member
 
Krishna Sandeep
Join Date: Jun 2012
Posts: 12
Rep Power: 13
Krishna Sandeep is on a distinguished road
Hi everyone,
I am using interFoam to capture the interface between air and water in a rotating tank. I need to patch the initial swirl to the water field so that it doesn't take much time for the momentum to be transferred to water from the rotating tank wall. Can I initialize it using setFields directory? Please help me with this.

Regards
Sandeep.
Krishna Sandeep is offline   Reply With Quote

Old   June 28, 2012, 09:17
Default
  #2
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
Do you know the shape and velocity of the initial swirl?

If yes, you can do some bad workaround by using a dummy setFieldsDict that defines after the defaultFieldValues (...); for example regions ( boxToCell{ box (coordinates of lower-back box edge) (coordinates of upper-front box edge); fieldValues( volScalarFieldValue alpha1 1 volVectorFieldValue U (0 0 1); } );
If you call setFields your initial U and alpha1 fields will be filled with as many entries as you have cells in your grid. Now you can overwrite each of these lines with the correct field value, but this needs soem exel sheet work first to account for the fact that you have to know for each line which cell / which position it is related to. But be aware not to conflict with boundary settings, otherwhise these have to be adjusted the same way.

Much better would be to run the case with a much coarser grid so that you get a rough swirl, and then using mapFields to project your values from the coarse grid case to the fine grid case. Yust keep in mind that for mapping the time folders of the coarse case folder and the fine case folder have to be the same and have to correspond to the startTime in controlDict, so if you ran your coarse simulation until t=10s and you want to map your solution of the folder 10 to the fine case, rename your 0 folder in the fine case to 10, change the startTime in your controlDict to 10, call mapFields, and then rename your fine folder 10 to your starting folder 0. Somehow irritating to explain but you ll see what I mean if you try it out.
Krishna Sandeep likes this.
vonboett is offline   Reply With Quote

Old   June 28, 2012, 12:29
Default
  #3
New Member
 
Krishna Sandeep
Join Date: Jun 2012
Posts: 12
Rep Power: 13
Krishna Sandeep is on a distinguished road
Quote:
Originally Posted by vonboett View Post
Do you know the shape and velocity of the initial swirl?

If yes, you can do some bad workaround by using a dummy setFieldsDict that defines after the defaultFieldValues (...); for example regions ( boxToCell{ box (coordinates of lower-back box edge) (coordinates of upper-front box edge); fieldValues( volScalarFieldValue alpha1 1 volVectorFieldValue U (0 0 1); } );
If you call setFields your initial U and alpha1 fields will be filled with as many entries as you have cells in your grid. Now you can overwrite each of these lines with the correct field value, but this needs soem exel sheet work first to account for the fact that you have to know for each line which cell / which position it is related to. But be aware not to conflict with boundary settings, otherwhise these have to be adjusted the same way.

Much better would be to run the case with a much coarser grid so that you get a rough swirl, and then using mapFields to project your values from the coarse grid case to the fine grid case. Yust keep in mind that for mapping the time folders of the coarse case folder and the fine case folder have to be the same and have to correspond to the startTime in controlDict, so if you ran your coarse simulation until t=10s and you want to map your solution of the folder 10 to the fine case, rename your 0 folder in the fine case to 10, change the startTime in your controlDict to 10, call mapFields, and then rename your fine folder 10 to your starting folder 0. Somehow irritating to explain but you ll see what I mean if you try it out.
Oh thank u. I shall try what u were saying. But dont we have a simple syntax for initializing the swirl as we have for a rotatingWallVelocity?
Krishna Sandeep is offline   Reply With Quote

Old   June 29, 2012, 04:07
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Probably you want to use funkySetFields instead of setFields. With funkySetFields you can set the value of velocity as a function of some parameters, probably you want to have something like "U0*vector(pos().y,-pos().x,1)"
Bernhard is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
InterFoam - setFields for a non-rectangular 3D domain Ak_cfd OpenFOAM Running, Solving & CFD 24 July 25, 2020 22:16
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 01:04
[mesh manipulation] mergeMeshes problem Attesz OpenFOAM Meshing & Mesh Conversion 3 July 29, 2015 05:15
Applicability of wall functions to rotating surface waku2005 Main CFD Forum 0 March 11, 2012 21:52
rotating wall enomis77 FLUENT 2 August 27, 2010 03:52


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