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

InterFoam - setFields for a non-rectangular 3D domain

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2015, 12:40
Default
  #21
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi Guys;

I know this is quite an old post but just got stuck with a problem recently.

So, i use interFOAM in OpenFOAM 2.3.1 and i would like to set values for the phases in specific regions of the domain.

Well I tried to initialize the values with our friendly setFields utility but it accepts only one set of values. The second set of value is omitted.

So, is it possible to set the values at specific discontinuous parts of the domain with the setFields utility that i am not aware of?

Else can i use the funkySetFields utility but it says the development is transferred further on to the utility named swakySetFieldDict.

Will funky utility work on OF 2.3.x else i have no option other than to use swakysetfieldsdict?

Thanks;
Saideep
Saideep is offline   Reply With Quote

Old   July 24, 2020, 18:58
Default
  #22
New Member
 
AmiN
Join Date: Nov 2014
Posts: 13
Rep Power: 11
AmiN.D is on a distinguished road
This is an old thread but I want give it a try and ask a question about setField, I'm simulating a U shaped barometer in 3D with snappyhex and interFoam and kinda confused about setting the initial condition for Alpha.
How can I set my SetField to get a results like the attached picture?
Attached Images
File Type: png Screen Shot 2020-07-24 at 11.58.43 PM.png (105.3 KB, 9 views)
AmiN.D is offline   Reply With Quote

Old   July 24, 2020, 21:55
Default
  #23
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18
fumiya is on a distinguished road
Hi,

There are two scenarios:
1. Create a cellZone corresponding to your initial liquid volume with snappyHexMesh and use setFields with zoneToCell option
You might want to check the tutorial to crate a cellZone with snappyHexMesh: incompressible/pimpleFoam/RAS/propeller

2. Generate mesh without cellZone and use setFields with boxToCell option(You can also use setAlphaField utility)

Hope this helps,
Fumiya
AmiN.D likes this.
__________________
[Personal]
fumiya is offline   Reply With Quote

Old   July 25, 2020, 05:17
Default
  #24
New Member
 
AmiN
Join Date: Nov 2014
Posts: 13
Rep Power: 11
AmiN.D is on a distinguished road
Quote:
Originally Posted by fumiya View Post
Hi,

There are two scenarios:
1. Create a cellZone corresponding to your initial liquid volume with snappyHexMesh and use setFields with zoneToCell option
You might want to check the tutorial to crate a cellZone with snappyHexMesh: incompressible/pimpleFoam/RAS/propeller

2. Generate mesh without cellZone and use setFields with boxToCell option(You can also use setAlphaField utility)

Hope this helps,
Fumiya

Thanks for the quick answer.
I think I would go for the second scenario [first option may take time to get to know everything there]

but I thought boxToCell is just for Hexa mesh and not for non-structural mesh. I couldn't comprehend giving a box coordinate in a pipe which can cover the red are [in picture above] at time 0 . But thank you for making me to read the User Guide again and correct my wrong assumptions.
AmiN.D is offline   Reply With Quote

Old   July 25, 2020, 21:16
Default
  #25
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18
fumiya is on a distinguished road
In the first scenario, mesh lines generally do not align to your initial liquid volume(particularly in the case of unstructured meshes as you wrote), so obtained initial alpha distribution might be in a zig-zag manner.
If the shape of your initial liquid volume is complex, you might want to use insideCells utility to create cellSet from the enclosed volume of the input stl geometry.

[keywords]
*insideCells: Create a cellSet for cells with their centres ’inside’ the defined surface. Requires surface to be closed and singly connected

Hope this helps,
Fumiya
AmiN.D likes this.
__________________
[Personal]
fumiya is offline   Reply With Quote

Reply

Tags
interfoam, openfoam 1.5, setfields


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
Domain format problem on airfoil flow simulation andrenonaka CFX 14 December 7, 2015 00:42
setFields doesn't function for a tetrahedral mesh - interFoam tommie OpenFOAM Pre-Processing 5 April 15, 2010 03:32
CFX Solver Memory Error mike CFX 1 March 19, 2008 07:22
[blockMesh] BlockMesh for a rectangular domain with curved bottom surface segersson OpenFOAM Meshing & Mesh Conversion 0 April 17, 2006 14:11
Import a rectangular domain into CFX 5.7 from ICEM SKLam CFX 9 March 8, 2006 00:47


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