|
[Sponsors] |
May 30, 2018, 02:33 |
Mesh generated VOF fields (interFoam)
|
#1 |
New Member
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8 |
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! |
|
May 30, 2018, 03:20 |
|
#2 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
You mean like the interface being represented by a certain grid line?
|
|
May 30, 2018, 03:45 |
|
#3 |
New Member
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8 |
Yeah. Maybe a better way of saying this is how can I create a non-box geometry for air-water phases in interFoam?
|
|
May 30, 2018, 03:57 |
|
#4 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
||
May 30, 2018, 03:59 |
|
#5 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
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.
|
|
May 30, 2018, 04:34 |
|
#6 |
New Member
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8 |
No, I simply wish to implement interFoam where my initial fluid geometries are non-rectangular.
|
|
May 31, 2018, 03:29 |
|
#7 |
Senior Member
|
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 ); } ); // ************************************************************************* // |
|
May 31, 2018, 05:23 |
|
#8 |
New Member
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8 |
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.
|
|
|
|
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 |