|
[Sponsors] |
![]() |
![]() |
#1 |
Member
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 78
Rep Power: 11 ![]() |
Hi,
Can I use cfMesh for Multi Region Meshing like snappyHexMesh? Thanks |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 13 ![]() |
You can.
Please find a sample case in attachment, the Allrun-file shows you the way to make the multi-region mesh. |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Anonymous
Join Date: Mar 2017
Posts: 3
Rep Power: 8 ![]() |
Quote:
I think the file attached has different patches, as in, different walls are defined. What should I do to define separate regions (volumes) in the mesh. I am a beginner here, so please correct me if I'm wrong. |
||
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 13 ![]() |
Hi,
the multi-regions meshing algorithm is self-explained in Allrun-script, but I can explain it to you. First you need to create mesh for each region. Since cfmesh has no direct possibility for doing this, you can create two cases and generate mesh for each of them (with custom meshDict-settings): Code:
cartesianMesh -case cases/pipewall cartesianMesh -case cases/pipe Code:
cp -r cases/pipe/constant/polyMesh/ constant/pipe cp -r cases/pipewall/constant/polyMesh/ constant/pipewall Code:
dictionaryReplacement { boundary { pipe_to_pipewall { type mappedWall; sampleMode nearestPatchFace; sampleRegion pipewall; samplePatch pipewall_to_pipe; } } } You need to create such mappings for all inter-region boundaries in your system. Of course you need to properly set the heat transfer conditions at the boundaries, usually via changeDictionaryDict files. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Anonymous
Join Date: Mar 2017
Posts: 3
Rep Power: 8 ![]() |
Thanks. You saved me.
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 13 ![]() |
Hi!
I think you should use nearestPatchFaceAMI, since your mesh at the interface is not conform. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 13 ![]() |
Yes, you are right.
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
Bastian Heitkötter
Join Date: Mar 2018
Posts: 3
Rep Power: 7 ![]() |
Hi starykov,
I have a question about MultiRegion-Meshing with cfMesh. I have a case with 6 region andbe able to mesh them. But to run chtMultiRegionSimpleFoam I need the cellToRegion file in 0. How did you create it? |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 6 ![]() |
Hello,
I try to mesh multiregions, I found this topic and I try the case attached by starykov. When I do the Allrun command it complains with HTML Code:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
/* Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt *\
| Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com |
\*---------------------------------------------------------------------------*/
Build : 5.x-963176928289
Exec : C:/PROGRA~1/BLUECF~1/OpenFOAM-5.x/platforms/mingw_w64GccDPInt32Opt/bin/changeDictionary.exe -region pipe
Date : Dec 23 2020
Time : 15:04:35
Host : "PC_JULIEN"
PID : 9648
I/O : uncollated
Case : C:/PROGRA~1/BLUECF~1/OFUSER~1/run/CFMESH~1/forum/tubeStl
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh pipe for time = 0
Read dictionary changeDictionaryDict with replacements for dictionaries 1(dictionaryReplacement)
Reading polyMesh/boundary file to extract patch names
Loaded dictionary boundary with entries
3
(
minY
maxY
pipe_to_pipewall
)
Replacing entries in dictionary dictionaryReplacement
Loading dictionary dictionaryReplacement
--> FOAM FATAL ERROR:
cannot find file "C:/PROGRA~1/BLUECF~1/OFUSER~1/run/CFMESH~1/forum/tubeStl/0/pipe/dictionaryReplacement"
From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 522.
FOAM exiting
I work with bluecorecfd on windows 10. Best regards |
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 13 ![]() |
Hello,
for this particular problem you have to remove that dictionaryReplacement with {} parentheses in the dict file. The file format changed in the meantime. But there are other changes, you have to adjust your files. Look at the heater-tutorials in the heatTransfer directory and update them accordingly. |
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Aditya
Join Date: Jun 2021
Posts: 2
Rep Power: 0 ![]() |
Hi, after running Allrun with your case, it gives this error:
Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : _f3950763fe-20191219 OPENFOAM=1912 Arch : "LSB;label=32;scalar=64" Exec : changeDictionary -region pipewall Date : Mar 06 2022 Time : 18:17:54 Host : LAPTOP-TT50BSP8 PID : 21018 I/O : uncollated Case : /mnt/c/Users/Aditya/Desktop/learrn/tubeStl/tubeStl nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh pipewall for time = 0 Read dictionary changeDictionaryDict with replacements for dictionaries 1(dictionaryReplacement) Reading polyMesh/boundary file to extract patch names Loaded dictionary boundary with entries 4(minY maxY wall pipewall_to_pipe) Replacing entries in dictionary dictionaryReplacement Loading dictionary dictionaryReplacement --> FOAM Warning : From function int main(int, char**) in file changeDictionary.C at line 709 Requested field to change dictionaryReplacement does not exist in "/mnt/c/Users/Aditya/Desktop/learrn/tubeStl/tubeStl/0/pipewall" End |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Senior Member
Join Date: Jan 2012
Posts: 197
Rep Power: 13 ![]() |
Hi starykov
Though we apply nearestPatchFaceAMI in sampleMode (fields will be mapped in those two different regions in the process of simulation), the generated mesh in Paraview is still not conform, is there a way of creating a conformal mesh in this case in cfmesh? Looking forward to hearing from you. Best Regards, Kit |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] New multi region meshing tutorial with sHM | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 24, 2014 17:42 |
[snappyHexMesh] Multi Region Meshing | bruce | OpenFOAM Meshing & Mesh Conversion | 12 | July 31, 2013 10:09 |
[snappyHexMesh] Multi region meshing & recovering the original patch names | fluidpath | OpenFOAM Meshing & Mesh Conversion | 4 | May 19, 2013 19:13 |
[snappyHexMesh] Multi Region Meshing with sHM | marango | OpenFOAM Meshing & Mesh Conversion | 3 | March 27, 2012 00:51 |
Multi region meshing | noob@cfd | Siemens | 2 | March 26, 2012 12:32 |