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

Create a cellSet out of the gamma directory

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2008, 09:10
Default I´d like to crate a cellset ou
  #1
New Member
 
Christofer Ivarsson
Join Date: Mar 2009
Posts: 21
Rep Power: 17
cricke is on a distinguished road
I´d like to crate a cellset out of the gamma value from the time directory in order to create a volume of a fluid from the bottom to the free surface in a VOF calculation.

Is there any way to create a cellSet from the gamma-file in the latest time directory?

The gamma-file contains values of the phase fraction and I believe it would be possible to extract all cellvalues from lets say gamma fraction 0.1 - 1.0?

RG

Christofer Ivarsson
cricke is offline   Reply With Quote

Old   February 5, 2008, 05:15
Default Sure. The utility is called
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Sure.

The utility is called most appropriately: "cellSet"

You need to put the dictionary cellSetDict (found in $FOAM_UTILITIES/mesh/manipulation/cellSet/) in your system directory. Edit it and comment out all the cell set definitions excepts "fieldToCell", for which you would set the field name to gamma and the min and max values to 0.1 and 1 respectively.
eugene is offline   Reply With Quote

Old   February 6, 2008, 04:13
Default Ok, thanks, that seem simple a
  #3
New Member
 
Christofer Ivarsson
Join Date: Mar 2009
Posts: 21
Rep Power: 17
cricke is on a distinguished road
Ok, thanks, that seem simple and straight on. I succeded by extracting the values to Excel, give every cell an ID and filter out the values wanted. Took me about all day yesterday...I´ll try the cellSetDict right away!

How do I make a patch out of the cellSet to apply boundary condition for the new volume? I can´t just add a new patch in the 'boundary' dict since it need a start value for the first cell. Since the cells have random cell-ID that´s not possible.

Thanks for helping me out

/Chris
cricke is offline   Reply With Quote

Old   February 6, 2008, 05:18
Default You will have to subset the me
  #4
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
You will have to subset the mesh to remove the regions you do not want. there is a utility called subsetMesh that should do the trick.
eugene is offline   Reply With Quote

Old   February 6, 2008, 06:15
Default The thing is that I do not wan
  #5
New Member
 
Christofer Ivarsson
Join Date: Mar 2009
Posts: 21
Rep Power: 17
cricke is on a distinguished road
The thing is that I do not want to remove the new volume but change the property of that volume. The aim is to find a steady-state solution of the VOF calculation, "freeze" the fluid by making it a volume and than switch to a steady-state solver to speed up convergence. Then I need to be able to handle the fluid as a vlume on which I can modify its properties ac Cp, rho and so on
cricke is offline   Reply With Quote

Old   February 6, 2008, 06:37
Default So you want to introduce and t
  #6
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
So you want to introduce and then remove baffles at the fluid interface? Boundaries can be introduced using splitMesh and removed again using stitchMesh. Both found in applications/utilities/mesh/manipulation/
eugene is offline   Reply With Quote

Old   February 7, 2008, 03:57
Default Actually I don´t want to remov
  #7
New Member
 
Christofer Ivarsson
Join Date: Mar 2009
Posts: 21
Rep Power: 17
cricke is on a distinguished road
Actually I don´t want to remove anything but try capture the fluid in the container. I will then set the fluid as a solid with the specific material properties to see how temperature transfers from a combusting flame through the soild to the container walls. Using splitMesh the internal walls gets external right?

I hace succeded in using 'cellSet' to get a seperate cellSet "gamma" containing all cells with phase concentration 0,1 - 1,0. Great utility by the way!

Still I haven´t found a way to create a seperate patch out of that fluid....
cricke is offline   Reply With Quote

Old   February 7, 2008, 05:01
Default If you put a boundary between
  #8
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
If you put a boundary between the solid and the fluid, it becomes a conjugate heat transfer problem. This cannot be solved in anything resembling a straight-forward way.

The alternative is to approximate an interface by setting the fluid viscosity to a very high value and then playing numerical tricks with the transfer coefficients at the interface.
eugene is offline   Reply With Quote

Old   February 7, 2008, 05:48
Default Thanks for your correspondens.
  #9
New Member
 
Christofer Ivarsson
Join Date: Mar 2009
Posts: 21
Rep Power: 17
cricke is on a distinguished road
Thanks for your correspondens.
Really, I don intend to carry on the calculations in OF after the VOF since when it comes to combustion OF starts to get kind of complicated... I will do those calculations in FLUENT but in fluent you cant do anything similar to a subset like in OF to create a volume of the phase fraction 0,1 - 1,0.

So the aim with doing the VOF in OF is only to get a "steady-state" interface of air/water, extract the cells with a specific phase fraction of water and create a separate volume. Then export the two seperate volumes air/water as patches/boundaries two fluent and then carry on with the combustion calculations.

I´ve gone through more or less all the utilities if OF trying to create a patch out of a cellSet or faceSet but since the water-volume contains internal cells as well as external cells (those close to the walls) it doesn´t seem possible.
cricke is offline   Reply With Quote

Old   June 26, 2009, 04:26
Default
  #10
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17
isabel is on a distinguished road
Hello everybody,

I am working with the damBreak tutorial and I am using Fluent as postprocessor. Does anybody know how to see the volume fraction in Fluent?

Thanks in advance.
isabel is offline   Reply With Quote

Old   June 30, 2009, 05:34
Default
  #11
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
Quote:
Originally Posted by isabel View Post
I am working with the damBreak tutorial and I am using Fluent as postprocessor. Does anybody know how to see the volume fraction in Fluent?
You had a look at section 6.2 of the UserGuide? In my opinion all the information to convert gamma to Fluent is there. How it is actually called in Fluent is another problem. But having a look at the Fluent-VOF-examples might help.
gschaider is offline   Reply With Quote

Old   July 12, 2009, 03:52
Default
  #12
New Member
 
Klaus Rädecke
Join Date: Jun 2009
Location: Rüsselsheim, Germany
Posts: 9
Rep Power: 16
shamantic is on a distinguished road
Trouble with fieldToCell: I have no success for this functionality, depending on the data, I get a broad spectrum of error messages, i.E.:
Reading mesh for time = 4.31e-05
Create mesh

Reading cellSetDict

Backing up c0 into c0_old
Set:c0 Size:0 Action:new


IOstream::check(const char* operation) : error in IOstream "/home/xxx/work/4.31e-05/gamma" for operation operator>>(Istream&, List<T>&) : reading entry

file: /home/xxx/work/4.31e-05/gamma at line 22.

From function IOstream::fatalCheck(const char* operation) const
in file db/IOstreams/IOstreams/IOcheck.C at line 73.

FOAM exiting

To me it seems that fieldToCell does not like binary data (as generated in the lesCavitatingFoam tutorial). I had several tries, also with the other fields (p, rho...) and could not select cells. It does work on initial data stored in ascii format.

What is a way to fix this? Thanks!
shamantic 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
[mesh manipulation] BlockMesh cellSet refineMesh mattijs OpenFOAM Meshing & Mesh Conversion 41 April 7, 2020 09:32
CellSet question bobbicknell OpenFOAM Post-Processing 0 February 24, 2009 16:50
Nonexistent run directory martapajon OpenFOAM Running, Solving & CFD 1 August 6, 2007 13:54
Center coordinates of all the cells in a cellset lizhihua Siemens 0 August 21, 2006 03:59
Fluent Directory Johnnyb FLUENT 1 September 1, 2003 09:48


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