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

Is there a way to define couple a wall with more than one wall in chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pete20r2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2018, 14:11
Default Is there a way to define couple a wall with more than one wall in chtMultiRegionFoam
  #1
New Member
 
Join Date: May 2018
Posts: 9
Rep Power: 8
Talaat is on a distinguished road
I have a geometry where I have a cylinder and inside it I have many smaller cylinders made of different materials. Is there a way I could define a mappedWall condition for the big cylinder's inner wall with each of the smaller cylinders' walls?

It's impractical to divide the big cylinder into the same number of regions. I have more than 50 cylinders inside.

Edit: I apologize about the typo in the title.
Talaat is offline   Reply With Quote

Old   July 17, 2018, 23:51
Default
  #2
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
I had a similar problem to this.
I found if I blockMesh the entire mesh, then use topSet to make cellZones, then used splitMeshRegions -cellZones the boundaries are automatically created in the form:
Code:
FoamFile
{
    version     0.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/cell_1/polyMesh";
    object      boundary;
}

    cell_1_to_channelT
    {
        type            mappedWall;
        inGroups        1 ( wall );
        nFaces          1600;
        startFace       445600;
        sampleMode      nearestPatchFace;
        sampleRegion    channelT;
        samplePatch     channelT_to_cell_1;
    }
There are 16 cells in my case all with contacts to the "channel" region.

By doing this and having default p,T,U fields in 0 when doing the split, I can control all of the patches in the similar regions by using a linux trick.
I create a system folder for cell_1 and then link the system folder for cell_2-16 to cell_1
I have this script in the system folder to make it quickly:
Code:
#!/bin/bash
cd ${0%/*} || exit 1    # run from this directory

for i in cell_2 cell_3 cell_4 cell_5 cell_6 cell_7 cell_8 cell_9 cell_10 cell_11 cell_12 cell_13 cell_14 cell_15 cell_16
do
   ln -s cell_1 $i
done
Then I setup a changeDictionaryDict file in system\cell_1 (which will now apply to all regions cell_x)
It's written using widcards for the region numbers so it can run on all regions:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
T
    {
        internalField   uniform 300;

		boundaryField
		{
    		"cell_.*_to_channel.*"
    		{
        		type            compressible::turbulentTemperatureCoupledBaffleMixed;
        		Tnbr            T;
        		thicknessLayers ( 1.5e-05 );
        		kappaLayers     ( 2 );
        		kappaMethod     solidThermo;
        		value           uniform 300;
Then just run changeDict on all regions and you should be good to go
Talaat likes this.
pete20r2 is offline   Reply With Quote

Old   July 18, 2018, 05:45
Default
  #3
New Member
 
Join Date: May 2018
Posts: 9
Rep Power: 8
Talaat is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
I had a similar problem to this.
I found if I blockMesh the entire mesh, then use topSet to make cellZones, then used splitMeshRegions -cellZones the boundaries are automatically created in the form:
Code:
FoamFile
{
    version     0.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/cell_1/polyMesh";
    object      boundary;
}

    cell_1_to_channelT
    {
        type            mappedWall;
        inGroups        1 ( wall );
        nFaces          1600;
        startFace       445600;
        sampleMode      nearestPatchFace;
        sampleRegion    channelT;
        samplePatch     channelT_to_cell_1;
    }
There are 16 cells in my case all with contacts to the "channel" region.

By doing this and having default p,T,U fields in 0 when doing the split, I can control all of the patches in the similar regions by using a linux trick.
I create a system folder for cell_1 and then link the system folder for cell_2-16 to cell_1
I have this script in the system folder to make it quickly:
Code:
#!/bin/bash
cd ${0%/*} || exit 1    # run from this directory

for i in cell_2 cell_3 cell_4 cell_5 cell_6 cell_7 cell_8 cell_9 cell_10 cell_11 cell_12 cell_13 cell_14 cell_15 cell_16
do
   ln -s cell_1 $i
done
Then I setup a changeDictionaryDict file in system\cell_1 (which will now apply to all regions cell_x)
It's written using widcards for the region numbers so it can run on all regions:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
T
    {
        internalField   uniform 300;

		boundaryField
		{
    		"cell_.*_to_channel.*"
    		{
        		type            compressible::turbulentTemperatureCoupledBaffleMixed;
        		Tnbr            T;
        		thicknessLayers ( 1.5e-05 );
        		kappaLayers     ( 2 );
        		kappaMethod     solidThermo;
        		value           uniform 300;
Then just run changeDict on all regions and you should be good to go
Thanks for your help. Did you have 16 channel.* regions? If so, did you use inletOutlet boundary condition for the velocity at the region interfaces or what condition did you use?
Talaat is offline   Reply With Quote

Old   July 19, 2018, 02:00
Default
  #4
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
I'm using a mapped inlet to develop the inlet velocity profile.
U is zeroGradient on outlet.
p is zeroGradient on inlet, fixedMean 0 on the outlet.
I know there are no flow reversals across my boudaries so I'm getting away with it, inletOutlet is a good idea to start with to improve the chances of getting a converged solution. Might not be accurate but will get you running.
There are 2 fluid channels contacting 16 solid regions, each solid region has a patch to each fluid region.
pete20r2 is offline   Reply With Quote

Old   December 3, 2024, 02:07
Default
  #5
New Member
 
Suhan Umur Okuducu
Join Date: Oct 2024
Posts: 20
Rep Power: 2
suoCFD is on a distinguished road
I wrote this with something misunderstanding.

Last edited by suoCFD; December 20, 2024 at 09:39.
suoCFD 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
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
[mesh manipulation] mergeMeshes problem Attesz OpenFOAM Meshing & Mesh Conversion 3 July 29, 2015 05:15
[ICEM] Export ICEM mesh to Gambit / Fluent romekr ANSYS Meshing & Geometry 1 November 26, 2011 13:11
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
REAL GAS UDF brian FLUENT 6 September 11, 2006 09:23


All times are GMT -4. The time now is 17:19.