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

Solver multiregion--boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2021, 07:44
Default Solver multiregion--boundary conditions
  #1
New Member
 
José Manuel Olmos Martínez
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Jose Manuel Olmos is on a distinguished road
Hi everyone,

I’m doing simulations of fluids containing a solute in a tubular pipe. The solute also can carry out a chemical reaction inside of the tube. Thus, I modified the “icoFoam” solver for considering the variation of its concentration by diffusion, convection and chemical reaction. The new code is running without problems (see Transport of solutes).

However, the geometry of the system is a bit more complicated. I also have a cylinder inside the pipe, that is where the solute can react. I mean, outside the cylinder, the solute only is transported (variation of the concentration by diffusion and convection). On the other hand, inside the cylinder, the solute is transported and also reacts (variation of the concentration by diffusion, convection and the chemical reaction). In the attached image, you can see the new geometry and the different “patches” that I have defined.

I have tried to modify again the solver. Based on the “chtMultiRegionFoam” solver, I have created two regions in the geometry: “Region 1” (including the patches “inlet”, “outlet” and “wall”) and “Region 2” (including the patches “C_up”, “C_down” and “C_wall”). The idea was the new code solved different equations in each region: “diffusion + convection” in “Region 1” and “diffusion+convection+reaction” in “Region 2”.

The code is running without errors. However, I have a problem with the boundary conditions. Particularly, I don’t know what type of boundary conditions I have to use at the inlet and outlet of the cylinder (I mean, the patches “C_down” and “C_up”). The fields in these patches should be “linked” to the values of the fields in zones of Region1 very close to them.

As a solution, I have created two new patches in “Region 1” next to “C_down” and “C_up” (“down” and “up”) and have used the boundary condition “mapped”. This is the corresponding “boundary” file of the folder “constant/polymesh”:

FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

8
(

//Region 1

inlet
{
type patch;
nFaces 42;
startFace 2003074;
}
outlet
{
type patch;
nFaces 40;
startFace 2003116;
}
wall
{
type wall;
inGroups List<word> 1(wall);
nFaces 20618;
startFace 2003156;
}
down
{
type patch;
nFaces 17616;
startFace 2023774;
}
up
{
type mappedPatch;
nFaces 17616;
startFace 2041390;
offset (0 0 0.0001);
sampleRegion region2;
sampleMode nearestPatchFace;
samplePatch C_up;
offsetMode uniform;
}

//Region 2

C_wall
{
type wall;
inGroups List<word> 1(wall);
nFaces 21840;
startFace 2059006;
}
C_down
{
type mappedPatch;
nFaces 3884;
startFace 2080846;
offset (0 0 0.0001);
sampleRegion region1;
sampleMode nearestPatchFace;
samplePatch down;
offsetMode uniform;
}
C_up
{
type patch;
nFaces 3884;
startFace 2084730;
}
The idea was to map the fields from “down” of “Region1” in the patch “C_down” of “Region2” and from “C_up” of “Region2” in “up” of Region1” (I also modified the files for the fields at t = 0). However, it’s not working correctly since the fields are not mapped (although the code compile and works without errors).

I don’t know if this type of simulations can be done with OpenFOAM, but I would be very grateful if anyone can help me with this issue.

Thanks in advance,
Jose Manuel
Attached Images
File Type: jpg Imagen1.jpg (60.1 KB, 11 views)
Jose Manuel Olmos 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
foam-extend-4.1 release hjasak OpenFOAM Announcements from Other Sources 19 July 16, 2021 05:02
Centrifugal fan j0hnny CFX 13 October 1, 2019 13:55
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05


All times are GMT -4. The time now is 07:31.