|
[Sponsors] |
[swak4Foam] FunkySetFields Boundary conditions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 7, 2009, 10:56 |
FunkySetFields Boundary conditions
|
#1 |
New Member
Michael List
Join Date: Mar 2009
Posts: 3
Rep Power: 17 |
BRIEF DESCRIPTION
----------------- I am currently trying to apply a function to a flowfield using funkySetFields. The application works as described, however, I would like to specify the same xyz-dependent function on the boundaries as in the interior, without copying the interior values to the boundaries. The current function uses "pos" which uses the cell center. I am aware of "fpos", but am not sure how to apply it. Any assistance would be greatly appreciated! EXAMPLE ------- Currently I am running a unit cube to learn how to use the utility. I am running the below command to set a linear gradient on the velocity components: funkySetFields -time 0 -field U -keepPatches \ -valuePatches "inlet exit top bottom front back" \ -expression "vector(3*pos().x,4*pos().y,5*pos().z)" Again, this gives the desired behavior in the cells but I am unsure how to set the boundary face values correctly without manually editing them. Thank you very much, Mike |
|
January 12, 2009, 17:28 |
Hi Mike!
In fact what FSF d
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Mike!
In fact what FSF does for valuePatches is take the value of the cell that the patch-face borders to and uses it as the face value. In your case this might introduce a slight error. The problem with fpos is that it produces a surfaceField and funkySetFields knows no way to map that directly to a boundary patch of a volField (which is what you want to do), it always has to be converted (by averaging etc) back to a volField (and then you'd get the same center-of-cell values). The only solution for that (if you can'T live with the slight error), that I can think of right now would be to write a funkySetPatchField or write a separate boundary condition or write a separate utility that correctly sets the patch values (like the parabolic-inlet that floats around on the board). Wait .... that are three solutions. The only three solutions for that ....... Bernhard
__________________
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 |
|
January 13, 2009, 08:40 |
Bernhard,
Thank you for the
|
#3 |
New Member
Michael List
Join Date: Mar 2009
Posts: 3
Rep Power: 17 |
Bernhard,
Thank you for the response! I think I will give a funkySetPatchField a shot as time goes by. For now I can do some hand/python corrections. Thanks! Mike |
|
March 29, 2013, 06:08 |
|
#4 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 13 |
Hi Foamers,
I am using this thread because its title is close to my problem. When I use funkySetFields (so easy to use! Thanks Bernhard !) , it changes my field (as I want), but it also changes my boundary conditions! How can I prevent this behavior ? More precisely, here is my command line: Code:
funkySetFields -latestTime -field U -expression "vector(pos().z>1 ? 5*log(pos().z/.2) : 5*log(1/.2),0,0)" Did I misunderstood something? Is there any option to preserve my boundary fields? |
|
March 29, 2013, 09:36 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
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 |
||
March 29, 2013, 09:57 |
|
#6 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 13 |
Thanks ! (I had read this page, but not these 3 lines... Shame on me!)
|
|
November 18, 2013, 17:49 |
|
#7 |
Member
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 13 |
Hello all,
I want to initialize the temperature field of a bubble in contact with a wall using funkySetFields. The wall has a fixedGradient BC acting as the heat flux, with wall temp higher than bubble temp. The issue is that temp of bubble cells at contact region overrides the wall patch temp. This makes temp at contact region higher than wall temp whereas, I expect this region to have less than or equal to the wall temp. Here's what my funkySetFieldDict looks like: Code:
field T; expression "xxx"; condition "yyy"; -keepPatches 1; |
|
November 18, 2013, 18:34 |
|
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
b) the minus in front of keepPatches is really there? Why? That way of course FSF assumes that keepPatches is false (because you're setting another value)
__________________
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 |
||
November 18, 2013, 19:37 |
|
#9 |
Member
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 13 |
Thanks for the quick response. Yep you're right, my typing was sloppy, indeed the minus sign is not included. Here is what my funkySetFiedDict look like:
Code:
expressions ( ____________ other fields ____________ temperature { field T; expression "T+10"; condition "pow(pos().x-0.01,2)+pow(pos().y-0.02,2) <= pow(0.001,2)"; keepPatches 1; } ); |
|
November 19, 2013, 11:20 |
|
#10 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Paraview pictures don't prove that OF sees the value this way. They only show how PV interprets the OF-data. Especially if as in your case you're using point values.
__________________
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 |
||
November 19, 2013, 11:53 |
|
#11 |
Member
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 13 |
The temp data from the spreadsheet also shows this high temp. I've tried forcing this fixedGradient with a funkySetBoundaryDict file but I don't understand why it does not make any changes to the temp field when I then initialize with funkySetBoundary. Here's what the dict file looks like:
Code:
temp { field T; expressions ( { target fixedGradient; patchName wall; expression "xxx"; } ); } |
|
November 20, 2013, 09:09 |
|
#12 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
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 |
||
November 20, 2013, 11:05 |
|
#13 | |
Member
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 13 |
Quote:
|
||
November 22, 2013, 13:00 |
|
#14 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
But why don't you use FSBF after FSF … with the correct target
__________________
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 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 01:27 |
Velocity vector in impeller passage | ngoc_tran_bao | CFX | 24 | May 3, 2016 21:16 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 08:44 |
Low torque values on Screw Turbine | Shaun Waters | CFX | 34 | July 23, 2015 08:16 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 00:00 |