|
[Sponsors] |
June 7, 2013, 08:07 |
using setFieldsDict
|
#1 |
Member
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 12 |
Dear FOAMers,
I'm starting to use OpenFOAM since 2 weeks. After reading some tutorials, I've established the mesh of my problems (please see attached file). Now, I'm trying to put my initial conditions: for example half of the tank is filled with water (alpha1=1) and the remaining half is air (open to atmosphere) hence alpha1=0. I tried to use setFieldDict defaultFieldValues ( volScalarFieldValue alpha1 1 ); regions ( boxToCell { box (x x x) (x x x); fieldValues ( volScalarFieldValue alpha1 0 ); } ); I'm wondering if I should use the boxToCell or not ? If yes what is the meaning of the syntax box (x x x) (x x x) ? Could any Foamers explain to me how to process ? Any suggestions for this problem is welcome ! Many thanks Kind regards krimo |
|
June 7, 2013, 10:24 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
What do you think it means? Did you try to execute and see what happens? Doesn't the name itself explain it already?
|
|
June 7, 2013, 17:01 |
|
#3 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
Quote:
Code:
setFields but i suggest that you use funkySetFields from swak4Foam package its more handy
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
||
June 8, 2013, 07:27 |
|
#4 | |
Member
Join Date: Apr 2013
Posts: 32
Rep Power: 12 |
Quote:
boxtoCell will work in your case....box (xxx) (xxx)... In this you have to enter the coordinates of the box for which patching is to be done.... like box ( 0 0 0) (0.1 0.2 0.3) |
||
June 10, 2013, 02:57 |
|
#5 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
There is no reason to use funkySetFields if you don't want to do anythin funky
|
|
July 29, 2013, 04:17 |
|
#6 |
New Member
Vishal
Join Date: Feb 2013
Posts: 28
Rep Power: 13 |
Hi Belkadi
If your case is rectangular tank, then you can use boxToCell. The points (x x x)(x x x) means those are the point on diagonal of the rectangle where you need to patch the required fields. If your case is cylindrical you can use cylinderTocell. there you have to specify two points on the axis of cylinder where you need to patch the field and also radius of the cylinder. All the best.. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
setFieldsDict, alpha1, free surface, wigley | kolloff | OpenFOAM Pre-Processing | 10 | April 3, 2015 06:05 |
codeStream in SetFieldsDict | physics1 | OpenFOAM Running, Solving & CFD | 1 | June 14, 2013 11:58 |
SetFieldsDict: Non uniform density | physics1 | OpenFOAM Running, Solving & CFD | 1 | May 8, 2013 17:35 |
SetFieldsDict file problem with 3D multiphase flow | jeff_87 | OpenFOAM Pre-Processing | 11 | May 3, 2013 07:20 |
Bogus setFieldsDict in damBreak4phase{,Fine} tutorial cases | mwild | OpenFOAM Bugs | 1 | August 10, 2010 10:36 |