|
[Sponsors] |
March 8, 2012, 16:41 |
Field functions for a specific Region
|
#1 |
Member
Join Date: Nov 2011
Location: Germany
Posts: 40
Rep Power: 15 |
Hello everybody,
I want to define a field function for only one region (I have 3 Regions: Inlet, Outlet and Cleaner) ... i.E.: ($Species2MolarConcentration == 0) ? 0 : -0.5*$Temperature I want that, if $Species2MolarConcentration == 0 only in the Region Cleaner then = 0 does it works? thanks, for help! greetz |
|
March 10, 2012, 03:49 |
|
#2 |
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22 |
A field function will always be valid for the whole domain. All you can do is to put different values for different regions / areas / boundaries etc.
You can access single regions by using the RegionIndes, e.g. $RegionIndex = 0 ? doSomething : doSomethingElse Put the index of the desired region for the 0. You can get the RegionIndex by just clicking on a region and looking to the properties window (lower left corner) |
|
March 12, 2012, 06:50 |
|
#3 |
Member
Join Date: Nov 2011
Location: Germany
Posts: 40
Rep Power: 15 |
Dear Abdul,
thank for your reply and sorry for my late reply. I'm not sure, but I think your answer can not really help me. My Problem is not to assign the field function to a specific region, it's more to define the field function for a region according to the time. I think it helps, if I explain what I'm going to do: In the picture (http://s14.directupload.net/file/d/2...49rw4e_png.htm) you can see the Inlet, the Cleaner and the Outlet. In the velocity Inlet flows a multi-component gas (C4H10 and N2). What I want: When my C4H10-N2 gas "arrived" in the Cleaner Region, then the Source Term begins to remove the C4H10 components. Not before! What I have at the moment: The Source Term starts at the first iteration (but at the beginning, there is no C4H10 in the Cleaner Region) ... so the Temperature grows up (because of the negative bulk flow). I hope u can image what im trying to do. Best regards, TrII4d p.s. sorry for that bad english :-( |
|
March 15, 2012, 04:15 |
|
#4 |
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22 |
Okay, then I misunderstood it. I don't have a solution right now, but I will keep on thinking about it.
|
|
March 15, 2012, 07:12 |
|
#5 |
Member
Join Date: Nov 2011
Location: Germany
Posts: 40
Rep Power: 15 |
Okay ... Thanks Abdul!
|
|
Tags |
field function, regions |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problems after decomposing for running | alessio.nz | OpenFOAM | 7 | March 5, 2021 05:49 |
Mesh refinement with Field Functions - error | Dan Chambers | STAR-CCM+ | 7 | January 30, 2014 09:01 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
BC coefficients evaluation functions | shrina | OpenFOAM Running, Solving & CFD | 1 | October 9, 2006 06:02 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |