|
[Sponsors] |
Why does meshToMesh want "cuttingPatches" from the source mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2019, 04:09 |
Why does meshToMesh want "cuttingPatches" from the source mesh
|
#1 |
Member
Fabien Robaux
Join Date: Oct 2016
Posts: 51
Rep Power: 9 |
I everyone,
I already read pretty much all tread about meshToMesh (If I missed some, let me know =) ) but there is something I don't understand. I want to map a field which is defined on mesh externalPhiRegions[0] on a mesh completely included, fluidRegions[i]. I use the meshToMesh toolbox. Code:
meshToMesh mapper( externalPhiRegions[0], fluidRegions[i], meshToMesh::imCellVolumeWeight, patchMap, // patchMap, cuttingPatches, // cuttingPatches true ); The problem is I got a Fatal error as the cuttingPatch is not inside the externalPhiRegions[0] mesh (which name is of_GlobMesh). Code:
--> FOAM FATAL ERROR: Unable to find patch 'inlet' in mesh 'of_GlobMesh'. Available patches include: 6 ( front back LeftWall BottomWall RightWall athmosphere ) From function void Foam::meshToMesh::constructFromCuttingPatches(const Foam::word&, const Foam::word&, const Foam::HashTable<Foam::word>&, const wordList&, bool) in file meshToMesh/meshToMesh.C at line 789. Last edited by frobaux; June 4, 2019 at 06:21. |
|
June 5, 2019, 10:49 |
|
#2 |
Member
Fabien Robaux
Join Date: Oct 2016
Posts: 51
Rep Power: 9 |
I tried to do it manually, using the mapFieldsPar utility
(which uses the meshToMesh library, where mapFields uses the meshToMesh0) I obtain the same output (this time of_boxMesh3 is the source mesh) Code:
mapFieldsPar -sourceRegion of_boxMesh3 -targetRegion Hsl35 -fields '(Phi_interp)' ./ Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Source: "." "" Source region: of_boxMesh3 Target: "/home/robaux/These/HPC/IBMfs/CylinderVenugopal/TestConversionOF/nx60CFL200" "mergedboxMesh3" Target region: Hsl35 Create databases as time I/O : uncollated Case : /home/robaux/These/HPC/IBMfs/CylinderVenugopal/TestConversionOF/nx60CFL200/mergedboxMesh3 nProcs : 1 Overriding DebugSwitches according to controlDict meshToMesh 1; Overriding DebugSwitches according to controlDict meshToMesh 1; Source time: 6.7 Target time: 6.7 Create meshes Source mesh size: 1800 Target mesh size: 1341 Creating and mapping fields for time 6.7 --> FOAM FATAL ERROR: Unable to find patch 'inlet' in mesh 'of_boxMesh3'. Available patches include: 7 ( front back extInterpLeft extInterpBottom extInterpRight extInterpTop wallbox ) From function void Foam::meshToMesh::constructFromCuttingPatches(const Foam::word&, const Foam::word&, const Foam::HashTable<Foam::word>&, const wordList&, bool) in file meshToMesh/meshToMesh.C at line 789. FOAM exiting |
|
June 6, 2019, 05:24 |
|
#3 |
Member
Fabien Robaux
Join Date: Oct 2016
Posts: 51
Rep Power: 9 |
Well, I think I may have find the answer: A problem in the code of my OF version 1712, as well as in 1812:
lines are in src/sampling/meshToMesh/meshToMesh.C Code:
cuttingPatches_.setSize(cuttingPatches.size()); forAll(cuttingPatches_, i) { const word& patchName = cuttingPatches[i]; label cuttingPatchi = srcBm.findPatchID(patchName); if (cuttingPatchi == -1) { FatalErrorInFunction << "Unable to find patch '" << patchName << "' in mesh '" << srcRegion_.name() << "'. " << " Available patches include:" << srcBm.names() << exit(FatalError); } cuttingPatches_[i] = cuttingPatchi; } I tried to replace the "src" by "tgt" and it seems to work like a charm. In OpenFoam v6, corresponding line takes the mesh target, as well as in foam-extend 3.2. Should I do something about it? Post that somewhere or inform someone? Thanks a lot |
|
Tags |
cuttingpatches, interpolation, meshtomesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 03:04 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 06:42 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 10:57 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |