CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   chtMultiRegionFoam (http://www.cfd-online.com/Forums/openfoam/99561-chtmultiregionfoam.html)

samiam1000 April 6, 2012 06:56

chtMultiRegionFoam
 
Dear all,

just a very fast question: what about the changeDictionaryDict dictionary in chtMultiRegionFoam?

Should I edit them on my own or I can use a command that prepares them and then I fix the BC that I want to?

Thanks a lot,

Samuele

wyldckat April 6, 2012 17:28

Quick answer: "changeDictionaryDict" exists to make life easier for repetitive or automated dictionary editing.
Example: it's a fast way for reseting multiple boundary fields, after a failed execution of setFields.

samiam1000 April 10, 2012 04:41

Dear Bruno, Dear all,

thanks for this answer, too.

Also, sorry if I opened different threads, but I thought it was easier to manage the discussions.

Anyway, I looked at the user guide and I am finding it difficult to understand how to use the chtMultiRegion solver.

Could you give me a very brief explanation of the steps?

Let me explain my case:

1. I import a .msh mesh from Ansys.

2. I have this situation:
- a 0 folder with the following files: epsilon, k, p, p_rgh, T, U, Tchar, Ypmma
- a constant folder with some subfolders and the regionProperties file. The subfolders are the following:
door_and_roof, external_air, internal_air and polyMesh
- the system folder.

3. I now give the fluent3DMeshToFoam command and in the polymesh subfolder some files are created: boundary, cellZones, faces, faceZones, neighbour, owner, points, pointZones

4. the cellZone is the file where I have all the info about the different zones.

5. the topoSetDict (in the system subfolder) is the following:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  dev                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    {
        name    door_and_roof;
        type    cellZoneSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            set door_and_roof;          // name of cellSet
        }
    }

    {
        name    internal_air;
        type    cellZoneSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            set internal_air;          // name of cellSet
        }
    }

    {
        name    external_air;
        type    cellZoneSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            set external_air;          // name of cellSet
        }
    }

);

// ************************************************************************* //


Is that correct? What should I do, then?

Thanks for your help,

Samuele

samiam1000 April 11, 2012 09:36

Dear All,

I am ready to run my case. There is one more problem. I think it's something linked with the BC.

I get this:
Code:

lab@lab-laptop:~/Documenti/cases_OF/OF_case11_test$ chtMultiRegionFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : chtMultiRegionFoam
Date  : Apr 11 2012
Time  : 15:23:03
Host  : "lab-laptop"
PID    : 8053
Case  : /home/lab/Documenti/cases_OF/OF_case11_test
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region internal_air for time = 0

Create fluid mesh for region external_air for time = 0

Create solid mesh for region door_and_roof for time = 0

*** Reading fluid mesh thermophysical properties for region internal_air

    Adding to thermoFluid

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::hRhoThermo(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#5  Foam::basicRhoThermo::addfvMeshConstructorToTable<Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > > >::New(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#6  Foam::basicRhoThermo::New(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#7 
 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
#8  __libc_start_main in "/lib/libc.so.6"
#9 
 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
Floating point exception

What can I do? Are che `changeDictionary' files compulsory?

Thanks a lot,

Samuele

wyldckat April 11, 2012 16:42

Hi Samuele,

I'll have to be quick... This seems to indicate that there was a division by zero or by infinity or a log(0), when defining the thermodynamic properties:
Quote:

Originally Posted by samiam1000 (Post 354184)
Code:

#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3 Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::hRhoThermo(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"


Quote:

Originally Posted by samiam1000 (Post 354184)
Are che `changeDictionary' files compulsory?

That dictionary can help you quickly re-apply boundary conditions. Read the file "system/changeDictionaryDict" and compare with what you got in the respective dictionaries, right before changeDictionary is called.

Best regards,
Bruno

sitekss April 30, 2012 05:02

Dear colleagues,

I'm trying to run chtMultiRgionHeater tutorial to understand how this stuff works. At first, I ran 'Allrun" but it created a few log files containing the information that changedictionary command were not found. it refeers to certain line in Allrun:

for i in bottomAir topAir heater leftSolig rightSolid
do
changeDictionary -region $i > log.changeDictionary.$i 2>&1
done

What's the problem and what can I do to fix it?

BR

Adam

dhruv May 3, 2012 03:05

Problem setting up chtMultiRegion Case
 
Hi Samiam,

I hope you managed to solve your problem and run your case. I am having some problems in running the case with chtMultiRegionFoam too.

I have two independent mesh, both meshed by snappyHexMesh. These two meshes together makes my complete geometry. With these two meshes, I create two cellZones. Now, to make the polyMesh directory of the base mesh, I mergeMesh the two meshes. Then, I use splitMeshRegions -cellZones -overwrite to update my mesh in two zones correctly, solid and fluid. When I run the case, I see that the temperature is not passed from the fluid side to the solid side. I use the standard BCs from the tutorial of chtMultiRegionHeater for the temperature field. When I run checkMesh on the base mesh, I see that it generates a message

Code:

The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0.0038/cellToRegion"

Can this be causing the problem? Or there is a problem in the BCs? Any help is very much appreciated.

Thanks,
Dhruv.

Quote:

Originally Posted by samiam1000 (Post 354184)
Dear All,

I am ready to run my case. There is one more problem. I think it's something linked with the BC.

I get this:
Code:

lab@lab-laptop:~/Documenti/cases_OF/OF_case11_test$ chtMultiRegionFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : chtMultiRegionFoam
Date  : Apr 11 2012
Time  : 15:23:03
Host  : "lab-laptop"
PID    : 8053
Case  : /home/lab/Documenti/cases_OF/OF_case11_test
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region internal_air for time = 0

Create fluid mesh for region external_air for time = 0

Create solid mesh for region door_and_roof for time = 0

*** Reading fluid mesh thermophysical properties for region internal_air

    Adding to thermoFluid

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::hRhoThermo(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#5  Foam::basicRhoThermo::addfvMeshConstructorToTable<Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > > >::New(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#6  Foam::basicRhoThermo::New(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#7 
 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
#8  __libc_start_main in "/lib/libc.so.6"
#9 
 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
Floating point exception

What can I do? Are che `changeDictionary' files compulsory?

Thanks a lot,

Samuele


Linse May 3, 2012 11:05

I wonder why it would write to a folder 0.0038/cellToRegion. At which timestep do you start?
I would suggest to have a look into your system/controlDict and check if it really works from the correct timestep...

Though I would not know how this problem comes into existence...

dhruv May 3, 2012 11:28

checkMesh
 
Oh.. this is because I used checkMesh -latestTime. Otherwise, I start from 0 timestep.

Quote:

Originally Posted by Linse (Post 359129)
I wonder why it would write to a folder 0.0038/cellToRegion. At which timestep do you start?
I would suggest to have a look into your system/controlDict and check if it really works from the correct timestep...

Though I would not know how this problem comes into existence...


dhruv May 7, 2012 03:11

Problem setting up chtMultiRegion Case
 
Ok... so, I did a little more investigation into the case, and found out that, when the splitMeshRegions is used in the chtMultiRegionFoam tutorial, it generates some intermediate patches at the interface, e.g bottomair_to_heater, etc. However, when I use splitMeshRegions to split my base mesh, it does not generate these patches. I think therein lies the problem. Now, as I understand, in tutorial, the regions are created from a single base mesh, and hence the creation of intermediate patches are necessary. In my case, I have two separate mesh. Is it necessary here too? How can I resolve this? Please, any suggestions.

Thanks,
Dhruv.

helmut May 7, 2012 14:03

What information do you get in "0.0038/cellToRegion"? Could the existence of regions not connected by any faces be caused by the interfaces not being everywhere coincident?

dhruv May 8, 2012 05:03

Problem setting up chtMultiRegion Case
 
Quote:

Originally Posted by helmut (Post 359785)
What information do you get in "0.0038/cellToRegion"? Could the existence of regions not connected by any faces be caused by the interfaces not being everywhere coincident?

Hi Helmut,

Thanks for the response. What do you exactly mean by coincident? I have two regions in my mesh. If I view them in parafoam, they perfectly align over each other.

helmut May 8, 2012 09:17

I was just thinking you might have some small void spaces between the two mesh patches that form the interface. This could happen, for example, if the interface is a curved surface and the two zones have been independently snappyHex'd.

dhruv May 9, 2012 02:43

Problem setting up chtMultiRegion Case
 
Yes, i have meshed the two zones separately by snappy. So, i just made two cases, which have the same geometry and blockMesh, and changed the locationInMesh in both, to generate my solid and fluid region. Thereafter, I created zones in these meshes, and used mergeMesh to create my base mesh for chtMultiRegionFoam. Is there any other way that I can do this? Please suggest me.

Quote:

Originally Posted by helmut (Post 359935)
I was just thinking you might have some small void spaces between the two mesh patches that form the interface. This could happen, for example, if the interface is a curved surface and the two zones have been independently snappyHex'd.


raghu.tejaswi June 4, 2012 10:02

Quote:

Originally Posted by samiam1000 (Post 354184)
Dear All,

I am ready to run my case. There is one more problem. I think it's something linked with the BC.

I get this:
Code:

lab@lab-laptop:~/Documenti/cases_OF/OF_case11_test$ chtMultiRegionFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : chtMultiRegionFoam
Date  : Apr 11 2012
Time  : 15:23:03
Host  : "lab-laptop"
PID    : 8053
Case  : /home/lab/Documenti/cases_OF/OF_case11_test
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region internal_air for time = 0

Create fluid mesh for region external_air for time = 0

Create solid mesh for region door_and_roof for time = 0

*** Reading fluid mesh thermophysical properties for region internal_air

    Adding to thermoFluid

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::hRhoThermo(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#5  Foam::basicRhoThermo::addfvMeshConstructorToTable<Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > > >::New(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#6  Foam::basicRhoThermo::New(Foam::fvMesh const&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#7 
 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
#8  __libc_start_main in "/lib/libc.so.6"
#9 
 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
Floating point exception

What can I do? Are che `changeDictionary' files compulsory?

Thanks a lot,

Samuele

Hi samiam1000,

Have you been able to solve your problem. Can you please share the solution too?
I feel there might be a problem in inputting the values in thermophysicalproperties....

Thanks.....
Raghu


All times are GMT -4. The time now is 13:35.