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

Boundary conditions for Internal faces

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 4 Post By wyldckat
  • 6 Post By alientxtmsgs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2013, 07:38
Default Boundary conditions for Internal faces
  #1
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 14
Danath is on a distinguished road
Hello i want to set the boundary conditons for internal faces

i run simple
how to set the internal faces for P ,U i just want the fluid flow through the face and no special boundary condition

Last edited by Danath; April 16, 2013 at 08:04.
Danath is offline   Reply With Quote

Old   May 3, 2013, 05:02
Default
  #2
Senior Member
 
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18
openfoam_user is on a distinguished road
Dear Evangelos,

did you find an answer ?

I have the same kind of problem. I want to set a boundary condition for a patch inside the flow domain. Let me know.

Regards,
Stephane.
openfoam_user is offline   Reply With Quote

Old   May 3, 2013, 11:51
Unhappy
  #3
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 14
Danath is on a distinguished road
Quote:
Originally Posted by openfoam_user View Post
Dear Evangelos,

did you find an answer ?

I have the same kind of problem. I want to set a boundary condition for a patch inside the flow domain. Let me know.

Regards,
Stephane.
Hello ! No yet !

but if you want to connect volumes and eliminate the internal faces try " merge faces " using Gambit
Danath is offline   Reply With Quote

Old   May 4, 2013, 20:22
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Greetings to all!

Quote:
Originally Posted by openfoam_user View Post
I want to set a boundary condition for a patch inside the flow domain.
It's possible to do this, but it depends on what exactly you want to do.

For example, there is a tutorial named "TJunctionFan", located in "incompressible/pimpleFoam/TJunctionFan", which creates a cyclic baffle. It then uses a special boundary condition of type "fan"... well, the specifics are in the file "system/createBafflesDict" and in "system/topoSetDict" you can see how the cell faces are selected for later converting to the cyclic baffles.

@Evangelos: creating a faceSet or faceZoneSet might be enough, if you want to calculate the mass-flow going through the selected faces, or some kind of value monitor. These are selected using topoSet, as described in the aforementioned tutorial.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 13, 2014, 20:40
Default
  #5
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 43
Rep Power: 13
DineshramBalaji is on a distinguished road
Hi ,

I have created a solid sheet patch inside a fluid domain in salome and imported to fluent. the internal patch has been defined in face zones. I want to define it as a wall and specify some field values for it. Can someone help me on this?
DineshramBalaji is offline   Reply With Quote

Old   January 26, 2014, 14:01
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Greetings Dinesh,

If you can provide a small example case, it would be easier to help you.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 26, 2014, 14:03
Default
  #7
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 43
Rep Power: 13
DineshramBalaji is on a distinguished road
Hi Bruno,

Thanks for the help. I can work and see on it.
DineshramBalaji is offline   Reply With Quote

Old   January 26, 2014, 15:07
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
By the way, doesn't this page explain what you are trying to do? http://openfoamwiki.net/index.php/Ho...internal_walls
wyldckat is offline   Reply With Quote

Old   January 26, 2014, 15:31
Default
  #9
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 43
Rep Power: 13
DineshramBalaji is on a distinguished road
Hi Bruno,

I created a large box. Inside which i created a duct, as a solid domain. Then I used partition operation for two bodies.

The boundaries are created in the face zone of the polymesh. I need to create a temperature boundary condition in the walls in the 0 directory. But I cant find the boundary condition for the walls.

This is my problem.
DineshramBalaji is offline   Reply With Quote

Old   January 26, 2014, 15:51
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Hi Dinesh,

Mmm... OK, then if the instructions at http://openfoamwiki.net/index.php/Ho...internal_walls don't do what you need, then I need an example case so that I can test this myself.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 26, 2014, 16:05
Default
  #11
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 43
Rep Power: 13
DineshramBalaji is on a distinguished road
Hi,

If you can send ur email id, I can send the case to you directly.
DineshramBalaji is offline   Reply With Quote

Old   January 29, 2014, 22:34
Default
  #12
New Member
 
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12
alientxtmsgs is on a distinguished road
Greetings everyone,

I have been running into a related issue with my simulation, although it may be an even simpler case. I've been following along the $FOAM_RUN/tutorials/incompressible/pimpleFoam/TJunctionFan tutorial to see if I can create a baffle in my domain.

My general procedure so far has been to first define my topoSetDict to create a faceZone that will then be converted into an internal wall with createBaffles.

The actions field inside my topoSetDict looks like:

PHP Code:
actions
(
    {
        
name    baffleFaces;
        
type    faceZoneSet;
        
action  new;
        
source  boxToFace;
        
sourceInfo
        
{
            
box (2.32 1.4 0) (5.6 1.4 1.15);
        }
    } 
However, I do not quite understand the boxToFace option. I want to convert a plane that coincides with cell faces in my domain. For this reason, I have attempted to define a plane in the "box" field and I am not sure if this is the correct way to proceed. It does not give me any errors when I run topoSet, but when I view the newly generated sets and zones in paraView, the plane seems to be defined in the correct location but it does not extend to the bottom of my domain like it should.

Any help would be greatly appreciated!

Regards,
Steven
alientxtmsgs is offline   Reply With Quote

Old   January 30, 2014, 23:28
Default
  #13
New Member
 
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12
alientxtmsgs is on a distinguished road
Hello all,

I seem to have solved my problem. For those that are interested, I will explain what I did in order to create my infinitely thin wall. Please forgive me if my explanation isn't technically sound, it is merely how I understand it.

What I needed was essentially a vertical partition in my wave flume to create a 180 degree bend, essentially what is shown in my primitive drawing below (imagine the dots aren't there):
_________________________________________
|........ ___________________________________|
|_________________|

I needed it to behave as the external walls did with all the same initial and boundary conditions for k, epsilon, velocity, pressure, eddy viscosity, etc.

In the first step I created a topoSetDict with the following entries inside:
PHP Code:
{
        
name    baffleFaces;
        
type    faceSet;
        
action  new;
        
source  boxToFace;
        
sourceInfo
        
{
            
box (2.315 1.395 -0.05)(5.605 1.405 1.155);
        }
    }
    {
        
name    baffleFaces;
        
type    faceZoneSet;
        
action  new;
        
source  setToFaceZone;
        
sourceInfo
        
{
            
faceSet baffleFaces;
        }
    } 
The box I created in the topoSetDict enveloped the cell faces I needed to be converted into a faceZone (only slightly, by half a centimetre).

I ran topoSet after my mesh was created and was able to view the newly created "set" and "zone" in paraview (not yet a patch). To convert it to a wall I ran createBaffles with the following createBafflesDict entries:

PHP Code:
internalFacesOnly true;

baffles
{
    
baffleFaces
    
{
        
type        faceZone;
        
zoneName    baffleFaces;

        
patches
        
{
            
master
            
{
                
name            baffles;
                
type            wall;

                
patchFields
                
{
                    
epsilon
                    
{
                        
type            epsilonWallFunction;
                
value           uniform 0.1;
                    }
                    
k
                    
{
                        
type            kqRWallFunction;
                       
value           uniform 0.1;
                    }
                    
nut
                    
{
                        
type            nutkWallFunction;
                
value           uniform 0;
                    }
                    
nuTilda
                    
{
                        
type            zeroGradient;
                    }
                    
p_rgh
                    
{
                        
type            fixedFluxPressure;
                
value           uniform 0;
                    }
                    
U
                    
{
                        
type            fixedValue;
                        
value           uniform (0 0 0);
                    }
                }
            }
            
slave
            
{
                ${..
master}
            }
        }
    } 

After running createBaffles it output my new mesh to a new time directory so I changed my controlDict to start from the new time (0.001 sec). It now seems to be doing exactly as I hoped

If anyone who understands this better I would love to know if my procedure is standard, or if there is an easier way etc!

Hope it helps someone,
Steven


alientxtmsgs is offline   Reply With Quote

Old   February 2, 2014, 09:30
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Greetings to all!

@Dinesh:
Quote:
Originally Posted by DineshramBalaji View Post
If you can send ur email id, I can send the case to you directly.
Please use Dropbox or a similar service for uploading your case and then send me the link over private message: http://www.cfd-online.com/Forums/faq...ivate_messages
I ask this because otherwise your email will only get lost in the several other emails I get, which is why I like to keep OpenFOAM+forum related questions only on the forum itself, including private messages.


@Steven: Thanks for sharing the solution you've reached. And sorry, but I don't have time to go over the solution you've found .

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 11, 2019, 11:27
Default
  #15
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Good Day All


Sorry for reviving an old post but i think my question fits in here.
I have created internal faces similar to the original post
  • snappyhexmesh
  • toposet
  • createbaffles
I am trying to place a mass flow rate condition on my new baffle.
The inlet and outlet patches are pressure based and i am using bouyantSimpleFoam as the solver since i have a heating element in my mesh.
Below is my U file

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"
    "Box_walls|Box_pcb|Box_heater|Box_ppm"
    {
        type            noSlip;
    }
    Box_inlet
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
        inletValue      uniform (0 0 0);
    }
    Box_outlet
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
        inletValue      uniform (0 0 0);
    }
    "baffel1_master|baffel1_slave"
    {
        type            flowRateInletVelocity;
        massFlowRate    constant 0.000925;
        rhoInlet        1;          // estimate for initial rho
    }
}
and my p_rgh file
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 101325;

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"
        "Box_walls|Box_pcb|Box_heater|Box_ppm"
    {
        type            fixedFluxPressure;
        value           uniform 101325;
    }
    Box_inlet
    {
        type            fixedFluxPressure;
        value           uniform 101325;
    }
    Box_outlet
    {
        type            fixedFluxPressure;
        value           uniform 101325;
    }
    "baffel1_master|baffel1_slave"
    {
        type            fixedFluxPressure;
        value           uniform 101325;
    }
}
I get to the point of running the solver (the mesh is built and functional for this case) but when it attempts to calculate p_rgh I get the following error:
Quote:
FOAM FATAL ERROR
Continuity error cannot be removed by adjusting outflow.
Please check the velocity boundary conditions and/or run potentialFoam...
I think i am using an incorrect boundary condition on my baffle or even the wrong solver for this case (i have run the case using rhoPimpleFoam).
I have a zip of the case file but its too large to attach
I have attached a screenshot of the mesh. the solid white patch would the baffels. The inlet and outlet are on the right side. These are clips of the stl used to make the mesh.


Any advice welcome
Attached Images
File Type: jpg one.jpg (31.7 KB, 144 views)
File Type: jpg two.jpg (50.0 KB, 78 views)

Last edited by bullmut; April 11, 2019 at 11:36. Reason: attaching case file
bullmut is offline   Reply With Quote

Old   April 21, 2019, 07:47
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 answers:
  1. None of the patches seem to define a pressure value, which means that they are all inferred based on the pressure within the domain. If that is the case, then you must define an appropriate reference pressure point and position in "system/fvSolution", if I remember correctly... example: https://github.com/OpenFOAM/OpenFOAM...fvSolution#L87 - line 87.
  2. The solver you are using needs the "p" field as well, which if you don't define it correctly, will result in a broken "p_rgh": https://github.com/OpenFOAM/OpenFOAM...teFields.H#L70 - line 70, which means that at least the internal field is changed...
    • This to say that you might need to copy-paste-adapt the solver code and build it, to do the calculation the other way around.
  3. My guess is that the boundary conditions for the field "p" are incorrectly defined and result in a situation that it's not possible to flow fluid. See the tutorial cases for references...
  4. Oh, the outlet on the "p_rgh" should probably have a fixed value and not the fixed flux value.
  5. Suggestion: do a simple test case without your geometry, but with the same or similar inlet/outlet boundaries, so that you can more easily test for, if the current case is too slow to run.
__________________
wyldckat is offline   Reply With Quote

Old   June 26, 2019, 15:31
Default
  #17
New Member
 
Paras
Join Date: Jun 2019
Posts: 3
Rep Power: 6
CFD_Paras is on a distinguished road
@alientxtmsgs
I did exactly what you did and it worked. Now if I want to create inner walls which are not vertical or horizontal but inclined (60 degree) what should I choose? I cannot use box to face so what else can I use?
CFD_Paras is offline   Reply With Quote

Old   June 26, 2019, 15:37
Default
  #18
New Member
 
Paras
Join Date: Jun 2019
Posts: 3
Rep Power: 6
CFD_Paras is on a distinguished road
Quote:
Originally Posted by alientxtmsgs View Post
Hello all,

I seem to have solved my problem. For those that are interested, I will explain what I did in order to create my infinitely thin wall. Please forgive me if my explanation isn't technically sound, it is merely how I understand it.

What I needed was essentially a vertical partition in my wave flume to create a 180 degree bend, essentially what is shown in my primitive drawing below (imagine the dots aren't there):
_________________________________________
|........ ___________________________________|
|_________________|

I needed it to behave as the external walls did with all the same initial and boundary conditions for k, epsilon, velocity, pressure, eddy viscosity, etc.

In the first step I created a topoSetDict with the following entries inside:
PHP Code:
{
        
name    baffleFaces;
        
type    faceSet;
        
action  new;
        
source  boxToFace;
        
sourceInfo
        
{
            
box (2.315 1.395 -0.05)(5.605 1.405 1.155);
        }
    }
    {
        
name    baffleFaces;
        
type    faceZoneSet;
        
action  new;
        
source  setToFaceZone;
        
sourceInfo
        
{
            
faceSet baffleFaces;
        }
    } 
The box I created in the topoSetDict enveloped the cell faces I needed to be converted into a faceZone (only slightly, by half a centimetre).

I ran topoSet after my mesh was created and was able to view the newly created "set" and "zone" in paraview (not yet a patch). To convert it to a wall I ran createBaffles with the following createBafflesDict entries:

PHP Code:
internalFacesOnly true;

baffles
{
    
baffleFaces
    
{
        
type        faceZone;
        
zoneName    baffleFaces;

        
patches
        
{
            
master
            
{
                
name            baffles;
                
type            wall;

                
patchFields
                
{
                    
epsilon
                    
{
                        
type            epsilonWallFunction;
                
value           uniform 0.1;
                    }
                    
k
                    
{
                        
type            kqRWallFunction;
                       
value           uniform 0.1;
                    }
                    
nut
                    
{
                        
type            nutkWallFunction;
                
value           uniform 0;
                    }
                    
nuTilda
                    
{
                        
type            zeroGradient;
                    }
                    
p_rgh
                    
{
                        
type            fixedFluxPressure;
                
value           uniform 0;
                    }
                    
U
                    
{
                        
type            fixedValue;
                        
value           uniform (0 0 0);
                    }
                }
            }
            
slave
            
{
                ${..
master}
            }
        }
    } 

After running createBaffles it output my new mesh to a new time directory so I changed my controlDict to start from the new time (0.001 sec). It now seems to be doing exactly as I hoped

If anyone who understands this better I would love to know if my procedure is standard, or if there is an easier way etc!

Hope it helps someone,
Steven


I did exactly what you did and it worked. Now if I want to create inner walls which are not vertical or horizontal but inclined (60 degree) what should I choose? I cannot use box to face so what else can I use?
CFD_Paras is offline   Reply With Quote

Old   June 20, 2023, 13:41
Default
  #19
New Member
 
water
Join Date: Mar 2022
Posts: 2
Rep Power: 0
hideonramas777 is on a distinguished road
hi everyone, i am having the same problem, but its a boundary that is an artefact of using fluentMeshToFoam so i'm stuck with it.


the yellow wall is the wall i dont need for my simulation. i've set that boundary to internal and defined the initial conditions as type internal. this works just fine when i check my conditions (by typing paraFoam before running the sim) but upon running the sim, i get an error saying it cannot form a matrix for this wall. for the simpleFoam solver, i can use an internal condition as well (simpleFoam -listScalarBCs -listVectorBCs)

any ideas on how to fix it?

i have tried this and it doesnt work, openfoam does not expect wall_A and expects a ) or } https://openfoamwiki.net/index.php/H...internal_walls


thanks!
Attached Images
File Type: jpg Screenshot 2023-06-20 184038.jpg (24.3 KB, 15 views)
hideonramas777 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
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 7 December 15, 2020 13:06
ribbed channel / simpleFoam / boundary conditions beeo OpenFOAM Pre-Processing 20 July 17, 2013 08:39
Please help with flow around car modelling! Tudor Miron CFX 17 March 19, 2004 19:23


All times are GMT -4. The time now is 23:48.