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

[swak4Foam] and setFields for interFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2015, 11:56
Default and setFields for interFoam
  #1
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
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
Attached Images
File Type: jpg initial.jpg (17.6 KB, 52 views)
Saideep is offline   Reply With Quote

Old   September 3, 2015, 14:57
Default
  #2
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Anyone with an idea how to define this please..!!

Saideep
Saideep is offline   Reply With Quote

Old   September 3, 2015, 16:56
Default
  #3
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
hello Saideep,

did you look at damBreak4phase. I think there is done what you want.

hope this helps
Wouter
wouter is offline   Reply With Quote

Old   September 4, 2015, 06:56
Default Finally working!!
  #4
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
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 
        );
    }
);
and final image in fig1. Though this is a simple case i wanted to have this sort of setFields for a more complex structure and started with this as an initial step.

Thanks;
Saideep
Attached Images
File Type: jpg fig1.jpg (22.3 KB, 44 views)

Last edited by wyldckat; September 4, 2015 at 20:18. Reason: Added [CODE][/CODE] markers
Saideep is offline   Reply With Quote

Old   September 4, 2015, 20:20
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick note: swak4Foam provides a utility named funkySetFields: http://openfoamwiki.net/index.php/Co...funkySetFields
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Manual decomposition using setFields RL-S OpenFOAM Pre-Processing 8 July 3, 2023 09:51
how to use setFields in multiregionsolver lg88 OpenFOAM 18 June 12, 2022 19:57
Can run setFields in parallel while decomposed? totalart OpenFOAM Running, Solving & CFD 2 August 21, 2018 00:07
rhoSimplecFoam with setFields sino75 OpenFOAM Pre-Processing 0 March 11, 2015 05:08
Problems with the execution of the setFields utility. foamer OpenFOAM Pre-Processing 5 June 3, 2013 13:24


All times are GMT -4. The time now is 09:58.