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

Mapped boundary condition implementation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2023, 14:56
Default Mapped boundary condition implementation
  #1
New Member
 
Alessandro Spreafico
Join Date: Jan 2023
Posts: 4
Rep Power: 3
Ale1542 is on a distinguished road
Dear Foamers,
I've recently struggled to implement a mapped boundary condition on a backward facing step geometry in order to achieve a fully developed turbulent flow. In particular, I tried to map the velocity field at the inlet from a plane at a fixed distance downstream. Briefly, the simulation is intended to be a simple conjugated heat transfer problem in which the fluid domain is thermally coupled with the solid domain. The solid domain is composed by the lower wall (internally heated) and the step wall (not heated), whereas the working fluid is liquid sodium (cf. attached image). I used "topoSet" and "splitMeshRegions" to create the three regions, namely Fluid, ColdWall and Hotwall.
To implement the the fluid velocity inlet boundary condition, I first edited the constant/polymesh/boundary file as follows:
Code:
boundary
(
    inlet
    {
          type 		mappedPatch;
	  sampleRegion	Fluid;
	  sampleMode	nearestCell;
	  samplePatch	none;
	  offsetMode	uniform;
	  offset		(0.15 0 0);

        faces
        (
            (0 11 14 3)
            (3 14 16 5)
        );
    }
Then I also modified the constant/Fluid/polymesh/boundary file as follows:
Code:
(
    inlet
    {
        type                 mappedPatch;
        inGroups           List<word> 1(mappedPatch);
        nFaces              2000;
        startFace           887980;
        sampleMode      nearestCell;
        sampleRegion    Fluid;
        offsetMode        uniform;
        offset               (0.150 0 0);
    }
Finally, I edited the 0/Fluid/U file:
Code:
boundaryField
{
    inlet
    {
        type           	 	mapped;
        value                  	uniform (0.0523 0 0);
	interpolationScheme	cell;
	setAverage		true;
	average			(1 0 0);
    }
Now, when I try to run chtMultiRegionFoam, OpenFoam throws the following error:
Code:
Region: Fluid Courant Number mean: 0.00601751 max: 0.0959633
Region: ColdWall Diffusion Number mean: 0.00874827 max: 0.226531
Region: HotWall Diffusion Number mean: 0.00989324 max: 0.226531
--> FOAM Warning :
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 853
    Caught FatalError
--> FOAM FATAL ERROR:

    request for objectRegistry region0 from objectRegistry bfs failed
    available objects of type objectRegistry are

3
(
HotWall
ColdWall
Fluid
)
Why is it complaining about the "region0"? Is it something that has to do with the "sampleRegion" option of mappedPatch class? Can someone kindly explain to me what is the meaning of the error and how to fix it? It would be of great help. Thank you in advance.
P.S.: to better under the problem I'm trying to solve, you can have a look to the paper "Reference numerical database for turbulent flow and heat transfer in liquid metals" by Shams et al. (3rd paragraph).
Ale1542 is offline   Reply With Quote

Old   April 24, 2023, 17:57
Default
  #2
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
Hello Alessandro,

Did you resolve the issue? I am trying to simulate a pipe flow using mapped B.C. However it look very strange since it produce only smooth averaged look profile of velocity while the simulation is LES.
sinatahmooresi is offline   Reply With Quote

Old   June 14, 2023, 09:36
Default
  #3
New Member
 
Alessandro Spreafico
Join Date: Jan 2023
Posts: 4
Rep Power: 3
Ale1542 is on a distinguished road
Hi, sorry for the very late reply. Concerning the forward step case, I was able to solve the problem by first simulating just the entrance channel until I got a fully developed flow. Eventually, I used the outlet profile as initial condition for the inlet of the step simulation. (an other solution could be to make the entrance channel longer enough to let the flow develop upstream the step, hence w/o the need of an initial simulation). I recently worked on an other simulation with a periodic channel flow (w/o conjugate heat transfer), but in that case I just used the "cyclicAMI" BCs.
Ale1542 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
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 17, 2020 00:44
Cyclic boundary condition in foam-extend 4.0 rellumeister OpenFOAM Pre-Processing 2 March 3, 2020 09:03
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 02:44
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49


All times are GMT -4. The time now is 00:03.