|
[Sponsors] |
March 29, 2010, 13:19 |
How to add 3rd region to chtMultiRegionFoam
|
#1 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
Has anybody tried to extend chtMultiRegionFoam to 3 regions? For example, in the current chtMultiRegionFoam example, there are 2 regions: a fluidRegion and a solidRegion. I'm trying to make a third region (let's just call it fluidRegion2).
I don't know how to modify the coupleManager files though. Specifically this part in chtMultiRegionFoam/coupleManager/coupleManager.C: Code:
bool Foam::coupleManager::regionOwner() const { const fvMesh& nbrRegion = neighbourRegion(); const regionProperties& props = localRegion_.objectRegistry::parent().lookupObject<regionProperties> ( "regionProperties" ); label myIndex = findIndex(props.fluidRegionNames(), localRegion_.name()); if (myIndex == -1) { label i = findIndex(props.solidRegionNames(), localRegion_.name()); if (i == -1) { FatalErrorIn("coupleManager::regionOwner() const") << "Cannot find region " << localRegion_.name() << " neither in fluids " << props.fluidRegionNames() << " nor in solids " << props.solidRegionNames() << exit(FatalError); } myIndex = props.fluidRegionNames().size() + i; } label nbrIndex = findIndex(props.fluidRegionNames(), nbrRegion.name()); if (nbrIndex == -1) { label i = findIndex(props.solidRegionNames(), nbrRegion.name()); if (i == -1) { FatalErrorIn("coupleManager::regionOwner() const") << "Cannot find region " << nbrRegion.name() << " neither in fluids " << props.fluidRegionNames() << " nor in solids " << props.solidRegionNames() << exit(FatalError); } nbrIndex = props.fluidRegionNames().size() + i; } return myIndex < nbrIndex; } |
|
April 3, 2010, 18:22 |
|
#2 |
New Member
Eugen
Join Date: May 2009
Location: Russia, Obninsk
Posts: 10
Rep Power: 17 |
For create a new region you don't need to modify coupleManager. Just create in your case new folder with 3rd region mesh like in tutorial. In regionPriperties you should put type of your region.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 05:04 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 05:38 |
[Other] Importing regions from 3rd party meshing programms | suitup | OpenFOAM Meshing & Mesh Conversion | 1 | November 10, 2009 10:40 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |