CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Gamma field initialization (https://www.cfd-online.com/Forums/openfoam-pre-processing/62250-gamma-field-initialization.html)

Pei-Ying Hsieh (Hsieh) February 11, 2005 11:19

Hi, There are times that I
 
Hi,

There are times that I have to initialize gamma field inside a very complex geometry. Has anyone done this?

In FoamX, if I have, say 5 blocks. I want to initialize the gamma field to 1 inside one block. Can I save all the cells inside this block and then read these cells back into FoamX and then set the gammea values of these cells to 1? Is it possible?

Pei

Eugene de Villiers (Eugene) February 12, 2005 07:55

To my knowledge, there is no
 
To my knowledge, there is no field initialisation of this kind built into the FoamX GUI. At present, OepnFOAM has no byuilt-in cell types to differentiate one region from another, although it would be easy to add.

Everything you want to do can be achieved through some comparatively simple programming via an application like setGammaDambreak.

E

vvqf November 7, 2005 05:58

version 1.2, User Guide 2.3.3,
 
version 1.2, User Guide 2.3.3, U-57
non-uniform
But what about assign different values in different regions for a field variable?

Expecting replies...

vvqf November 7, 2005 08:39

is such function available in
 
is such function available in the new version 1.2?

assign different values in different regions for a field variable? even to each different cell?

eugene November 7, 2005 09:02

What do you mean different reg
 
What do you mean different regions?

Your best bet is to look at the source of setGammaDambreak (which is really very easy to understand) and modify it to suite your needs.

hsieh November 7, 2005 10:31

Hi, VVgf: In version 1.2, y
 
Hi, VVgf:

In version 1.2, you can use setFields to assign different gamma to different region. The constraint is that the regions cannot be an arbitary shape, it needs to be a box (I do not know if spherical/cylinder works or not). Of course, with the setGammaDamBreak.C, you can do whatever you want.

One other thing is that, I am trying to figure out if one can use cellSets to assign gamma field. But, I do not know how to read in cellSets just yet. This will be the best approach in my opinion because you can export cellSets that you want to assign gamma values from your pre-processor.

Pei

mattijs November 8, 2005 03:44

setFields with 'cellToCell' so
 
setFields with 'cellToCell' source should be able to set fields from a cellSet.

(setFields uses the same back-end as the 'cellSet' utility)

vvqf November 10, 2005 08:51

I can't find the example. wher
 
I can't find the example. where is the source setGammaDamBreak.C ?

Thanks and sorry to ask to this extent. http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif

eugene November 10, 2005 09:21

The "setGammaDambreak" utility
 
The "setGammaDambreak" utility appears to have been supersceded by the setFields utility and is no longer in the release. setFields is probably more than adequate for your needs. Its usauge is described in the dambreak tutorial.

If it does not do what you want then of course there are other ways of setting up fields. This involves compiling your own utilities though.

vvqf November 10, 2005 10:07

Thank you. http://www.cfd-onli
 
Thank you. http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
yes, I already applied setFields, it gave me nice esults.

So, if want to go further, I can't be so lazy to expect existing example any more. :Q

eugene November 10, 2005 10:44

There are plenty of examples o
 
There are plenty of examples on this forum. Search is your friend.


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