# [swak4Foam] funkySetField

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 16, 2010, 10:15 funkySetField #1 New Member   Emanuele Leoni Join Date: Apr 2009 Posts: 13 Rep Power: 13 Hi, i'm trying to put here the mail i wrote to the creator of the funkySetField application in openfoam wiki. I didn't get any answer yet so i try also in this forum, maybe someone is able to help me. Thank you Emanuele Hi, i'm a master student of Politecnico di Milano, and I'm developing my master thesis work on openfoam. I found your utility and i think it is what I need. My problem is about a non premixed flame in which I have a very simple axial symmetric mesh with some boundaries. The point is that i need to set some non uniform initial conditions on this boundaries, principally related to U, epsilon and k. I tried using your utility and I managed to set the U field, but i tried to set the inletfuel patch using this command: funkySetFields -field U -valuePatches "inletfuel" -expression 'vector((2.+0.167)*(1.+0.167)/2.*pow((pow(1.01,2.167)-pow(0.01,2.167)-(2.+0.167)*pow(0.01,1.167)),-1.)*117.2*pow((1.01*pos().x/0.0018),0.167),0,0)' -time 0 the result was: Create time Create mesh for time = 0 Time = 0 Using command-line options Putting "vector((2.+0.167)*(1.+0.167)/2.*pow((pow(1.01,2.167)-pow(0.01,2.167)-(2.+0.167)*pow(0.01,1.167)),-1.)*117.2*pow((1.01*pos().x/0.0018),0.167),0,0)" into field U at t = "0" if condition "true" is true Setting the patches 1 ( inletfuel ) to fixed value Setting 15830 of 15830 cells Writing to "U" End In this way all the cells are filled with this condition, but i need the condition only in the inlet. So i think I didn't understand very well the -valuePatches option. I have a question more: I want the condition for every time step: how i can set this? I really hope you can help me. Thank you very much Emanuele

 March 16, 2010, 12:07 #2 Senior Member   Michael Jaworski Join Date: Mar 2009 Location: Champaign, IL, USA Posts: 126 Rep Power: 13 I don't know about the -valuePatches option, but if this is a boundary condition, why not use groovyBC instead?

March 17, 2010, 07:57
#3
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,146
Rep Power: 46
Quote:
 Originally Posted by lions85 In this way all the cells are filled with this condition, but i need the condition only in the inlet. So i think I didn't understand very well the -valuePatches option.
Rerun FSF with the -keepPatches-option and "clear" the field. See http://openfoamwiki.net/index.php/Co...t-Room_Example
Quote:
 Originally Posted by lions85 I have a question more: I want the condition for every time step: how i can set this?
A fixedValue is not changed during the simulation. So if you set the patch at 0 it will keep that value. If your BC is transient then have a look at groovyBC as suggested in the other posting

Bernhard