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

setFields does not recognize inlet patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2021, 06:49
Default setFields does not recognize inlet patch
  #1
New Member
 
Theresa
Join Date: Dec 2020
Posts: 2
Rep Power: 0
thesa is on a distinguished road
Hello everyone,

I created a mesh from a DEM of a river with snappyHexMesh. I did the spillway tutorial of openFoam and I want to apply the interFoam solver at my case. My problem is the following: in the setFieldsDict, I created a box around a part of my geometry, including the inlet patch. The setFields utility works, but it does not set the alpha values to 1 at the inlet and at the atmosphere patch , it does set the alpha values to 1 at the walls and at the internal mesh. I checked already the bounding box, it is large enough to cover the region.

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);
regions
boxToCell
{
box (-100 -10 -10) (100 20 30);
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

Any suggestions what might be wrong? How can I fix it?

Thank you for your replies!


regards,
Theresa
thesa is offline   Reply With Quote

Old   September 8, 2023, 16:45
Default Problem Solved?
  #2
New Member
 
Sarah Aguiar
Join Date: Sep 2023
Posts: 10
Rep Power: 2
Sarah_Ag is on a distinguished road
Hi, did you reach a solution? I'm having the same problem.
Sarah_Ag is offline   Reply With Quote

Old   September 11, 2023, 03:38
Default
  #3
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Hello

When applied to "PATCH", write as follows.


see: OpenFOAM-v2212/tutorials/multiphase/interFoam/RAS/DTCHull/system/setFieldsDict





defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

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

fieldValues
(
volScalarFieldValue alpha.water 1
);
}

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

fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/
Powered by Ennova : https://ennova-cfd.com/
Ennova's Channel Partners : http://www.wolfdynamics.com/
LongGe is offline   Reply With Quote

Old   September 12, 2023, 17:09
Default Had Tried
  #4
New Member
 
Sarah Aguiar
Join Date: Sep 2023
Posts: 10
Rep Power: 2
Sarah_Ag is on a distinguished road
Hi! thanks for the reply, i set my setFields like this:



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

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

regions
(
boxToCell
{
box (-10 0 -1) (57 20 1);

fieldValues
(
volScalarFieldValue alpha.water 1
);
}
boxToFace
{
box (0 0 -1) (0 20 1);

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



Then in 0 time the inlet bondary is ok! but in the follow time steps the bondary got the same problem, staying all water or partial water where should be just air. Like the pic.



Dis you saw something like this? have any tips?
Attached Images
File Type: jpeg inlet.jpeg (11.5 KB, 2 views)
Sarah_Ag is offline   Reply With Quote

Old   September 12, 2023, 18:09
Default
  #5
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Hello
What type of boundary conditions are you giving to the patch there? I mean, please indicate 0/alpha.* .
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/
Powered by Ennova : https://ennova-cfd.com/
Ennova's Channel Partners : http://www.wolfdynamics.com/
LongGe is offline   Reply With Quote

Old   September 13, 2023, 15:59
Default alpha.water
  #6
New Member
 
Sarah Aguiar
Join Date: Sep 2023
Posts: 10
Rep Power: 2
Sarah_Ag is on a distinguished road
Thanks for the reply, this is my alpha.water









ALPHA.WATER



/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5-dev |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type waveAlpha;
waveDictName waveDict;
value uniform 0;
}
frontAndBack
{
type empty;
}
wall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
}

// ************************************************** *********************** //
Sarah_Ag is offline   Reply With Quote

Old   September 13, 2023, 18:11
Default
  #7
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Hello



Maybe this is a "waveAlpha" problem. I don't know this type, so I can't judge if it is a bug or not.
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/
Powered by Ennova : https://ennova-cfd.com/
Ennova's Channel Partners : http://www.wolfdynamics.com/
LongGe is offline   Reply With Quote

Old   September 14, 2023, 16:58
Default Thank you
  #8
New Member
 
Sarah Aguiar
Join Date: Sep 2023
Posts: 10
Rep Power: 2
Sarah_Ag is on a distinguished road
I'll search about this. Thank you!
Sarah_Ag is offline   Reply With Quote

Reply

Tags
inlet, interfoam, setfields, setfieldsdict, snappy hex mesh


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
[Other] Wedge patch '*' is not planar LilumDaru OpenFOAM Meshing & Mesh Conversion 6 January 12, 2021 05:55
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 15:33
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) Aadhavan OpenFOAM Meshing & Mesh Conversion 2 March 8, 2018 01:47
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 13:38
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25


All times are GMT -4. The time now is 16:21.