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 |
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 |
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... |
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? |
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. |
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 |
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) |
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 |
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. |
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 |
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. |