|
[Sponsors] |
April 13, 2015, 06:19 |
and Multi Region Meshing
|
#1 |
Member
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12 |
Hi,
Can I use cfMesh for Multi Region Meshing like snappyHexMesh? Thanks |
|
July 10, 2015, 07:45 |
|
#2 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 14 |
You can.
Please find a sample case in attachment, the Allrun-file shows you the way to make the multi-region mesh. |
|
June 5, 2017, 16:37 |
|
#3 | |
New Member
Anonymous
Join Date: Mar 2017
Posts: 3
Rep Power: 9 |
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. |
||
June 6, 2017, 03:39 |
|
#4 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 14 |
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. |
|
June 6, 2017, 03:44 |
|
#5 |
New Member
Anonymous
Join Date: Mar 2017
Posts: 3
Rep Power: 9 |
Thanks. You saved me.
|
|
June 6, 2018, 10:26 |
|
#6 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
I think you should use nearestPatchFaceAMI, since your mesh at the interface is not conform. |
|
June 7, 2018, 02:39 |
|
#7 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 14 |
Yes, you are right.
|
|
March 7, 2019, 08:01 |
|
#8 |
New Member
Bastian Heitkötter
Join Date: Mar 2018
Posts: 3
Rep Power: 8 |
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? |
|
December 23, 2020, 10:19 |
it doesn't work
|
#9 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
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 |
|
December 23, 2020, 16:15 |
|
#10 |
New Member
Oleksiy Starykov
Join Date: Apr 2012
Posts: 4
Rep Power: 14 |
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. |
|
March 6, 2022, 08:49 |
Error with tubeStl case
|
#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 |
|
July 26, 2022, 03:50 |
|
#12 |
Senior Member
Join Date: Jan 2012
Posts: 197
Rep Power: 14 |
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 |
|
September 4, 2024, 00:10 |
example file not running
|
#13 |
New Member
Chaz
Join Date: Mar 2012
Posts: 24
Rep Power: 14 |
Hello,
Has anyone been able to get the sample file provided running? There have been a few issues noted in the thread, and in order to get close to have it running in of2312, there was a missing g file, missing "uniform" designation on boundary, and some other issues. Now, I get the following errors. changeDictionary is not changing the boundaries. It shows a warning, but if it is not executing, that My modified case is attached. Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : _e651d635-20240208 OPENFOAM=2312 patch=240220 version=2312 Arch : "LSB;label=32;scalar=64" Exec : changeDictionary -region pipe Date : Sep 03 2024 Time : 22:01:03 Host : zalbuntuSpeed PID : 83053 I/O : uncollated Case : /home/m/Sync/LNC_Sync/engineering/2024_08_foam_practice/07tubeStl nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20) 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 Warning : From int main(int, char**) in file changeDictionary.C at line 704 Requested field to change dictionaryReplacement does not exist in "/home/m/Sync/LNC_Sync/engineering/2024_08_foam_practice/07tubeStl/0/pipe" End Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : _e651d635-20240208 OPENFOAM=2312 patch=240220 version=2312 Arch : "LSB;label=32;scalar=64" Exec : chtMultiRegionFoam Date : Sep 03 2024 Time : 22:08:23 Host : zalbuntuSpeed PID : 88316 I/O : uncollated Case : /home/m/Sync/LNC_Sync/engineering/2024_08_foam_practice/07tubeStl nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create fluid mesh for region pipe for time = 0 Create solid mesh for region pipewall for time = 0 *** Reading fluid mesh thermophysical properties for region pipe Adding to thermoFluid Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectFluid; specie specie; energy sensibleEnthalpy; } --> FOAM FATAL ERROR: (openfoam-2312 patch=240220) Incorrect patch type wall for patch pipe_to_pipewall of field T in file "/home/m/Sync/LNC_Sync/engineering/2024_08_foam_practice/07tubeStl/0/pipe/T" Type should be a mappedPatch From static const Foam::mappedPatchBase& Foam::mappedPatchFieldBase<Type>::mapper(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = double] in file ./src/finiteVolume/lnInclude/mappedPatchFieldBase.C at line 954. FOAM exiting |
|
September 4, 2024, 04:29 |
|
#14 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,203
Rep Power: 28 |
Hello Chaz,
Your changeDictionaryDict uses a different syntax than the one in OpenFOAM-v2312. You need to update your changeDictionaryDict to match v2312 syntax. Errors using cfmesh and muliple regions (chtmultiregionsimplefoam) Cheers, Yann |
|
September 4, 2024, 19:29 |
It works!
|
#15 |
New Member
Chaz
Join Date: Mar 2012
Posts: 24
Rep Power: 14 |
Thank you Yann. Yes, you noted that I asked this question elsewhere, and you answered it already. My memory is failing.
For any future readers, please see the attached case that works in OF V2312 or similar. -.stl files are converted to meshes using cfmesh -the meshes at the boundary DO NOT conform, but heat flows across the boundary using mapping -result looks reasonable.... |
|
October 9, 2024, 08:28 |
|
#16 |
New Member
Skill-Lync CFD
Join Date: Sep 2024
Location: Chennai
Posts: 18
Rep Power: 2 |
Hi Yann,
How are the patches (pipe to pipe wall and pipe wall to pipe) mapped for chtMultiRegionFoam? The free version of cfMesh doesn't allow for multi-region mesh and sorely lacks this one capability. Even when we merge meshes, the mapping doesn't get done properly. Thanks Team Skill-Lync |
|
October 10, 2024, 06:42 |
|
#17 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,203
Rep Power: 28 |
Hello,
The usual workflow when meshing with snappy:
If you use mergeMeshes, you will end up with one single mesh for all regions, but with separate patches at the interface. This is probably why splitMeshRegions will not detect the interfaces and does not create it. After merging the meshes you should use something like stitchMesh to stitch your meshes together and remove the patches at interfaces before running splitMeshRegions. If you mesh each regions separately, you will probably not have conformal mesh at the interfaces, so I am not sure how stitchMesh will perform (there are several options to deal with conformal or not conformal meshes) The other way around could be to use createPatch to manually create interfaces between regions based on your existing patches. (possibly using cyclicAMI if your interfaces are non conformal). One more thought: I don't use cfMesh, but can't you mesh all your regions at once and define cellZones for each regions as it is done in snappy? How does it work when your need to define a cellZone somewhere in your mesh to do something with it later in your simulation? (like in fvOptions, or using MRF or whatever) Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] New multi region meshing tutorial with sHM | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 24, 2014 18:42 |
[snappyHexMesh] Multi Region Meshing | bruce | OpenFOAM Meshing & Mesh Conversion | 12 | July 31, 2013 11:09 |
[snappyHexMesh] Multi region meshing & recovering the original patch names | fluidpath | OpenFOAM Meshing & Mesh Conversion | 4 | May 19, 2013 20:13 |
[snappyHexMesh] Multi Region Meshing with sHM | marango | OpenFOAM Meshing & Mesh Conversion | 3 | March 27, 2012 01:51 |
Multi region meshing | noob@cfd | Siemens | 2 | March 26, 2012 13:32 |