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

conjugateHeatFoam for 4 different regions

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 3 Post By benk

Reply
 
LinkBack Thread Tools Display Modes
Old   July 6, 2012, 21:04
Default conjugateHeatFoam for 4 different regions
  #1
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 5
lg88 is on a distinguished road
Hello everybody,
I am going to use conjugateHeatFoam to simulate a conduction problem in a multi region case, thus including solid regions and fluid regions. I am using OF 1.6-ext.
There are 4 different regions, corresponding to different materials: A and C are solids, B and D is fluid (laminar). All the mesh is hexa,
Can solver conjugateHeatFoam realize my need?Do I need to modify the solver code?
thank you very much!

regards!

lg88
Attached Images
File Type: png 11111111.png (2.0 KB, 28 views)
lg88 is offline   Reply With Quote

Old   July 9, 2012, 17:29
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings lg88,

In response to the private message you sent me:
I'm not familiar with conjugateHeatFoam. But I think that chtMultiRegionFoam should be able to solve this issue, but again, I'm not very familiar with either one of these solvers.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 9, 2012, 21:20
Default
  #3
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 5
lg88 is on a distinguished road
Thank you for your suggestion.But I am familiar with conjugateHeatFoam and my new solver is based on it.I hope use the solver to solve my problem.I found some information about the same problem I meet at [url]http://www.cfd-online.com/Forums/openfoam/89684-conjugateheatfoam-arbitrary-number-region.html.But there is not detailed construction.
Can anyone give me some idea?

Thank you very much!

lg88

Last edited by lg88; July 9, 2012 at 22:46.
lg88 is offline   Reply With Quote

Old   July 9, 2012, 21:34
Default
  #4
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Quote:
Originally Posted by lg88 View Post
Hello everybody,
I am going to use conjugateHeatFoam to simulate a conduction problem in a multi region case, thus including solid regions and fluid regions. I am using OF 1.6-ext.
There are 4 different regions, corresponding to different materials: A and C are solids, B and D is fluid (laminar). All the mesh is hexa,
Can solver conjugateHeatFoam realize my need?Do I need to modify the solver code?
thank you very much!

regards!

lg88
conjugateHeatFoam can only deal with two different regions, three or more regions are not allowed. Use chtMultiRegionFoam instead please.

Regards, Junwei
su_junwei is offline   Reply With Quote

Old   July 11, 2012, 00:25
Default
  #5
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 5
lg88 is on a distinguished road
hello
Thank you for your suggestion .I have checked in the forum and found that some people had applied conjugateHeatFoam to multi-regions successfully.And my new foam is developed based on the conjugateHeatFoam.

regards!

lg88
lg88 is offline   Reply With Quote

Old   July 13, 2012, 17:43
Default
  #6
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 10
benk is on a distinguished road
You need to edit the files attachPatches.H and detachPateches.H. You then have a main region and all other regions are treated as submeshes of the main region.

I've only done this for 3 regions, but 4 or more is definitely possible.

attachPatches.H (for 3 regions):

Code:
{
    const polyPatchList& patches = mesh.boundaryMesh();

    forAll (patches, patchI)
    {
        if (isType<regionCouplePolyPatch>(patches[patchI]))
        {
            const regionCouplePolyPatch& rcp =
                refCast<const regionCouplePolyPatch>(patches[patchI]);

            // Attach it here
            rcp.attach();
        }
    }

    // Force recalculation of weights
    mesh.surfaceInterpolation::movePoints(); 
    
    const polyPatchList& patches1 = separatorMesh.boundaryMesh();

    forAll (patches1, patchI)
    {
        if (isType<regionCouplePolyPatch>(patches1[patchI]))
        {
            const regionCouplePolyPatch& rcp =
                refCast<const regionCouplePolyPatch>(patches1[patchI]);

            // Attach it here
            rcp.attach();
        }
    }

    // Force recalculation of weights
    separatorMesh.surfaceInterpolation::movePoints();
    
    const polyPatchList& patches2 = positiveMesh.boundaryMesh();

    forAll (patches2, patchI)
    {
        if (isType<regionCouplePolyPatch>(patches2[patchI]))
        {
            const regionCouplePolyPatch& rcp =
                refCast<const regionCouplePolyPatch>(patches2[patchI]);

            // Attach it here
            rcp.attach();
        }
    }

    // Force recalculation of weights
    positiveMesh.surfaceInterpolation::movePoints();
}
detachPatches.H (for 3 regions):

Code:
{
    const polyPatchList& patches = mesh.boundaryMesh();

    forAll (patches, patchI)
    {
        if (isType<regionCouplePolyPatch>(patches[patchI]))
        {
            const regionCouplePolyPatch& rcp =
                refCast<const regionCouplePolyPatch>(patches[patchI]);

            // Detach it here
            rcp.detach();
        }
    }

    // Force recalculation of weights
    mesh.surfaceInterpolation::movePoints();

    const polyPatchList& patches1 = separatorMesh.boundaryMesh();

    forAll (patches1, patchI)
    {
        if (isType<regionCouplePolyPatch>(patches1[patchI]))
        {
            const regionCouplePolyPatch& rcp =
                refCast<const regionCouplePolyPatch>(patches1[patchI]);

            // Detach it here
            rcp.detach();
        }
    }

    // Force recalculation of weights
    separatorMesh.surfaceInterpolation::movePoints();
    
    const polyPatchList& patches2 = positiveMesh.boundaryMesh();

    forAll (patches2, patchI)
    {
        if (isType<regionCouplePolyPatch>(patches2[patchI]))
        {
            const regionCouplePolyPatch& rcp =
                refCast<const regionCouplePolyPatch>(patches2[patchI]);

            // Detach it here
            rcp.detach();
        }
    }

    // Force recalculation of weights
    positiveMesh.surfaceInterpolation::movePoints();
}
In the above, my submeshes are called "separatorMesh" and "positiveMesh".

Then in case/constant you have:
polyMesh/... (for the main mesh)
positive/polyMesh/... (for one submesh)
separator/polyMesh/... (for the other submesh)

In case/0 you have:
{fields for main mesh}
positive/{fields for positive mesh}
separator/{fields for separator mesh}
benk is offline   Reply With Quote

Old   July 14, 2012, 10:53
Default
  #7
New Member
 
kob
Join Date: Nov 2011
Posts: 28
Rep Power: 5
bryant_k is on a distinguished road
Thank you for your detailed construction.I am also looking for the multi-region function of conjugateHeatFoam.

Regards!

kob
bryant_k is offline   Reply With Quote

Old   July 14, 2012, 11:01
Default
  #8
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 5
lg88 is on a distinguished road
@benk
Thank you very much.I have modified my code as you said. Now it can work fluently and I am waiting for the results.Hoping it will work.

Regards!

lg88
lg88 is offline   Reply With Quote

Old   August 25, 2012, 15:17
Default
  #9
New Member
 
reza
Join Date: May 2012
Posts: 3
Rep Power: 5
ramon is on a distinguished road
can anyone send me a simple tutorial of conjugateHeatFoam for multiregion (2fluid & 1solid) ?
Can anyone give me some idea?
thanks
ramon is offline   Reply With Quote

Old   October 19, 2013, 22:35
Default
  #10
New Member
 
Maosong Cheng
Join Date: Aug 2012
Posts: 19
Rep Power: 4
mscheng is on a distinguished road
Quote:
Originally Posted by lg88 View Post
@benk
Thank you very much.I have modified my code as you said. Now it can work fluently and I am waiting for the results.Hoping it will work.

Regards!

lg88
Hi lg88,

In your case, can the boudaryField fully show in the solution file (such as T) using conjugateHeatFoam?

Thanks!
CHENG
mscheng is offline   Reply With Quote

Reply

Tags
conjugateheatfoam

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
beginners how to][convert binarySTL to asciiSTL with regions (good for SHM tutorial) soonic OpenFOAM Mesh Utilities 10 June 12, 2013 15:30
isolated fluid regions were found alfin CFX 9 October 12, 2011 06:45
Splitting regions king_steve STAR-CCM+ 1 September 27, 2010 12:48
how the interface between 2 solid regions is treater in chtMultiRegionFoam ? Cyp OpenFOAM 1 June 16, 2010 16:03
conjugateHeatFoam: Problems adding 3rd region benk OpenFOAM 5 April 21, 2010 12:46


All times are GMT -4. The time now is 22:29.