|
[Sponsors] |
June 18, 2012, 19:13 |
non-uniform internalField
|
#1 |
Member
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 14 |
hi,
I am new to openfoam, i need to set initial pressure field as function of height. i donot want to use setfields (uses third party software) to get the task done, can i use internalField nonuniform <List>; //but donot know how to set the list?? |
|
June 18, 2012, 20:24 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Setting that list can be done by hand using a text editor (but it is not practical ), by writing your own utility in C++ or using funkySetFields which is third party software |
||
May 11, 2013, 10:15 |
|
#3 | |
Senior Member
|
Quote:
is funkySetFields utility capable of setting a list of cells within a complex region? by complex region I mean not to be a common shape like rectangle or circle. is it possible to define user defined regions to select particular cells? Thank you, Mojtaba
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
||
May 12, 2013, 07:00 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
If the complex region is written to disc as a cell zone or a cell set ... you're in business (but I think setFields can handle that too) If it is defined as a mixture of the above ... you're in business. Bottom line: you've got to be more specific about what you mean with "complex"
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 12, 2013, 07:22 |
|
#5 | |
Senior Member
|
Quote:
well in my case, by complex I mean a region which is surrounded by multiple straight line borders. For instance this simple region, which is surrounded by these lines: y=-x+1 y=0 x=0 Thank you
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
||
May 12, 2013, 17:12 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
That can be easily done with a condition like this in funkySetFields: Code:
(pos().y>0) && (pos().x>0) && ((pos().x+pos().y)<1) Code:
funkySetFields -time 0 -field alpha -keepPatches -expression "1" -condition "<cond>" Code:
funkySetFields -time 0 -field alpha -keepPatches -expression "<cond> ? 1 : 0"
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 12, 2013, 17:54 |
|
#7 | |
Senior Member
|
Quote:
This really helped. I have an another little problem. I want to set z0 values (roughness parameter) for this particular region. as you know z0 is not a field in OF like U or p. well you know these better than me Do you have any idea how I can set values for it? in nut file I have something like this: ground { type nutkAtmRoughWallFunction; z0 $z0; value uniform 0.0; } Can I use funkySetFields for setting the values of z0? Thank you
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
||
January 4, 2017, 11:24 |
|
#8 | |
New Member
Join Date: Nov 2016
Posts: 13
Rep Power: 9 |
Quote:
I'm in the second case and I've got a cell set, but the problem is how to assign two different costant values for two different regions... How can I set internalField initial value dictionaries of variables? Thanks |
||
January 4, 2017, 13:30 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
funkySetFields -time 0 -field foo -keepPatches -expression "set(set1) ? 42 : (set(set2) ? 666 : foo)"
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
singularity? | mihaipruna | OpenFOAM Running, Solving & CFD | 5 | April 24, 2012 18:18 |
chtMultiRegionSimpleFoam | javad814 | OpenFOAM | 1 | September 26, 2011 14:30 |
Need help with boundary conditions: open to atmosphere | Wolle | OpenFOAM | 2 | April 11, 2011 08:32 |
rhoSimpleFoam | claco | OpenFOAM | 7 | April 20, 2010 05:32 |
RasInterFoam STRANGE RESULTS AT BOUNDARY | kumar2 | OpenFOAM Running, Solving & CFD | 8 | March 24, 2008 19:38 |