CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Mapping (interpolation) between two meshes

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2017, 06:15
Default Mapping (interpolation) between two meshes
New Member
Join Date: Mar 2010
Posts: 28
Rep Power: 16
Ebrahim is on a distinguished road

I have a Eulerian-Lagrangian coupled solver with particles. I use two meshes in the simulation, a fine mesh and a coarse one and I need to transfer particles between the two meshes during the solution.
I have faced an issue for lagrangian interpolation in parallel simulation and I will be thankful if someone can help me with that. Here is the problem description:

To do the interpolation between the two grids, I've used the same functions that are implemented in mapFields / mapFieldsPar. The major difference between the interpolation function of mapFieldsPar and the revised one in my solver is in the lagrangian interpolation part. In mapFieldsPar the particle clouds (here passiveParticleCloud) are constructed by reading the cloud directories (objects) in the case time directory, but in my solver the particle clouds (both source and target) are constructed in the solver main loop (as I need the particle data during the solution before they are written in the time directories).
Everything works fine for serial case. Even in the parallel case the Eulerian fields (e.g. velocity, pressure, etc) are interpolated correctly. But just for lagrangian interpolation of particles in parallel, I cannot get the right result. It seems that the host cell of the particle in the target mesh cannot be found in the function (in mapLagrangian.C):

 autoPtr<passiveParticle> newPtr
                            new passiveParticle
Actually, in the domain decomposition, the two meshes are not decomposed similarly, and processor K, for example, does not cover the same regions of the meshes. So, when the interpolation function in applied in processor K, it cannot find the target cell of particle i in the same processor because that cell is located in another processor. Would you let me know how I can solve my issue?

(When I forced the decomposition to be the same in both meshes, the interpolation works fine, but I cannot do such a decomposition in general case of unstructured meshes, I think.)

I'm wondering how mapFields can do parallel interpolations for Eulerian field values but not for lagrangian particles.

Thank you in advance
Ebrahim is offline   Reply With Quote

Old   March 31, 2017, 10:59
New Member
Join Date: Mar 2010
Posts: 28
Rep Power: 16
Ebrahim is on a distinguished road
For those who may find this post interesting:
I finally decided to use the approach mentioned in this link: Mapping Lagrangian particles
Ebrahim is offline   Reply With Quote

Old   June 15, 2020, 13:31
New Member
Jiaui Zhang
Join Date: Aug 2018
Location: Changsha, China
Posts: 17
Rep Power: 7
charryzzz is on a distinguished road
Hi Ebrahim

I am currently working on the two mesh method for the particle combustion simulation in the Eular-Lagrangian frame.

I am new to Openfoam, and I don't know how to add the mapFields / mapFieldsPar function to the solver, so could you please give me more information on the following issues:

1. What is the process of data exchange between the Lagrangian phase and gas phase in the coarse and fine meshes in your solver?
(Which gas phase properties (coarse mesh or fine mesh) are used as the input for the Lagrangian phase model? and to which gas phase (in coarse mesh or fine mesh) is the source phase generated by the particles transferred? )

2. Which part of codes in mapFields / mapFieldsPar are added in the solver? and where should it be added in the solver?

Thank you in advance

charryzzz is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interpolation with moving meshes Martijn CFX 6 January 10, 2020 03:59
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
fvMeshSubset and labelHashSet: mapping fields between the meshes Arnoldinho OpenFOAM Programming & Development 1 February 19, 2012 09:05
interpolation method on unstructured meshes harry Main CFD Forum 9 October 3, 2006 01:10
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19

All times are GMT -4. The time now is 15:20.