|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 ![]() |
Dear FOAMERS;
I am working with interFOAM and would like to have a case as shown in the figure. I would like to specify an alternating phase at the left end of the domain. I tried using something like '&&' to initialize multiple patch values in setFieldsDict but it could read and set only one value out of a group of values. I am not sure if this could be done with setFields and the alternate is using swak4FOAM. Could anyone give a hint how could i do this in swak4Foam as i see no thread related to this setFields interFoam concept used for initialization of alpha values. Thanks; Saideep |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 ![]() |
Anyone with an idea how to define this please..!!
Saideep |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18 ![]() |
hello Saideep,
did you look at damBreak4phase. I think there is done what you want. hope this helps Wouter |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 ![]() |
Hi Wouter;
Thanks a lot!! Yes i checked the damBreak4Phase and it is quite straight forward to use that. I was rather exploring the swak4Foam and other groovyBC's for assigning such b.c's for alpha. However just to complete the thread and maybe someone can find this useful: setFieldsDict file: Code:
defaultFieldValues ( volScalarFieldValue alpha.air 1 volScalarFieldValue alpha.water 0 ); regions ( boxToCell { box (0 0 0) (10e-6 33e-6 50e-6); fieldValues ( volScalarFieldValue alpha.water 1 volScalarFieldValue alpha.air 0 ); } boxToCell { box (0 33e-6 0) (10e-6 66e-6 50e-6); fieldValues ( volScalarFieldValue alpha.air 1 volScalarFieldValue alpha.water 0 ); } boxToCell { box (0 66e-6 0) (10e-6 100e-6 50e-6); fieldValues ( volScalarFieldValue alpha.water 1 volScalarFieldValue alpha.air 0 ); } boxToCell { box (0 100e-6 0) (10e-6 133e-6 50e-6); fieldValues ( volScalarFieldValue alpha.water 0 volScalarFieldValue alpha.air 1 ); } boxToCell { box (0 133e-6 0) (10e-6 166e-6 50e-6); fieldValues ( volScalarFieldValue alpha.air 0 volScalarFieldValue alpha.water 1 ); } boxToCell { box (0 166e-6 0) (10e-6 200e-6 50e-6); fieldValues ( volScalarFieldValue alpha.water 0 volScalarFieldValue alpha.air 1 ); } ); Thanks; Saideep Last edited by wyldckat; September 4, 2015 at 19:18. Reason: Added [CODE][/CODE] markers |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick note: swak4Foam provides a utility named funkySetFields: http://openfoamwiki.net/index.php/Co...funkySetFields
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manual decomposition using setFields | RL-S | OpenFOAM Pre-Processing | 8 | July 3, 2023 08:51 |
how to use setFields in multiregionsolver | lg88 | OpenFOAM | 18 | June 12, 2022 18:57 |
Can run setFields in parallel while decomposed? | totalart | OpenFOAM Running, Solving & CFD | 2 | August 20, 2018 23:07 |
rhoSimplecFoam with setFields | sino75 | OpenFOAM Pre-Processing | 0 | March 11, 2015 04:08 |
Problems with the execution of the setFields utility. | foamer | OpenFOAM Pre-Processing | 5 | June 3, 2013 12:24 |