CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] funkySetField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2010, 11:15
Default funkySetField
  #1
New Member
 
Emanuele Leoni
Join Date: Apr 2009
Posts: 13
Rep Power: 17
lions85 is on a distinguished road
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
lions85 is offline   Reply With Quote

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

Old   March 17, 2010, 08:57
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by lions85 View Post
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 View Post
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
gschaider is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkySetField newbie29 OpenFOAM Community Contributions 2 September 12, 2012 02:50
Bubble in zero gravity conditions sega OpenFOAM Running, Solving & CFD 59 November 25, 2011 08:21
[Technical] Cell numbering sega OpenFOAM Meshing & Mesh Conversion 1 April 20, 2010 12:32


All times are GMT -4. The time now is 20:35.