|
[Sponsors] |
January 3, 2006, 07:54 |
Hi
I have a body, with a po
|
#1 |
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
Hi
I have a body, with a porous and a nonporous region. By using a field for the permeability and specifying appropriate values for certain regions i want to define porous/non-porous-zones. My problem is how to set non-uniform initial conditions. It is described in some other threads, but not enough detailed. I would be very thankful for some help |
|
January 3, 2006, 08:10 |
For "easy" cases, use the setF
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
For "easy" cases, use the setFields utility. You can find an example dictionary in:
OpenFOAM-1.2/applications/utilities/preProcessing/setFields For more complex cases, write a little application (top-level code) that will read in the field you wish to set and, set the values and write it out. Good examples could be found in OpenFOAM-1.2/applications/utilities/postProcessing/velocityField or (if you're running an older version) in setGammaDamBreak in the interFoam tutorial (OLD VERSION). Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
January 4, 2006, 07:37 |
I have meshed my geometry with
|
#3 |
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
I have meshed my geometry with gambit and declared two different volumes. After converting the mesh with fluentMeshtoFoam i get a folder named sets in /constant/polyMesh with 2 files in it. The two files (fluid.1 & fluid.2 )each with contain a list of cells which belong to each volume.
I know that i cannot use setFields to set nonuniform initial conditions for the two different volumes, because i think it only works with using blockmesh. I read in another thread that it is possible to change boxtocell with celltocell. By Mattijs Janssens on Thursday, November 17, 2005 - 03:05 am: Edit Post to e.g. read cellSet c0 replace the boxToCell { box (..)(..) fieldValues ... } with: cellToCell { set "c0"; fieldValues ... } (or maybe lose the quotes around c0) Also look at the sample cellSetDict in the cellSet utility. My question is now, how to read in all cells belong to one file (for example polyMesh/sets/fluid.1). It would be a great help if you told me step by step, what I have to do. the file fluid.4: /*---------------------------------------------------------------------------* FoamFile { version 2.0; format ascii; root "OpenFOAM/nico-1.2/run/tutorials/simpleFoam"; case "test01"; instance ""constant""; local "polyMesh/sets"; class cellSet; object fluid.4; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 240 ( 50 51 52 53 . . 279 280 ) /*************************************************/ THANKS |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with nonuniform boundary conditions | qtian | OpenFOAM Pre-Processing | 4 | January 12, 2018 16:03 |
Specifying nonuniform initial condition | msyaml | OpenFOAM Running, Solving & CFD | 65 | April 25, 2016 05:23 |
Nonuniform initial condition using cellSetDict | rinao | OpenFOAM Running, Solving & CFD | 6 | January 9, 2013 01:42 |
Burgerbs equation non constant Boundary Conditions Initial Conditions | arkangel | OpenFOAM Running, Solving & CFD | 1 | October 2, 2008 15:48 |
Initial conditions = final conditions | Chucho | CFX | 5 | December 16, 2005 18:14 |