MapField for different patch and mesh size
Hello all,
I have simulated my case in openfoam with the non staggered mesh. However, I'm going to use mapField utility to map for example velocity field on a rectangular staggered mesh. How can I do that? Is it possible?! Thank you in advance. |
How did you run an OpenFOAM case with a non-staggered mesh?
|
2 Attachment(s)
Ok, it was my bad explanation.
Let's consider this case in which you've modelled your case with the following mesh: Attachment 98214 now you are goiing to map the velocity field to the following mesh: Attachment 98215 The question is how it can be performed? |
Try to follow the steps in this post:
https://www.cfd-online.com/Forums/op...tml#post673845 If that does not work for some reason, report the error message here. Regards |
Dear NotOverUnderated,
Thank you for the reply. I am beginner in mapfield utility, and I need more details in order to handle my case. Could you provide me some more information regarding the procedures? Best |
I made some progress...
However, I have come across an error about number of target cells: Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/target$ mapFields -consistent -sourceTime 'latestTime' ../source/ why? It isn't possible to map from fine mesh to course mesh? |
Hi Saeed,
as far as I know, mapFields works perfectly fine with mesh with different size. I think the error you're getting is related to the number of patches which is different between the source case and the target case. I myself used mapFields only in some simple cases. If you're interested to get a quick overview about this utility check this video by József Nagy: https://youtu.be/qUMPdkvKBS8 I can find this thread that I think is related to your case: https://www.cfd-online.com/Forums/op...r-patches.html I hope this helps. Regards |
NotOverUnderated thanks again.
Yes, it was because of patch issues and I am doing map with different sizes and patches. However, I tried different commands for executation of mapField; case 1: Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/Target$ mapFields -consistent -sourceTime 'latestTime' ../source/ Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/Target$ mapFields -consistent -sourceTime 'latestTime' ../source/ -parallelSource Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/Target$ mapFields -sourceTime 'latestTime' ../source/ -parallelSourc |
By the way this is my mapFieldDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/source$ checkMesh Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/Target$ blockMesh |
1 Attachment(s)
Hi again,
I found the problem. The contents of the 0 folder must be inside the latest time (0.2 second) folder. Code:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/Target$ mapFields -sourceTime 'latestTime' ../source/ -parallelSource
Edit: keep in mind you should execute blockMesh in target directory before running the above command. |
That was the case where you can do maping for a specific period of time, now I would like to do maping over runtime through the following utility:
Code:
mapFields1 I have adopted it inside my controlDict: Code:
functions How can I adopt this part for my case? Regards |
I think you need to create a region. I have never done that myself before but I believe this is easy when checking the cavityMappingTest tutorials.
Code:
$FOAM_TUTORIALS/tutorials/incompressible/icoFoam/cavityMappingTest Code:
# create the coarse mesh |
Thanks for the information.
Code:
// Optional (inherited) entries However, in the cavityMappingTest tutorial the mapping over runtime has not mentioned. I would appreciate any help regarding this matter as well as any idea for mapping all of the time steps with postProcess utility. Thanks. |
In your question you're asking about mapRegion keyword not region keyword.
|
I am working on it, and it gave me some satisfactory feedback.
Tomorrow I will share my findings. Best |
3 Attachment(s)
Dear NotOverUnderated,
I followed the steps of cavityMappingTest, and finally became successful to perform mapping over runTime. However, I have come across another isssue with that. Original result:Attachment 98238 The interpolated results:Attachment 98239 & Attachment 98240 As you can see, when I use point data illustration, every thing got messed up! However, mapping of cell data illustration seems good. Does it depend on the factors of: Quote:
|
Any idea?:)
|
2 Attachment(s)
Finally, I found the problem.
The point is I should assign empty type to all patches in the blockMeshDict.course for my case. Code:
boundary Attachment 98268 & Attachment 98269 |
All times are GMT -4. The time now is 01:54. |