CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Create a cellSet out of the gamma directory (http://www.cfd-online.com/Forums/openfoam-solving/59164-create-cellset-out-gamma-directory.html)

cricke February 4, 2008 10:10

Iīd like to crate a cellset ou
 
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

eugene February 5, 2008 06:15

Sure. The utility is called
 
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.

cricke February 6, 2008 05:13

Ok, thanks, that seem simple a
 
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

eugene February 6, 2008 06:18

You will have to subset the me
 
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.

cricke February 6, 2008 07:15

The thing is that I do not wan
 
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

eugene February 6, 2008 07:37

So you want to introduce and t
 
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/

cricke February 7, 2008 04:57

Actually I donīt want to remov
 
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....

eugene February 7, 2008 06:01

If you put a boundary between
 
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.

cricke February 7, 2008 06:48

Thanks for your correspondens.
 
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.

isabel June 26, 2009 04:26

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.

gschaider June 30, 2009 05:34

Quote:

Originally Posted by isabel (Post 220558)
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.

shamantic July 12, 2009 03:52

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!


All times are GMT -4. The time now is 06:34.