CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Mesh generated VOF fields (interFoam)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2018, 02:33
Default Mesh generated VOF fields (interFoam)
  #1
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Hello!

I would like to ask if anybody has an idea about how to make a mesh generated setFields (I don't know how to formally call this case so I'll just go with this). I want to make an fluid domain similar to the one in the picture attached, where separate domains are for the air and water. In setFields we usually do this using BoxToCell, but clearly it cannot be used for the one I/m trying to do. I have also heard of funkySetFields but I cannot imagine it working for me (but maybe I am wrong, I haven't actually tried).

Thank you in advance!
Attached Images
File Type: png case.png (76.9 KB, 22 views)
cuikahlil is offline   Reply With Quote

Old   May 30, 2018, 03:20
Default
  #2
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
You mean like the interface being represented by a certain grid line?
Santiago is offline   Reply With Quote

Old   May 30, 2018, 03:45
Default
  #3
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Yeah. Maybe a better way of saying this is how can I create a non-box geometry for air-water phases in interFoam?
cuikahlil is offline   Reply With Quote

Old   May 30, 2018, 03:57
Default
  #4
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by cuikahlil View Post
Yeah. Maybe a better way of saying this is how can I create a non-box geometry for air-water phases in interFoam?
But you mean to use interfoam as an interface tracking method?
Santiago is offline   Reply With Quote

Old   May 30, 2018, 03:59
Default
  #5
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by cuikahlil View Post
Yeah. Maybe a better way of saying this is how can I create a non-box geometry for air-water phases in interFoam?
To create non box geometries has nothing to do with interfoam. Use pointwise or snappy to generate the geometry you need, and then run it using whatever OF solver you want.
Santiago is offline   Reply With Quote

Old   May 30, 2018, 04:34
Default
  #6
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
No, I simply wish to implement interFoam where my initial fluid geometries are non-rectangular.
cuikahlil is offline   Reply With Quote

Old   May 31, 2018, 03:29
Default
  #7
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 638
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
For setFields, you can just make your box extend to outside your domain, so with a flat surface, you can still use a box. I guess this would work:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

zWater = 700

defaultFieldValues
(
    volScalarFieldValue alpha.water 0
);

regions
(
    // Set cell values
    // (does zerogradient on boundaries)
    boxToCell
    {
        box (-999 -999 -999) (999 999 $zWater);

        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }

    // Set patch values (using ==)
    boxToFace
    {
        box (-999 -999 -999) (999 999 $zWater);

        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }
);

// ************************************************************************* //
tomf is offline   Reply With Quote

Old   May 31, 2018, 05:23
Default
  #8
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Thank you very much! I'll give it a try. A friend also mentioned to me that I can manually set the water domain in 0/alpha.water by typing 1 in the face where I want water to be. I guess this is not the most elegant solution, but as long as my mesh is not super fine, it should be manageable.
cuikahlil 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
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 07:34
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
Gambit problems Althea FLUENT 22 January 4, 2017 03:19
[ANSYS Meshing] Combine solid mesh generated in workbench mesh and fluid mesh in fluent meshing ? RPjack ANSYS Meshing & Geometry 2 August 27, 2015 09:33
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21


All times are GMT -4. The time now is 11:35.