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

Introducing changeDictionaryDict and topoSetDict files in chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2015, 14:44
Default Introducing changeDictionaryDict and topoSetDict files in chtMultiRegionFoam
  #1
New Member
 
Franco
Join Date: Sep 2015
Location: Montreal
Posts: 26
Rep Power: 11
fracasce is on a distinguished road
Hi,
here is a new OpenFoam user. I'm trying to solve a simple heat transfer exercise, i want to analyse the heat conduction through a 2D geometry. In this 2D geometry, there are several sub-regions and each sub-region has its own thermo-physical properties (see attached file). In order to do that, I'm using chtMultiRegionSimpleFoam.
Here's what I've done:
-I made the geometry and the mesh using Salome,
-I used the command idesUnvToFoam to create the polymesh directory into the constant folder,
- I used the command splitMeshRegions -cellZones -overwrite to to create the several sub-regions into the folders 0, constant and system,
I created the regionProperties files and I introduced the thermpphysicalproperties file.
Now, I need to modify the files into the system directory. However, I'm having troubles, since I don't know how to create the several changedirectoryDict files (in the sub-regions) and the topoSetDict file (in the system folder). So my questions are
  1. How can I create the changeDictionaryDict file for a complex geometry? I know that I need to introduce the boundary conditions, however, this is a long work for a complex geometry. Is there a command that creates these files (in the same way as idesUnvToFoam creates the boundary file) or do I need to write them by myself?
  2. What is the meaning of the topoSetDict file? I've found some tutorials using topoSetDict files (and some other tutorials that don't use this file) but it is still not clear to me what this file does: for instance, in this file there is something like this
    name wall;
    type cellSet;
    action new;
    source boxToCell;
    sourceInfo
    {
    box (0 0.4 0 )(1 0.6 0.1);
    }
    what does it mean cellSet, action new, sourceInfo and mostly, which coordinate should I enter in the box field?

Thank you very much!!!

Franco
Attached Images
File Type: png Screenshot from 2015-09-19 13:35:18.png (18.1 KB, 249 views)

Last edited by fracasce; October 5, 2015 at 11:42. Reason: I forgot to upload the attached file
fracasce is offline   Reply With Quote

Old   October 3, 2015, 12:00
Default
  #2
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12
esujby is on a distinguished road
I have the same problem, right now, i have a complex geometry with many 3D parts however ( a solar volumetric receiver), i have used snappyhexmesh to mesh my still files but i don't understand how to utilize changedictionarydict, if there is a single code to do it, that would be helpful.

Also if anyone can shed more light on how to set the changedictionarydict, that will be also helpful. thanks
esujby is offline   Reply With Quote

Old   October 3, 2015, 12:17
Default
  #3
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 12
jmdf is on a distinguished road
Hi,

the topoSet is used to create zones in the mesh, which can after be split into regions using the splitMeshRegions command. Has others uses but the objective here are the regions I think.

Anyway if you can create your regions converting the UNV file and using splitMeshRegions, you don't need to use topoSet, at least from my experience. I used the same procedure and the only thing I had to do was to rename the regions (they were created as domain*) and proceed to run the case.

About changeDictionaryDict, you can use the wildcard ".*" to give the same initial condition to every boundary. For example, if you have several outlets and all of them start with "outlet_" if you define in the changeDictionaryDict file as "outlet_.*" everyone of them are going to be defined in the same way.
What I had to do to make it work was to insert, in the 0 directory files, the name (only the name) of every boundary of the region. After doing this the wildcard and my changeDictionaryDict file were working very well.
jmdf is offline   Reply With Quote

Old   October 6, 2015, 16:24
Default ChangeDictionaryDict introduction
  #4
New Member
 
Franco
Join Date: Sep 2015
Location: Montreal
Posts: 26
Rep Power: 11
fracasce is on a distinguished road
Hi jmdf,
thank you very much for your reply, it's been very helpful. Howerver, I don't understand how to introduce the changeDictionaryDict file.

Quote:
Originally Posted by jmdf View Post
Hi,
About changeDictionaryDict, you can use the wildcard ".*" to give the same initial condition to every boundary. For example, if you have several outlets and all of them start with "outlet_" if you define in the changeDictionaryDict file as "outlet_.*" everyone of them are going to be defined in the same way.
What I had to do to make it work was to insert, in the 0 directory files, the name (only the name) of every boundary of the region. After doing this the wildcard and my changeDictionaryDict file were working very well.
Once I run the splitMeshRegion comand, I have several folders in 0, constant and system (each forlder representing a region): however, in the system subfolder, I don't have any changeDictionaryDict file. How do I introduce this file in each folder? Do I need to manually write this file for each subregion (taking into account that each region has its own surfaces), or is there an easier and faster way to do that?

Thanks by now
fracasce is offline   Reply With Quote

Old   October 6, 2015, 16:37
Default
  #5
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 12
jmdf is on a distinguished road
Hi,

you can copy the changeDictionaryDict file from any tutorial and then adjust it to your case, i'm not aware of any other way to do it.

Here comes handy the use of the wildcard ".*" to define several boundary conditions at the same time.

So basically i would do it like this:
1. Copy the dict file to every region on the system folder and adjust it to the case;
2. Run changeDictionary -region <region name> for every region you have;

Hope this helps!
jmdf is offline   Reply With Quote

Old   October 6, 2015, 20:48
Default
  #6
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12
esujby is on a distinguished road
Quote:
Originally Posted by jmdf View Post
Hi,

you can copy the changeDictionaryDict file from any tutorial and then adjust it to your case, i'm not aware of any other way to do it.

Here comes handy the use of the wildcard ".*" to define several boundary conditions at the same time.

So basically i would do it like this:
1. Copy the dict file to every region on the system folder and adjust it to the case;
2. Run changeDictionary -region <region name> for every region you have;

Hope this helps!

Thanks for your reply, i have done what you said, created a folder and copied the changedictionarydict, decomposepardict fvschemse and fvsolutions. for every single region. however i have a multiple geometries about 21 including inlet and outlet, with only 3 different solid regions(materials) and a single fluid. . how do i go about modifying the boundary? i am trying to say, i have no idea how it is structured

eg, i am trying to modify the changedictionarydict, bellow. i can easily guess what the individual lines mean but not the overall file. i am going to highlight the bits i don't understand the meaning in red. i would appreciate further clarifications.


Code:
dictionaryReplacement
{
    boundary
[COLOR="rgb(139, 0, 0)"]    {
        minY
        {
            type            patch;
        }
        minZ
        {
            type            patch;
        }
        maxZ
        {
            type            patch;[/COLOR]
        }
    }

    T
    {
        internalField   uniform 300;

        boundaryField
        {
            ".*"
            {
                type            zeroGradient;
                value           uniform 300;
            }
            "heater_to_.*"
            {
                type            compressible::turbulentTemperatureCoupledBaffleMixed;
                Tnbr            T;
                kappa           solidThermo;
                kappaName       none;
                value           uniform 300;
            }
            minY
            {
                type            fixedValue;
                value           uniform 500;
            }
        }
    }
}

Last edited by esujby; October 30, 2015 at 22:45.
esujby is offline   Reply With Quote

Old   October 7, 2015, 04:47
Default
  #7
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 12
jmdf is on a distinguished road
Hi,

I will try to explain what I understand from this file.

Quote:
Originally Posted by esujby View Post
dictionaryReplacement
{
boundary
[COLOR="rgb(139, 0, 0)"] {
minY
{
type patch;
}
minZ
{
type patch;
}
maxZ
{
type patch;
[/COLOR]
}
}
This part changes the type of boundary you have, in this tutorial these three boundaries work as inlet/outlet and so instead of a wall they need to be changed to a patch.
Converting a mesh from Salome, usually boundaries are defined as walls, so for the inlets/outlets you can use the changeDictionary tool or change it directly on the boundary file on the constant folder.


Quote:
Originally Posted by esujby View Post
dictionaryReplacement
{
boundary
[COLOR="DarkRed"][COLOR="rgb(139, 0, 0)"]
".*"
{
type zeroGradient;
value uniform 300;
}
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa solidThermo;
kappaName none;
value uniform 300;
}
minY
{
type fixedValue;
value uniform 500;
This part changes the boundaries on the 0 folder. Step by step it starts to define every boundary as zeroGradient using the wildcard ".*" then the boundaries that are shared between the heater and the other regions are defined as compressible::turbulentTemperatureCoupledBaffleMix ed and to finish the "minY" boundary is defined as fixedValue.

Remember that the names on this file are for the tutorial and so you have to change them according to your case.

Hope this helps
jmdf is offline   Reply With Quote

Old   October 13, 2015, 08:51
Default
  #8
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12
esujby is on a distinguished road
Hello,

Thanks very much for your reply, it has helped me allot in further defining my case, however, i am wondering,

since i have 21 changedict folders in the system folders for all my geometries, must i specify the following in each of the changedictionarydict in every single folder representing each geometry:

Code:
dictionaryReplacement
{
boundary
{
inlet
{
type patch;
}
outlet
{
type patch;
}
}

T
{
internalField uniform 300;

boundaryField
{
".*"
{
type zeroGradient;
value uniform 300;
}

Also, with regards to my case, i don't have a solid heater heating up the geometries per say. what i want to use is a non uniform heat flux boundary condition (result from monte carlo solar ray tracing), in table, grid, and or array format (100x 100 elements) representing the concentrated heat flux on a circle with 3cm radius propagating along one direction to heat up the wall and fluid regions and between the walls and fluid regions, there would be heat transfer interms of radiation, convection and conduction. this will be carried out in order to calculate the exit gas temperature. so i am wondering how to go about modifying the boundary section bellow. thanks

Code:
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa solidThermo;
kappaName none;
value uniform 300;
}
minY
{
type fixedValue;
value uniform 500;
}
}
}
}
thanks

Kind regards

Last edited by esujby; October 30, 2015 at 22:46.
esujby is offline   Reply With Quote

Old   October 28, 2015, 05:25
Default
  #9
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 12
jmdf is on a distinguished road
Hi,

regarding the first part, each region has its own boundaries so on the regions you need to change the boundary type you have to use the boundary type entries. For the initial conditions you need a changeDict file on every system folder with the conditions you want to used for each boundary.

The second part, to consider energy exchange between the regions the compressible::turbulentTemperatureCoupledBaffleMix ed is what you need to use.
The concentrated heat flux on a circle, if you create that zone/faceSet with topoSet and define on it the heat flux you want it might work although I never did something like that.

PS: sorry for my late response
jmdf is offline   Reply With Quote

Reply

Tags
changedictionary, chtmultiregionfoam, salome 7, toposetdict


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
Error in thermophysical properties (chtMultiRegionFoam) mukut OpenFOAM Pre-Processing 28 November 23, 2021 07:34
topoSetDict samiam1000 OpenFOAM 5 July 23, 2019 12:45
Turbulences from Toposetdict??? Ingenieur5 OpenFOAM Running, Solving & CFD 2 May 29, 2018 00:07
topoSetDict by Mesh from another Software Parisa_Khiabani OpenFOAM Pre-Processing 3 December 12, 2014 07:29
chtMultiRegionFoam Set-up michael157 OpenFOAM Pre-Processing 2 July 4, 2014 18:12


All times are GMT -4. The time now is 05:12.