|
[Sponsors] |
March 21, 2023, 01:10 |
mapFields with different number of patches
|
#1 |
New Member
Abhijit
Join Date: Aug 2020
Location: India
Posts: 28
Rep Power: 6 |
I want to solve vortex-induced vibration of a cylinder in a duct. I have solved the flow in a duct without the cylinder and then I want to map the fields from the cylinder-less problem to the problem with the cylinder in a duct. Both the geometries have same dimensions. But when I tried to map the fields the error comes:
--> FOAM FATAL ERROR: Incompatible meshes: different number of patches, fromMesh = 6, toMesh = 7 I think the reason is with the cylinder case I have to add the cylinder patch. Is there anyway to map the fields with different number of patches? I have attached the two meshes: without_cylinder.jpeg with_cylinder.jpeg Thank you in advance. |
|
March 22, 2023, 04:56 |
|
#2 |
Senior Member
|
Hi Redrakham,
mapFields can be used in various situations. I think you could learn from the clipped cavity tutorial. I think such a situation would apply for your case as well, where the cylinder patch would be part of the cuttingPatches in mapFieldsDict. Hope this helps. Tom |
|
March 23, 2023, 06:49 |
|
#3 |
New Member
Abhijit
Join Date: Aug 2020
Location: India
Posts: 28
Rep Power: 6 |
I have tried this but got the same error.
|
|
March 23, 2023, 06:56 |
|
#4 |
Senior Member
|
Well it would be helpful if you can share exactly what you typed, how your mapFieldsDict looks like and what the complete output says. Otherwise we can only guess what is going on.
Cheers, Tom |
|
March 23, 2023, 07:04 |
|
#5 |
New Member
Abhijit
Join Date: Aug 2020
Location: India
Posts: 28
Rep Power: 6 |
This is my mapFieldsDict:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object mapFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // patchMap ( ); cuttingPatches (cylinder1); My patch name for cylinder is cylinder1. This is the error I got: Build : v1906 OPENFOAM=1906 Arch : "LSB;label=32;scalar=64" Exec : mapFields -consistent -sourceTime latestTime ../without_cylinder1 Date : Mar 23 2023 Time : 15:10:01 Host : abhi PID : 24097 I/O : uncollated Case : /home/abhi/Turbulent/snappy_confined_2D/with_cylinder 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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Source: "/home/abhi/Turbulent/snappy_confined_2D" "without_cylinder1" Target: "/home/abhi/Turbulent/snappy_confined_2D" "with_cylinder" Create databases as time Source time: 600 Target time: 0 Create meshes Source mesh size: 161280 Target mesh size: 385248 --> FOAM FATAL ERROR: Incompatible meshes: different number of patches, fromMesh = 6, toMesh = 7 From function Foam::meshToMesh0::meshToMesh0(const Foam::fvMesh&, const Foam::fvMesh&) in file meshToMesh0/meshToMesh0.C at line 134. FOAM exiting If you want I can share the whole case. |
|
March 23, 2023, 07:57 |
|
#6 |
Senior Member
|
Hi,
Thanks for the extra information. Your problem is the consistent option. That is only valid if your geometry and boundary conditions are exactly the same. But as you have the cylinder, the geometry is no longer exactly the same. You may need to add all other patches to patchMap in you mapFieldsDict to copy the information on them from your empty domain case. Best Regards, Tom |
|
April 4, 2023, 08:35 |
|
#7 |
New Member
Abhijit
Join Date: Aug 2020
Location: India
Posts: 28
Rep Power: 6 |
Thank you for your prompt reply. If I made the two geometries identical with one case having cylinder and the other have not then it is running all right. Now if I want to map the field of without cylinder case to the case of having cylinder with bigger geometry then it shows error:
--> FOAM FATAL IO ERROR: size 385248 is not equal to the given value of 633468 file: /home/abhi/Turbulent/snappy_confined_2D/with_cylinder/0/nut From function Foam::Field<Type>::Field(const Foam::word&, const Foam::dictionary&, Foam::label) [with Type = double; Foam::label = int] in file /home/abhi/OpenFOAM-v1906/src/OpenFOAM/lnInclude/Field.C at line 221 My mapFieldsDict is Now: fields (U); patchMap (); cuttingPatches ( cylinder1 top bottom front back inlet outlet ); Can you please help me with that. Last edited by Redrakham; April 4, 2023 at 09:57. Reason: Grammatical error |
|
April 4, 2023, 10:19 |
|
#8 |
New Member
Abhijit
Join Date: Aug 2020
Location: India
Posts: 28
Rep Power: 6 |
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
use the message in macro DEFINE_PROFILE with parallel processor | alireza_T | Fluent UDF and Scheme Programming | 3 | May 11, 2022 03:08 |
[Other] Can't Shake Erros: patch type 'patch' not constraint type 'empty' | BrendaEM | OpenFOAM Meshing & Mesh Conversion | 12 | April 3, 2022 19:32 |
[snappyHexMesh] snappyHexMesh stuck when snap is turned on | yukuns | OpenFOAM Meshing & Mesh Conversion | 3 | February 2, 2021 14:05 |
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) | AndreP | STAR-CCM+ | 10 | August 2, 2018 08:48 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |