|
[Sponsors] |
![]() |
![]() |
#1 |
Guest
Posts: n/a
|
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 |
|
![]() |
![]() |
![]() |
#2 |
Guest
Posts: n/a
|
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 |
|
![]() |
![]() |
![]() |
#3 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 ![]() |
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... |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 ![]() |
setFields with 'cellToCell' source should be able to set fields from a cellSet.
(setFields uses the same back-end as the 'cellSet' utility) |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 ![]() |
I can't find the example. where is the source setGammaDamBreak.C ?
Thanks and sorry to ask to this extent. ![]() |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 ![]() |
Thank you.
![]() 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 |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 ![]() |
There are plenty of examples on this forum. Search is your friend.
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange gamma field on wedge case | sega | OpenFOAM Running, Solving & CFD | 5 | October 19, 2008 11:45 |
Gamma field on boundary patch | tom | OpenFOAM Post-Processing | 0 | March 23, 2008 06:56 |
Gamma field initialisation | mer | OpenFOAM Pre-Processing | 0 | March 1, 2008 08:12 |
Putting submesh field values into field on parent mesh | helmut | OpenFOAM Running, Solving & CFD | 2 | June 20, 2006 07:31 |
field initialization using DEFINE_INIT | Maziar Mahzari | FLUENT | 0 | September 14, 2005 02:36 |