|
[Sponsors] |
How to Add STL file in setFieldsDict file to initialise water phase in multiphase |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 15, 2024, 15:33 |
How to Add STL file in setFieldsDict file to initialise water phase in multiphase
|
#1 |
New Member
BabuG
Join Date: May 2024
Posts: 14
Rep Power: 2 |
dears,
I am simulating a multiphase case. It is a square box with a complex shape region which is to be set a water. The complex shape is a combination of a cylinder with a cone. I was trying to add the STL file in the "setFieldsDict" file saved in folder constant. The corresponding STL (phase.STL) file is saved in working directory as suggested in one of the posts in this forum. However, the cell region within the phase.STL is not getting initialised properly. I played with different values for parameters "near distance" and "curvature" Kindly suggest better method. By the way I am using OpenFoam-12 version. I started with the tutorial dambreak3d case as base case. Further there is a file "topoSetDict". I have no idea if this file is to be modified. +++++++++++++++++File: setFieldsDict+++++++ defaultFieldValues ( volScalarFieldValue alpha.water 0 volVectorFieldValue U (0 0 0) ); regions // Select based on surface ( surfaceToCell // VOF initialization with a STL file (closed volume) { file "phase.stl"; outsidePoints ((0.0 0.0 0.13)); // definition of volume outside includeCut false; // cells cut by surface includeInside yes; // include cells inside surface includeOutside no; // exclude cells outside surface useSurfaceOrientation true; // use surface normals nearDistance -1; // cells with centre near surface curvature 0; // cells within nearDistance fieldValues ( volScalarFieldValue alpha.water 1 volVectorFieldValue U (0 0 0) ); } ); ++++++++++++++++++++++++++++++++++++++++++++ |
|
September 16, 2024, 04:36 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 698
Rep Power: 12 |
You are on the right path and the definition seems correct at first glance. Can you record and post the output of the command setFields here?
You can forget about topoSetDict for now, it is not relevant for the issue at hand. |
|
September 20, 2024, 05:29 |
|
#3 |
New Member
BabuG
Join Date: May 2024
Posts: 14
Rep Power: 2 |
Dear AtoHM,
Thank you for your response. Based on your response I modified the CylinderCone STL file. Actually I just compounded the two geometries in SALOME and used it. After your comment, I got the confidence on procedure and doubted STL file. So I converted the geometry to Solid using sewing option in SALOME. Now the setFieldsDict is working fine and water region is also correctly initiated. The correct setFieldsDict is: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue alpha.water 0 volVectorFieldValue U (0 0 0) ); regions // Select based on surface ( surfaceToCell // VOF initialization with a STL file (closed volume) { file "filename.stl"; outsidePoints ((0.0 0.0 0.13)); // definition of volume outside includeCut false; // cells cut by surface includeInside yes; // include cells inside surface includeOutside no; // exclude cells outside surface useSurfaceOrientation true; // use surface normals nearDistance -1; // cells with centre near surface curvature 0; // cells within nearDistance fieldValues ( volScalarFieldValue alpha.water 1 volVectorFieldValue U (0 0 0) ); } ); //NOTE: if "includeCut" is true, then "useSurfaceOrientation" should be false // and vice-versa. // One can play with values of "nearDistance" and "curvature". Thank you very much regards papaji |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 36 | July 16, 2024 04:52 |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
OpenFoam "Permission denied" and "command not found" problems. | iyidaniel@yahoo.co.uk | OpenFOAM Running, Solving & CFD | 11 | January 2, 2018 07:47 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |