|
[Sponsors] |
Undesired extrapolation when using mapFields/meshToMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 24, 2019, 15:19 |
Undesired extrapolation when using mapFields/meshToMesh
|
#1 |
New Member
Christian
Join Date: Jun 2019
Posts: 14
Rep Power: 7 |
Hi everyone,
I am using mapFields/meshToMesh functionality to map a scalar field at runtime between two meshes with inconsistent geometry. You can find images of source and target fields as well as their respective meshes in the attachments. To produce the mapped target field I'm using the following code in foam-extend 4.0.: Code:
// read the mapFieldsDict located in /case/system IOdictionary mapFieldsDict ( IOobject ( "mapFieldsDict", runTime.system(), runTime, IOobject::MUST_READ, IOobject::NO_WRITE, false ) ); HashTable<word> patchMap; wordList cuttingPatches; mapFieldsDict.lookup("patchMap") >> patchMap; mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches; // Create the interpolation scheme meshToMesh fluidToEmInterp ( mesh, //source mesh targetMesh, //target mesh patchMap, cuttingPatches ); // Interpolate field fluidToEmInterp.interpolate ( targetField, //target field sourceField, //source field meshToMesh::INTERPOLATE ); What really bothers me is the extrapolation of the targetField over the right boundary of the sourceMesh as illustrated in overlappingMeshes.jpg. How can I suppress this behavior? Best regards Christian |
|
October 15, 2019, 06:08 |
|
#2 |
New Member
Christian
Join Date: Jun 2019
Posts: 14
Rep Power: 7 |
I want to note that I still didn't resolve this issue. However, I found that this issue only occurs if fields are mapped from the smaller to the bigger mesh. The other way around works fine.
My current workaround is the following: Using two meshes that are identically built with blockMesh for the overlapping region. If I then want to copy field values from source to target mesh I do the following Code:
forAll(T, idx) { const scalar& cellT = T[idx]; Ttarget[idx] = cellT; } Code:
forAll(T, idx) { const scalar& cellT = T[idx]; Ttarget[idx] = 5.0*cellT + 10; //some arbitrary function: y=5*x + 10 } Data exchange for internal field values between two different mesh |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Export mesh statistics for use in Richardson Extrapolation for grid sensitivity study | JuPa | ANSYS Meshing & Geometry | 13 | July 5, 2018 09:35 |
ReactingFoam (w/ k-omega-SST): Error analysis using Richardson Extrapolation | JMDag2004 | OpenFOAM Verification & Validation | 1 | June 10, 2015 13:33 |
richardson extrapolation | Puigar | Main CFD Forum | 28 | March 13, 2013 13:18 |
Richardson extrapolation | pc | Main CFD Forum | 11 | March 8, 2013 07:50 |
Discretization error with Richardson extrapolation. | cfdstudent004 | CFX | 1 | May 29, 2012 20:04 |