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

Nonuniform initial conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2006, 07:54
Default Hi I have a body, with a po
  #1
Member
 
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 17
nico is on a distinguished road
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
nico is offline   Reply With Quote

Old   January 3, 2006, 08:10
Default For "easy" cases, use the setF
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
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
hjasak is offline   Reply With Quote

Old   January 4, 2006, 07:37
Default I have meshed my geometry with
  #3
Member
 
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 17
nico is on a distinguished road
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
nico 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
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


All times are GMT -4. The time now is 05:23.